/* ============================================================
   Anibal Auditor Pro — design system BiXYBER
   ============================================================
   JETONS DE COULEUR — trois couches
   1. Teinte de l'organisme : --primary --primary-hover --primary-soft --primary-softer --on-primary
      --secondary --on-secondary --accent --on-accent --side --side-2 --side-3 --side-active.
      Valeurs par défaut ci-dessous ; static/js/palette.js les SURCHARGE en style inline sur <html>.
      Les composants consomment ces jetons, jamais leurs valeurs ; ce qui dépend de la teinte
      (ombres colorées, anneau de focus, surlignages) en dérive par color-mix() dans la couche 3.
   2. Neutres et états (--bg, --surface, --text, --border, --success…) : thème clair ici,
      thème sombre dans :root[data-theme="dark"] (attribut posé sur <html> par palette.js).
   3. Dérivés (ombres, focus) et ALIAS historiques (--brand, --ink, --muted, --line, --ok, --danger,
      --warn…) : conservés pour ne rien casser, à ne plus employer dans le code neuf.
   Contrastes WCAG 2.1 AA calculés (luminance relative), en clair comme en sombre :
   texte ≥ 4,5:1 ; bordures de champs, icônes, barres ≥ 3:1.
   « Feuilles claires » (.editor, .cover-preview, .light-sheet) : contenu destiné à l'impression
   PDF/Word, il reste sur fond clair en thème sombre (neutres et états clairs redéclarés).
   ============================================================ */

