/* ============================================================
   MoniTao — Système visuel « Console »
   Feuille unique : jetons, composants, chrome public, page
   d'accueil, gabarit d'article SEO, coquille applicative.

   :root                = Console Paper (fond clair, lecture)
   [data-theme="dark"]  = Console Dark  (outil, hero, chrome)

   Assemblée depuis les livrables Claude Design du 15/08/2026.
   Les valeurs de jetons sont contractuelles : toute modification
   doit être reportée dans le brief de direction artistique.
   ============================================================ */

/* ============================================================
   MoniTao — Console UI. HTML5 + CSS. Aucune dépendance.
   Jetons : :root = Console Paper. [data-theme="dark"] = Console Dark.
   ============================================================ */
:root {
  --bg-base:#FCFCFB; --bg-surface:#FFFFFF; --bg-raised:#F7F8F6; --bg-inset:#F1F3F0;
  --border:#E2E4E1; --border-strong:#CBCFC9;
  --text:#14181B; --text-muted:#6D757C; --text-faint:#8A939B;
  --ok:#15703F; --ok-bg:#EDF6F0; --ok-border:#C3DFCE;
  --warn:#8A5A00; --warn-bg:#FBF3E4; --warn-border:#E8D3A8;
  --crit:#B02121; --crit-bg:#FBEDEC; --crit-border:#EFC7C4;
  --info:#1C5F86; --info-bg:#EAF2F7; --info-border:#C2D8E5;
  --accent:#F0A02C; --accent-hover:#FFB44A; --accent-on:#17110A; --accent-text:#8A5A00;
  --mono:'IBM Plex Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
  --sans:'IBM Plex Sans',system-ui,-apple-system,Segoe UI,sans-serif;
  --r:3px; --r-pill:2px;
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:24px; --s6:32px; --s7:48px; --s8:64px; --s9:96px;
  --t:120ms ease-out;
}
[data-theme="dark"] {
  --bg-base:#0D1114; --bg-surface:#12161A; --bg-raised:#171C22; --bg-inset:#0A0D10;
  --border:#262D35; --border-strong:#333C46;
  --text:#E4E9EE; --text-muted:#8A949F; --text-faint:#5E6873;
  --ok:#4FBF6A; --ok-bg:#12251A; --ok-border:#1F4029;
  --warn:#E0A53A; --warn-bg:#251D0E; --warn-border:#463414;
  --crit:#F2685F; --crit-bg:#2A1413; --crit-border:#4A201E;
  --info:#5FA8D3; --info-bg:#0F1D26; --info-border:#1C3543;
  --accent-text:#F0A02C;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-base:#0D1114; --bg-surface:#12161A; --bg-raised:#171C22; --bg-inset:#0A0D10;
    --border:#262D35; --border-strong:#333C46;
    --text:#E4E9EE; --text-muted:#8A949F; --text-faint:#5E6873;
    --ok:#4FBF6A; --ok-bg:#12251A; --ok-border:#1F4029;
    --warn:#E0A53A; --warn-bg:#251D0E; --warn-border:#463414;
    --crit:#F2685F; --crit-bg:#2A1413; --crit-border:#4A201E;
    --info:#5FA8D3; --info-bg:#0F1D26; --info-border:#1C3543;
    --accent-text:#F0A02C;
  }
}
html,body { margin:0; background:var(--bg-base); }
*,*::before,*::after { box-sizing:border-box; }
:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

/* --- socle ------------------------------------------------ */
.mt-root { background:var(--bg-base); color:var(--text); font-family:var(--sans); font-size:15px; line-height:1.6; }
.mt-mono { font-family:var(--mono); }
.mt-label { font-family:var(--mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--text-muted); }
.mt-num { font-variant-numeric:tabular-nums; }
.mt-h1 { font-family:var(--mono); font-size:34px; font-weight:500; letter-spacing:-.035em; line-height:1.1; margin:0; }
.mt-h2 { font-family:var(--mono); font-size:26px; font-weight:500; letter-spacing:-.035em; line-height:1.1; margin:0; }
.mt-h3 { font-family:var(--mono); font-size:17px; font-weight:500; line-height:1.1; margin:0; }
a { color:var(--accent-text); text-underline-offset:3px; }
a:hover { color:var(--accent-hover); }
[data-theme="light"] a:hover, :root:not([data-theme="dark"]) a:hover { color:#6E4700; }

/* --- boutons ---------------------------------------------- */
.mt-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:var(--s2);
  font-family:var(--mono); font-size:13px; font-weight:500; letter-spacing:.02em;
  min-height:36px; padding:0 14px; border-radius:var(--r); border:1px solid transparent;
  background:transparent; color:var(--text); cursor:pointer; text-decoration:none;
  transition:background var(--t), border-color var(--t), color var(--t);
  white-space:nowrap;
}
.mt-btn--sm { min-height:28px; padding:0 10px; font-size:12px; }
.mt-btn--primary { background:var(--accent); color:var(--accent-on); border-color:var(--accent); }
.mt-btn--primary:hover { background:var(--accent-hover); border-color:var(--accent-hover); }
.mt-btn--primary:active { background:#DB8F1F; border-color:#DB8F1F; }
.mt-btn--secondary { border-color:var(--border-strong); color:var(--text); background:var(--bg-surface); }
.mt-btn--secondary:hover { border-color:var(--accent); color:var(--accent-text); }
.mt-btn--secondary:active { background:var(--bg-inset); }
.mt-btn--quiet { color:var(--text-muted); }
.mt-btn--quiet:hover { background:var(--bg-inset); color:var(--text); }
.mt-btn--danger { border-color:var(--crit-border); background:var(--crit-bg); color:var(--crit); }
.mt-btn--danger:hover { border-color:var(--crit); }
.mt-btn--icon { padding:0; width:36px; min-height:36px; border:1px solid var(--border-strong); background:var(--bg-surface); color:var(--text-muted); }
.mt-btn--icon.mt-btn--sm { width:28px; min-height:28px; }
.mt-btn--icon:hover { color:var(--text); border-color:var(--accent); }
.mt-btn[disabled], .mt-btn[aria-disabled="true"] { opacity:.45; cursor:not-allowed; pointer-events:none; }
.mt-btn[data-loading="true"] { pointer-events:none; color:transparent; position:relative; }
.mt-btn[data-loading="true"]::after {
  content:""; position:absolute; width:12px; height:12px; border-radius:50%;
  border:2px solid currentColor; border-top-color:transparent; color:var(--accent-on);
  animation:mt-spin .7s linear infinite;
}
.mt-btn--secondary[data-loading="true"]::after, .mt-btn--quiet[data-loading="true"]::after { color:var(--text-muted); }
@keyframes mt-spin { to { transform:rotate(360deg); } }
.mt-btn__ico { width:14px; height:14px; flex:none; fill:currentColor; }

/* --- formulaires ------------------------------------------ */
.mt-field { display:flex; flex-direction:column; gap:var(--s2); min-width:0; }
.mt-field__label { font-family:var(--mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--text-muted); }
.mt-field__hint { font-size:12px; line-height:1.6; color:var(--text-muted); }
.mt-field__error { font-family:var(--mono); font-size:12px; color:var(--crit); display:flex; gap:var(--s2); align-items:flex-start; }
.mt-input, .mt-select, .mt-textarea {
  font-family:var(--mono); font-size:16px; line-height:1.4; color:var(--text);
  background:var(--bg-inset); border:1px solid var(--border-strong); border-radius:var(--r);
  padding:9px 12px; min-height:40px; width:100%; transition:border-color var(--t), background var(--t);
}
.mt-textarea { min-height:96px; resize:vertical; font-size:15px; }
.mt-select { appearance:none; padding-right:32px;
  background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);
  background-position:calc(100% - 16px) 18px, calc(100% - 11px) 18px; background-size:5px 5px,5px 5px; background-repeat:no-repeat; }
