/* LA FEUILLE D'ATLAS MANAGEMENT. Une seule, servie par le mgmt lui-meme (CSP `style-src 'self'`).
 *
 * LES JETONS SONT CEUX D'ATLAS, RECOPIES (le mgmt n'importe rien d'ATLAS) : `app/globals.css` et
 * `app/styles/sombre.css`, DESIGN.md « La salle de controle ». Sept tailles, cinq graisses, cinq
 * arrondis, trois durees : aucune valeur en dur plus bas pour une taille, une graisse, un arrondi ou
 * une duree. Les encres tiennent 4,5:1 sur leur fond dans les deux themes ; un aplat qui porte du
 * texte blanc (`--brand`, `--danger-deep`, la barre laterale) ne bascule pas de theme.
 *
 * DEUX THEMES, SANS SCRIPT : `prefers-color-scheme`. Une bascule memorisee exigerait du JavaScript
 * (donc un nonce dans une CSP qui n'autorise aucun script) ou un aller-retour serveur par page : on
 * suit le systeme, comme la page de mise a jour d'ATLAS.
 */
:root {
  --bg: #f4f6fa; --surface: #ffffff; --surface-2: #f8fafd; --ink: #0e1a2b; --muted: #5a6b82;
  --line: #e4e9f1; --line-strong: #828da6;
  --brand: #202a62; --brand-ink: #161c44; --brand-2: #2c3878; --on-brand: #ffffff;
  --accent: #e63329; --accent-ink: #a01c11;
  --ok: #15803d; --ok-bg: #dcfce7; --ok-ink: #127034;
  --wait: #b45309; --wait-bg: #fef3c7; --wait-ink: #7a4b0a;
  --danger: #b42318; --danger-bg: #feecea; --danger-ink: #b42318; --danger-deep: #9b1c13;
  --off: #5c6b7f; --off-bg: #edf1f6;
  --halo: rgba(44, 56, 120, .18);
  /* La barre laterale : un panneau sombre PAR CONSTRUCTION (il ne suit pas le theme). */
  --barre: #161c44; --barre-ink: #c9d0f2; --barre-actif: #2c3878; --barre-survol: rgba(255, 255, 255, .08);
  --fs-micro: 11px; --fs-sm: 12px; --fs-body: 13px; --fs-md: 14px; --fs-title: 16px; --fs-lg: 18px;
  --fs-xl: 20px; --fs-2xl: 24px; --fs-display: 32px;
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700; --fw-black: 800;
  --r-2xs: 4px; --r-xs: 6px; --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-full: 999px;
  --dur-1: 120ms; --dur-2: 200ms; --dur-3: 320ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1); --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --sh-sm: 0 1px 2px rgba(14, 26, 43, .06); --sh-md: 0 4px 12px rgba(14, 26, 43, .08), 0 2px 4px rgba(14, 26, 43, .05);
  /* Police systeme : aucune police externe (CSP). */
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --cible: 44px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1320; --surface: #161d2d; --surface-2: #1b2334; --ink: #e8eefa; --muted: #a7b6cd;
    --line: #313d58; --line-strong: #5c6a89;
    --brand-2: #97a3f3; --accent-ink: #ff8f86;
    --ok: #4ade80; --ok-bg: #0f2a1c; --ok-ink: #4ade80;
    --wait: #fbcf72; --wait-bg: #2f2309; --wait-ink: #fbcf72;
    --danger: #f87171; --danger-bg: #341a1a; --danger-ink: #fca5a5;
    --off: #a7b6cd; --off-bg: #1e2637;
    --halo: rgba(151, 163, 243, .25);
    --barre: #0a0f1c; --barre-actif: #232c55;
    --sh-sm: 0 1px 2px rgba(0, 0, 0, .4); --sh-md: 0 4px 14px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