/* ---- couche 1 : teinte de l'organisme (surchargée au runtime) + barre latérale ---- */
:root {
  --primary: #0b6fa4;          /* boutons, liens, onglet actif — blanc dessus 5,49:1 (l'ancien #1795d0 : 3,36:1) */
  --primary-hover: #095a86;    /* survol / appui du primaire — blanc dessus 7,45:1 */
  --primary-soft: #e3f1fa;     /* fond d'élément sélectionné — --primary dessus 4,77:1 */
  --primary-softer: #f2f8fc;   /* survol de ligne, fond d'aide */
  --on-primary: #ffffff;
  --secondary: #0d1a2b;        /* bleu nuit BiXYBER : bouton secondaire, bandeaux */
  --on-secondary: #ffffff;
  --accent: #1795d0;           /* bleu BiXYBER vif : barres de progression, liserés (élément graphique ≥ 3:1) */
  --on-accent: #0d1a2b;        /* texte posé sur l'accent : 5,21:1 */
  --side: #0d1a2b; --side-2: #132338; --side-3: #1b3049;
  --side-active: #0b6fa4;      /* élément de menu actif — texte --side-active-text dessus 5,49:1 */
  /* barre latérale, jetons fixes (non surchargés par la palette : la barre reste sombre) */
  --side-text: #b7c5d6;        /* 9,98:1 sur --side */
  --side-muted: #8394ab;       /* intertitres, version, pied — 5,66:1 sur --side, 5,12:1 sur --side-2 */
  --side-strong: #ffffff;
  --side-active-text: #ffffff;
  --side-border: rgb(255 255 255 / .06);
  --side-hover: rgb(255 255 255 / .07);
  --side-hover-strong: rgb(255 255 255 / .12);
  --side-edge: color-mix(in srgb, var(--side) 78%, #000);
  --side-bottom: color-mix(in srgb, var(--side) 85%, #000);

  --radius: 10px; --radius-sm: 6px;
  --side-w: 272px; --rail-w: 64px; --top-h: 56px; --drawer-w: 560px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  /* mouvement */
  --ease: cubic-bezier(.2, 0, 0, 1); --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur-fast: 120ms; --dur: 180ms; --dur-slow: 260ms;
}

/* Technical remediation: matrix, reviewed changes and side-by-side diffs. */
.tr-matrix{display:grid;grid-template-columns:110px repeat(5,minmax(100px,1fr));gap:5px;overflow:auto;min-width:720px}
.tr-matrix-y,.tr-matrix-x{font-size:.75rem;color:var(--muted);display:flex;align-items:center;justify-content:center;padding:7px;text-align:center}
.tr-matrix-cell{min-height:72px;border-radius:9px;padding:6px;display:flex;gap:5px;align-content:flex-start;flex-wrap:wrap;border:1px solid color-mix(in srgb,var(--border) 75%,transparent)}
.tr-matrix-cell.zone-P1{background:color-mix(in srgb,#ef4444 13%,var(--surface))}.tr-matrix-cell.zone-P2{background:color-mix(in srgb,#f97316 12%,var(--surface))}
.tr-matrix-cell.zone-P3{background:color-mix(in srgb,#22c55e 11%,var(--surface))}.tr-matrix-cell.zone-P4{background:color-mix(in srgb,#64748b 9%,var(--surface))}
.tr-matrix-point{font:700 .68rem var(--mono);padding:4px 6px;border-radius:999px;background:var(--surface);box-shadow:0 1px 4px #0002;color:var(--text)}
.tr-rem-list{display:grid;gap:14px}.tr-rem-change{padding:16px;border:1px solid var(--border);border-radius:12px;background:color-mix(in srgb,var(--surface) 95%,var(--primary))}
.tr-diff-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}.tr-diff-pair pre{white-space:pre-wrap;overflow:auto;max-height:260px;border-inline-start:3px solid #ef4444}
.tr-diff-pair pre+pre{border-inline-start-color:#22c55e}
@media(max-width:760px){.tr-diff-pair{grid-template-columns:1fr}.tr-matrix{min-width:660px}}

/* ---- couche 2 : neutres et états — thème clair (et feuilles claires en thème sombre) ---- */
:root, :root[data-theme="dark"] :is(.editor, .cover-preview, .light-sheet) {
  color-scheme: light;
  --bg: #f3f6f9; --surface: #ffffff; --surface-2: #f8fafc; --surface-3: #eef2f6;
  --text: #17202b;             /* 16,43:1 sur --surface */
  --text-2: #3b4a5c;           /* 9,05:1 */
  --text-muted: #5f6e80;       /* 5,21:1 sur --surface, 4,98:1 sur --surface-2 */
  --border: #dfe6ee;           /* séparateurs décoratifs */
  --border-soft: #eef2f6;
  --border-hover: #c7d2de;
  --border-strong: #8491a1;    /* bordure des champs de saisie — 3,2:1 sur --surface */
  /* états : couleur pleine (texte --on-status dessus ≥ 4,5:1), -soft (fond d'alerte/badge), -text (texte sur -soft), -border */
  --on-status: #ffffff;
  --success: #1a7f45; --success-soft: #e7f6ee; --success-text: #135c33; --success-border: #b7ebc6;
  --warning: #c2410c; --warning-soft: #fff4e5; --warning-text: #7c2d12; --warning-border: #fed7aa;
  --error: #c0282f;   --error-soft: #fdecec;   --error-text: #86181d;   --error-border: #f1c4c6;
  --info: #0b6fa4;    --info-soft: #e3f1fa;    --info-text: #0b4e73;    --info-border: #cfe6f5;
  --caution: #d9a400; --on-caution: #2b2300;   --caution-strong: #a16207;
  --caution-soft: #fff6d6; --caution-text: #713f12; --caution-border: #fde68a;
  --teal: #0f766e; --grey: #657282; --violet: #6d28d9; --violet-soft: #eef2ff; --violet-text: #3730a3;
  --neutral-soft: #e2e8f0; --neutral-text: #1e293b;
  /* graphiques SVG générés par le serveur : fond toujours clair (leurs couleurs sont figées) */
  --chart-bg: #ffffff; --chart-text: #17202b; --chart-grid: #dfe6ee;
  --skeleton: #e8edf3; --skeleton-hi: #f6f8fb;
  --overlay: rgb(13 26 43 / .45); --overlay-soft: rgb(13 26 43 / .25);
  --shadow-rgb: 16 24 40;
}

/* ---- thème sombre : redéfinit les couches 1 et 2 (contrastes AA vérifiés) ---- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --primary: #4db3e6; --primary-hover: #7cc8ee; --primary-soft: #12324a; --primary-softer: #0f2638; --on-primary: #06121d;
  --secondary: #2a3f5a; --on-secondary: #e6edf5; --accent: #38bdf8; --on-accent: #06121d;
  --side: #080f19; --side-2: #0e1827; --side-3: #16263a; --side-active: #1a6c9a;
  --bg: #0b1320; --surface: #121c2b; --surface-2: #172334; --surface-3: #1d2a3c;
  --text: #e6edf5; --text-2: #c1ccd9; --text-muted: #94a3b8;
  --border: #2a3a50; --border-soft: #1f2d40; --border-hover: #3b4d66; --border-strong: #5f718a;
  --on-status: #06121d;
  --success: #34c77b; --success-soft: #0f2e20; --success-text: #6fdca3; --success-border: #1f5a3c;
  --warning: #fb923c; --warning-soft: #35200e; --warning-text: #fdba74; --warning-border: #6b3a12;
  --error: #f0636a;   --error-soft: #3a1618;   --error-text: #f8a5a9;   --error-border: #6e2a2e;
  --info: #4db3e6;    --info-soft: #12324a;    --info-text: #8fd0f2;    --info-border: #1f4a66;
  --caution: #facc15; --on-caution: #2b2300;   --caution-strong: #eab308;
  --caution-soft: #332a0a; --caution-text: #fde68a; --caution-border: #5c4a10;
  --teal: #2dd4bf; --grey: #94a3b8; --violet: #a78bfa; --violet-soft: #2a2350; --violet-text: #c4b5fd;
  --neutral-soft: #263447; --neutral-text: #d5dde8;
  --chart-bg: #f8fafc; --chart-text: #17202b; --chart-grid: #cbd5e1;
  --skeleton: #1d2a3c; --skeleton-hi: #2a3a50;
  --overlay: rgb(0 0 0 / .6); --overlay-soft: rgb(0 0 0 / .4);
  --shadow-rgb: 0 0 0;
}
/* feuilles claires en sombre : les fonds teintés dérivent de la teinte primaire sur fond clair */
:root[data-theme="dark"] :is(.editor, .cover-preview, .light-sheet) {
  --primary-soft: color-mix(in srgb, var(--primary) 16%, #fff);
  --primary-softer: color-mix(in srgb, var(--primary) 8%, #fff);
}

/* ---- couche 3 : dérivés et alias (redéclarés sur les feuilles claires pour s'y résoudre) ---- */
:root, :is(.editor, .cover-preview, .light-sheet) {
  --shadow-sm: 0 1px 2px rgb(var(--shadow-rgb) / .06);
  --shadow: 0 1px 2px rgb(var(--shadow-rgb) / .06), 0 1px 3px rgb(var(--shadow-rgb) / .1);
  --shadow-md: 0 4px 14px rgb(var(--shadow-rgb) / .12), 0 1px 3px rgb(var(--shadow-rgb) / .08);
  --shadow-lg: 0 10px 30px rgb(var(--shadow-rgb) / .2);
  --shadow-primary: 0 2px 6px color-mix(in srgb, var(--primary) 30%, transparent);
  --shadow-primary-lg: 0 4px 12px color-mix(in srgb, var(--primary) 34%, transparent);
  --shadow-nav-active: 0 4px 12px color-mix(in srgb, var(--side-active) 35%, transparent);
  --primary-ring: color-mix(in srgb, var(--primary) 22%, transparent);
  --field-ring: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
  /* anneau de focus clavier : liseré de fond + anneau primaire (≥ 3:1 sur la surface) */
  --focus-ring: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary);
  /* alias historiques */
  --brand: var(--primary); --brand-600: var(--primary-hover); --brand-100: var(--primary-soft); --brand-50: var(--primary-softer);
  --brand-300: color-mix(in srgb, var(--primary) 55%, var(--surface));
  --ink: var(--text); --ink-2: var(--text-2); --muted: var(--text-muted); --line: var(--border); --line-2: var(--border-soft);
  --paper: var(--surface);
  --ok: var(--success); --danger: var(--error); --warn: var(--warning); --warn-600: var(--warning-text);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; } h4 { font-size: 13.5px; }
p { margin: 0 0 8px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
::selection { background: var(--primary-soft); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--side-w) 1fr; grid-template-rows: var(--top-h) 1fr; height: 100vh; overflow: hidden; }
.app.login-mode { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.side { grid-row: 1 / 3; background: linear-gradient(180deg, var(--side) 0%, var(--side-bottom) 100%); color: var(--side-text); display: flex; flex-direction: column; overflow: hidden; border-right: 1px solid var(--side-edge); }
.side-brand { height: var(--top-h); display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--side-border); flex-shrink: 0; }
.side-brand img { height: 30px; width: auto; }
.side-brand .brand-name { font-weight: 700; color: var(--side-strong); font-size: 15px; line-height: 1.15; letter-spacing: .02em; white-space: nowrap; }
.side-brand .brand-sub { font-size: 10.5px; line-height: 1.25; color: var(--side-text); white-space: nowrap; }
.side-brand .brand-ver { font-family: var(--mono); font-size: 9.5px; line-height: 1.3; letter-spacing: .04em; color: var(--side-muted); white-space: nowrap; }
.side-brand .burger { margin-left: auto; background: transparent; border: 0; color: var(--side-text); cursor: pointer; padding: 6px; border-radius: 6px; transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.side-brand .burger:hover { background: var(--side-hover); color: var(--side-strong); }
.side-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 8px 20px; scrollbar-width: thin; scrollbar-color: var(--side-3) transparent; }
.side-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--side-muted); padding: 14px 10px 6px; white-space: nowrap; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--side-text); cursor: pointer; white-space: nowrap; font-size: 13.5px; user-select: none; border: 0; background: transparent; width: 100%; text-align: left;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease); }
.nav-item:hover { background: var(--side-hover); color: var(--side-strong); text-decoration: none; }
.nav-item.active { background: var(--side-active); color: var(--side-active-text); box-shadow: var(--shadow-nav-active); }
.nav-item .ico { width: 20px; height: 20px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.nav-item .ico svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.nav-item:hover .ico svg { transform: scale(1.06); }
.nav-item .lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav-item .cnt { font-size: 11px; background: var(--side-hover-strong); padding: 1px 7px; border-radius: 10px; }
.nav-item.sub { padding-left: 24px; font-size: 13px; }
.nav-item.sub2 { padding-left: 38px; font-size: 12.5px; }
.nav-item .chev { width: 14px; height: 14px; transition: transform .15s; opacity: .7; }
.nav-item.open .chev { transform: rotate(90deg); }
.nav-group.collapsed .nav-children { display: none; }
.side-foot { border-top: 1px solid var(--side-border); padding: 10px 12px; font-size: 11px; color: var(--side-muted); white-space: nowrap; }
/* rail (menu replié) : au-delà de 760 px seulement — en dessous, la barre devient un tiroir (voir « adaptatif ») */
@media (min-width: 761px) {
  .app.rail { grid-template-columns: var(--rail-w) 1fr; }
  .app.rail .side .lbl, .app.rail .side .cnt, .app.rail .side .chev, .app.rail .side-section, .app.rail .side-brand .brand-txt, .app.rail .side-foot, .app.rail .nav-item.sub, .app.rail .nav-item.sub2, .app.rail .side .audit-card { display: none; }
  .app.rail .nav-item { justify-content: center; padding: 10px; }
  .app.rail .side-brand { flex-direction: column; justify-content: center; gap: 4px; padding: 8px 0; height: auto; }
  .app.rail .side-brand .burger { margin-left: 0; }
  .app.rail .side-brand img { height: 24px; }
}
.side .audit-card { margin: 6px 4px 8px; padding: 10px 12px; background: var(--side-2); border-radius: 10px; border: 1px solid var(--side-3); }
.side .audit-card .ref { font-size: 11px; color: var(--side-muted); font-family: var(--mono); }
.side .audit-card .ttl { color: var(--side-strong); font-weight: 600; font-size: 13px; margin: 2px 0 6px; line-height: 1.25; }
.side .audit-card .bar { height: 5px; background: var(--side-3); border-radius: 4px; overflow: hidden; }
.side .audit-card .bar > i { display: block; height: 100%; background: var(--accent); }
.side .audit-card .pct { font-size: 11px; color: var(--side-muted); margin-top: 4px; display: flex; justify-content: space-between; }

.top { grid-column: 2; display: flex; align-items: center; gap: 14px; padding: 0 22px; background: var(--surface); border-bottom: 1px solid var(--border); }
.top .crumbs { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-muted); min-width: 0; }
.top .crumbs a { color: var(--text-muted); }
.top .crumbs .cur { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .crumbs .sep { opacity: .5; }
.top .spacer { flex: 1; }
.top .save-state { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.top .save-state .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.top .save-state.saving .dot { background: var(--caution); animation: pulse 1s infinite; }
.top .save-state.error .dot { background: var(--error); }
@keyframes pulse { 50% { opacity: .3; } }
.top .user { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 20px; border: 1px solid transparent; transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.top .user:hover { background: var(--surface-2); border-color: var(--border); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-hover)); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; flex-shrink: 0; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
/* 2.26.0 : avatar illustré. Le buste est recadré sur le visage dans le cercle ; fond neutre pour qu'un vêtement sombre
   ou clair se lise sur les deux thèmes. */
.avatar.a-img { background: var(--surface-3); padding: 0; overflow: hidden; }
.avatar.a-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.32); transform-origin: 50% 28%; display: block; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.avatar.xl { width: 96px; height: 96px; font-size: 28px; }
.av-profil { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.av-filtres { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.av-filtre { display: grid; gap: 2px; font-size: .82rem; color: var(--text-muted); }
.av-q { min-width: 180px; font: inherit; padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); }
.av-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; max-height: 60vh; overflow: auto; padding: 2px; }
.av-tuile { display: grid; justify-items: center; gap: 6px; padding: 10px 6px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2);
  color: inherit; font: inherit; cursor: pointer; transition: border-color var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast); }
.av-tuile:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.av-tuile:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.av-tuile.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); background: var(--primary-softer); }
.av-tuile img { width: 88px; height: 88px; border-radius: 50%; background: var(--surface-3); }
.av-lib { font-size: .8rem; font-weight: 600; text-align: center; line-height: 1.25; color: var(--text); }
.av-sous { font-size: .72rem; text-align: center; line-height: 1.2; color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { .av-tuile { transition: none; } .av-tuile:hover { transform: none; } }
.top .user .nm { font-weight: 600; font-size: 13px; line-height: 1.1; }
.top .user .rl { font-size: 11px; color: var(--text-muted); }

.main { grid-column: 2; overflow: auto; padding: 22px 26px 60px; position: relative; }
.main.flush { padding: 0; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .grow { flex: 1; min-width: 200px; }
.page-head .sub { color: var(--text-muted); margin-top: 4px; font-size: 13px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- components ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font-weight: 550; font-size: 13px; line-height: 1.3; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur-fast) var(--ease); }
.btn:hover { border-color: var(--border-hover); background: var(--surface-2); text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-primary); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); box-shadow: var(--shadow-primary-lg); }
.btn.secondary { background: var(--secondary); border-color: var(--secondary); color: var(--on-secondary); }
.btn.secondary:hover { background: color-mix(in srgb, var(--secondary) 86%, var(--on-secondary)); border-color: color-mix(in srgb, var(--secondary) 86%, var(--on-secondary)); }
.btn.danger { color: var(--error-text); border-color: var(--error-border); background: var(--error-soft); }
.btn.danger:hover { background: color-mix(in srgb, var(--error) 14%, var(--surface)); border-color: var(--error); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { padding: 4px 9px; font-size: 12px; border-radius: 6px; }
.btn.xs { padding: 2px 7px; font-size: 11.5px; border-radius: 5px; }
.btn.icon { padding: 6px; }
.btn svg { width: 15px; height: 15px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 8px 8px 0; }
.btn-group .btn.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); z-index: 1; }
/* focus clavier uniforme (la souris ne déclenche pas :focus-visible sur les boutons) */
:where(.btn, .icon-btn, .report-btn, .nav-item, .tab, button.chip, .pick, .t-node, .rs, .tuto-pill, .burger, .mobile-burger, .toast-close, a, [tabindex]):focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn.primary:focus-visible { box-shadow: var(--focus-ring), var(--shadow-primary); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .card-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); }
.card .card-h h3 { flex: 1; }
.card .card-b { padding: 16px; }
.card .card-b.tight { padding: 0; }
/* cartes cliquables : légère élévation (transform seul, sans effet sur la mise en page) */
.card.clickable, .kpi.clickable { cursor: pointer; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.card.clickable:hover, .kpi.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-hover); }
.card.clickable:active, .kpi.clickable:active { transform: translateY(0); box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1200px) { .grid.c4, .grid.c5 { grid-template-columns: repeat(2, 1fr); } .grid.c3 { grid-template-columns: repeat(2, 1fr); } }
.kpi { padding: 14px 16px; }
.kpi .k-lbl { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi .k-val { font-size: 26px; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }
.kpi .k-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.kpi.accent { border-left: 4px solid var(--accent); }
.kpi.danger { border-left: 4px solid var(--error); }
.kpi.warn { border-left: 4px solid var(--warning); }
.kpi.ok { border-left: 4px solid var(--success); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--on-status); background: var(--grey); white-space: nowrap; line-height: 1.4; }
.badge.outline { background: transparent; border: 1px solid currentColor; }
.badge.lvl-CONFORME { background: var(--success); } .badge.lvl-NC_MAJ { background: var(--error); } .badge.lvl-NC_MIN { background: var(--warning); }
.badge.lvl-OBS { background: var(--caution); color: var(--on-caution); } .badge.lvl-PA { background: var(--info); } .badge.lvl-PF { background: var(--teal); } .badge.lvl-NA { background: var(--grey); }
.badge.lvl-none { background: var(--neutral-soft); color: var(--text-2); }
.badge.st-draft { background: var(--neutral-soft); color: var(--neutral-text); } .badge.st-planned, .badge.st-submitted { background: var(--info); } .badge.st-in_progress { background: var(--primary); color: var(--on-primary); }
.badge.st-consolidation { background: var(--violet); } .badge.st-reporting { background: var(--teal); } .badge.st-closed, .badge.st-validated { background: var(--success); } .badge.st-rejected { background: var(--error); }
.badge.st-todo { background: var(--neutral-soft); color: var(--neutral-text); } .badge.st-done { background: var(--success); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-size: 11.5px; font-weight: 600; }
.chip.grey { background: var(--border-soft); color: var(--text-2); }
.chip.fam { background: var(--violet-soft); color: var(--violet-text); }