.mt-input:hover, .mt-select:hover, .mt-textarea:hover { border-color:var(--text-muted); }
.mt-input::placeholder, .mt-textarea::placeholder { color:var(--text-muted); }
.mt-input[aria-invalid="true"], .mt-textarea[aria-invalid="true"] { border-color:var(--crit); background:var(--crit-bg); }
.mt-input[disabled], .mt-select[disabled], .mt-textarea[disabled] { opacity:.5; cursor:not-allowed; }
.mt-input-group { display:flex; align-items:stretch; }
.mt-input-group__addon { display:flex; align-items:center; padding:0 12px; font-family:var(--mono); font-size:13px;
  color:var(--text-muted); background:var(--bg-raised); border:1px solid var(--border-strong); border-right:0; border-radius:var(--r) 0 0 var(--r); }
.mt-input-group .mt-input { border-radius:0 var(--r) var(--r) 0; }
.mt-check { display:flex; gap:var(--s3); align-items:flex-start; cursor:pointer; font-size:15px; }
.mt-check input { appearance:none; margin:0; flex:none; width:18px; height:18px; margin-top:3px;
  border:1px solid var(--border-strong); border-radius:var(--r-pill); background:var(--bg-inset); cursor:pointer; transition:var(--t); }
.mt-check input[type="radio"] { border-radius:50%; }
.mt-check input:checked { background:var(--accent); border-color:var(--accent); }
.mt-check input[type="checkbox"]:checked { background-image:linear-gradient(var(--accent-on),var(--accent-on)),linear-gradient(var(--accent-on),var(--accent-on));
  background-repeat:no-repeat; background-size:2px 7px,2px 11px; background-position:5px 7px,9px 4px; }
.mt-check input[type="radio"]:checked { box-shadow:inset 0 0 0 4px var(--bg-inset); }
.mt-check input[disabled] { opacity:.45; cursor:not-allowed; }
.mt-switch { display:flex; gap:var(--s3); align-items:center; cursor:pointer; font-size:15px; }
.mt-switch input { appearance:none; margin:0; flex:none; width:38px; height:22px; border:1px solid var(--border-strong);
  border-radius:var(--r); background:var(--bg-inset); position:relative; cursor:pointer; transition:var(--t); }
.mt-switch input::after { content:""; position:absolute; top:3px; left:3px; width:14px; height:14px; border-radius:var(--r-pill);
  background:var(--text-faint); transition:transform var(--t), background var(--t); }