/* ═══ SOCLE ════════════════════════════════════════════════════════════════════════════════════ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: var(--fw-regular) var(--fs-md)/1.5 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--brand-2); text-decoration: none; transition: color var(--dur-1) var(--ease-out); }
a:hover { color: var(--ink); text-decoration: none; }
code, pre { font-family: var(--mono); font-size: var(--fs-sm); }
code { overflow-wrap: anywhere; }
h1 { font-size: var(--fs-xl); font-weight: var(--fw-bold); margin: 0 0 4px; letter-spacing: -.01em; line-height: 1.25; }
h2 { font-size: var(--fs-title); font-weight: var(--fw-semibold); margin: 0 0 12px; line-height: 1.3; }
h3 { font-size: var(--fs-md); font-weight: var(--fw-semibold); margin: 16px 0 8px; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; border-radius: var(--r-xs); }
.evitement { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: var(--r-sm); box-shadow: var(--sh-md); }
.evitement:focus { left: 8px; }

/* ═══ MARQUE ═══════════════════════════════════════════════════════════════════════════════════ */
.marque { display: inline-flex; align-items: center; gap: 10px; font-weight: var(--fw-bold); font-size: var(--fs-title); color: var(--on-brand); letter-spacing: -.01em; }
.marque:hover { color: var(--on-brand); }
.logo { width: 32px; height: 32px; flex: none; }
.logo-fond { fill: #a01c11; } /* le rouge de marque assombri, FIXE : le pictogramme ne suit pas le theme */
.logo-trait { stroke: #ffffff; }
.logo-point { fill: #ffffff; }

/* ═══ L'APPLICATION : BARRE LATERALE + CONTENU ════════════════════════════════════════════════ */
/* La colonne de la barre est peinte par le chassis : la barre elle-meme reste collee en haut (sticky),
   et le fond suit la page entiere quelle que soit sa hauteur. */
.chassis { --large-barre: 248px; display: grid; grid-template-columns: var(--large-barre) minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--barre) var(--large-barre), transparent var(--large-barre)); }
.barre {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px;
  background: var(--barre); color: var(--barre-ink); padding: 18px 12px; overflow-y: auto;
}
.barre .marque { padding: 4px 8px 10px; }
.onglets ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.onglets a {
  display: flex; align-items: center; gap: 12px; min-height: var(--cible); padding: 0 12px;
  border-radius: var(--r-sm); color: var(--barre-ink); font-weight: var(--fw-medium);
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.onglets a:hover { background: var(--barre-survol); color: #ffffff; }
.onglets a.on { background: var(--barre-actif); color: #ffffff; font-weight: var(--fw-semibold); box-shadow: inset 3px 0 0 var(--accent); }
.onglets a:focus-visible { outline-color: #ffffff; }
.ico { width: 20px; height: 20px; flex: none; }
.qui { margin-top: auto; display: grid; gap: 8px; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.qui-courriel { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qui .btn { justify-content: flex-start; color: var(--barre-ink); border-color: rgba(255, 255, 255, .22); background: transparent; }
.qui .btn:hover { color: #ffffff; background: var(--barre-survol); }
.qui .btn:focus-visible { outline-color: #ffffff; }
.principal { min-width: 0; display: flex; flex-direction: column; }
.contenu { width: 100%; max-width: 1280px; padding: 26px 32px 60px; }

/* ═══ LES BANDES D'ETAT ════════════════════════════════════════════════════════════════════════ */
.bandes { position: sticky; top: 0; z-index: 5; }
.bande { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 10px 32px; font-size: var(--fs-body); border-bottom: 1px solid var(--line); }
.bande .point, .etat-direct .point { width: 8px; height: 8px; border-radius: var(--r-full); background: currentColor; flex: none; }
.bande-ok { background: var(--ok-bg); color: var(--ok-ink); }
.bande-attente { background: var(--wait-bg); color: var(--wait-ink); }
.bande-panne { background: var(--danger-deep); color: #ffffff; font-size: var(--fs-md); }
.bande-neutre { background: var(--off-bg); color: var(--muted); }
/* Un lien DANS une bande garde la couleur de la bande ; il se distingue par la graisse, jamais par
   un soulignement (PO, 21/10). */
.bande a { color: inherit; text-decoration: none; font-weight: var(--fw-bold); }
.bande a:hover { color: inherit; }

/* ═══ EN-TETE D'ECRAN, CARTES, INDICATEURS ═════════════════════════════════════════════════════ */
.titre-ecran { margin-bottom: 18px; }
.titre-ecran h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.aide, .fin { color: var(--muted); }
.aide { margin: 4px 0 0; max-width: 78ch; }
.fin { font-size: var(--fs-sm); }
.carte { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 16px; box-shadow: var(--sh-sm); }
.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 16px; }
.vide { color: var(--muted); padding: 18px 0; }
.erreur, .avis, .bon { padding: 12px 14px; border-radius: var(--r-sm); margin: 0 0 14px; border: 1px solid transparent; }
.erreur { background: var(--danger-bg); color: var(--danger-ink); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.avis { background: var(--wait-bg); color: var(--wait-ink); border-color: color-mix(in srgb, var(--wait) 30%, transparent); }
.bon { background: var(--ok-bg); color: var(--ok-ink); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 18px; }
.kpi { display: grid; gap: 2px; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--sh-sm); border-top: 3px solid var(--line-strong); }
.kpi-ok { border-top-color: var(--ok); }
.kpi-att { border-top-color: var(--wait); }
.kpi-ko { border-top-color: var(--danger); }
.kpi-libelle { font-size: var(--fs-micro); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kpi-valeur { font-size: var(--fs-2xl); font-weight: var(--fw-black); line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi-detail { font-size: var(--fs-sm); color: var(--muted); }

/* ═══ FILTRES ══════════════════════════════════════════════════════════════════════════════════ */
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.seg a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: var(--fs-body); font-weight: var(--fw-medium); transition: border-color var(--dur-1) var(--ease-out); }
.seg a:hover { border-color: var(--line-strong); color: var(--ink); }
.seg a.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.compte { opacity: .75; margin-left: 4px; font-variant-numeric: tabular-nums; }
.resume { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }

/* ═══ TABLEAUX : en-tetes collants, lignes de 44 px ════════════════════════════════════════════ */
.tblwrap { overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 16px; }
.carte .tblwrap { border: 0; border-radius: 0; margin: 0 -20px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 680px; font-size: var(--fs-body); }
th {
  position: sticky; top: 0; z-index: 1; background: var(--surface-2); text-align: left;
  font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  font-weight: var(--fw-semibold); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; height: var(--cible); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color var(--dur-1) var(--ease-out); }
tbody tr:hover { background: var(--surface-2); }
td code { overflow-wrap: normal; white-space: nowrap; }
td code.detail { white-space: pre-wrap; overflow-wrap: anywhere; }
td.nombre { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td a strong { color: var(--ink); }
td a:hover strong { color: var(--brand-2); }

/* ═══ PASTILLES D'ETAT ═════════════════════════════════════════════════════════════════════════ */
.pastille { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-full); font-size: var(--fs-sm); font-weight: var(--fw-semibold); white-space: nowrap; line-height: 1.4; }
.pastille::before { content: ""; width: 6px; height: 6px; border-radius: var(--r-full); background: currentColor; }
.p-nouveau, .p-ko, .p-a_valider { background: var(--danger-bg); color: var(--danger-ink); }
.p-vu, .p-en_cours, .p-encours { background: var(--wait-bg); color: var(--wait-ink); }
.p-corrige, .p-livre, .p-ok { background: var(--ok-bg); color: var(--ok-ink); }
.p-ignore, .p-refuse, .p-neutre, .p-a_faire, .p-abandonne { background: var(--off-bg); color: var(--muted); }
.p-env-prod { background: var(--brand); color: var(--on-brand); }
.p-env-prod::before, .p-env-preprod::before { display: none; }
.p-env-preprod { background: var(--off-bg); color: var(--brand-2); }
.job { display: inline-block; font-size: var(--fs-sm); padding: 1px 8px; border-radius: var(--r-xs); margin: 2px 2px 0 0; }
.job-ko { background: var(--danger-bg); color: var(--danger-ink); }
.job-tolere { background: var(--wait-bg); color: var(--wait-ink); }
.bon-texte { color: var(--ok-ink); font-weight: var(--fw-semibold); }
.ko-texte { color: var(--danger-ink); font-weight: var(--fw-semibold); }

/* ═══ FICHES ET TEXTES ═════════════════════════════════════════════════════════════════════════ */
.fiche { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 0; }
.fiche dt { color: var(--muted); }
.fiche dd { margin: 0; overflow-wrap: anywhere; }
pre.pile, pre.doc { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; overflow: auto; max-height: 480px; white-space: pre-wrap; overflow-wrap: anywhere; }
.texte-retour { white-space: pre-wrap; font-size: var(--fs-md); }
.captures { display: flex; flex-wrap: wrap; gap: 12px; }
.captures img { max-width: 100%; width: 360px; height: auto; max-height: 240px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--r-sm); }
.liste { padding-left: 18px; margin: 0; }
.liste li { margin: 4px 0; }
.alertes { margin: 0; padding-left: 16px; font-size: var(--fs-sm); }
.alertes li { margin: 2px 0; }
.decision { margin-top: 4px; color: var(--danger-ink); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
blockquote.citation { margin: 0; padding: 10px 14px; border-left: 3px solid var(--brand-2); background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; white-space: pre-wrap; }
code.detail { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); }
details > summary { cursor: pointer; }
details.pli > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: var(--cible); }
details.pli > summary::-webkit-details-marker { display: none; }
details.pli > summary h2 { display: inline; margin: 0; }
details.pli > summary::before { content: "+"; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r-xs); background: var(--off-bg); color: var(--muted); font-weight: var(--fw-bold); }
details.pli[open] > summary::before { content: "-"; }

/* La frise de disponibilite */
.frise { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; margin: 10px 0 6px; }
.case { height: 28px; border-radius: var(--r-2xs); background: var(--off-bg); }
.case-ok { background: var(--ok); }
.case-partiel { background: var(--wait); }
.case-ko { background: var(--danger); }

/* ═══ FORMULAIRES ET BOUTONS ═══════════════════════════════════════════════════════════════════ */
form.pile { display: grid; gap: 14px; }
.ligne-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ligne-form .large { flex: 1 1 100%; }
label { display: grid; gap: 6px; font-weight: var(--fw-semibold); font-size: var(--fs-body); color: var(--ink); }
input, select, textarea {
  font: inherit; font-weight: var(--fw-regular); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 10px 12px; min-height: var(--cible); max-width: 100%;
  transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--halo); }
textarea { width: 100%; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; min-height: 40px;
  border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--fs-md); font-weight: var(--fw-semibold); cursor: pointer; text-decoration: none;
  transition: background-color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: var(--on-brand); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); border-color: var(--line); }
.btn-danger { background: var(--surface); border-color: var(--danger); color: var(--danger-ink); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger-ink); }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: var(--fs-body); }
.btn-large { min-height: var(--cible); width: 100%; font-size: var(--fs-md); }
.btn .ico { width: 18px; height: 18px; }
.desactive { opacity: .45; cursor: not-allowed; }
.gestes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 10px; }
form.en-ligne { display: inline; }

/* La confirmation forte */
.confirmation { max-width: 640px; margin: 0 auto 16px; }
.confirmation-prod { border: 2px solid var(--danger); }
.cible-geste { font-size: var(--fs-md); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ═══ CONNEXION ET ACTIVATION : ECRAN PARTAGE ══════════════════════════════════════════════════ */
.auth { display: grid; grid-template-columns: minmax(320px, 5fr) 7fr; min-height: 100vh; }
.auth-marque {
  display: flex; flex-direction: column; gap: 28px; padding: 40px 44px; color: #dfe4fb;
  background: radial-gradient(120% 80% at 0% 0%, #2c3878 0%, #202a62 45%, #161c44 100%);
}
.marque-grande { font-size: var(--fs-lg); }
.marque-grande .logo { width: 40px; height: 40px; }
.auth-phrase { margin-top: auto; max-width: 42ch; }
.auth-phrase p { margin: 0 0 10px; font-size: var(--fs-md); color: #c9d0f2; }
.auth-phrase .accroche { font-size: var(--fs-display); font-weight: var(--fw-black); line-height: 1.15; color: #ffffff; letter-spacing: -.02em; margin-bottom: 14px; }
.etat-direct { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; margin: 0; padding: 8px 14px; border-radius: var(--r-full); font-size: var(--fs-body); font-weight: var(--fw-semibold); background: rgba(255, 255, 255, .1); color: #ffffff; }
.etat-ok .point { background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .2); }
.etat-ko .point { background: #f87171; box-shadow: 0 0 0 4px rgba(248, 113, 113, .2); }
.etat-neutre .point { background: #a7b6cd; }
.auth-formulaire { display: grid; place-items: center; padding: 40px 24px; }
.connexion { width: 100%; max-width: 420px; margin: 0; padding: 32px; box-shadow: var(--sh-md); }
.connexion h1 { font-size: var(--fs-2xl); margin-bottom: 6px; }
.connexion .aide { margin-bottom: 20px; }
.pied-carte { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-body); }
.pied-carte a { font-weight: var(--fw-semibold); }
/* L'ecran 2 de la connexion : le compte en clair, et un champ de code lisible d'un coup d'oeil. */
.compte-etape { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 20px; color: var(--ink); overflow-wrap: anywhere; }
.compte-etape a { font-size: var(--fs-body); font-weight: var(--fw-semibold); }
.champ-code { height: var(--cible); padding-block: 0; font-size: var(--fs-lg); font-variant-numeric: tabular-nums; letter-spacing: .2em; }
.connexion .aide-pied { margin: 12px 0 0; font-size: var(--fs-body); }
.qr { margin: 0 0 12px; display: grid; place-items: center; }
.qr svg { width: 200px; height: 200px; max-width: 100%; background: #ffffff; padding: 8px; border-radius: var(--r-sm); }
.secret code { font-size: var(--fs-md); letter-spacing: .04em; }

/* ═══ PETITS ECRANS ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .chassis { --large-barre: 212px; }
  .contenu { padding: 22px 22px 48px; }
  .bande { padding: 10px 22px; }
}
@media (max-width: 820px) {
  .chassis { grid-template-columns: minmax(0, 1fr); background: none; }
  .barre { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; }
  .barre .marque { padding: 0; flex: 1 1 auto; }
  .onglets { order: 3; flex: 1 1 100%; }
  .onglets ul { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .onglets a.on { box-shadow: inset 0 -3px 0 var(--accent); }
  .qui { margin: 0; padding: 0; border: 0; grid-auto-flow: column; align-items: center; }
  .qui-courriel { display: none; }
  .bandes { position: static; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-marque { padding: 24px; gap: 14px; }
  .auth-phrase { margin-top: 0; }
  .auth-phrase .accroche { font-size: var(--fs-2xl); }
  .auth-formulaire { padding: 24px 16px 40px; }
}
@media (max-width: 560px) {
  .contenu { padding: 16px 16px 40px; }
  .bande { padding: 10px 16px; }
  .onglets ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .onglets a { padding: 0 10px; gap: 8px; font-size: var(--fs-body); }
  .qui .btn span { display: none; }
  .connexion { padding: 22px; }
  .tblwrap { max-height: none; }
  table { min-width: 0; }
  .rtable thead { display: none; }
  .rtable tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 14px; }
  .rtable td { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; border: 0; padding: 4px 0; height: auto; }
  .rtable td::before { content: attr(data-label); color: var(--muted); font-size: var(--fs-sm); }
  td.nombre { text-align: left; }
  td code { white-space: normal; overflow-wrap: anywhere; }
  .rtable td > * { justify-self: start; max-width: 100%; }
  .carte .tblwrap { margin: 0; }
  .fiche { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .fiche dd { margin-bottom: 8px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-valeur { font-size: var(--fs-xl); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; scroll-behavior: auto !important; }
}