.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); font-weight: 600; position: sticky; top: 0; z-index: 1; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: top; transition: background-color var(--dur-fast) var(--ease); }
.tbl tr:hover td { background: var(--primary-softer); }
.tbl tr.clickable { cursor: pointer; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .muted { color: var(--text-muted); }
.tbl input, .tbl select, .tbl textarea { width: 100%; }
.tbl.compact td, .tbl.compact th { padding: 5px 8px; }
.empty { padding: 36px 20px; text-align: center; color: var(--text-muted); }
.empty .big { font-size: 34px; margin-bottom: 8px; opacity: .5; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 11.5px; color: var(--text-muted); }
/* Source française affichée sous un champ en mode traduction (1.100.0). Le texte d'origine peut être long
   — une consigne d'audit fait plusieurs lignes — et il ne doit pas repousser le champ suivant hors de vue :
   d'où la hauteur bornée et le défilement, plutôt qu'une troncature qui cacherait ce qu'on doit traduire. */
.field .hint { max-height: 5.5em; overflow-y: auto; white-space: pre-wrap; }
.input, input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea { padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); outline: none; width: 100%;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: var(--field-ring); }
textarea { min-height: 72px; resize: vertical; line-height: 1.45; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--primary); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }

.progress { height: 8px; background: var(--border-soft); border-radius: 6px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .3s; }
.progress.ok > i { background: var(--success); } .progress.warn > i { background: var(--warning); }
.stack { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--border-soft); }
.stack > i { display: block; height: 100%; }
.donut { width: 150px; height: 150px; border-radius: 50%; position: relative; display: inline-block; }
.donut::after { content: attr(data-label); position: absolute; inset: 28px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; text-align: center; white-space: pre-line; line-height: 1.1; }
.legend { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs .tab { padding: 9px 14px; cursor: pointer; color: var(--text-muted); font-weight: 550; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 13.5px; background: none; border-top: 0; border-left: 0; border-right: 0;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur-fast) var(--ease); border-radius: 6px 6px 0 0; }
.tabs .tab:hover { color: var(--text); border-bottom-color: var(--border-hover); background: var(--surface-2); }
.tabs .tab.active { color: var(--primary); border-bottom-color: var(--primary); background: transparent; }