.mt-switch input:checked { background:var(--accent-text); border-color:var(--accent-text); }
[data-theme="dark"] .mt-switch input:checked { background:var(--accent); border-color:var(--accent); }
.mt-switch input:checked::after { transform:translateX(16px); background:var(--accent-on); }
[data-theme="light"] .mt-switch input:checked::after, :root:not([data-theme="dark"]) .mt-switch input:checked::after { background:#FFFFFF; }
.mt-radio-group { display:flex; flex-direction:column; gap:var(--s3); }
.mt-segment { display:inline-flex; border:1px solid var(--border-strong); border-radius:var(--r); overflow:hidden; flex-wrap:wrap; }
.mt-segment label { position:relative; }
.mt-segment input { position:absolute; opacity:0; width:100%; height:100%; left:0; top:0; margin:0; cursor:pointer; }
.mt-segment span { display:block; font-family:var(--mono); font-size:12px; letter-spacing:.06em; padding:8px 14px;
  color:var(--text-muted); border-right:1px solid var(--border-strong); transition:var(--t); }
.mt-segment label:last-child span { border-right:0; }
.mt-segment input:checked + span { background:var(--bg-raised); color:var(--accent-text); }
.mt-segment input:focus-visible + span { outline:2px solid var(--accent); outline-offset:-2px; }

/* --- statuts ---------------------------------------------- */
.mt-status { display:inline-flex; align-items:center; gap:var(--s2); font-family:var(--mono); font-size:11px;
  letter-spacing:.14em; text-transform:uppercase; padding:4px 8px; border-radius:var(--r); border:1px solid; white-space:nowrap; }
.mt-status__glyph { flex:none; width:8px; height:8px; display:inline-block; }
.mt-status--up { color:var(--ok); background:var(--ok-bg); border-color:var(--ok-border); }
.mt-status--up .mt-status__glyph { background:currentColor; border-radius:var(--r-pill); animation:mt-beat 2s ease-in-out infinite; }
@keyframes mt-beat { 0%,100% { opacity:1 } 50% { opacity:.3 } }
.mt-status--down { color:var(--crit); background:var(--crit-bg); border-color:var(--crit-border); }
.mt-status--down .mt-status__glyph { position:relative; }
.mt-status--down .mt-status__glyph::before, .mt-status--down .mt-status__glyph::after {
  content:""; position:absolute; left:0; top:3px; width:8px; height:2px; background:currentColor; }
.mt-status--down .mt-status__glyph::before { transform:rotate(45deg); }
.mt-status--down .mt-status__glyph::after { transform:rotate(-45deg); }
.mt-status--late { color:var(--warn); background:var(--warn-bg); border-color:var(--warn-border); }
.mt-status--late .mt-status__glyph { height:8px; width:8px; border:2px solid currentColor; border-radius:var(--r-pill); }
.mt-status--paused { color:var(--text-muted); background:var(--bg-inset); border-color:var(--border-strong); }
.mt-status--paused .mt-status__glyph { width:8px; height:8px; background:
  linear-gradient(currentColor,currentColor) left/2px 8px no-repeat,
  linear-gradient(currentColor,currentColor) right/2px 8px no-repeat; }
.mt-status--degraded { color:var(--info); background:var(--info-bg); border-color:var(--info-border); }
.mt-status--degraded .mt-status__glyph { height:2px; margin-top:0; background:currentColor; }
.mt-status--unknown { color:var(--text-muted); background:var(--bg-inset); border-color:var(--border); }
.mt-status--unknown .mt-status__glyph { border:1px dashed currentColor; border-radius:var(--r-pill); }
.mt-dot { width:6px; height:6px; border-radius:var(--r-pill); display:inline-block; flex:none; }

/* --- cartes / panneaux ------------------------------------ */
.mt-card { background:var(--bg-surface); border:1px solid var(--border); border-radius:var(--r); overflow:hidden; }
.mt-card__head { display:flex; align-items:center; justify-content:space-between; gap:var(--s4);
  padding:var(--s3) var(--s4); border-bottom:1px solid var(--border); background:var(--bg-raised); flex-wrap:wrap; }
.mt-card__title { font-family:var(--mono); font-size:13px; font-weight:500; color:var(--text); margin:0; }
.mt-card__body { padding:var(--s4); }
.mt-card__foot { display:flex; gap:var(--s2); justify-content:flex-end; flex-wrap:wrap;
  padding:var(--s3) var(--s4); border-top:1px solid var(--border); background:var(--bg-raised); }

/* --- métriques -------------------------------------------- */
.mt-metric { background:var(--bg-surface); border:1px solid var(--border); border-radius:var(--r); padding:var(--s4);
  display:flex; flex-direction:column; gap:var(--s3); min-width:0; }
.mt-metric__value { font-family:var(--mono); font-size:34px; font-weight:500; letter-spacing:-.035em; line-height:1.1;
  font-variant-numeric:tabular-nums; color:var(--text); }
.mt-metric__delta { font-family:var(--mono); font-size:12px; font-variant-numeric:tabular-nums; display:inline-flex; gap:var(--s1); align-items:center; }
.mt-metric__delta--up { color:var(--ok); }
.mt-metric__delta--down { color:var(--crit); }
.mt-metric__delta--flat { color:var(--text-muted); }
.mt-spark { display:block; width:100%; height:36px; }
.mt-spark path { fill:none; stroke:var(--accent-text); stroke-width:1.5; vector-effect:non-scaling-stroke; }
[data-theme="dark"] .mt-spark path { stroke:var(--accent); }

/* --- tableaux --------------------------------------------- */
.mt-table-wrap { border:1px solid var(--border); border-radius:var(--r); overflow-x:auto; background:var(--bg-surface); }
.mt-table { width:100%; border-collapse:collapse; font-size:13px; min-width:640px; }
.mt-table th, .mt-table td { text-align:left; padding:var(--s3) var(--s4); border-bottom:1px solid var(--border); vertical-align:middle; }
.mt-table thead th { font-family:var(--mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--text-muted); background:var(--bg-raised); font-weight:500; white-space:nowrap; position:sticky; top:0; }
.mt-table__sort { display:inline-flex; align-items:center; gap:var(--s2); background:none; border:0; padding:0;
  font:inherit; letter-spacing:inherit; text-transform:inherit; color:inherit; cursor:pointer; }
.mt-table__sort:hover { color:var(--text); }
.mt-table__sort[aria-sort="ascending"], .mt-table__sort[aria-sort="descending"] { color:var(--accent-text); }
.mt-table__sort::after { content:"↕"; font-size:10px; opacity:.6; }
.mt-table__sort[aria-sort="ascending"]::after { content:"↑"; opacity:1; }
.mt-table__sort[aria-sort="descending"]::after { content:"↓"; opacity:1; }
.mt-table tbody tr:hover { background:var(--bg-raised); }
.mt-table tbody tr:last-child td { border-bottom:0; }
.mt-table tr[data-state="crit"] { background:var(--crit-bg); }
.mt-table tr[data-state="crit"]:hover { background:var(--crit-bg); }
.mt-table tr[data-state="crit"] td:first-child { box-shadow:inset 2px 0 0 var(--crit); }
.mt-table td.mt-num, .mt-table th.mt-num { text-align:right; font-family:var(--mono); font-variant-numeric:tabular-nums; }
.mt-tablefoot { display:flex; align-items:center; justify-content:space-between; gap:var(--s4); flex-wrap:wrap;
  padding:var(--s3) var(--s4); border-top:1px solid var(--border); background:var(--bg-raised); }

/* --- messages système ------------------------------------- */
.mt-alert { display:flex; gap:var(--s3); padding:var(--s3) var(--s4); border:1px solid; border-radius:var(--r); align-items:flex-start; }
.mt-alert__mark { font-family:var(--mono); font-size:13px; font-weight:600; line-height:1.6; flex:none; }
.mt-alert__body { display:flex; flex-direction:column; gap:var(--s1); min-width:0; }
.mt-alert__title { font-family:var(--mono); font-size:13px; font-weight:500; }
.mt-alert__text { font-size:13px; line-height:1.6; color:var(--text-muted); }
.mt-alert--ok { color:var(--ok); background:var(--ok-bg); border-color:var(--ok-border); }
.mt-alert--crit { color:var(--crit); background:var(--crit-bg); border-color:var(--crit-border); }
.mt-alert--warn { color:var(--warn); background:var(--warn-bg); border-color:var(--warn-border); }
.mt-alert--info { color:var(--info); background:var(--info-bg); border-color:var(--info-border); }

/* --- overlays --------------------------------------------- */
.mt-modal { position:fixed; inset:0; z-index:50; display:none; align-items:center; justify-content:center; padding:var(--s5);
  background:rgba(10,13,16,.72); }
.mt-modal[open] { display:flex; }
.mt-modal__panel { width:min(520px,100%); background:var(--bg-surface); border:1px solid var(--border-strong); border-radius:var(--r); }
.mt-tooltip { position:relative; display:inline-flex; }
.mt-tooltip__bubble { position:absolute; bottom:calc(100% + 8px); left:50%; transform:translateX(-50%);
  background:var(--bg-raised); color:var(--text); border:1px solid var(--border-strong); border-radius:var(--r);
  font-family:var(--mono); font-size:12px; padding:6px 10px; white-space:nowrap; opacity:0; pointer-events:none; transition:opacity var(--t); }
.mt-tooltip:hover .mt-tooltip__bubble, .mt-tooltip:focus-within .mt-tooltip__bubble { opacity:1; }
.mt-menu { position:relative; display:inline-block; }
.mt-menu__list { position:absolute; top:calc(100% + 4px); left:0; min-width:200px; z-index:20;
  background:var(--bg-surface); border:1px solid var(--border-strong); border-radius:var(--r); padding:var(--s1) 0; display:none; }
.mt-menu[data-open="true"] .mt-menu__list { display:block; }
.mt-menu__item { display:flex; width:100%; gap:var(--s3); align-items:center; justify-content:space-between;
  background:none; border:0; padding:8px 14px; font-family:var(--mono); font-size:13px; color:var(--text); cursor:pointer; text-align:left; }
.mt-menu__item:hover { background:var(--bg-raised); color:var(--accent-text); }
.mt-menu__item--danger { color:var(--crit); }
.mt-menu__sep { height:1px; background:var(--border); margin:var(--s1) 0; }
.mt-menu__key { font-size:11px; color:var(--text-muted); }

/* --- navigation ------------------------------------------- */
.mt-crumbs { display:flex; flex-wrap:wrap; align-items:center; gap:var(--s2); font-family:var(--mono); font-size:12px; }
.mt-crumbs a { color:var(--text-muted); text-decoration:none; }
.mt-crumbs a:hover { color:var(--accent-text); text-decoration:underline; }
.mt-crumbs__sep { color:var(--text-muted); }
.mt-crumbs [aria-current="page"] { color:var(--text); }
.mt-tabs { display:flex; gap:var(--s5); border-bottom:1px solid var(--border); overflow-x:auto; }
.mt-tabs__tab { background:none; border:0; border-bottom:2px solid transparent; margin-bottom:-1px; padding:var(--s3) 0;
  font-family:var(--mono); font-size:13px; color:var(--text-muted); cursor:pointer; white-space:nowrap; transition:var(--t); }
.mt-tabs__tab:hover { color:var(--text); }
.mt-tabs__tab[aria-selected="true"] { color:var(--text); border-bottom-color:var(--accent); }
.mt-pager { display:flex; gap:var(--s1); align-items:center; flex-wrap:wrap; }
.mt-pager__item { min-width:32px; height:32px; display:inline-flex; align-items:center; justify-content:center;
  font-family:var(--mono); font-size:12px; font-variant-numeric:tabular-nums; color:var(--text-muted);
  background:none; border:1px solid transparent; border-radius:var(--r); cursor:pointer; padding:0 8px; }
.mt-pager__item:hover { border-color:var(--border-strong); color:var(--text); }
.mt-pager__item[aria-current="page"] { border-color:var(--accent); color:var(--accent-text); }
.mt-pager__item[disabled] { opacity:.4; cursor:not-allowed; }

/* --- progression / squelette ------------------------------ */
.mt-progress { height:6px; background:var(--bg-inset); border:1px solid var(--border); border-radius:var(--r); overflow:hidden; }
.mt-progress__bar { height:100%; background:var(--accent-text); transition:width var(--t); }
[data-theme="dark"] .mt-progress__bar { background:var(--accent); }
.mt-progress--ok .mt-progress__bar { background:var(--ok); }
.mt-progress--crit .mt-progress__bar { background:var(--crit); }
.mt-skel { background:var(--bg-inset); border-radius:var(--r); height:12px; position:relative; overflow:hidden; }
.mt-skel::after { content:""; position:absolute; inset:0; background:var(--border); opacity:0; animation:mt-pulse 1.4s ease-in-out infinite; }
@keyframes mt-pulse { 0%,100% { opacity:0 } 50% { opacity:.7 } }

/* --- code -------------------------------------------------- */
.mt-code { border:1px solid var(--border); border-radius:var(--r); background:var(--bg-inset); overflow:hidden; }
.mt-code__head { display:flex; align-items:center; justify-content:space-between; gap:var(--s3);
  padding:var(--s2) var(--s3); border-bottom:1px solid var(--border); background:var(--bg-raised); }
.mt-code__lang { font-family:var(--mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--text-muted); }
.mt-code pre { margin:0; padding:var(--s3) var(--s4); overflow-x:auto; font-family:var(--mono); font-size:13px; line-height:1.6; color:var(--text); }
.mt-copy { font-family:var(--mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--text-muted);
  background:none; border:1px solid var(--border-strong); border-radius:var(--r); padding:4px 8px; cursor:pointer; transition:var(--t); }
.mt-copy:hover { color:var(--accent-text); border-color:var(--accent); }
.mt-copy[data-copied="true"] { color:var(--ok); border-color:var(--ok-border); }

/* --- états ------------------------------------------------- */
.mt-empty { border:1px dashed var(--border-strong); border-radius:var(--r); padding:var(--s7) var(--s5);
  display:flex; flex-direction:column; align-items:center; gap:var(--s3); text-align:center; background:var(--bg-surface); }
.mt-empty__title { font-family:var(--mono); font-size:17px; font-weight:500; color:var(--text); }
.mt-empty__text { font-size:15px; color:var(--text-muted); max-width:52ch; }

/* --- page du guide ---------------------------------------- */
.mt-guide { max-width:1240px; margin:0 auto; padding:var(--s7) var(--s5) var(--s9); display:flex; flex-direction:column; gap:var(--s8); }
.mt-topbar { position:sticky; top:0; z-index:30; background:var(--bg-base); border-bottom:1px solid var(--border); }
.mt-topbar__in { max-width:1240px; margin:0 auto; padding:var(--s3) var(--s5); display:flex; align-items:center; justify-content:space-between; gap:var(--s4); flex-wrap:wrap; }
.mt-sec { display:flex; flex-direction:column; gap:var(--s5); }
.mt-sec__head { display:flex; gap:var(--s4); align-items:baseline; flex-wrap:wrap; border-bottom:1px solid var(--border); padding-bottom:var(--s3); }
.mt-sec__num { font-family:var(--mono); font-size:11px; letter-spacing:.14em; color:var(--accent-text); }
.mt-demo { border:1px solid var(--border); border-radius:var(--r); background:var(--bg-surface); }
.mt-demo__stage { padding:var(--s5); display:flex; flex-wrap:wrap; gap:var(--s4); align-items:flex-start; }
.mt-demo__stage--block { display:block; }
.mt-demo__stage--grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); }
.mt-demo__code { border-top:1px solid var(--border); background:var(--bg-inset); }
.mt-demo__code pre { margin:0; padding:var(--s4); overflow-x:auto; font-family:var(--mono); font-size:12px; line-height:1.6; color:var(--text-muted); }
.mt-demo__code summary { font-family:var(--mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--text-muted);
  padding:var(--s3) var(--s4); cursor:pointer; list-style:none; }