.tree { font-size: 13px; }
.tree .t-node { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; cursor: pointer; user-select: none; transition: background-color var(--dur-fast) var(--ease); }
.tree .t-node:hover { background: var(--border-soft); }
.tree .t-node.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.tree .t-node .t-id { font-family: var(--mono); font-size: 11.5px; color: var(--text-muted); flex-shrink: 0; }
.tree .t-node .t-ttl { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree .t-node .t-cnt { font-size: 11px; color: var(--text-muted); }
.tree .t-node .chev { width: 12px; height: 12px; flex-shrink: 0; transition: transform .15s; opacity: .6; }
.tree .t-node.open .chev { transform: rotate(90deg); }
.tree .t-children { margin-left: 14px; border-left: 1px dashed var(--border); padding-left: 4px; }
.tree .t-group.collapsed > .t-children { display: none; }
.tree .mini-bar { width: 46px; height: 5px; background: var(--border-soft); border-radius: 3px; overflow: hidden; flex-shrink: 0; }
.tree .mini-bar i { display: block; height: 100%; background: var(--success); }

.split { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
.split .pane-left { position: sticky; top: 0; max-height: calc(100vh - var(--top-h) - 44px); overflow: auto; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } .split .pane-left { position: static; max-height: none; } }

.req-list .req { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border-soft); cursor: pointer; align-items: center; transition: background-color var(--dur-fast) var(--ease); }
.req-list .req:hover { background: var(--primary-softer); }
.req-list .req.active { background: var(--primary-soft); }
.req-list .req.excluded { opacity: .5; }
.req-list .req .r-id { font-family: var(--mono); font-size: 12px; color: var(--primary); font-weight: 600; }
.req-list .req .r-ttl { font-weight: 550; }
.req-list .req .r-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 3px; font-size: 11.5px; color: var(--text-muted); }
.req-list .req .r-right { display: flex; gap: 6px; align-items: center; }
.req-list .chap-row { padding: 8px 14px; background: var(--surface-2); font-weight: 650; font-size: 12.5px; color: var(--text-2); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1; }
.dot-w { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

/* drawer */
.drawer-bg { position: fixed; inset: 0; background: var(--overlay-soft); z-index: 40; opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(var(--drawer-w), 96vw); background: var(--surface); box-shadow: var(--shadow-lg); z-index: 41; transform: translateX(100%); transition: transform var(--dur-slow) var(--ease-out); display: flex; flex-direction: column; }
.drawer.wide { width: min(900px, 96vw); }
.drawer.open { transform: none; }
.drawer-bg.open { opacity: 1; pointer-events: auto; }
.drawer .d-h { display: flex; align-items: flex-start; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.drawer .d-h h3 { flex: 1; line-height: 1.3; }
.drawer .d-b { flex: 1; overflow: auto; padding: 16px 18px; }
.drawer .d-f { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; background: var(--surface-2); }
.d-sec { margin-bottom: 16px; }
.d-sec h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 6px; }
.d-sec .box { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.d-sec ul { margin: 0; padding-left: 18px; }
.obs-pick { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.obs-pick .op { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border-soft); cursor: pointer; font-size: 12.5px; align-items: center; }
.obs-pick .op:last-child { border-bottom: 0; }
.obs-pick .op:hover { background: var(--primary-softer); }
.obs-pick .op.on { background: var(--primary-soft); }
.obs-pick .op-h { padding: 6px 10px; background: var(--surface-2); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.finding-card { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: var(--surface); }
.finding-card .fc-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12.5px; }
.finding-card .fc-h .who { font-weight: 600; }
.finding-card .fc-b { font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.finding-card.mine { border-color: var(--primary); }

/* modal */
.modal-bg { position: fixed; inset: 0; background: var(--overlay); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade var(--dur-fast) var(--ease); }
@keyframes fade { from { opacity: 0; } }
/* `min-width: 0` est obligatoire : sans lui, cet enfant flex garde `min-width: auto`, ne peut pas rétrécir sous la
   largeur de son contenu et — comme il est centré — déborde **des deux côtés**, rendant sa partie gauche
   inatteignable au défilement. C'est ce qui cassait la comparaison d'anonymisation jusqu'à la 1.69.0. */
.modal { background: var(--surface); color: var(--text); border-radius: 14px; width: min(640px, 100%); min-width: 0; max-height: 92vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: modal-in var(--dur) var(--ease-out); }
.modal.wide { width: min(1000px, 100%); }
.modal.xl { width: min(1280px, 100%); }
/* Modal « plein écran » (comparaison d'anonymisation) : le corps ne défile pas lui-même, il délègue à son contenu.
   Sans cela, trois conteneurs de défilement se superposent et aucun panneau interne ne défile jamais. */
.modal.full { width: 100%; height: 92vh; }
.modal.full .m-b { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.modal.full .m-b > * { min-height: 0; }
@keyframes up { from { transform: translateY(12px); opacity: 0; } }
@keyframes modal-in { from { transform: translateY(10px) scale(.985); opacity: 0; } }
.modal .m-h { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.modal .m-h h3 { flex: 1; }
.modal .m-b { padding: 18px 20px; overflow: auto; }
.modal .m-f { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); border-radius: 0 0 14px 14px; }
.steps { display: flex; gap: 6px; margin-bottom: 16px; }
.steps .s { flex: 1; padding: 8px 10px; border-radius: 8px; background: var(--border-soft); font-size: 12px; color: var(--text-muted); font-weight: 600; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.steps .s.on { background: var(--primary); color: var(--on-primary); } .steps .s.done { background: var(--primary-soft); color: var(--primary); }
.pick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pick { border: 1px solid var(--border); border-radius: 10px; padding: 12px; cursor: pointer; transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease); }
.pick:hover { border-color: var(--primary); background: var(--primary-softer); }
.pick.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 2px var(--primary-ring); }
.pick .p-t { font-weight: 600; font-size: 13px; }
.pick .p-d { font-size: 12px; color: var(--text-muted); margin-top: 3px; line-height: 1.4; }

/* ---------- toasts ----------
   Balisage produit par toast() (core.js) : <div class="toast success|error|warn|info">message</div> dans #toasts.
   Sans changement de JS, le CSS dessine l'icône (::before, pastille ✓ ✕ ! i) et la barre de progression (::after).
   Options côté JS :
   - style="--toast-ms: 6000ms" sur .toast : cale la barre sur la durée d'affichage (3500 ms par défaut) ;
   - classe .leaving ajoutée ~180 ms avant remove() : animation de sortie ;
   - enfant <button class="toast-close"> : bouton de fermeture stylé s'il est présent.
   Variantes : .success, .error, .warn, .info (défaut), .ok (alias de .success, utilisé par le portail). */
.toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 100; pointer-events: none; }
.toast { --tone: var(--info); --glyph: "i"; --toast-dx: 16px;
  position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 10px; pointer-events: auto;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--tone);
  padding: 10px 14px 12px 12px; border-radius: 8px; font-size: 13px; line-height: 1.4; box-shadow: var(--shadow-lg); max-width: 380px;
  animation: toast-in var(--dur) var(--ease-out) both; }
.toast::before { content: var(--glyph); flex: none; width: 18px; height: 18px; margin-top: 0; border-radius: 50%; background: var(--tone); color: var(--on-status);
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; line-height: 1; font-family: var(--font); }
.toast::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tone); opacity: .6; transform-origin: left center;
  animation: toast-bar var(--toast-ms, 3500ms) linear forwards; }
.toast.success, .toast.ok { --tone: var(--success); --glyph: "\2713"; }
.toast.error { --tone: var(--error); --glyph: "\2715"; }
.toast.warn { --tone: var(--warning); --glyph: "!"; }
.toast.info { --tone: var(--info); --glyph: "i"; }
.toast.leaving { animation: toast-out var(--dur) var(--ease) forwards; }
.toast .toast-close { margin-left: auto; background: transparent; border: 0; color: var(--text-muted); cursor: pointer; padding: 0 2px; border-radius: 4px; line-height: 1; }
.toast .toast-close:hover { color: var(--text); }
.toast .toast-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.toast .toast-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.toast.persistent::after { display: none; }
.toasts { max-height: calc(100vh - 36px); overflow-y: auto; }
.warn-text { color: var(--warning); font-weight: 600; }
.ok-text { color: var(--success); font-weight: 600; }
/* Valeurs contextuelles d'une remédiation (1.51.0) */
.rv-panel { border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px 12px; margin: 8px 0 12px; background: var(--surface-2); }
.rv-head { margin-bottom: 8px; }
.rv-row { padding: 8px 0; border-top: 1px solid var(--border-soft); }
.rv-row:first-of-type { border-top: 0; }
.rv-label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.rv-key { font-size: 11.5px; direction: ltr; unicode-bidi: isolate; color: var(--text-muted); }
.rv-input { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rv-input input[type=text], .rv-input input[type=password] { min-width: 260px; font-family: var(--mono); }
.rv-row-wide .fi-field { flex: 1 1 100%; align-self: stretch; }
.rv-row-wide .rv-input input[type=text] { width: 100%; max-width: 60rem; }
.rv-multi { display: flex; gap: 6px 14px; flex-wrap: wrap; }
.rv-secret { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--text-2); }
.rv-conf-high { background: var(--success-soft, var(--surface-3)); }
.rv-conf-medium { background: var(--warning-soft); color: var(--warning-text); }
.rv-conf-low { background: var(--warning-soft); color: var(--warning-text); font-weight: 600; }
.rv-summary { margin-top: 8px; }
/* Saisie contextuelle des valeurs (lot V2, 1.57.0) */
.fi-field { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.fi-combo { position: relative; display: flex; flex-direction: column; gap: 2px; }
.fi-combo-input { min-width: 280px; font-family: var(--mono); }
.fi-list { position: absolute; inset-inline-start: 0; top: 100%; z-index: 30; min-width: 320px; max-width: 480px;
  max-height: 260px; overflow: auto; background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); padding: 4px; }
.fi-item { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 5px 8px; border: 0;
  border-radius: 6px; background: none; color: inherit; text-align: start; cursor: pointer; }
.fi-item:hover, .fi-item:focus { background: var(--surface-3); }
.fi-item-label { font-family: var(--mono); }
.fi-free { font-style: italic; }
.fi-none { padding: 5px 8px; }
.fi-source, .fi-example { font-size: 11.5px; }
.fi-range { display: flex; gap: 10px; flex-wrap: wrap; }
.fi-range label { display: flex; flex-direction: column; gap: 2px; }
.fi-duration { display: flex; gap: 6px; align-items: center; }
.fi-suggest { display: flex; gap: 6px; flex-wrap: wrap; }
/* Recherche globale (lot UX-5, 1.65.0) */
.gs-overlay { position: fixed; inset: 0; z-index: 1200; background: rgba(0, 0, 0, .35); display: flex;
  align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; }
.gs-panel { width: min(720px, 100%); max-height: 70vh; display: flex; flex-direction: column;
  background: var(--surface-1, var(--surface)); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28); overflow: hidden; }
.gs-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); }
.gs-input { flex: 1; border: 0; outline: none; background: none; font-size: 15px; color: inherit; }
.gs-results { overflow: auto; padding: 6px; }
.gs-group { display: flex; align-items: center; gap: 8px; padding: 8px 10px 4px; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.gs-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%;
  padding: 7px 10px; border: 0; border-radius: 8px; background: none; color: inherit; text-align: start; cursor: pointer; }
.gs-item:hover, .gs-item.on { background: var(--surface-3); }
.gs-item-title { font-weight: 600; }
.gs-none, .gs-more { padding: 10px 12px; }
.gs-hint { padding: 8px 12px; border-top: 1px solid var(--border-soft); }
/* Contrôles avant génération (lot V4, 1.59.0) */
.pf-item { border: 1px solid var(--border-soft); border-inline-start-width: 4px; border-radius: 8px;
  padding: 8px 10px; margin-bottom: 8px; }