.mt-demo__code summary::before { content:"+ "; }
.mt-demo__code details[open] summary::before { content:"− "; }
.mt-row { display:flex; flex-wrap:wrap; gap:var(--s3); align-items:center; }
.mt-col { display:flex; flex-direction:column; gap:var(--s4); }
.mt-note { font-family:var(--mono); font-size:12px; line-height:1.6; color:var(--text-muted); }
.mt-grid-2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:var(--s4); }
.mt-grid-3 { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:var(--s4); }
@media (max-width:520px) {
  .mt-guide { padding:var(--s5) var(--s4) var(--s8); gap:var(--s7); }
  .mt-demo__stage { padding:var(--s4); }
  .mt-h1 { font-size:26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation:none !important; transition:none !important; }
}

/* ============ icônes ============ */
/* ---- le jeu d'icônes : une seule règle pilote tout ---- */
.mt-ico {
  width:24px; height:24px; flex:none; display:inline-block; vertical-align:-0.15em;
  fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:butt; stroke-linejoin:miter;
}
.mt-ico--16 { width:16px; height:16px; }
.mt-ico--32 { width:32px; height:32px; }
/* les aplats et le pointillé sont portés par la géométrie du <symbol> :
   le CSS du document ne traverse pas l'arbre cloné par <use>. */

/* ============ chrome public : barre, conteneur, pied ============ */
.mt-site { background:var(--bg-base); color:var(--text); font-family:var(--sans); font-size:15px; line-height:1.6; }
.mt-wrap { max-width:1200px; margin:0 auto; padding:0 var(--s5); }
@media (max-width:520px) { .mt-wrap { padding:0 var(--s4); } }

.mt-mkbar { position:sticky; top:0; z-index:40; background:var(--bg-base); border-bottom:1px solid var(--border); }
.mt-mkbar__in { max-width:1200px; margin:0 auto; padding:var(--s3) var(--s5); display:flex; align-items:center; gap:var(--s4); flex-wrap:wrap; }
.mt-mkbar__nav { display:flex; gap:var(--s5); margin-left:var(--s5); flex-wrap:wrap; }
.mt-mkbar__nav a { font-family:var(--mono); font-size:13px; color:var(--text-muted); text-decoration:none; }
.mt-mkbar__nav a:hover { color:var(--text); }
.mt-mkbar__act { margin-left:auto; display:flex; gap:var(--s2); align-items:center; }
@media (max-width:820px) { .mt-mkbar__nav { display:none; } }

.mt-foot { border-top:1px solid var(--border); background:var(--bg-surface); padding:var(--s7) 0 var(--s6); }
/* La maquette déclarait « 1.4fr repeat(auto-fit, minmax(150px,1fr)) ».
   La grammaire de CSS Grid interdit de mêler une répétition automatique
   à une piste flexible : la déclaration entière était donc invalide et
   ignorée, ce qui empilait tout le pied de page sur une colonne. La
   répétition automatique est ici seule, et la colonne de marque occupe
   deux pistes pour retrouver la proportion voulue. */
.mt-foot__cols { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:var(--s6); }
/* Au-delà de 1000 px, on fige six colonnes : la répétition automatique
   laissait la dernière rubrique seule sur une deuxième ligne. */
@media (min-width:1000px) { .mt-foot__cols { grid-template-columns:1.6fr repeat(5,minmax(0,1fr)); } }
.mt-foot__cols > .mt-foot__col:first-child { grid-column:span 2; }
.mt-foot__col { display:flex; flex-direction:column; gap:var(--s3); min-width:0; }
.mt-foot__h { font-family:var(--mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--text-muted); }
.mt-foot__col a { font-size:13px; color:var(--text-muted); text-decoration:none; }
.mt-foot__col a:hover { color:var(--accent); }
.mt-foot__bottom { display:flex; align-items:center; justify-content:space-between; gap:var(--s4); flex-wrap:wrap;
  border-top:1px solid var(--border); margin-top:var(--s6); padding-top:var(--s4);
  font-family:var(--mono); font-size:12px; color:var(--text-muted); }
/* Le bloc de marque du pied était porté par des styles en ligne dans la
   maquette : promu en classes pour être réutilisable côté PHP. */
.mt-foot__brand { display:flex; align-items:center; gap:var(--s3); }
.mt-foot__brand .mt-mono { font-size:15px; font-weight:500; color:var(--text); }
.mt-foot__tagline { font-size:13px; color:var(--text-muted); max-width:34ch; }
.mt-foot__legal { display:flex; gap:var(--s4); flex-wrap:wrap; }

/* ============ page d'accueil ============ */
.mt-sect { border-top:1px solid var(--border); padding:var(--s9) 0; }
.mt-sect:first-child { border-top:0; }
@media (max-width:640px) { .mt-sect { padding:var(--s7) 0; } }
.mt-sect__label { font-family:var(--mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--text-muted); }
.mt-sect__title { font-family:var(--mono); font-size:26px; font-weight:500; letter-spacing:-.035em; line-height:1.1; margin:var(--s3) 0 0; }
.mt-sect__lede { margin:var(--s3) 0 0; color:var(--text-muted); max-width:68ch; text-wrap:pretty; }

.mt-hero { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.05fr); gap:var(--s7); align-items:center; padding:var(--s8) 0; }
@media (max-width:960px) { .mt-hero { grid-template-columns:minmax(0,1fr); gap:var(--s6); padding:var(--s6) 0; } }
.mt-hero h1 { font-family:var(--mono); font-size:44px; font-weight:500; letter-spacing:-.035em; line-height:1.1; margin:0; text-wrap:balance; }
@media (max-width:640px) { .mt-hero h1 { font-size:34px; } }
.mt-hero__sub { margin:var(--s4) 0 0; font-size:17px; color:var(--text-muted); max-width:54ch; text-wrap:pretty; }
.mt-hero__acts { display:flex; gap:var(--s3); flex-wrap:wrap; margin-top:var(--s5); }
.mt-hero__fine { margin:var(--s3) 0 0; font-family:var(--mono); font-size:12px; color:var(--text-muted); }

.mt-term { border:1px solid var(--border-strong); border-radius:var(--r); background:var(--bg-surface); overflow:hidden; }
.mt-term__bar { display:flex; align-items:center; justify-content:space-between; gap:var(--s3); padding:var(--s2) var(--s3);
  border-bottom:1px solid var(--border); background:var(--bg-raised); font-family:var(--mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--text-muted); }
.mt-term__live { display:inline-flex; align-items:center; gap:var(--s2); color:var(--ok); }
.mt-term__live i { width:6px; height:6px; border-radius:2px; background:currentColor; animation:mt-beat 2s ease-in-out infinite; }
.mt-term__row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:var(--s3); align-items:center;
  padding:10px var(--s3); border-bottom:1px solid var(--border); font-family:var(--mono); font-size:13px; }