.pf-item.blocked { border-inline-start-color: var(--danger); }
.pf-item.warning { border-inline-start-color: var(--warning); }
.pf-item.ok { border-inline-start-color: var(--success, var(--border)); }
.pf-checks { margin: 6px 0 0; padding-inline-start: 18px; }
.pf-check { margin: 3px 0; }
/* Correspondance constat → ligne (1.52.0) */
.rm-cand { border: 1px solid var(--border-soft); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.rm-cand pre { margin: 6px 0; }
.rm-window { max-height: 45vh; overflow: auto; border: 1px solid var(--border-soft); border-radius: 6px; font-family: var(--mono); font-size: 12px; background: var(--surface-2); text-align: left; }
.rm-line { display: flex; gap: 10px; padding: 1px 8px; cursor: pointer; white-space: pre; }
.rm-line:hover { background: var(--surface-3); }
.rm-line.was { background: var(--warning-soft); }
.rm-line.sel { background: var(--accent); color: var(--on-status); }
.rm-no { color: var(--text-muted); min-width: 42px; text-align: right; user-select: none; }
.rm-line.sel .rm-no { color: inherit; }
/* Remédiation en masse (1.54.0) */
tr.bulk-review td { background: var(--warning-soft); }
.rv-explain { margin-top: 8px; font-size: 13px; }
.rv-explain ul { margin: 4px 0; padding-inline-start: 20px; }
.danger-text { color: var(--error); }
/* détail structuré d'une erreur (liste d'éléments en cause) */
.err-items { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.err-items th, .err-items td { text-align: start; padding: 5px 8px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.err-items td.entry { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; direction: ltr; unicode-bidi: isolate; }
.err-refs dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; }
.err-refs dt { color: var(--text-muted); }
.err-refs dd { margin: 0; }
.err-refs code { direction: ltr; unicode-bidi: isolate; user-select: all; }
/* Centre d'erreurs (1.49.0) */
.icon-btn.errc-btn { color: var(--text-muted); }
.icon-btn.errc-btn.has-errors { color: var(--error); }
.ec-list h4 { margin: 4px 0 8px; }
.ec-item { border: 1px solid var(--border-soft); border-inline-start: 4px solid var(--error); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: var(--surface); }
.ec-item.ec-warning { border-inline-start-color: var(--warning); }
.ec-item.unread { box-shadow: var(--shadow); }
.ec-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ec-head svg { color: var(--error); flex: none; }
.ec-warning .ec-head svg { color: var(--warning); }
.ec-msg { margin: 6px 0 4px; font-weight: 500; overflow-wrap: anywhere; }
.ec-tech { font-family: var(--mono); font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; direction: ltr; unicode-bidi: isolate; }
.ec-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0; }
.ec-meta code { font-size: 11.5px; direction: ltr; unicode-bidi: isolate; user-select: all; }
.ec-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
/* Explication d'erreur et ticket (1.50.0) */
.err-explain { border: 1px solid var(--border-soft); border-inline-start: 4px solid var(--error); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; background: var(--surface-2); }
.err-explain-warning { border-inline-start-color: var(--warning); }
.err-explain-info { border-inline-start-color: var(--info, var(--accent)); }
.err-explain-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.err-explain-head code { font-size: 12px; direction: ltr; unicode-bidi: isolate; }
.err-explain h4 { margin: 10px 0 2px; font-size: 13px; }
.err-explain p { margin: 2px 0; }
.err-explain ol { margin: 2px 0 6px; padding-inline-start: 20px; }
.err-attached { border: 1px dashed var(--border); border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.err-attached h4 { margin: 0 0 6px; display: flex; align-items: center; gap: 4px; }
.err-attached code { direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
/* Diagnostics (1.49.0) */
.diag-lv { font-weight: 600; }
.diag-lv-error, .diag-lv-critical { background: var(--error); color: var(--on-status); }
.diag-lv-warning { background: var(--warning); color: var(--on-status); }
.diag-lv-info, .diag-lv-debug { background: var(--surface-2); color: var(--text-2); }
.diag-mono, .diag-mono-input { font-family: var(--mono); font-size: 12px; direction: ltr; unicode-bidi: isolate; }
.diag-mono-input { min-width: 220px; text-transform: uppercase; }
.diag-table td.diag-msg { max-width: 460px; overflow-wrap: anywhere; }
.diag-filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.diag-filters input[type=search] { min-width: 240px; flex: 1; }
.diag-message { font-weight: 500; overflow-wrap: anywhere; }
.diag-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.diag-dl dt { color: var(--text-muted); }
.diag-dl dd { margin: 0; overflow-wrap: anywhere; }
.diag-pre { max-height: 40vh; overflow: auto; font-family: var(--mono); font-size: 12px; background: var(--surface-2); padding: 10px; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; direction: ltr; text-align: left; }
.diag-crumbs, .diag-timeline { padding-inline-start: 20px; margin: 4px 0; }
.diag-crumbs li { font-size: 12.5px; }
.diag-timeline li { margin-bottom: 8px; padding-inline-start: 4px; }
.diag-timeline li.bad { color: var(--error); }
.diag-retention { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 16px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
tr.clickable { cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(var(--toast-dx)); } }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1200px 600px at 20% 0%, var(--side-3) 0%, var(--side) 55%, var(--side-edge) 100%); }
.login .box { width: min(420px, 92vw); background: var(--surface); color: var(--text); border-radius: 16px; padding: 32px 32px 26px; box-shadow: var(--shadow-lg); animation: modal-in var(--dur-slow) var(--ease-out); }
.login .box img { height: 54px; display: block; margin: 0 auto 8px; }
.login .box .tag { text-align: center; color: var(--text-muted); font-size: 12.5px; margin-bottom: 4px; }
.login .box .ver { text-align: center; font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 20px; min-height: 13px; }
.login .box h1 { text-align: center; font-size: 19px; margin-bottom: 4px; }
.login .foot { color: var(--side-muted); font-size: 11.5px; text-align: center; margin-top: 16px; }
/* choix de la langue : discret, mais présent avant l'authentification */
.login .lang-row { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; }
.login .lang-row svg { width: 13px; height: 13px; color: var(--text-muted); }
.lang-select { border: 1px solid var(--border-strong); border-radius: 7px; padding: 4px 8px; font-size: 12.5px; color: var(--text-muted); background: var(--surface); cursor: pointer; }
.lang-select:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }

/* accordions / phases */
.acc { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; background: var(--surface); overflow: hidden; }
.acc .acc-h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; background: var(--surface-2); transition: background-color var(--dur-fast) var(--ease); }
.acc .acc-h:hover { background: var(--surface-3); }
.acc .acc-h .n { width: 34px; height: 34px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.acc .acc-h .t { flex: 1; } .acc .acc-h .t b { display: block; } .acc .acc-h .t span { font-size: 12px; color: var(--text-muted); }
.acc .acc-h > svg { width: 16px; height: 16px; flex-shrink: 0; transition: transform .15s; opacity: .6; }
.acc.open .acc-h > svg { transform: rotate(90deg); }
.acc .acc-b { padding: 6px 16px 14px; display: none; }
.acc.open .acc-b { display: block; }
.step { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); align-items: start; }
.step:last-child { border-bottom: 0; }
.step .s-t { font-weight: 600; }
.step .s-d { color: var(--text-2); font-size: 12.5px; margin-top: 3px; line-height: 1.45; }
.step .s-meta { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 5px; }
.step .s-meta .chip { font-weight: 500; }
.step textarea { margin-top: 6px; min-height: 40px; font-size: 12.5px; }
.step select { width: 130px; }
.step.done .s-t { color: var(--text-muted); text-decoration: line-through; }

.day-block { margin-bottom: 14px; }
.day-block .day-h { display: flex; align-items: center; gap: 10px; font-weight: 650; margin-bottom: 6px; }
.day-block .day-h .d-date { font-weight: 500; color: var(--text-muted); font-size: 12.5px; }