.mt-term__row span.host { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mt-term__row .num { font-variant-numeric:tabular-nums; color:var(--text-muted); font-size:12px; }
.mt-term__log { padding:var(--s3); background:var(--bg-inset); font-family:var(--mono); font-size:12px; line-height:1.8;
  color:var(--text-muted); font-variant-numeric:tabular-nums; overflow-x:auto; }
.mt-term__log b { color:var(--text); font-weight:400; }
.mt-term__log .t { color:var(--text-muted); }
.mt-term__log .ok { color:var(--ok); }
.mt-term__log .crit { color:var(--crit); }
.mt-term__log .warn { color:var(--warn); }

.mt-surf { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:1px; background:var(--border);
  border:1px solid var(--border); border-radius:var(--r); overflow:hidden; margin-top:var(--s5); }
.mt-surf__cell { background:var(--bg-surface); padding:var(--s5); display:flex; flex-direction:column; gap:var(--s3); }
.mt-surf__head { display:flex; align-items:center; gap:var(--s3); font-family:var(--mono); font-size:15px; font-weight:500; }
.mt-surf__head .mt-ico { color:var(--accent); }
.mt-surf dl { margin:0; display:grid; grid-template-columns:auto 1fr; gap:var(--s2) var(--s4); }
.mt-surf dt { font-family:var(--mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--text-muted); }
.mt-surf dd { margin:0; font-size:13px; color:var(--text-muted); }

.mt-path { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:var(--s4); margin-top:var(--s5); }
.mt-path__step { border:1px solid var(--border); border-radius:var(--r); background:var(--bg-surface); padding:var(--s5); display:flex; flex-direction:column; gap:var(--s3); }
.mt-path__num { font-family:var(--mono); font-size:11px; letter-spacing:.14em; color:var(--accent); }
.mt-path__t { font-family:var(--mono); font-size:15px; font-weight:500; }
.mt-path__d { font-size:13px; color:var(--text-muted); }
.mt-path__clock { font-family:var(--mono); font-size:12px; color:var(--text-muted); font-variant-numeric:tabular-nums; border-top:1px solid var(--border); padding-top:var(--s3); margin-top:auto; }

.mt-chan { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:1px; background:var(--border);
  border:1px solid var(--border); border-radius:var(--r); overflow:hidden; margin-top:var(--s5); }
.mt-chan__cell { background:var(--bg-surface); padding:var(--s5); display:flex; flex-direction:column; gap:var(--s2); }
.mt-chan__t { display:flex; align-items:center; gap:var(--s3); font-family:var(--mono); font-size:15px; font-weight:500; }
.mt-chan__delay { font-family:var(--mono); font-size:26px; font-weight:500; letter-spacing:-.035em; font-variant-numeric:tabular-nums; }
.mt-chan__d { font-size:13px; color:var(--text-muted); }

.mt-plans { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:var(--s4); margin-top:var(--s5); }
.mt-plan { border:1px solid var(--border); border-radius:var(--r); background:var(--bg-surface); padding:var(--s5); display:flex; flex-direction:column; gap:var(--s4); }
.mt-plan--pro { border-color:var(--accent); }
.mt-plan__name { font-family:var(--mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--text-muted); }
.mt-plan--pro .mt-plan__name { color:var(--accent); }
.mt-plan__price { font-family:var(--mono); font-size:34px; font-weight:500; letter-spacing:-.035em; line-height:1.1; font-variant-numeric:tabular-nums; }
.mt-plan__price small { font-family:var(--mono); font-size:13px; font-weight:400; letter-spacing:0; color:var(--text-muted); }
.mt-plan__for { font-size:13px; color:var(--text-muted); }
.mt-plan ul { margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:var(--s2); font-size:13px; }
.mt-plan li { display:flex; gap:var(--s2); align-items:flex-start; color:var(--text-muted); }
.mt-plan li .mt-ico { color:var(--text-muted); margin-top:2px; }
.mt-plan__cta { margin-top:auto; }

.mt-obj { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:var(--s4); margin-top:var(--s5); }
.mt-obj__cell { border:1px solid var(--border); border-radius:var(--r); background:var(--bg-surface); padding:var(--s5); display:flex; flex-direction:column; gap:var(--s3); }
.mt-obj__q { font-family:var(--mono); font-size:15px; font-weight:500; }
.mt-obj__a { font-size:14px; color:var(--text-muted); text-wrap:pretty; }

/* ============ gabarit d'article SEO ============ */
.mt-doc { background:var(--bg-base); color:var(--text); font-family:var(--sans); }
/* bandeau de titre — Console Dark */
.mt-arthead { padding:var(--s7) 0 var(--s8); border-bottom:1px solid var(--border); }
.mt-arthead h1 { font-family:var(--mono); font-size:44px; font-weight:500; letter-spacing:-.035em; line-height:1.1;
  margin:var(--s4) 0 0; max-width:20ch; text-wrap:balance; }
@media (max-width:640px) { .mt-arthead h1 { font-size:26px; } .mt-arthead { padding:var(--s5) 0 var(--s6); } }
.mt-arthead__lede { margin:var(--s4) 0 0; font-size:17px; color:var(--text-muted); max-width:64ch; text-wrap:pretty; }
.mt-artmeta { display:flex; flex-wrap:wrap; gap:var(--s2) var(--s4); margin-top:var(--s5);
  font-family:var(--mono); font-size:12px; color:var(--text-muted); font-variant-numeric:tabular-nums;
  border-top:1px solid var(--border); padding-top:var(--s3); }
.mt-artmeta span { display:inline-flex; align-items:center; gap:var(--s2); }

/* corps — Console Paper, bascule franche */
.mt-body { border-top:2px solid var(--border-strong); }
.mt-body__grid { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:var(--s8); padding:var(--s7) 0 var(--s8); align-items:start; }
@media (max-width:1000px) { .mt-body__grid { grid-template-columns:minmax(0,1fr); gap:var(--s6); } }

.mt-toc { position:sticky; top:88px; display:flex; flex-direction:column; gap:var(--s3); border-left:1px solid var(--border); padding-left:var(--s4); }
@media (max-width:1000px) { .mt-body__grid .mt-toc { display:none; } }
.mt-toc__h { font-family:var(--mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--text-muted); }
.mt-toc a { font-size:13px; line-height:1.5; color:var(--text-muted); text-decoration:none; border-left:2px solid transparent; margin-left:-18px; padding-left:16px; }
.mt-toc a:hover { color:var(--accent-text); border-left-color:var(--accent); }
.mt-toc a.sub { padding-left:28px; font-size:12px; }

.mt-prose { max-width:68ch; font-size:17px; line-height:1.6; color:var(--text); }
.mt-prose > * + * { margin-top:var(--s4); }
.mt-prose h2 { font-family:var(--mono); font-size:26px; font-weight:500; letter-spacing:-.035em; line-height:1.1;
  margin-top:var(--s7); padding-top:var(--s4); border-top:1px solid var(--border); scroll-margin-top:88px; }
.mt-prose h3 { font-family:var(--mono); font-size:17px; font-weight:500; line-height:1.1; margin-top:var(--s5); scroll-margin-top:88px; }
.mt-prose p { margin:0; text-wrap:pretty; }
.mt-prose a { color:var(--accent-text); text-underline-offset:3px; }
.mt-prose ul, .mt-prose ol { margin:0; padding-left:var(--s5); display:flex; flex-direction:column; gap:var(--s2); }
.mt-prose li::marker { color:var(--text-muted); font-family:var(--mono); font-size:14px; }
.mt-prose code { font-family:var(--mono); font-size:15px; background:var(--bg-inset); border:1px solid var(--border); border-radius:var(--r); padding:1px 5px; }
.mt-prose .mt-code code { border:0; background:none; padding:0; font-size:13px; }
.mt-prose figcaption { font-family:var(--mono); font-size:12px; color:var(--text-muted); margin-top:var(--s2); }

.mt-callout { border:1px solid var(--border-strong); border-radius:var(--r); background:var(--bg-raised); padding:var(--s4) var(--s5); display:flex; flex-direction:column; gap:var(--s2); }
.mt-callout__h { display:flex; align-items:center; gap:var(--s2); font-family:var(--mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--text-muted); }
.mt-callout p { font-size:15px; margin:0; }
.mt-callout--warn { background:var(--warn-bg); border-color:var(--warn-border); }
.mt-callout--warn .mt-callout__h { color:var(--warn); }
.mt-callout--def { background:var(--bg-inset); }
.mt-callout--def dt { font-family:var(--mono); font-size:15px; font-weight:500; }
.mt-callout--def dd { margin:var(--s2) 0 0; font-size:15px; color:var(--text-muted); }

.mt-proc { counter-reset:mtstep; display:flex; flex-direction:column; gap:0; border:1px solid var(--border); border-radius:var(--r); background:var(--bg-surface); }
.mt-proc__step { counter-increment:mtstep; display:grid; grid-template-columns:auto minmax(0,1fr); gap:var(--s4);
  padding:var(--s4) var(--s5); border-bottom:1px solid var(--border); }
.mt-proc__step:last-child { border-bottom:0; }
.mt-proc__step::before { content:counter(mtstep,decimal-leading-zero); font-family:var(--mono); font-size:12px; color:var(--accent-text); padding-top:4px; }
.mt-proc__t { font-family:var(--mono); font-size:15px; font-weight:500; }
.mt-proc__d { font-size:15px; color:var(--text-muted); margin-top:var(--s2); }
.mt-proc__d + .mt-code { margin-top:var(--s3); }

.mt-faq { display:flex; flex-direction:column; gap:var(--s2); }
.mt-faq details { border:1px solid var(--border); border-radius:var(--r); background:var(--bg-surface); }
.mt-faq summary { display:flex; align-items:center; justify-content:space-between; gap:var(--s4); cursor:pointer;
  font-family:var(--mono); font-size:15px; padding:var(--s3) var(--s4); list-style:none; }
.mt-faq summary::-webkit-details-marker { display:none; }
.mt-faq summary::after { content:"+"; font-family:var(--mono); color:var(--text-muted); }
.mt-faq details[open] summary::after { content:"−"; }
.mt-faq details[open] summary { border-bottom:1px solid var(--border); }
.mt-faq__a { padding:var(--s4); font-size:15px; color:var(--text-muted); }
.mt-faq__a p { margin:0; }
.mt-faq__a p + p { margin-top:var(--s3); }

/* appel à l'action — Console Dark */
.mt-cta { border-top:2px solid var(--border-strong); }
.mt-cta__in { display:flex; align-items:center; justify-content:space-between; gap:var(--s5); flex-wrap:wrap; padding:var(--s6) 0; }
.mt-cta__t { font-family:var(--mono); font-size:20px; font-weight:500; letter-spacing:-.02em; max-width:52ch; margin:0; }

.mt-siblings { border-top:1px solid var(--border); padding:var(--s6) 0; }
.mt-siblings__grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:1px; background:var(--border);
  border:1px solid var(--border); border-radius:var(--r); overflow:hidden; margin-top:var(--s4); }
.mt-sib { background:var(--bg-surface); padding:var(--s4) var(--s5); display:flex; flex-direction:column; gap:var(--s2); text-decoration:none; }
.mt-sib:hover { background:var(--bg-raised); }
.mt-sib__t { font-family:var(--mono); font-size:15px; color:var(--text); }
.mt-sib:hover .mt-sib__t { color:var(--accent-text); }
.mt-sib__d { font-size:13px; color:var(--text-muted); }

/* ============ coquille applicative ============ */
.mt-app { min-height:100vh; background:var(--bg-base); color:var(--text); font-family:var(--sans); font-size:15px; line-height:1.6; }
.mt-appbar { position:sticky; top:0; z-index:40; background:var(--bg-base); border-bottom:1px solid var(--border); }
.mt-appbar__in { max-width:1360px; margin:0 auto; padding:0 var(--s5); display:flex; align-items:center; gap:var(--s5); min-height:56px; }
.mt-brand { display:flex; align-items:center; gap:var(--s3); text-decoration:none; color:var(--text); flex:none; }
.mt-brand__word { font-family:var(--mono); font-size:15px; font-weight:500; }
.mt-nav { display:flex; gap:var(--s1); flex:1 1 auto; min-width:0; overflow-x:auto; scrollbar-width:none; }
.mt-nav a { display:inline-flex; align-items:center; gap:var(--s2); font-family:var(--mono); font-size:13px; color:var(--text-muted);
  text-decoration:none; padding:8px 12px; border-radius:var(--r); border:1px solid transparent; white-space:nowrap; transition:var(--t); }