/* report editor — feuille claire (contenu destiné au PDF/Word), y compris en thème sombre */
.report-layout { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
.rep-sections .rs { padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; display: flex; align-items: center; gap: 8px; transition: background-color var(--dur-fast) var(--ease); }
.rep-sections .rs:hover { background: var(--border-soft); }
.rep-sections .rs.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.rep-sections .rs .auto { font-size: 10px; color: var(--text-muted); margin-left: auto; }
.editor { min-height: 400px; padding: 22px 28px; outline: none; line-height: 1.55; font-size: 13.5px; background: var(--surface); color: var(--text); }
.editor:focus { box-shadow: inset 0 0 0 2px var(--primary-soft); }
.editor h4 { margin: 14px 0 6px; color: var(--text-2); }
.editor table { border-collapse: collapse; width: 100%; font-size: 12.5px; margin: 8px 0 12px; }
.editor th, .editor td { border: 1px solid var(--border); padding: 5px 7px; text-align: left; vertical-align: top; }
.editor th { background: var(--surface-2); }
.editor .badge { font-size: 10.5px; }
.editor .finding { border-left: 3px solid var(--primary); padding: 6px 12px; margin: 9px 0; background: var(--surface-2); }
.editor .finding.lvl-NC_MAJ { border-left-color: var(--error); } .editor .finding.lvl-NC_MIN { border-left-color: var(--warning); }
.editor .finding.lvl-OBS { border-left-color: var(--caution); } .editor .finding.lvl-PA { border-left-color: var(--info); }
.editor .finding.lvl-PF { border-left-color: var(--teal); }
.editor .finding .f-req { color: var(--text-2); font-size: 12px; font-style: italic; }
.editor .finding .f-meta { margin-top: 4px; }
.editor .muted { color: var(--text-muted); font-size: 12px; }
.editor .verdict { background: var(--primary-softer); border-left: 4px solid var(--primary); padding: 10px 14px; margin: 12px 0; }
.editor .charts { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; margin: 14px 0; }
.editor .legend-wrap { padding-top: 26px; }
.editor .two { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.editor .two > div { flex: 1; min-width: 230px; }
.editor .kpis { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.editor .kpi { flex: 1; min-width: 118px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; }
.editor .kpi .v { font-size: 22px; font-weight: 700; line-height: 1.1; }
.editor .kpi .l { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.editor .note { background: var(--surface-2); border-left: 3px solid var(--border); padding: 8px 12px; margin: 10px 0; font-size: 12.5px; }
.editor figure { margin: 0 0 10px; }
.editor figcaption { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 2px; }
.editor svg.chart { max-width: 100%; height: auto; }
.editor table.kpi { width: auto; min-width: 55%; }
.ed-toolbar { display: flex; gap: 4px; padding: 6px 10px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.ed-toolbar .btn { padding: 3px 8px; }

/* misc */
.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.mt { margin-top: 12px; } .mb { margin-bottom: 12px; } .mt-lg { margin-top: 22px; }
.sep { height: 1px; background: var(--border); margin: 14px 0; }
.list-plain { margin: 0; padding-left: 18px; line-height: 1.5; }
.matrix { border-collapse: collapse; }
.matrix td, .matrix th { border: 1px solid var(--border); width: 60px; height: 44px; text-align: center; font-size: 12px; font-weight: 600; }
.matrix td.acceptable { background: var(--success-soft); } .matrix td.tolerable { background: var(--caution-soft); } .matrix td.inacceptable { background: var(--error-soft); }
.matrix td .n { display: block; font-size: 15px; }
.json-area { font-family: var(--mono); font-size: 12px; min-height: 380px; }
.act-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 12.5px; }
.act-row .when { color: var(--text-muted); width: 120px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.act-row .who { font-weight: 600; width: 140px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; }
.kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--surface); }
.search { position: relative; }
.search input { padding-left: 32px; }
.search svg { position: absolute; left: 10px; top: 9px; width: 15px; height: 15px; color: var(--text-muted); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.help { background: var(--info-soft); border: 1px solid var(--info-border); color: var(--info-text); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; line-height: 1.5; }
.help ul { margin: 4px 0 0; padding-left: 18px; }
.warn-box { background: var(--warning-soft); border: 1px solid var(--warning-border); color: var(--warning-text); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; }
/* Messages encadrés. La classe `.notice` était employée dans dix vues (avertissements de préflight, résiduels,
   erreurs du laboratoire…) mais n'était définie que dans `portal.css`, qui n'est pas chargé par l'application :
   ces messages s'affichaient sans aucun traitement visuel. Les variantes reprennent les noms réellement
   employés dans le code (`danger` et `error`, `warn` et `warning`). */
.notice { border-radius: 8px; padding: 10px 12px; font-size: 12.5px; line-height: 1.5; }
.notice.info { background: var(--info-soft); border: 1px solid var(--info-border); color: var(--info-text); }
.notice.warn, .notice.warning { background: var(--warning-soft); border: 1px solid var(--warning-border); color: var(--warning-text); }
.notice.danger, .notice.error { background: var(--error-soft); border: 1px solid var(--error-border); color: var(--error-text); }
.notice.success, .notice.ok { background: var(--success-soft); border: 1px solid var(--success-border); color: var(--success-text); }
.notice.small { font-size: 11.5px; }
.obs-editor .oe { display: grid; grid-template-columns: 1fr 150px 1fr auto; gap: 6px; margin-bottom: 6px; align-items: start; }
.obs-editor textarea { min-height: 40px; font-size: 12.5px; }
.ebios-table td { padding: 4px 6px; }
.ebios-table textarea { min-height: 34px; font-size: 12.5px; padding: 4px 6px; }
.ebios-table input, .ebios-table select { padding: 4px 6px; font-size: 12.5px; }
.calc { display: inline-block; padding: 3px 8px; background: var(--primary-soft); border-radius: 6px; font-weight: 600; color: var(--primary); font-size: 12px; }
.calc.hi { background: var(--error-soft); color: var(--error-text); } .calc.mid { background: var(--caution-soft); color: var(--caution-text); } .calc.lo { background: var(--success-soft); color: var(--success-text); }
.print-only { display: none; }

/* ---------- support / signalements ---------- */
.box { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
h4.sub-h { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin: 14px 0 5px; font-weight: 700; }
h4.sub-h:first-child { margin-top: 0; }
.finding-card.internal { background: var(--caution-soft); border-color: var(--caution-border); }
.top .tools { display: flex; align-items: center; gap: 6px; margin-right: 6px; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--border); background: var(--surface); border-radius: 9px; color: var(--text-2); cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.icon-btn:hover { background: var(--surface-2); color: var(--primary); border-color: var(--primary); }
.icon-btn:active { transform: translateY(1px); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .cnt { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--error); color: var(--on-status); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; animation: pop var(--dur) var(--ease-out); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.report-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; height: 34px; border: 1px solid var(--border); background: var(--surface); border-radius: 9px; color: var(--text-2); font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.report-btn:hover { border-color: var(--warning); color: var(--warning-text); background: var(--warning-soft); }
.report-btn svg { width: 15px; height: 15px; }
@media (max-width: 900px) { .report-btn .lbl { display: none; } .report-btn { padding: 0; width: 34px; justify-content: center; } }
.notif { border-bottom: 1px solid var(--border-soft); padding: 9px 10px; cursor: pointer; border-radius: 6px; transition: background-color var(--dur-fast) var(--ease); }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--primary-softer); border-left: 3px solid var(--primary); }
.notif:last-child { border-bottom: 0; }
.bars { display: flex; flex-direction: column; gap: 7px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 34px; align-items: center; gap: 9px; font-size: 12.5px; }
.bar-row .bl { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bt { height: 13px; background: var(--border-soft); border-radius: 999px; overflow: hidden; }
.bar-row .bt i { display: block; height: 100%; border-radius: 999px; transition: width .3s; }
.bar-row .bv { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- offres commerciales ---------- */
.badge.st-sent { background: var(--info); } .badge.st-accepted { background: var(--success); } .badge.st-declined { background: var(--error); } .badge.st-archived { background: var(--grey); }
.prop-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 1200px) { .prop-kpis { grid-template-columns: repeat(3, 1fr); } }
.prop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .prop-layout { grid-template-columns: 1fr; } }
.prop-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; }
/* graphiques SVG générés par le serveur (couleurs figées) : fond clair --chart-bg, lisible aussi en thème sombre.
   .chart-img / img.chart : même traitement pour un graphique inséré comme image. */
.prop-chart, .chart-img, img.chart { background: var(--chart-bg); color: var(--chart-text); border-radius: var(--radius-sm); }
.prop-chart svg { max-width: 100%; height: auto; display: block; }
.prop-chart.pad { padding: 10px 12px; }
:root[data-theme="dark"] :is(.prop-chart:not(.pad), .chart-img, img.chart) { padding: 6px; }
.range-row { display: grid; grid-template-columns: 1fr 70px; gap: 10px; align-items: center; }
.range-row output { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; color: var(--primary); }
input[type=range] { width: 100%; accent-color: var(--primary); padding: 0; border: 0; background: transparent; }
.depth-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.depth-grid .pick { padding: 10px; }
.export-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .export-grid { grid-template-columns: repeat(2, 1fr); } }
.export-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.export-card .ex-ico { width: 42px; height: 42px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.export-card .ex-ico svg { width: 22px; height: 22px; }
.export-card h4 { font-size: 14px; }
.export-card p { font-size: 12.5px; color: var(--text-muted); flex: 1; }
.export-card .row { margin-top: auto; }
.prop-preview { width: 100%; height: 72vh; border: 1px solid var(--border); border-radius: 10px; background: var(--chart-bg); }
.editor .shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 10px 0; }
.editor figure.shot img { width: 100%; border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-md); }
.editor .phase { border-left: 3px solid var(--primary-soft); padding: 2px 12px; margin: 10px 0; }
.editor .tbl.quote td:nth-child(n+2) { text-align: right; white-space: nowrap; }
.editor .tbl tr.total td { background: var(--surface-2); }
.editor .sign-box { height: 90px; border: 1px dashed var(--border); border-radius: 8px; margin-top: 8px; }
.editor .kpi .v { color: var(--primary); }
.opt-row { display: grid; grid-template-columns: auto 1fr 90px 130px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.opt-row .o-l { font-weight: 600; font-size: 13px; } .opt-row .o-d { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.total-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--border-soft); }
.total-line.big { font-size: 15px; font-weight: 700; border-bottom: 0; color: var(--primary); }
/* charte graphique : logos, couleurs, aperçu de page de garde */
.logo-picker { display: flex; flex-direction: column; gap: 8px; }
/* les logos sont dessinés pour un fond clair : --chart-bg reste clair en thème sombre */
.logo-prev { border: 1px dashed var(--border); border-radius: 8px; padding: 10px; background: var(--chart-bg); display: flex; align-items: center; justify-content: center; min-height: 72px; }
.logo-prev img { max-height: 72px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.logo-prev.empty { color: var(--text-muted); font-size: 12.5px; background: var(--surface); }
input[type=color] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); cursor: pointer; }
.logo-row { display: grid; grid-template-columns: 1.2fr 140px 1fr; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--border); vertical-align: middle; margin-right: 4px; }
.cover-preview { background: linear-gradient(160deg, var(--surface) 0%, var(--primary-softer) 100%); color: var(--text); border: 1px solid var(--border); border-bottom: 5px solid var(--primary); border-radius: 10px; padding: 16px; aspect-ratio: 210 / 297; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.cover-preview .logos { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; min-height: 36px; }
.cover-preview .logos .slot { display: flex; gap: 8px; align-items: center; min-width: 0; } .cover-preview .logos .slot.c { justify-content: center; } .cover-preview .logos .slot.r { justify-content: flex-end; }
.cover-preview .logos img { max-height: 52px; height: auto; width: auto; object-fit: contain; }
.cover-preview h1 { font-size: 15px; color: var(--primary); margin-top: 26px; } .cover-preview .sub { font-size: 10px; color: var(--text-muted); }
.cover-preview .client { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; margin: 8px 0 6px; } .cover-preview .client .bar { width: 3px; height: 16px; border-radius: 2px; background: var(--primary); flex-shrink: 0; }
.cover-preview .meta { font-size: 8.5px; color: var(--text-muted); line-height: 1.5; margin-top: 6px; } .cover-preview .by { font-size: 8px; color: var(--text-muted); }
.cover-preview .hdr { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--primary); padding-bottom: 4px; margin-top: 10px; } .cover-preview .hdr img { max-height: 14px; }