.mt-nav a:hover { color:var(--text); background:var(--bg-raised); }
.mt-nav a[aria-current="page"] { color:var(--text); border-color:var(--border-strong); background:var(--bg-surface); }
.mt-nav a[aria-current="page"] .mt-ico { color:var(--accent); }
.mt-appbar__right { display:flex; align-items:center; gap:var(--s3); flex:0 1 auto; min-width:0; }
.mt-lang { display:inline-flex; border:1px solid var(--border-strong); border-radius:var(--r); overflow:hidden; }
.mt-lang button { font-family:var(--mono); font-size:11px; letter-spacing:.1em; padding:6px 8px; background:none; border:0; color:var(--text-muted); cursor:pointer; }
.mt-lang button + button { border-left:1px solid var(--border-strong); }
.mt-lang button[aria-pressed="true"] { background:var(--bg-raised); color:var(--text); }
.mt-account { display:flex; flex-direction:column; align-items:flex-end; line-height:1.2; min-width:0; }
.mt-account__name, .mt-account__plan { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mt-account__name { font-family:var(--mono); font-size:13px; color:var(--text); }
.mt-account__plan { font-family:var(--mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--text-muted); display:flex; gap:6px; align-items:center; }
.mt-account__plan a { color:var(--accent-text); text-decoration:none; border-bottom:1px solid transparent; }
.mt-account__plan a:hover { border-bottom-color:currentColor; }
.mt-burger { display:none; }
@media (max-width:1180px) {
  .mt-appbar__in { flex-wrap:wrap; gap:var(--s3); padding:var(--s2) var(--s4); }
  .mt-burger { display:inline-flex; margin-left:auto; }
  .mt-nav { display:none; order:3; width:100%; flex-direction:column; gap:0; border-top:1px solid var(--border); padding:var(--s2) 0; }
  .mt-app[data-nav="open"] .mt-nav { display:flex; }
  .mt-nav a { border-radius:0; border:0; padding:10px 4px; }
  .mt-nav { overflow:visible; }
  .mt-appbar__right { order:2; }
  .mt-account { align-items:flex-start; }
}
@media (max-width:520px) { .mt-account__name { max-width:38vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } }

.mt-main { max-width:1360px; margin:0 auto; padding:var(--s6) var(--s5) var(--s9); display:flex; flex-direction:column; gap:var(--s6); }
@media (max-width:520px) { .mt-main { padding:var(--s5) var(--s4) var(--s8); gap:var(--s5); } }
.mt-pagehead { display:flex; align-items:flex-end; justify-content:space-between; gap:var(--s4); flex-wrap:wrap; }
.mt-pagehead h1 { font-family:var(--mono); font-size:26px; font-weight:500; letter-spacing:-.035em; line-height:1.1; margin:0; }

/* bande d'état */
.mt-strip { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:1px; background:var(--border);
  border:1px solid var(--border); border-radius:var(--r); overflow:hidden; }
.mt-strip__cell { background:var(--bg-surface); padding:var(--s4); display:flex; flex-direction:column; gap:var(--s2); min-width:0; }
.mt-strip__value { font-family:var(--mono); font-size:26px; font-weight:500; letter-spacing:-.035em; line-height:1.1; font-variant-numeric:tabular-nums; }
.mt-strip__sub { font-family:var(--mono); font-size:12px; color:var(--text-muted); font-variant-numeric:tabular-nums; }
.mt-strip__cell[data-tone="crit"] { background:var(--crit-bg); }
.mt-strip__cell[data-tone="crit"] .mt-strip__value { color:var(--crit); }

/* bloc à traiter */
.mt-triage { border:1px solid var(--crit-border); border-radius:var(--r); background:var(--bg-surface); overflow:hidden; }
.mt-triage__head { display:flex; align-items:center; gap:var(--s3); justify-content:space-between; flex-wrap:wrap;
  padding:var(--s3) var(--s4); background:var(--crit-bg); border-bottom:1px solid var(--crit-border); color:var(--crit); }
.mt-triage__title { display:flex; align-items:center; gap:var(--s2); font-family:var(--mono); font-size:13px; font-weight:500; }
.mt-triage__row { display:flex; align-items:center; gap:var(--s4); padding:var(--s3) var(--s4); border-bottom:1px solid var(--border); flex-wrap:wrap; }
.mt-triage__row:last-child { border-bottom:0; }
.mt-triage__name { font-family:var(--mono); font-size:15px; color:var(--text); text-decoration:none; }
.mt-triage__name:hover { color:var(--accent); }
.mt-triage__meta { font-family:var(--mono); font-size:12px; color:var(--text-muted); font-variant-numeric:tabular-nums; }
.mt-triage__actions { margin-left:auto; display:flex; gap:var(--s2); flex-wrap:wrap; }

/* graphique */
.mt-chart { width:100%; height:220px; display:block; }
.mt-chart .grid { stroke:var(--border); stroke-width:1; }
.mt-chart .area { fill:var(--accent); opacity:.08; stroke:none; }
.mt-chart .line { fill:none; stroke:var(--accent); stroke-width:1.5; vector-effect:non-scaling-stroke; }
.mt-chart .last { fill:var(--accent); stroke:var(--bg-surface); stroke-width:1.5; }
.mt-chart .drop { stroke:var(--crit); stroke-width:1; stroke-dasharray:3 3; }
.mt-axis { display:flex; justify-content:space-between; font-family:var(--mono); font-size:11px; color:var(--text-muted); font-variant-numeric:tabular-nums; padding:0 var(--s4) var(--s3); }

/* listes */
.mt-lists { display:grid; grid-template-columns:repeat(auto-fit,minmax(340px,1fr)); gap:var(--s4); }
.mt-lrow { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; align-items:center; gap:var(--s3);
  padding:var(--s3) var(--s4); border-bottom:1px solid var(--border); }
.mt-lrow:last-child { border-bottom:0; }
.mt-lrow:hover { background:var(--bg-raised); }
.mt-lrow__name { font-family:var(--mono); font-size:13px; color:var(--text); text-decoration:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mt-lrow__name:hover { color:var(--accent); }
.mt-lrow__sub { font-family:var(--mono); font-size:11px; color:var(--text-muted); font-variant-numeric:tabular-nums; }
.mt-lrow__up { font-family:var(--mono); font-size:12px; color:var(--text-muted); font-variant-numeric:tabular-nums; text-align:right; }
.mt-lrow .mt-spark { width:72px; height:24px; }
@media (max-width:420px) {
  .mt-lrow { grid-template-columns:auto minmax(0,1fr) auto; }
  .mt-lrow .mt-spark { display:none; }
}
.mt-steps { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:1px; background:var(--border); border:1px solid var(--border); border-radius:var(--r); overflow:hidden; }
.mt-step { background:var(--bg-surface); padding:var(--s5); display:flex; flex-direction:column; gap:var(--s3); }
.mt-step__num { font-family:var(--mono); font-size:11px; letter-spacing:.14em; color:var(--accent); }
.mt-step__title { font-family:var(--mono); font-size:15px; font-weight:500; }
.mt-step__text { font-size:13px; color:var(--text-muted); line-height:1.6; }
/* Lien vers le compte de la marque, dans la colonne de marque du pied. */
.mt-foot__social {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  min-height: 32px;
}
.mt-foot__social:hover { color: var(--accent-text); }
.mt-foot__social .mt-ico { width: 14px; height: 14px; flex: none; }

/* --- introduction de l'accueil ---------------------------------
   Le seul bloc de prose de la page : il pose le sujet en toutes
   lettres, pour le lecteur pressé comme pour les moteurs. */
.mt-intro { padding:var(--s7) 0; border-top:1px solid var(--border); }
.mt-intro p { margin:0 0 var(--s4); max-width:68ch; font-size:17px; line-height:1.75; color:var(--text-muted); }
.mt-intro p:last-child { margin-bottom:0; }
.mt-intro p:first-child { color:var(--text); }
@media (max-width:640px) { .mt-intro { padding:var(--s6) 0; } .mt-intro p { font-size:15px; } }

/* --- rubriques de l'accueil ------------------------------------
   Dix entrées : une, deux ou cinq colonnes — les trois divisent
   dix. En répétition automatique, la dernière rangée restait à
   moitié vide et le fond de la grille se voyait par les trous. */
.mt-hubs { grid-template-columns:minmax(0,1fr); }
@media (min-width:560px) { .mt-hubs { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (min-width:1100px) { .mt-hubs { grid-template-columns:repeat(5,minmax(0,1fr)); } }