/* ---------- écriture de droite à gauche (arabe) ----------
   La grille et les flex suivent d'eux-mêmes `dir="rtl"` ; seules les propriétés physiques
   (marges, bordures, positions « left/right ») sont retournées ici. */
[dir="rtl"] body, [dir="rtl"] { --font: "Segoe UI", "Noto Naskh Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif; }
[dir="rtl"] .side { border-right: 0; border-left: 1px solid var(--side-edge); }
[dir="rtl"] .side-brand .burger { margin-left: 0; margin-right: auto; }
[dir="rtl"] .app.rail .side-brand .burger { margin-right: 0; }
[dir="rtl"] .nav-item { text-align: right; }
[dir="rtl"] .nav-item.sub { padding-left: 10px; padding-right: 24px; }
[dir="rtl"] .nav-item.sub2 { padding-left: 10px; padding-right: 38px; }
[dir="rtl"] .nav-item .chev, [dir="rtl"] .tree .t-node .chev { transform: rotate(180deg); }
[dir="rtl"] .nav-item.open .chev, [dir="rtl"] .tree .t-node.open .chev { transform: rotate(90deg); }
[dir="rtl"] .btn-group .btn { margin-left: 0; margin-right: -1px; }
[dir="rtl"] .btn-group .btn:first-child { border-radius: 0 8px 8px 0; margin-right: 0; }
[dir="rtl"] .btn-group .btn:last-child { border-radius: 8px 0 0 8px; }
[dir="rtl"] .kpi.accent, [dir="rtl"] .kpi.danger, [dir="rtl"] .kpi.warn, [dir="rtl"] .kpi.ok { border-left: 0; border-right-width: 4px; border-right-style: solid; }
[dir="rtl"] .kpi.accent { border-right-color: var(--accent); } [dir="rtl"] .kpi.danger { border-right-color: var(--error); }
[dir="rtl"] .kpi.warn { border-right-color: var(--warning); } [dir="rtl"] .kpi.ok { border-right-color: var(--success); }
[dir="rtl"] .tbl th, [dir="rtl"] .editor th, [dir="rtl"] .editor td { text-align: right; }
[dir="rtl"] .tbl td.num, [dir="rtl"] .tbl th.num, [dir="rtl"] .bar-row .bv, [dir="rtl"] .range-row output { text-align: left; }
[dir="rtl"] .legend i, [dir="rtl"] .swatch { margin-right: 0; margin-left: 6px; }
[dir="rtl"] .tree .t-children { margin-left: 0; margin-right: 14px; border-left: 0; border-right: 1px dashed var(--border); padding-left: 0; padding-right: 4px; }
[dir="rtl"] .drawer { right: auto; left: 0; transform: translateX(-100%); }
[dir="rtl"] .drawer.open { transform: none; }
[dir="rtl"] .d-sec ul, [dir="rtl"] .list-plain, [dir="rtl"] .help ul { padding-left: 0; padding-right: 18px; }
[dir="rtl"] .toasts { right: auto; left: 18px; }
[dir="rtl"] .toast, [dir="rtl"] .notif.unread, [dir="rtl"] .editor .finding, [dir="rtl"] .editor .verdict, [dir="rtl"] .editor .note, [dir="rtl"] .editor .phase { border-left: 0; border-right-style: solid; }
[dir="rtl"] .toast { --toast-dx: -16px; border-left: 1px solid var(--border); border-right-width: 4px; border-right-color: var(--tone); }
[dir="rtl"] .toast::after { transform-origin: right center; }
[dir="rtl"] .toast .toast-close { margin-left: 0; margin-right: auto; }
[dir="rtl"] .notif.unread { border-right-width: 3px; border-right-color: var(--primary); }
[dir="rtl"] .editor .finding { border-right-width: 3px; border-right-color: var(--primary); }
[dir="rtl"] .editor .finding.lvl-NC_MAJ { border-right-color: var(--error); } [dir="rtl"] .editor .finding.lvl-NC_MIN { border-right-color: var(--warning); }
[dir="rtl"] .editor .finding.lvl-OBS { border-right-color: var(--caution); } [dir="rtl"] .editor .finding.lvl-PA { border-right-color: var(--info); }
[dir="rtl"] .editor .finding.lvl-PF { border-right-color: var(--teal); }
[dir="rtl"] .editor .verdict { border-right-width: 4px; border-right-color: var(--primary); }
[dir="rtl"] .editor .note { border-right-width: 3px; border-right-color: var(--border); }
[dir="rtl"] .editor .phase { border-right-width: 3px; border-right-color: var(--primary-soft); }
[dir="rtl"] .editor .tbl.quote td:nth-child(n+2) { text-align: left; }
[dir="rtl"] .rep-sections .rs .auto { margin-left: 0; margin-right: auto; }
[dir="rtl"] .search input { padding-left: 10px; padding-right: 32px; }
[dir="rtl"] .search svg { left: auto; right: 10px; }
[dir="rtl"] .top .tools { margin-right: 0; margin-left: 6px; }
[dir="rtl"] .icon-btn .cnt { right: auto; left: -5px; }
[dir="rtl"] .top .user { padding: 4px 4px 4px 8px; }
[dir="rtl"] .cover-preview .logos .slot.r { justify-content: flex-start; }
[dir="rtl"] .mono, [dir="rtl"] code, [dir="rtl"] input[type=email], [dir="rtl"] input[type=password], [dir="rtl"] .tree .t-node .t-id, [dir="rtl"] .side .audit-card .ref, [dir="rtl"] .brand-ver { direction: ltr; unicode-bidi: embed; }
[dir="rtl"] .side-brand .brand-txt { text-align: right; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] .side-section, [dir="rtl"] .kpi .k-lbl, [dir="rtl"] .tbl th { letter-spacing: 0; }

/* ---------- travail à plusieurs : échanges et verrous ---------- */
.th-layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.th-list { display: flex; flex-direction: column; gap: 6px; max-height: 64vh; overflow: auto; }
.th-item { border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; cursor: pointer; background: var(--surface); transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease); }
.th-item:hover { border-color: var(--brand-300); }
.th-item.active { border-color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); }
.th-item .ttl { font-weight: 600; font-size: 14px; margin: 3px 0; line-height: 1.35; }
.th-item .row { gap: 6px; align-items: center; }
.th-detail { display: flex; flex-direction: column; gap: 10px; }
.th-msgs { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; padding: 4px 2px; }
.th-msg { border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; background: var(--surface); }
.th-msg.mine { background: color-mix(in srgb, var(--primary) 6%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 25%, var(--border)); }
.th-msg .body { white-space: pre-wrap; margin-top: 4px; line-height: 1.5; }
.th-ev { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); padding: 2px 4px; }
.th-reply textarea { width: 100%; }
.lock-banner { display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 10px; margin-bottom: 12px;
  background: color-mix(in srgb, var(--warning) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warning) 35%, var(--border)); font-size: 13.5px; }
.seg { display: inline-flex; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg .btn { border: 0; border-radius: 0; }
.seg .btn.active { background: var(--primary); color: var(--on-primary); }
@media (max-width: 980px) { .th-layout { grid-template-columns: 1fr; } }
[dir="rtl"] .th-item.active { box-shadow: inset -3px 0 0 var(--primary); }

/* ---------- fil de commentaires d'une partie de l'audit ---------- */
.comments { display: flex; flex-direction: column; gap: 10px; }
.cm-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; }
.cm-item { display: block; border: 1px solid var(--border); border-radius: 9px; padding: 7px 10px; color: inherit; text-decoration: none; background: var(--surface); transition: border-color var(--dur-fast) var(--ease); }
.cm-item:hover { border-color: var(--primary); }
.cm-item .row { gap: 6px; align-items: center; flex-wrap: wrap; }
.cm-title { margin-top: 3px; line-height: 1.4; }
.cm-add textarea { width: 100%; }
.cm-add .tag-list { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.chip.brand { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
button.chip { cursor: pointer; font: inherit; }

/* ---------- tutoriel ---------- */
.tuto h3 { margin-bottom: 4px; }
.tuto p { line-height: 1.6; }
.tuto-bar { display: flex; gap: 3px; margin-bottom: 8px; }
.tuto-bar i { flex: 1; height: 4px; border-radius: 2px; background: var(--border); transition: background-color var(--dur) var(--ease); }
.tuto-bar i.on { background: var(--primary); }
.tuto-shot { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-top: 10px; max-height: 46vh; }
.tuto-shot img { display: block; width: 100%; }
.tuto-pill { position: fixed; bottom: 18px; right: 18px; z-index: 60; display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: var(--on-primary); border: 0; border-radius: 999px; padding: 9px 14px; font: inherit; cursor: pointer;
  box-shadow: var(--shadow-lg); transition: background-color var(--dur-fast) var(--ease), transform var(--dur) var(--ease); }
.tuto-pill:hover { background: var(--primary-hover); transform: translateY(-1px); }
[dir="rtl"] .tuto-pill { right: auto; left: 18px; }
#tuto-btn b { font-size: 15px; line-height: 1; }

/* ---------- transitions de vue ----------
   .view-enter : à poser par le routeur sur le contenu fraîchement inséré dans #main (layout.main), par ex.
   `m.firstElementChild?.classList.add('view-enter')` juste après m.append(). Fondu + glissement de 6 px en 180 ms.
   Remplissage « backwards » : aucun transform ne subsiste après l'animation (pas d'effet sur position:fixed/sticky
   ni sur la mise en page). Pour rejouer sur le même nœud : retirer la classe, forcer un reflow, la remettre. */
.view-enter { animation: view-enter var(--dur) var(--ease-out) backwards; }
@keyframes view-enter { from { opacity: 0; transform: translateY(6px); } }

/* ---------- squelettes de chargement et indicateur d'activité ----------
   .skeleton      : bloc neutre animé (shimmer), dimensions libres (style="height:…;width:…").
   .skeleton-line : ligne de texte fictive, 12 px ; largeurs alternées automatiquement, .short (40 %) / .lg (18 px).
   .skeleton-card : carte fictive de 120 px (surcharger la hauteur au besoin), à placer dans .grid.
   Côté JS : aria-hidden="true" sur les squelettes, aria-busy="true" sur le conteneur tant qu'il charge.
   .spinner       : anneau tournant (22 px) ; variantes .sm (14 px), .lg (36 px), .center (bloc centré). */
.skeleton, .skeleton-line, .skeleton-card { background: linear-gradient(90deg, var(--skeleton) 0%, var(--skeleton) 35%, var(--skeleton-hi) 50%, var(--skeleton) 65%, var(--skeleton) 100%);
  background-size: 300% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: var(--radius-sm); }
.skeleton { display: block; min-height: 12px; }
.skeleton-line { display: block; height: 12px; margin: 9px 0; width: 100%; }
.skeleton-line:nth-child(3n+2) { width: 84%; } .skeleton-line:nth-child(3n) { width: 62%; }
.skeleton-line.short { width: 40%; } .skeleton-line.lg { height: 18px; }
.skeleton-card { display: block; height: 120px; border-radius: var(--radius); border: 1px solid var(--border-soft); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.spinner { display: inline-block; width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; }
.spinner.lg { width: 36px; height: 36px; border-width: 4px; }
.spinner.center { display: block; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- adaptatif ----------
   Classes attendues côté JS (bascule écrite par le chef de projet) :
   - 761–1024 px : la barre latérale passe d'office en rail (aucune classe à poser ; .rail reste utilisable au-delà).
   - ≤ 760 px    : la barre latérale sort de l'écran ; poser .mobile-open sur .app pour l'afficher en tiroir.
                   Voile : dessiné par .app.mobile-open::after (un clic dessus a pour cible .app elle-même :
                   `app.addEventListener('click', e => { if (e.target === app) app.classList.remove('mobile-open'); })`).
                   Retirer .mobile-open au changement de vue et sur Échap.
                   Bouton d'ouverture à placer dans .top avec la classe .mobile-burger (masqué au-delà de 760 px).
   - Tableaux larges : les envelopper dans .tbl-wrap (défilement horizontal) ; sous 760 px, un .tbl posé
     directement dans .card-b / .card-b.tight défile aussi horizontalement. */
.mobile-burger { display: none; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 9px; cursor: pointer; flex-shrink: 0; }
.mobile-burger:hover { background: var(--surface-2); color: var(--primary); }
.mobile-burger svg { width: 18px; height: 18px; }
.tbl-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
@media (min-width: 761px) and (max-width: 1024px) {
  .app:not(.login-mode) { grid-template-columns: var(--rail-w) 1fr; }
  .app:not(.login-mode) .side .lbl, .app:not(.login-mode) .side .cnt, .app:not(.login-mode) .side .chev, .app:not(.login-mode) .side-section, .app:not(.login-mode) .side-brand .brand-txt, .app:not(.login-mode) .side-foot, .app:not(.login-mode) .nav-item.sub, .app:not(.login-mode) .nav-item.sub2, .app:not(.login-mode) .side .audit-card { display: none; }
  .app:not(.login-mode) .nav-item { justify-content: center; padding: 10px; }
  .app:not(.login-mode) .side-brand { flex-direction: column; justify-content: center; gap: 4px; padding: 8px 0; height: auto; }
  .app:not(.login-mode) .side-brand .burger { margin-left: 0; margin-right: 0; }
  .app:not(.login-mode) .side-brand img { height: 24px; }
  .main { padding: 18px 18px 50px; }
}
@media (max-width: 760px) {
  .app:not(.login-mode) { grid-template-columns: minmax(0, 1fr); }
  .top, .main { grid-column: 1; }
  .side { position: fixed; top: 0; bottom: 0; left: 0; width: min(var(--side-w), 86vw); z-index: 50; box-shadow: var(--shadow-lg);
    transform: translateX(-100%); visibility: hidden; transition: transform var(--dur-slow) var(--ease-out), visibility 0s linear var(--dur-slow); }
  .app.mobile-open .side { transform: none; visibility: visible; transition: transform var(--dur-slow) var(--ease-out); }
  .app.mobile-open::after { content: ""; position: fixed; inset: 0; background: var(--overlay); z-index: 49; animation: fade var(--dur) var(--ease); }
  [dir="rtl"] .side { left: auto; right: 0; transform: translateX(100%); }
  [dir="rtl"] .app.mobile-open .side { transform: none; }
  .mobile-burger { display: inline-flex; }
  .top { padding: 0 12px; gap: 8px; }
  .top .crumbs > :not(.cur):not(:last-child) { display: none; }
  .main { padding: 16px 14px 48px; }
  .grid.c2, .grid.c3, .grid.c4, .grid.c5, .form-grid, .pick-grid, .depth-grid, .export-grid, .prop-kpis,
  .split, .report-layout, .th-layout, .prop-layout, .editor .shots { grid-template-columns: minmax(0, 1fr); }
  .obs-editor .oe, .opt-row, .logo-row { grid-template-columns: 1fr; }
  .req-list .req { grid-template-columns: 70px minmax(0, 1fr); }
  .req-list .req .r-right { grid-column: 1 / -1; }
  .card .card-b:has(> .tbl), .card .card-b.tight { overflow-x: auto; }
  .tbl-wrap > .tbl, .card .card-b > .tbl { min-width: 560px; }
  .page-head .actions { width: 100%; }
  .drawer, .drawer.wide { width: 100vw; }
  .modal-bg { padding: 10px; }
  .toasts, [dir="rtl"] .toasts { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
  .bar-row { grid-template-columns: 96px 1fr 30px; }
}

/* ---------- mouvement réduit : toutes les animations et transitions sont neutralisées ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
    transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .card.clickable:hover, .kpi.clickable:hover, .btn:active:not(:disabled), .icon-btn:active, .tuto-pill:hover, .nav-item:hover .ico svg { transform: none; }
  .skeleton, .skeleton-line, .skeleton-card { animation: none !important; background: var(--skeleton); }
  .toast::after { display: none; }
}
.tech-report-frame-wrap{background:#eaf0f4;border-radius:12px;padding:12px}.tech-report-frame-tools{justify-content:space-between;margin-bottom:10px}
.tech-report-frame{display:block;width:100%;height:min(76vh,980px);border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:0 12px 36px rgba(11,31,51,.12)}

/* Administration → Localisation */
.l10n-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 16px; }
.l10n-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.l10n-card .card-h { padding: 0; border: 0; }
.l10n-rows { display: flex; flex-direction: column; gap: 6px; }
.l10n-row { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px; font-size: 12.5px; }
.l10n-bar { display: grid; grid-template-columns: 1fr 56px; align-items: center; gap: 8px; min-width: 120px; }
.l10n-bar .small { text-align: end; }
.l10n-miss { margin: 6px 0 0; padding-inline-start: 18px; max-width: 520px; }
.l10n-miss li { margin-bottom: 4px; }

/* Bandeau d'instance en lecture seule : posé en tête de chaque vue par layout.main(). */
.ro-banner { margin: 0 0 14px; font-weight: 500; }
.main.flush .ro-banner { margin: 12px 16px; }

/* 2.10.2 : champ refusé par le serveur (nommé dans le message d'erreur) */
.champ-refuse { outline: 2px solid var(--danger); outline-offset: 1px; }

/* 2.11.0 : fiche d'un créneau du planning (ouverte depuis le Gantt) */
.plan-fiche { display: grid; gap: 10px; }
.plan-kv { display: grid; grid-template-columns: minmax(130px, 180px) 1fr; gap: 10px; align-items: start; }
.plan-kv textarea { width: 100%; }
.plan-deps { max-height: 160px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; margin-top: 4px; }
/* SVG du serveur (couleurs figées pour la page blanche du rapport) : même fond clair que .chart-img. Le Gantt garde
   sa TAILLE RÉELLE et défile : réduit à la largeur de la carte, un audit de douze jours écrivait en 6 px. */
.gantt-fig, .ebios-fig { background: var(--chart-bg); color: var(--chart-text); border-radius: var(--radius-sm); padding: 8px; margin: 0; }
.gantt-fig { overflow-x: auto; }
.gantt-fig svg { display: block; max-width: none; height: auto; }
@media (max-width: 640px) { .plan-kv { grid-template-columns: 1fr; } }

/* 2.11.0 : EBIOS RM — schémas interactifs et fiche d'un objet de l'étude */
.ebios-fig svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.ebios-ident { white-space: nowrap; }
.ebios-champs { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 6px 12px; margin: 0; }
.ebios-champs dt { color: var(--muted); font-size: .85em; }
.ebios-champs dd { margin: 0; white-space: pre-wrap; }
.ebios-liens { margin: 6px 0; }
.ebios-chip { cursor: pointer; border: 0; }
@media (max-width: 640px) { .ebios-champs { grid-template-columns: 1fr; } }
