/* Memoria — console de l'appel et pages de préparation / de rapport (refonte du 12/10/2026).
 *
 * Système « papier et encre » (recherche ux-console.md, principes ISA-101) :
 *  - l'écran est neutre ; UNE couleur d'accent (terracotta) ; une couleur d'état n'apparaît que
 *    pour ce qui demande une action (bleu = action humaine, ocre = attention, rouge = critique,
 *    vert = atteint) ;
 *  - chaque voix a sa teinte (personne bleu-vert, IA prune, vous bleu), toujours doublée d'un libellé ;
 *  - contrastes WCAG calculés, clair comme sombre : texte ≥ 4,5:1, bordures et focus ≥ 3:1 ;
 *  - cibles de 44 px sur les pages ; la console, plus dense, garde 40 px pour ses petits boutons
 *    (jetons --ctl-h, --ctl-h-petit, --btn-px, --fs-libelle redéfinis sur .page-console).
 * Aucune ressource externe (CSP default-src 'self') : polices système uniquement.
 */

/* ------------------------------------------------------------------ jetons */
:root {
  color-scheme: light dark;
  --bg: #F6F2EA; --surface: #FFFFFF; --surface-2: #EFEAE1;
  --line: #DED7CB; --line-strong: #857B6E;
  --ink: #26211B; --ink-2: #554C42; --ink-3: #6B6257;
  --accent: #96442A; --accent-soft: #F6E7E0; --on-fill: #FFFFFF;
  --senior: #1E5B5E; --senior-soft: #DDEDEC; --agent: #5F4C78; --agent-soft: #ECE6F3;
  --magicien: #2B5AA6; --magicien-soft: #E2EAF7;
  --ok: #3B6A37; --ok-soft: #E6F0E1; --warn: #7F5300; --warn-soft: #FBF0D6;
  --danger: #B0261E; --danger-soft: #FBE4E1; --focus: #1D5FC4;
  --voile: rgb(38 33 27 / .45);
  --shadow-1: 0 1px 2px rgb(38 33 27 / .06); --shadow-2: 0 8px 24px rgb(38 33 27 / .14);

  --f-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "URW Palladio L", P052, Georgia, serif;
  --f-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-xs: .8125rem; --fs-sm: .9375rem; --fs-md: 1.0625rem; --fs-lg: 1.1875rem; --fs-xl: 1.375rem;
  --fs-2xl: 1.625rem; --fs-3xl: 2rem; --fs-4xl: 2.5rem;
  --lh-body: 1.55; --lh-read: 1.65; --lh-tight: 1.2;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --r-ctl: 8px; --r-card: 12px; --r-pill: 999px;
  --t-fast: 120ms; --t-med: 200ms; --ease: cubic-bezier(.2, .7, .2, 1);
  /* Tailles des commandes : 44 px sur les pages ; la console (plus dense) les redéfinit. */
  --cible-console: 44px;
  --ctl-h: 44px; --ctl-h-petit: 36px; --btn-px: var(--sp-5); --fs-libelle: var(--fs-md);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171411; --surface: #211E1A; --surface-2: #2A2621; --line: #3A342D; --line-strong: #948A7B;
    --ink: #F3ECE0; --ink-2: #D0C6B7; --ink-3: #AAA091; --accent: #EC9574; --accent-soft: #3D2A22; --on-fill: #1A1410;
    --senior: #7FC7C2; --senior-soft: #1B302F; --agent: #BCA7DA; --agent-soft: #2C2538;
    --magicien: #8FB6F4; --magicien-soft: #1C2A40;
    --ok: #8FC88A; --ok-soft: #1F2E1D; --warn: #EBB74F; --warn-soft: #3A2E12; --danger: #FF8E84; --danger-soft: #45201C;
    --focus: #8FB6F4; --voile: rgb(0 0 0 / .6);
    --shadow-1: none; --shadow-2: 0 8px 24px rgb(0 0 0 / .5);
  }
}
:root[data-theme="dark"] {
  --bg: #171411; --surface: #211E1A; --surface-2: #2A2621; --line: #3A342D; --line-strong: #948A7B;
  --ink: #F3ECE0; --ink-2: #D0C6B7; --ink-3: #AAA091; --accent: #EC9574; --accent-soft: #3D2A22; --on-fill: #1A1410;
  --senior: #7FC7C2; --senior-soft: #1B302F; --agent: #BCA7DA; --agent-soft: #2C2538;
  --magicien: #8FB6F4; --magicien-soft: #1C2A40;
  --ok: #8FC88A; --ok-soft: #1F2E1D; --warn: #EBB74F; --warn-soft: #3A2E12; --danger: #FF8E84; --danger-soft: #45201C;
  --focus: #8FB6F4; --voile: rgb(0 0 0 / .6);
  --shadow-1: none; --shadow-2: 0 8px 24px rgb(0 0 0 / .5);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-block: 96px 120px; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--ink);
  font: 400 var(--fs-md)/var(--lh-body) var(--f-sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0 0 var(--sp-3); line-height: var(--lh-tight); font-weight: 600; }
h1 { font: 600 var(--fs-3xl)/var(--lh-tight) var(--f-serif); letter-spacing: -.01em; }
h2 { font: 600 var(--fs-xl)/var(--lh-tight) var(--f-serif); }
h3 { font-size: var(--fs-md); font-weight: 650; }
p { margin: 0 0 var(--sp-3); }
/* Phrase de guidage en tête de page : ce qu'on fait ici, en une ligne. */
.guide { font: 400 var(--fs-lg)/1.45 var(--f-sans); color: var(--ink-2); max-width: 64ch; margin: 0 0 var(--sp-2); }
.en-tete-page { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-6); }
.en-tete-page h1 { margin: 0 0 var(--sp-2); }
.en-tete-page .guide { margin: 0; }
.en-tete-page .actions-page { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.pseudo-discret { font: 600 var(--fs-sm)/1 var(--f-mono); color: var(--ink-3); letter-spacing: .02em; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
code, kbd, .mono { font-family: var(--f-mono); font-size: .9em; }
ul, ol { padding-inline-start: 1.25em; margin: 0 0 var(--sp-3); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-5) 0; }
img, svg, canvas { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--accent-soft); color: var(--ink); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.lien-evitement {
  position: absolute; left: var(--sp-3); top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: var(--sp-2) var(--sp-4); border-radius: var(--r-ctl);
}
.lien-evitement:focus { top: var(--sp-2); }
.tc, .chrono, td.nombre { font-variant-numeric: tabular-nums; }
.discret { color: var(--ink-3); }
.petit { font-size: var(--fs-sm); }
.tres-petit { font-size: var(--fs-xs); }
.serif { font-family: var(--f-serif); }
.nowrap { white-space: nowrap; }
.pile > * + * { margin-top: var(--sp-3); }
.pile-l > * + * { margin-top: var(--sp-5); }
.ligne-flex { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.ligne-flex.espace { justify-content: space-between; }
.pousse { margin-inline-start: auto; }

/* ------------------------------------------------------------------ en-tête & navigation */
.entete {
  display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-6); border-bottom: 1px solid var(--line); background: var(--surface);
}
.marque {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font: 600 var(--fs-xl)/1 var(--f-serif); color: var(--ink); text-decoration: none; min-height: 44px;
}
.marque::before { content: ""; width: 22px; height: 22px; border-radius: 6px; background: var(--accent); flex: none; }
.marque span { font: 500 var(--fs-xs)/1 var(--f-sans); color: var(--ink-3); letter-spacing: .02em; }
.nav-principale ul { display: flex; gap: var(--sp-1); list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-principale a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--sp-4);
  border-radius: var(--r-ctl); color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: var(--fs-md);
}
.nav-principale a:hover { background: var(--surface-2); color: var(--ink); }
.nav-principale a[aria-current="page"] { color: var(--ink); font-weight: 650; box-shadow: inset 0 -3px 0 var(--accent); border-radius: var(--r-ctl) var(--r-ctl) 0 0; }
.entete-outils { margin-inline-start: auto; display: flex; gap: var(--sp-2); align-items: center; }
.entete-outils .btn { min-height: 44px; min-width: 44px; }

.contenu { max-width: 1120px; margin: 0 auto; padding: var(--sp-7) var(--sp-6) var(--sp-8); }
.contenu.large { max-width: 1440px; }
.surtitre { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; margin: 0 0 var(--sp-1); }

/* ------------------------------------------------------------------ bandeaux globaux */
.bandeau-global {
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-5); font-weight: 600;
  background: var(--danger-soft); color: var(--danger); border-bottom: 2px solid var(--danger);
}
.bandeau-global.attention { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.bandeau-global.info { background: var(--magicien-soft); color: var(--magicien); border-color: var(--magicien); }
/* Veille hors console : alerte urgente de la conversation en cours (détresse…), jusqu'à « J'ai vu ». */
.bandeau-veille { position: sticky; top: 0; z-index: 45; border-bottom-width: 3px; }
.bandeau-veille .texte { flex: 1 1 32ch; min-width: 0; }
.bandeau-veille .btn-discret { color: var(--danger); }
/* Rappel d'un rendez-vous (un quart d'heure avant, puis tant qu'il attend) : sur toutes les pages, sous
   le bandeau d'accès. Ambre quand il approche, rouge quand il attend sans personne, calme quand
   quelqu'un est à l'écoute. Le bouton mène à la console du rendez-vous. */
.bandeau-rendez-vous { position: sticky; top: 0; z-index: 44; }
.bandeau-rendez-vous .texte { flex: 1 1 32ch; min-width: 0; }
.bandeau-rendez-vous .btn { white-space: nowrap; }
/* Alerte d'accès (console en ligne) : l'autre fondateur est entré par une voie de secours, ou son
   accès a changé. Ambre, calme, sur toutes les pages, jusqu'à « J'ai vu ». */
.bandeau-acces { position: sticky; top: 0; z-index: 43; font-weight: 400; }
.bandeau-acces .texte { flex: 1 1 40ch; min-width: 0; }
.bandeau-acces .btn { white-space: nowrap; }
.bandeau-partage {
  position: sticky; top: 0; z-index: 40; text-align: center; padding: var(--sp-1) var(--sp-3);
  background: var(--magicien); color: var(--on-fill); font-size: var(--fs-sm); font-weight: 600;
}

/* ------------------------------------------------------------------ boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--ctl-h); padding: 0 var(--btn-px); border-radius: var(--r-ctl);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: 600 var(--fs-sm)/1.2 var(--f-sans); text-decoration: none; cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast);
  -webkit-user-select: none; user-select: none; position: relative; overflow: hidden; text-align: center;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primaire { background: var(--accent); border-color: var(--accent); color: var(--on-fill); }
.btn-primaire:hover { background: var(--accent); filter: brightness(.94); }
.btn-humain { background: var(--magicien); border-color: var(--magicien); color: var(--on-fill); }
.btn-humain:hover { background: var(--magicien); filter: brightness(.94); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: var(--on-fill); }
.btn-danger:hover { background: var(--danger); filter: brightness(.94); }
.btn-contour-danger { border-color: var(--danger); color: var(--danger); }
.btn-contour-danger:hover { background: var(--danger-soft); }
.btn-discret { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-discret:hover { background: var(--surface-2); color: var(--ink); }
.btn-lien { border: 0; background: none; padding: 0; min-height: 24px; color: var(--accent); text-decoration: underline; font-weight: 500; }
.btn-lien:hover { background: none; text-decoration-thickness: 2px; }
.btn-petit { min-height: var(--ctl-h-petit); padding: 0 var(--sp-3); font-size: var(--fs-xs); }
.btn-grand { min-height: var(--cible-console); padding: 0 var(--sp-5); font-size: var(--fs-md); }
.btn-icone { min-width: var(--ctl-h); padding: 0 var(--sp-2); }
.btn-rond { border-radius: var(--r-pill); }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn .touche { margin-inline-start: var(--sp-1); }

/* Appui maintenu 1 s : l'anneau/la barre se remplit (--progression 0→1, piloté par JS). */
.btn-maintenu::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 4px;
  background: currentColor; opacity: .85;
  transform-origin: left center; transform: scaleX(var(--progression, 0));
}
.btn-maintenu.en-maintien { outline: 2px dashed currentColor; outline-offset: -5px; }
.btn-maintenu .sous-libelle { display: block; font-weight: 400; font-size: var(--fs-xs); opacity: .9; }

kbd, .touche {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em; height: 1.6em;
  padding: 0 .35em; border: 1px solid currentColor; border-radius: 4px; opacity: .8;
  font: 600 .72rem/1 var(--f-mono); vertical-align: middle;
}

/* ------------------------------------------------------------------ formulaires */
label, .libelle { font-weight: 600; font-size: var(--fs-libelle); color: var(--ink); }
.champ { display: flex; flex-direction: column; gap: var(--sp-1); }
.champ + .champ { margin-top: var(--sp-4); }
.champs-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-4); }
.champs-grille .champ + .champ { margin-top: 0; }
input[type="text"], input[type="tel"], input[type="search"], input[type="number"], input[type="datetime-local"],
input[type="date"], input[type="time"], select, textarea {
  font: inherit; font-size: var(--fs-md); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-ctl);
  min-height: var(--ctl-h); padding: var(--sp-2) var(--sp-3); width: 100%;
}
textarea { min-height: 96px; line-height: var(--lh-read); resize: vertical; }
input:disabled, select:disabled, textarea:disabled, textarea[readonly], input[readonly] { background: var(--surface-2); color: var(--ink-2); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; flex: none; }
input[type="range"] { accent-color: var(--ink-2); width: 100%; min-height: 24px; }
.case { display: inline-flex; align-items: flex-start; gap: var(--sp-2); font-weight: 500; cursor: pointer; min-height: 24px; }
.case input { margin-top: 2px; }
.aide { font-size: var(--fs-sm); line-height: 1.5; color: var(--ink-3); font-weight: 400; margin: 0; }
/* Touches citées dans une aide (O, N, Espace) : sans l'opacité, sinon 3,8:1 sur fond blanc. */
.aide kbd, .aide .touche { opacity: 1; }
/* Une aide en <span> suit un autre texte : sur sa propre ligne (« ✓ citation retrouvéesouvenir heureux… »). */
span.aide { display: block; margin-top: 2px; }
.erreur-champ { font-size: var(--fs-sm); color: var(--danger); font-weight: 600; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--sp-4); margin: 0 0 var(--sp-4); }
legend { padding: 0 var(--sp-2); font-weight: 650; }
.choix-segment { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); overflow: hidden; flex-wrap: wrap; }
.choix-segment label { display: inline-flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-3); min-height: var(--ctl-h); cursor: pointer; font-weight: 500; border-inline-end: 1px solid var(--line); }
.choix-segment label:last-child { border-inline-end: 0; }
.choix-segment label:has(input:checked) { background: var(--surface-2); box-shadow: inset 0 -3px 0 var(--accent); font-weight: 650; }
.choix-segment input { width: 16px; height: 16px; }

/* Puces (sujets à éviter, prénoms) : ajout/retrait au clavier */
.puces { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; margin: 0 0 var(--sp-2); padding: 0; }
.puce {
  display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 32px;
  padding: 0 var(--sp-1) 0 var(--sp-3); border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--line); font-size: var(--fs-sm);
}
.puce button { border: 0; background: none; color: var(--ink-2); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 1rem; line-height: 1; }
.puce button:hover { background: var(--line); color: var(--ink); }
.ajout-puce { display: flex; gap: var(--sp-2); }
.ajout-puce input { flex: 1; }

/* ------------------------------------------------------------------ cartes & sections */
.carte {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: var(--sp-5) var(--sp-6); box-shadow: var(--shadow-1); min-width: 0;
}
.carte > h2:first-child, .carte > h3:first-child, .carte > header:first-child { margin-top: 0; }
.carte-titre { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-3); }
.carte-titre h2, .carte-titre h3 { margin: 0; }
.carte.accent { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent), var(--shadow-1); }
.carte.calme { background: var(--surface-2); box-shadow: none; }
.carte.ia-saura { border-color: var(--agent); box-shadow: inset 4px 0 0 var(--agent); }
.carte.pour-vous { border-style: dashed; }
/* Bandeau dans une page (état d'une conversation) : neutre, info, ou décision requise (crit). */
.bandeau-carte {
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  padding: var(--sp-4) var(--sp-5); border: 1px solid var(--line-strong); border-radius: var(--r-card);
  background: var(--surface-2);
}
.bandeau-carte.info { background: var(--magicien-soft); border-color: var(--magicien); }
.bandeau-carte.crit { background: var(--danger-soft); border-color: var(--danger); border-inline-start: 6px solid var(--danger); }
.bandeau-carte.att { background: var(--warn-soft); border-color: var(--warn); border-inline-start: 6px solid var(--warn); }
.bandeau-carte > .texte { flex: 1 1 28ch; min-width: 0; }
.bandeau-carte .btn { min-height: 40px; }
/* Bornes de saisie (« 3/8 ») : la limite de ce que l'IA recevra, visible avant le refus. */
.borne { font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; margin-inline-start: var(--sp-1); }
.borne.pleine { color: var(--warn); font-weight: 650; }
.grille { display: grid; gap: var(--sp-5); }
.grille-2 { display: grid; gap: var(--sp-5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grille-12 { display: grid; gap: var(--sp-5); grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.section + .section { margin-top: var(--sp-7); }
.section-titre { display: flex; align-items: center; gap: var(--sp-3); justify-content: space-between; flex-wrap: wrap; margin-bottom: var(--sp-4); }
.section-titre h2 { margin: 0; font-size: var(--fs-2xl); }
.section-titre .aide { flex-basis: 100%; }
.vide { color: var(--ink-3); font-style: italic; padding: var(--sp-4) 0; }
.chargement { color: var(--ink-3); }
.chargement::after { content: " …"; }
details > summary { cursor: pointer; font-weight: 600; min-height: var(--ctl-h); display: flex; align-items: center; gap: var(--sp-2); }
details > summary::marker { color: var(--ink-3); }
.liste-def { display: grid; grid-template-columns: max-content 1fr; gap: var(--sp-2) var(--sp-4); margin: 0; }
.liste-def dt { color: var(--ink-3); font-size: var(--fs-sm); }
.liste-def dd { margin: 0; }
/* Repli (objectifs de recrutement, options) : un cadre, un titre cliquable de 44 px. */
.repli { border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--sp-2) var(--sp-4); background: var(--surface); }
.repli > summary { min-height: 44px; font-size: var(--fs-md); }
.repli[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: var(--sp-3); }

/* ------------------------------------------------------------------ étiquettes & statuts (jamais la couleur seule) */
/* Grise par défaut ; colorée seulement pour ce qui demande une action (retrait à décider, bloquant). */
.etiquette {
  display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 var(--sp-2);
  border: 1px solid transparent; border-radius: var(--r-pill); background: var(--surface-2);
  font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.etiquette.ok { color: var(--ok); background: var(--ok-soft); }
.etiquette.att { color: var(--warn); background: var(--warn-soft); }
.etiquette.crit { color: var(--danger); background: var(--danger-soft); }
.etiquette.grand { min-height: 30px; padding: 0 var(--sp-3); font-size: var(--fs-md); }
.statut { display: inline-flex; align-items: center; gap: var(--sp-1); font-weight: 600; }
.statut.ok { color: var(--ok); } .statut.att { color: var(--warn); } .statut.crit { color: var(--danger); }
.statut.neutre { color: var(--ink-3); }

/* ------------------------------------------------------------------ tableaux */
/* position: relative — un .sr-only (position absolue) d'un tableau défilant s'en échappait et
   allongeait la page (défilement horizontal à 390 px, revue du 4/10). */
.defilement-x { position: relative; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
table.tableau { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.tableau th, .tableau td { text-align: left; padding: var(--sp-3); border-bottom: 1px solid var(--line); vertical-align: top; }
.tableau thead th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 650; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.tableau tbody tr:hover td, .tableau tbody tr:hover th { background: var(--surface-2); }
.tableau th button.tri { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; min-height: 24px; }
.tableau th button.tri:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tableau th[aria-sort="ascending"] button.tri::after { content: "▲"; font-size: .7em; }
.tableau th[aria-sort="descending"] button.tri::after { content: "▼"; font-size: .7em; }
.tableau .id-pseudo { font: 650 var(--fs-md)/1 var(--f-mono); color: var(--ink); text-decoration: none; }
.tableau .id-pseudo:hover { text-decoration: underline; }
.tableau tr.ligne-seuil td, .tableau tr.ligne-seuil th { background: var(--surface-2); font-weight: 650; }
.tableau tr.ligne-alerte td, .tableau tr.ligne-alerte th { background: var(--danger-soft); }
.tableau tr.ligne-notable td { background: var(--surface-2); }

/* ------------------------------------------------------------------ listes de contrôle (avant d'appeler, fin d'appel) */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.checklist li { display: grid; grid-template-columns: 28px 1fr; gap: var(--sp-2); align-items: center; min-height: 44px; padding: var(--sp-2) var(--sp-4); border-radius: var(--r-ctl); background: var(--surface-2); }
.checklist .icone { font-weight: 800; text-align: center; line-height: 1.5; }
.checklist li.ok .icone { color: var(--ok); }
.checklist li.att { background: var(--warn-soft); } .checklist li.att .icone { color: var(--warn); }
.checklist li.bloquant { background: var(--danger-soft); } .checklist li.bloquant .icone, .checklist li.bloquant strong { color: var(--danger); }
.checklist li .aide { margin-top: 2px; }

/* ------------------------------------------------------------------ jauges & seuils */
.jauge { position: relative; height: 8px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; min-width: 60px; }
.jauge > span { position: absolute; inset: 0 auto 0 0; width: calc(var(--valeur, 0) * 100%); background: var(--ink-3); border-radius: inherit; transition: width var(--t-med) var(--ease); }
.jauge.ok > span { background: var(--ok); } .jauge.att > span { background: var(--warn); } .jauge.crit > span { background: var(--danger); }
.jauge .repere { position: absolute; top: -2px; bottom: -2px; width: 2px; left: calc(var(--pos, 0) * 100%); background: var(--ink); }

/* ------------------------------------------------------------------ onglets */
.onglets { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.onglets [role="tab"] {
  border: 0; background: none; color: var(--ink-2); font: 600 var(--fs-md)/1 var(--f-sans);
  min-height: 44px; padding: 0 var(--sp-4); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.onglets.onglets-outils [role="tab"] { font-size: var(--fs-sm); }
.onglets [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.onglets [role="tab"]:hover { color: var(--ink); }

/* ------------------------------------------------------------------ toasts & dialogues */
.toasts { position: fixed; z-index: 90; right: var(--sp-4); bottom: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); max-width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.page-console .toasts { bottom: 110px; }
.toast {
  pointer-events: auto; display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-card); background: var(--ink); color: var(--bg);
  box-shadow: var(--shadow-2); font-size: var(--fs-sm); animation: entree var(--t-med) var(--ease);
}
.toast.erreur { background: var(--danger); color: var(--on-fill); }
.toast.succes { background: var(--ok); color: var(--on-fill); }
.toast .btn { min-height: 32px; background: transparent; color: inherit; border-color: currentColor; }
@keyframes entree { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

dialog {
  border: 1px solid var(--line); border-radius: var(--r-card); padding: 0;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
}
dialog.large { width: min(820px, calc(100vw - 32px)); }
dialog::backdrop { background: var(--voile); }
.dialogue-corps { padding: var(--sp-5); overflow: auto; }
.dialogue-corps h2 { margin-bottom: var(--sp-3); }
.dialogue-actions { display: flex; justify-content: flex-end; gap: var(--sp-2); flex-wrap: wrap; padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--line); background: var(--surface-2); }
.dialogue-actions .gauche { margin-inline-end: auto; }
dialog.danger { border-color: var(--danger); border-width: 2px; }
.raccourcis-liste { display: grid; grid-template-columns: max-content 1fr; gap: var(--sp-2) var(--sp-4); margin: 0 0 var(--sp-4); }
.raccourcis-liste dt { white-space: nowrap; }
.raccourcis-liste dd { margin: 0; color: var(--ink-2); }

/* ------------------------------------------------------------------ mode écran partagé : flou des données personnelles */
.ecran-partage .pii { filter: blur(7px); -webkit-user-select: none; user-select: none; }
.ecran-partage input.pii, .ecran-partage textarea.pii { color: transparent; text-shadow: 0 0 10px var(--ink); filter: none; }

/* ------------------------------------------------------------------ ACCUEIL */
/* « Bonjour. » puis trois blocs : la prochaine conversation, ce qu'il reste à faire, l'avancement. */
.accueil-bonjour { font: 600 var(--fs-4xl)/1.1 var(--f-serif); margin: 0 0 var(--sp-1); }
.accueil-date { font: 400 var(--fs-lg)/1.3 var(--f-sans); color: var(--ink-2); margin: 0; }
.accueil-grille { display: grid; gap: var(--sp-5); grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
/* La carte de la prochaine conversation porte la seule touche d'accent de la page. */
.carte-prochaine { border-color: var(--line); box-shadow: var(--shadow-1); }
.carte-prochaine .btn-primaire { min-height: 48px; font-size: var(--fs-md); }
.carte-prochaine .vide { padding: var(--sp-2) 0; }
.prochain .heure { font: 600 var(--fs-2xl)/1.15 var(--f-serif); font-variant-numeric: tabular-nums; }
.prochain .qui { font: 400 var(--fs-lg)/1.4 var(--f-sans); margin: var(--sp-1) 0 var(--sp-3); }
.prochain .qui .pseudo-discret { margin-inline-start: var(--sp-2); }
.a-faire { list-style: none; padding: 0; margin: 0; }
.a-faire li { display: grid; grid-template-columns: 22px 1fr auto; gap: var(--sp-3); align-items: center; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.a-faire li:last-child { border-bottom: 0; }
/* « Rien en attente » : une phrase seule, pas une ligne à trois colonnes (elle s'écrivait un mot par ligne). */
.a-faire li.vide { display: block; }
.a-faire .icone { color: var(--ink-3); font-weight: 800; }
.a-faire li.urgent .icone { color: var(--warn); }
.a-faire li.bloquant .icone { color: var(--danger); }
.a-faire li.bloquant > span:nth-child(2) { font-weight: 600; }
.a-faire a, .a-faire .btn { white-space: nowrap; }
/* Rendez-vous d'une personne : la ligne, puis ses gestes (sa console, déplacer, annuler, agenda). */
.a-faire li.rendez-vous { grid-template-columns: 22px minmax(0, 1fr); }
.a-faire li.rendez-vous .actions-rdv { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.a-faire li.rendez-vous.passe { color: var(--ink-2); padding: var(--sp-2) 0; }
.a-faire li.rendez-vous.passe > span:last-child { display: none; }
#planif-passes { margin-top: var(--sp-3); }
.compteurs { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); align-items: baseline; font-size: var(--fs-md); }
.compteur strong { font: 600 var(--fs-xl)/1.1 var(--f-serif); font-variant-numeric: tabular-nums; margin-inline-end: var(--sp-1); }
.compteur span { color: var(--ink-2); }
/* État technique du poste : une ligne grise, en bas. */
.etat-technique { color: var(--ink-3); font-size: var(--fs-sm); margin: var(--sp-6) 0 0; padding-top: var(--sp-4); border-top: 1px solid var(--line); }

/* ------------------------------------------------------------------ PERSONNES */
.quotas { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); align-items: center; font-size: var(--fs-md); margin: var(--sp-3) 0; }
.personne-cellule { display: grid; gap: 2px; }
.personne-cellule .id-pseudo { font-size: var(--fs-lg); }
.personne-cellule .profil-texte { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 400; }
.ou-en-est { font-weight: 600; }
.ou-en-est .detail { display: block; font-weight: 400; font-size: var(--fs-sm); color: var(--ink-3); }
.tableau-personnes td, .tableau-personnes th { padding-block: var(--sp-3); vertical-align: middle; }

/* ------------------------------------------------------------------ FICHE D'UNE PERSONNE */
.fiche-entete { display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap; }
.fiche-entete h1 { margin: 0; }
.fiche-entete .pseudo { font: 600 var(--fs-md)/1 var(--f-mono); color: var(--ink-3); letter-spacing: .02em; }
/* L'essentiel et UNE action en haut. */
.fiche-action { display: grid; gap: var(--sp-2); justify-items: start; }
.fiche-action .btn { min-height: 48px; font-size: var(--fs-md); }
.fiche-action .aide { max-width: 36ch; }
.sommaire { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); margin: 0 calc(-1 * var(--sp-6)) var(--sp-6); padding: 0 var(--sp-6); }
.sommaire ul { display: flex; gap: var(--sp-1); list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.sommaire a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--sp-3); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); }
.sommaire a:hover { color: var(--ink); background: var(--surface-2); }
.telephone-masque { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.telephone-masque output { font: 600 var(--fs-lg)/1 var(--f-mono); letter-spacing: .03em; }
/* Accords signés : une ligne par accord ; le formulaire de saisie en colonne, à droite, sans écraser
   le texte (un <select> à l'option longue prenait toute la largeur). */
.consent-ligne { display: grid; grid-template-columns: 26px minmax(0, 1.3fr) minmax(220px, 1fr); gap: var(--sp-3); align-items: start; padding: var(--sp-4) 0; border-bottom: 1px dotted var(--line-strong); }
.consent-ligne:last-child { border-bottom: 0; }
.consent-ligne .icone { font-weight: 800; font-size: var(--fs-lg); line-height: 1.2; text-align: center; }
.consent-ligne.fait .icone { color: var(--ok); }
.consent-ligne.refuse .icone { color: var(--danger); }
.consent-ligne.a-faire .icone { color: var(--ink-3); }
.consent-ligne .historique { font-size: var(--fs-xs); color: var(--ink-3); margin: var(--sp-1) 0 0; }
/* Valeurs longues (souhaits pour après le décès) : l'étiquette passe à la ligne au lieu d'élargir la page. */
.consent-ligne .etiquette { white-space: normal; max-width: 100%; }
.consent-ligne form { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); justify-items: stretch; align-content: start; }
.consent-ligne form select, .consent-ligne form input { width: 100%; max-width: 100%; min-height: 40px; }
.consent-ligne form .btn { justify-self: end; }
/* Accords déjà recueillis : la saisie repliée derrière « Modifier » (à droite de la ligne). */
.consent-ligne .repli-saisie > summary { justify-content: flex-end; font-size: var(--fs-sm); color: var(--ink-2); min-height: 40px; }
.consent-ligne .repli-saisie[open] > summary { margin-bottom: var(--sp-2); }
.statut-mots { font-weight: 600; }
.statut-mots.ok { color: var(--ink-2); } .statut-mots.crit { color: var(--danger); } .statut-mots.att { color: var(--warn); } .statut-mots.neutre { color: var(--ink-2); }
.carte-lancement { border: 2px solid var(--accent); }
.carte-lancement .btn-grand { min-height: 52px; font-size: var(--fs-md); }
/* « Quelle conversation » sur toute la largeur (le titre du chapitre était coupé à 1280 px), puis
   « Comment » en liste verticale : une ligne de 44 px par façon d'appeler. */
.carte-lancement .champs-grille { grid-template-columns: minmax(0, 1fr); }
.carte-lancement .choix-segment { display: grid; }
.carte-lancement .choix-segment label { border-inline-end: 0; border-bottom: 1px solid var(--line); }
.carte-lancement .choix-segment label:last-child { border-bottom: 0; }
.zone-danger { border: 1px solid var(--danger); border-radius: var(--r-card); padding: var(--sp-5); background: var(--danger-soft); }
.zone-danger h2, .zone-danger h3 { color: var(--danger); }

/* ------------------------------------------------------------------ CONSOLE DE L'APPEL */
/* Console v2 (12/10/2026, retour de la démonstration) : trois choses se lisent d'un coup d'œil —
   QUI PARLE / QUI A LA MAIN (bande d'état, une phrase), OÙ EN EST LA CONVERSATION (sous-titres au
   centre, la personne en grand), CE QU'ON ATTEND DE VOUS (une seule action, en couleur).
   Tout le reste est replié (« Détails », « Plus »). Écran neutre : la couleur n'apparaît que pour
   ce qui demande une action (ISA-101). */
/* Plus dense que les pages : petits boutons et champs à 40 px, libellés en corps réduit. */
.page-console { font-size: 1.0625rem; --ctl-h: 40px; --ctl-h-petit: 32px; --btn-px: var(--sp-4); --fs-libelle: var(--fs-sm); }
.page-console details > summary { min-height: 32px; }
.console-app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.console-app > * { flex: none; }
.console-app > .console-grille { flex: 1 1 auto; }

/* En-tête : UNE ligne — prénom · conversation · chapitre, pseudonyme en petit, chrono et jauge. */
.barre-etat { background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 var(--sp-4); }
.barre-etat .rangee { display: flex; align-items: center; gap: var(--sp-3); min-height: 52px; }
.barre-etat .retour { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); min-height: 32px; display: inline-flex; align-items: center; white-space: nowrap; }
.barre-etat .retour:hover { color: var(--ink); text-decoration: underline; }
.barre-etat .identite { display: flex; align-items: baseline; gap: var(--sp-2); min-width: 0; flex: 1 1 auto; }
.barre-etat .identite .prenom { font: 600 var(--fs-xl)/1.2 var(--f-serif); white-space: nowrap; }
.barre-etat .identite .prenom:empty { display: none; }
.barre-etat .identite .chapitre { font: 400 var(--fs-md)/1.2 var(--f-serif); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.barre-etat .identite .sid { font: 600 var(--fs-xs)/1 var(--f-mono); color: var(--ink-3); letter-spacing: .04em; white-space: nowrap; }
.barre-etat .identite .fiche { font-size: var(--fs-xs); font-weight: 500; }
.barre-etat .identite .canal { font-weight: 600; }
.outils-entete { display: flex; align-items: center; gap: var(--sp-2); flex: none; }
.chrono-bloc { display: inline-flex; align-items: center; gap: var(--sp-3); flex: none; }
.chrono { font: 600 var(--fs-xl)/1 var(--f-sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chrono.depasse { color: var(--warn); }
.frise-bloc { display: flex; flex-direction: column; gap: 4px; }
/* 150 px : à 1280 px avec « Arrêter l'écoute », le titre du chapitre était coupé (« L'enfance et la m… »). */
.frise { position: relative; width: 150px; height: 8px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line); }
.frise > .rempli { position: absolute; inset: 0 auto 0 0; width: calc(var(--avance, 0) * 100%); background: var(--ink-3); border-radius: inherit; transition: width var(--t-med) linear; }
.frise.depasse > .rempli { background: var(--warn); }
/* Jalons discrets (expliqués au survol de la légende) ; seule la durée prévue est marquée. */
.frise .jalon { position: absolute; top: -3px; bottom: -3px; width: 1px; left: calc(var(--pos, 0) * 100%); background: var(--line-strong); }
.frise .jalon.cible { background: var(--ink); width: 2px; top: -5px; bottom: -5px; }
.jalons-legende { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1; white-space: nowrap; cursor: help; }

/* Bande d'ÉTAT : toujours au même endroit ; une phrase, un détail, une action. Neutre quand tout va bien. */
.bande-mode {
  display: flex; align-items: center; gap: var(--sp-3) var(--sp-4);
  min-height: 64px; padding: var(--sp-2) var(--sp-4);
  background: var(--surface-2); color: var(--ink); border-block: 1px solid var(--line);
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease);
}
.bande-mode .icone-mode { font-size: 1.3em; line-height: 1; width: 1.3em; text-align: center; flex: none; }
.bande-mode .texte-mode { display: flex; flex-direction: column; gap: 2px; flex: 1 1 0; min-width: 0; }
.bande-mode .titre-mode { font: 600 var(--fs-xl)/1.25 var(--f-serif); display: flex; gap: var(--sp-2); align-items: baseline; flex-wrap: wrap; }
/* Sans opacité : à .8, « · silence 9 s » tombait à 3,9:1 sur la bande ocre et 3,7:1 sur la bleue (clair). */
.bande-mode #mode-duree { font: 500 var(--fs-sm)/1 var(--f-sans); }
/* Détail sur UNE ligne (texte complet au survol) : la hauteur va aux sous-titres. */
.bande-mode .detail-mode { font-weight: 400; font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .92; }
.bande-mode .detail-mode.complet { white-space: normal; }
.bande-mode .actions-mode { display: flex; gap: var(--sp-2); flex-wrap: wrap; flex: none; }
.bande-mode .actions-mode:empty { display: none; }
.bande-mode .btn { min-height: var(--cible-console); }
.mode-ia, .mode-appel, .mode-fin { background: var(--surface-2); color: var(--ink); }
.mode-prep { background: var(--surface-2); color: var(--ink-2); border-style: dashed; }
.mode-silence { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.mode-pause { background: var(--magicien-soft); color: var(--magicien); border-color: var(--magicien); }
.mode-main { background: var(--magicien); color: var(--on-fill); border-color: var(--magicien); }
.mode-main .btn { background: var(--on-fill); color: var(--magicien); border-color: var(--on-fill); }
.mode-att { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); border-inline-start: 8px solid var(--warn); }
.mode-crit { background: var(--danger); color: var(--on-fill); border-color: var(--danger); animation: pulsation 1.2s ease-in-out infinite; }
.mode-crit .btn { background: var(--on-fill); color: var(--danger); border-color: var(--on-fill); }
.mode-crit .btn.btn-discret { background: transparent; color: var(--on-fill); border-color: var(--on-fill); }
/* Sur les bandes pleines (bleu, rouge), l'anneau de focus bleu disparaissait (1,1:1) : en blanc. */
.mode-main :focus-visible, .mode-crit :focus-visible { outline-color: var(--on-fill); }
@keyframes pulsation { 50% { border-color: var(--on-fill); } }

/* Les trois voix : un indicateur discret dans la bande (nom + niveau), jamais un cadre coloré. */
.voix { display: flex; gap: var(--sp-2); flex: none; }
/* Opacité .92 au plus : à .7, les noms passaient sous 4,5:1 sur les bandes colorées (3,1:1 en ocre). */
.locuteur { display: grid; gap: 4px; min-width: 64px; max-width: 110px; padding: 4px var(--sp-2); border-radius: var(--r-ctl); border: 1px solid transparent; font-size: var(--fs-xs); color: inherit; opacity: .92; align-content: center; }
.locuteur .nom { font-weight: 650; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.locuteur.parle { opacity: 1; border-color: currentColor; }
.locuteur.silence-long { opacity: 1; }
.vumetre { display: block; height: 4px; border-radius: var(--r-pill); background: rgb(128 128 128 / .28); overflow: hidden; }
.vumetre > span { display: block; height: 100%; width: calc(var(--niveau, 0) * 100%); background: currentColor; transition: width 80ms linear; }

.bande-connexion { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-2) var(--sp-4); background: var(--warn-soft); color: var(--warn); font-weight: 650; border-bottom: 1px solid var(--warn); }
.bande-son { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; padding: var(--sp-2) var(--sp-4); background: var(--accent-soft); color: var(--ink); border-bottom: 1px solid var(--accent); font-weight: 600; }
.puce-chevauchement { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; padding: var(--sp-2) var(--sp-4); background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: var(--fs-sm); border-bottom: 1px solid var(--warn); }
/* Affichage figé (page déconnectée) : gris, mais encore lisible (.55 tombait à 3,7:1). */
.fige-donnees .fil, .fige-donnees .voix, .fige-donnees .machine, .fige-donnees .carnet-genres { opacity: .9; filter: grayscale(.8); }

/* Deux colonnes : les sous-titres à gauche (la place), vos commandes à droite. Chaque colonne défile seule. */
.console-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); min-height: 0; }
/* position: relative : les .sr-only (position absolue) restent DANS la colonne défilante — ils en
   sortaient, allongeaient la page et faisaient défiler la console (bande d'état hors écran). */
.console-gauche, .console-droite { position: relative; min-height: 0; overflow: auto; padding: var(--sp-4); }
.console-gauche { display: flex; flex-direction: column; gap: var(--sp-3); overflow-x: hidden; overflow-y: auto; }
.console-droite { display: flex; flex-direction: column; gap: var(--sp-3); background: var(--bg); border-inline-start: 1px solid var(--line); }
.panneau { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--sp-3) var(--sp-4); }
.panneau > header { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-2); }
.panneau h2 { font: 600 var(--fs-md)/1.2 var(--f-sans); color: var(--ink); margin: 0; display: inline-flex; align-items: center; gap: var(--sp-2); }
.panneau h2 kbd { opacity: .75; }   /* .6 → 4,3:1 en clair */
.aide-bulle { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--ink-3); font: 650 var(--fs-xs)/1 var(--f-sans); cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.aide-bulle:hover { background: var(--surface-2); color: var(--ink); }

/* Sous-titres : la personne en serif, grand (matière du livre) ; l'IA en retrait ; coulisses repliées. */
/* Les sous-titres ont la priorité : ≥ 300 px de fil à 1280 × 800. */
.fil-conteneur { position: relative; flex: 1 1 auto; min-height: clamp(200px, 34vh, 520px); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
/* Avant l'appel, rien ne se dit : la carte « Avant l'appel » est seule (le cadre vide, coupé sous la carte à 1280 × 800, semblait cassé). */
.avant-appel .fil-conteneur { display: none; }
.fil-conteneur > header { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.fil-conteneur > header h2 { font: 600 var(--fs-sm)/1.2 var(--f-sans); margin: 0; }
.fil-conteneur > header #fil-info { flex: 1 1 auto; min-width: 0; }
.fil { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: var(--sp-4) var(--sp-5) var(--sp-7); overscroll-behavior: contain; }
.fil.sans-coulisses .ligne-fil.coulisses { display: none; }
.ligne-fil { display: grid; grid-template-columns: 56px 92px minmax(0, 1fr); gap: var(--sp-3); padding: var(--sp-2) 0; align-items: baseline; }
.ligne-fil .tc { font-size: var(--fs-xs); color: var(--ink-3); }
.ligne-fil .qui { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); }
.ligne-fil.senior .qui { color: var(--senior); }
.tr-senior { font: 400 1.4rem/1.5 var(--f-serif); color: var(--ink); max-width: 62ch; }
.tr-agent { font: 400 1.0625rem/1.45 var(--f-sans); color: var(--ink-2); padding-inline-start: var(--sp-3); border-inline-start: 2px solid var(--line); max-width: 68ch; }
.tr-partiel { font-style: italic; color: var(--ink-3); }
.ligne-fil.parle-encore .texte { color: var(--ink-3); font-style: italic; font-family: var(--f-sans); font-size: var(--fs-sm); }
.ligne-fil.systeme { grid-template-columns: 56px minmax(0, 1fr); font-size: var(--fs-sm); color: var(--ink-2); padding: var(--sp-1) 0; }
.ligne-fil.systeme .texte { padding: 2px var(--sp-2); border-radius: var(--r-ctl); background: var(--surface-2); }
.ligne-fil.consigne .texte { color: var(--magicien); background: var(--magicien-soft); }
.ligne-fil.marqueur .texte { color: var(--accent); background: var(--accent-soft); }
.ligne-fil.alerte-att .texte { color: var(--warn); background: var(--warn-soft); }
.ligne-fil.alerte-crit .texte { color: var(--danger); background: var(--danger-soft); font-weight: 650; }
.ligne-fil.coulisses .texte { color: var(--ink-3); background: transparent; border: 1px dashed var(--line); }
.ligne-fil.apparait { animation: fondu var(--t-fast) var(--ease); }
@keyframes fondu { from { opacity: .2; } to { opacity: 1; } }
.retour-direct { position: absolute; left: 50%; bottom: var(--sp-3); transform: translateX(-50%); box-shadow: var(--shadow-2); background: var(--ink); color: var(--bg); border-color: var(--ink); border-radius: var(--r-pill); }
.retour-direct:hover { background: var(--ink); filter: brightness(1.1); }

/* Alertes (une alerte = une action) : le panneau n'existe que s'il y en a une. */
.alertes { display: grid; gap: var(--sp-2); }
.alerte { border-radius: var(--r-card); padding: var(--sp-3); border: 1px solid var(--line-strong); background: var(--surface); display: grid; gap: var(--sp-2); }
.alerte .tete { display: flex; gap: var(--sp-2); align-items: baseline; flex-wrap: wrap; font-weight: 700; }
.alerte .tete .quand { margin-inline-start: auto; font-weight: 500; font-size: var(--fs-xs); color: inherit; font-variant-numeric: tabular-nums; }
.alerte .texte { font-size: var(--fs-sm); }
.alerte .actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.alerte.info { background: var(--surface-2); color: var(--ink-2); }
.alerte.attention { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); border-inline-start-width: 6px; }
.alerte.urgence { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); border-width: 2px; border-inline-start-width: 8px; }
.alerte .btn { min-height: 36px; }
.alertes-plus { font-size: var(--fs-sm); color: var(--ink-3); }
.alerte .nouvelle-etiquette { color: inherit; background: transparent; border-color: currentColor; }

/* Enregistrement et accord : une ligne calme ; colorée seulement si une décision vous attend. */
.accord { display: flex; align-items: center; gap: var(--sp-2) var(--sp-3); flex-wrap: wrap; font-size: var(--fs-sm); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); }
.accord.att { border-color: var(--warn); background: var(--warn-soft); }
.accord.crit { border-color: var(--danger); background: var(--danger-soft); }
.pilule { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 28px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.pilule.ok { color: var(--ink-2); }
.pilule.att { color: var(--warn); }
.pilule.crit { color: var(--danger); }
.pilule .point { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }
.pilule.vivant .point { animation: respire 1.6s ease-in-out infinite; }
@keyframes respire { 50% { opacity: .35; } }
.consentement-bloc { display: inline-flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.consentement-bloc:empty { display: none; }

/* Souffler, marquer, chapitre */
.souffler textarea { min-height: 56px; font-size: var(--fs-md); }
.souffler .options { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: var(--sp-2); }
.envoi-programme { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; padding: var(--sp-2) var(--sp-3); margin-top: var(--sp-2); border-radius: var(--r-ctl); background: var(--magicien-soft); color: var(--magicien); font-weight: 650; font-size: var(--fs-sm); }
.envoi-programme .jauge { flex: 1; min-width: 80px; }
.envoi-programme .jauge > span { background: var(--magicien); transition: none; }
.consignes-rapides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); margin-top: var(--sp-2); }
.consignes-rapides .btn { justify-content: flex-start; min-height: var(--cible-console); text-align: left; font-weight: 500; }
.consignes-rapides .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.plus-options { margin-top: var(--sp-2); }
.plus-options > summary { font-size: var(--fs-sm); color: var(--ink-3); font-weight: 500; }
.plus-options[open] > summary { margin-bottom: var(--sp-2); }
.marqueurs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.marqueurs .btn { min-height: var(--cible-console); justify-content: flex-start; font-weight: 500; text-align: left; }
.marqueurs .btn.detresse { border-color: var(--danger); color: var(--danger); }
.marqueurs .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.progression .intitule { font: 400 var(--fs-md)/1.4 var(--f-serif); margin: 0 0 var(--sp-2); }
.progression .compte { font-weight: 600; font-variant-numeric: tabular-nums; font-size: var(--fs-sm); color: var(--ink-2); }
.prog-chapitre { font-weight: 400; color: var(--ink-2); }

/* Détails (replié) : carnet, sujets à éviter, journal, son, indicateurs */
.details-console > summary { display: flex; align-items: baseline; gap: var(--sp-2); min-height: 32px; }
.details-console > summary h2 { display: inline; }
.details-console .bloc-detail { padding: var(--sp-3) 0; border-top: 1px solid var(--line); }
.details-console[open] > summary { margin-bottom: var(--sp-2); }
.details-console h3 { font: 650 var(--fs-xs)/1.3 var(--f-sans); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 0 0 var(--sp-2); }
.details-console h3 .discret { text-transform: none; letter-spacing: 0; font-weight: 500; }
.details-console details.bloc-detail > summary { min-height: 28px; }
.details-console details.bloc-detail > summary h3 { display: inline; margin: 0; }
.details-console details.bloc-detail[open] > summary { margin-bottom: var(--sp-2); }
.carnet-genres { display: grid; gap: var(--sp-2); }
.carnet-genre h4, .fiche-reperes h4 { font: 650 var(--fs-xs)/1.3 var(--f-sans); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 0 0 4px; }
.carnet-genre ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.carnet-genre li { padding: 2px var(--sp-2); border-radius: var(--r-ctl); background: var(--surface-2); font-size: var(--fs-sm); }
.carnet-genre li.nouveau { background: var(--accent-soft); }
.journal-actions { max-height: 220px; overflow: auto; font-size: var(--fs-sm); }
.journal-actions ol { list-style: none; padding: 0; margin: 0; }
.journal-actions li { display: grid; grid-template-columns: 56px 1fr; gap: var(--sp-2); padding: 3px 0; border-bottom: 1px dotted var(--line); }
.micro-panneau { border: 2px solid var(--magicien); background: var(--magicien-soft); color: var(--ink); }
.micro-panneau h2 { color: var(--magicien); }
.micro-panneau .vumetre { height: 6px; background: rgb(128 128 128 / .25); color: var(--magicien); margin-bottom: var(--sp-2); }
.micro-etat { font-weight: 700; color: var(--magicien); }
.micro-etat.ouvert::before { content: "● "; color: var(--danger); }
.fiche-reperes h4 { margin: var(--sp-2) 0 4px; }
.fiche-reperes ul { margin: 0 0 var(--sp-2); }
.notes-fiche { white-space: pre-wrap; font-size: var(--fs-sm); max-height: 12em; overflow: auto; }
.ecoute { display: flex; align-items: center; gap: var(--sp-2) var(--sp-4); flex-wrap: wrap; }
.ecoute .volume { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); font-weight: 500; }
.ecoute .volume input { width: 80px; }
.ecoute .case { font-size: var(--fs-sm); }
.machine { display: grid; gap: 4px; font-size: var(--fs-sm); color: var(--ink-2); }
.machine .item { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.machine .item strong { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.machine .item.att strong, .machine .item.att { color: var(--warn); }
.machine .item.crit strong, .machine .item.crit { color: var(--danger); }
.machine .jauge { width: 60px; margin-inline-start: auto; }

/* Pied : les gestes de l'appel. Les actions graves (à droite) se confirment par un appui maintenu d'une seconde. */
.barre-actions {
  display: flex; align-items: stretch; gap: var(--sp-2); flex-wrap: wrap;
  padding: var(--sp-2) var(--sp-4); background: var(--surface); border-top: 1px solid var(--line-strong);
}
.barre-actions .groupe { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: stretch; }
.barre-actions .groupe.graves { margin-inline-start: auto; padding-inline-start: var(--sp-4); border-inline-start: 1px solid var(--line); }
.barre-actions .btn { min-height: var(--cible-console); }
.barre-actions .btn-maintenu { flex-direction: column; gap: 0; padding-block: 4px; }
/* « Plus » : vitesse de la voix, prolongation, bascule — un menu replié au-dessus du bouton. */
.menu-plus { position: relative; display: flex; }
.menu-plus > summary { list-style: none; }
.menu-plus > summary::-webkit-details-marker { display: none; }
.menu-plus-contenu { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 50; min-width: 420px; display: grid; gap: var(--sp-2); padding: var(--sp-3); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-card); box-shadow: var(--shadow-2); }
.menu-plus-contenu .btn-maintenu { flex-direction: column; gap: 0; padding-block: 4px; min-height: var(--cible-console); }
.voix-boutons { display: flex; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); overflow: hidden; }
.voix-boutons .btn { border: 0; border-radius: 0; border-inline-end: 1px solid var(--line); flex: 1 1 0; }
.voix-boutons .btn:last-child { border-inline-end: 0; }
.voix-boutons .libelle-groupe { display: inline-flex; align-items: center; padding: 0 var(--sp-2); font-size: var(--fs-xs); color: var(--ink-3); font-weight: 650; white-space: nowrap; }

/* Cartes plein écran (lancement, fin) : une phrase d'accroche, UNE action principale. */
.carte-centrale { max-width: 720px; width: 100%; margin: var(--sp-5) auto; }
.carte-centrale h2 { font-size: var(--fs-2xl); }
.carte-centrale .intro { color: var(--ink-2); margin-bottom: var(--sp-4); }
.carte-centrale .actions-carte { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; margin-top: var(--sp-4); }
.carte-centrale .actions-carte .secondaires { display: flex; gap: var(--sp-1); flex-wrap: wrap; margin-inline-start: auto; }
.etapes-analyse { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-1); font-size: var(--fs-sm); }
.etapes-analyse li::before { content: "○ "; color: var(--ink-3); }
.etapes-analyse li.fait::before { content: "✓ "; color: var(--ok); font-weight: 800; }
.etapes-analyse li.encours::before { content: "◐ "; color: var(--warn); }
.etapes-analyse li.erreur::before { content: "✕ "; color: var(--danger); }

.procedure-detresse ol li { margin-bottom: var(--sp-2); }
.procedure-detresse .aide { margin-top: var(--sp-3); }
.numeros-urgence { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.numeros-urgence div { border: 1px solid var(--danger); border-radius: var(--r-card); padding: var(--sp-2) var(--sp-3); }
.numeros-urgence strong { display: block; font: 700 var(--fs-2xl)/1 var(--f-sans); color: var(--danger); }

/* ------------------------------------------------------------------ RAPPORT D'UNE CONVERSATION */
/* « Qualité de la conversation » : une ligne par objectif du test, en mots (nom, résultat, règle). */
.seuils { display: grid; gap: 0; }
.seuil-ligne { display: grid; grid-template-columns: minmax(170px, 1fr) auto minmax(0, 2fr) auto; gap: var(--sp-3) var(--sp-4); align-items: center; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.seuil-ligne:last-child { border-bottom: 0; }
.seuil-ligne .nom { font-weight: 650; }
.seuil-ligne .valeur { font-variant-numeric: tabular-nums; }
.seuil-ligne .regle { display: block; font-size: var(--fs-sm); color: var(--ink-3); }
.seuil-ligne .jauge { grid-column: 1 / -1; height: 6px; }
.badge-seuil { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; font-size: var(--fs-sm); padding: 3px var(--sp-3); border-radius: var(--r-pill); border: 1px solid currentColor; white-space: nowrap; }
.badge-seuil.atteint { color: var(--ok); background: var(--ok-soft); }
.badge-seuil.manque { color: var(--danger); background: var(--danger-soft); }
.badge-seuil.confirmer { color: var(--warn); background: var(--warn-soft); border-style: dashed; }
.badge-seuil.non-saisi { color: var(--ink-3); background: var(--surface-2); }
.titre-rapport { font-size: var(--fs-3xl); }
.titre-rapport .pseudo-discret { margin-inline-start: var(--sp-3); vertical-align: middle; }

/* Lecteur épuré : « Écouter », ±5 s, position ; le reste sous « Plus d'options ». */
.lecteur { display: flex; align-items: center; gap: var(--sp-2) var(--sp-3); flex-wrap: wrap; padding: var(--sp-3) var(--sp-4); background: var(--surface); border-radius: var(--r-card) var(--r-card) 0 0; border: 1px solid var(--line); border-bottom: 0; }
.lecteur .position { font: 700 var(--fs-lg)/1 var(--f-sans); font-variant-numeric: tabular-nums; min-width: 9ch; }
.lecteur select { width: auto; min-height: 36px; }
.lecteur .btn-primaire { min-height: 44px; padding-inline: var(--sp-5); }
.lecteur details { flex: 1 1 100%; }
.lecteur details > summary { font-weight: 500; font-size: var(--fs-sm); color: var(--ink-2); min-height: 32px; }
.lecteur .options-lecteur { display: flex; gap: var(--sp-3) var(--sp-4); flex-wrap: wrap; align-items: center; padding-top: var(--sp-2); }
.volume-lecteur input { width: 100px; }
/* Fil de l'appel (qui parle, quand) sous le lecteur. */
.partition-cadre { border: 1px solid var(--line); border-radius: 0 0 var(--r-card) var(--r-card); background: var(--surface); padding: var(--sp-2) var(--sp-4) var(--sp-3); }
.partition-cadre .surtitre { margin: var(--sp-1) 0 var(--sp-2); }
.partition { display: block; width: 100%; height: 132px; cursor: pointer; border-radius: var(--r-ctl); }
.partition-legende { display: flex; gap: var(--sp-4); flex-wrap: wrap; font-size: var(--fs-xs); color: var(--ink-3); margin-top: var(--sp-2); }
.partition-legende .senior { color: var(--senior); font-weight: 700; }
.partition-legende .agent { color: var(--agent); font-weight: 700; }
.partition-legende .magicien { color: var(--magicien); font-weight: 700; }

/* Transcription à gauche, outils du test à droite (collés au défilement) : ils étaient 1 000 px sous le lecteur. */
.rapport-grille { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(380px, 1fr); gap: var(--sp-5); align-items: start; }
.colonne-transcript, .colonne-outils { min-width: 0; }
.colonne-outils { position: sticky; top: var(--sp-4); max-height: calc(100dvh - 2 * var(--sp-4)); overflow: auto; }
/* « Ce qu'elle a raconté » : le chapitre et les souvenirs relevés, en pleine largeur de lecture. */
.recit { max-width: 76ch; }
.recit .onglets { margin-bottom: var(--sp-5); }
.onglets-outils { margin-bottom: var(--sp-4); }
.rapport-grille.mode-wer .colonne-transcript { opacity: .85; }
.panneau-onglet { display: grid; gap: var(--sp-4); align-content: start; }
.panneau-onglet:focus-visible { outline-offset: 4px; }
.panneau-onglet h3 { margin: 0 0 var(--sp-2); }
.recherche-transcript { margin-bottom: var(--sp-3); }
.recherche-transcript input { flex: 1 1 16ch; width: auto; }
.selection-verbatim { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; padding: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3); border-radius: var(--r-ctl); background: var(--accent-soft); }
.fil-ariane { margin-bottom: var(--sp-3); color: var(--ink-3); }
.details-metriques { margin-top: var(--sp-4); }
.details-metriques .liste-def { margin-top: var(--sp-3); }
.h-petit { font-size: var(--fs-md); }
.transcript { max-height: 72vh; overflow-y: auto; padding-inline-end: var(--sp-2); }
.ligne-tr { display: grid; grid-template-columns: 54px 80px minmax(0, 1fr); gap: var(--sp-2); padding: var(--sp-2) var(--sp-2); border-radius: var(--r-ctl); cursor: pointer; align-items: baseline; border: 0; background: none; width: 100%; text-align: left; color: inherit; font: inherit; }
.ligne-tr:hover { background: var(--surface-2); }
.ligne-tr.en-cours { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.ligne-tr .tc { font-size: var(--fs-xs); color: var(--ink-3); }
/* Horodatage cliquable : bouton natif remplacé (fond gris natif → 1,95:1 en sombre, WCAG 1.4.3). */
.tc-bouton {
  appearance: none; -webkit-appearance: none; background: none; border: 1px solid var(--line-strong);
  border-radius: var(--r-ctl); padding: 2px 6px; min-height: 24px; cursor: pointer;
  font: inherit; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ligne-tr .tc.tc-bouton { color: var(--ink-2); }
.tc-bouton:hover { background: var(--surface-2); color: var(--ink); }
.temps-reel { display: block; margin-top: 2px; font: 400 var(--fs-xs)/1.4 var(--f-sans); color: var(--ink-3); }
.hors-livre-etiquette { margin-inline-start: var(--sp-2); }
.ligne-tr .qui { font-size: var(--fs-xs); font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.ligne-tr.senior .qui { color: var(--senior); font-size: var(--fs-sm); } .ligne-tr.agent .qui { color: var(--agent); } .ligne-tr.magicien .qui { color: var(--magicien); }
.ligne-tr.senior .texte { font: 400 var(--fs-xl)/var(--lh-read) var(--f-serif); }
.ligne-tr.agent .texte { color: var(--ink-2); font-size: var(--fs-md); }
/* Coulisses (messages automatiques, outils de l'IA) : en retrait, en italique. */
.ligne-tr.evenement .qui { color: var(--ink-3); }
.ligne-tr.evenement .texte { font-size: var(--fs-sm); color: var(--ink-3); font-style: italic; }
.ligne-tr.hors-livre .texte { text-decoration: line-through; text-decoration-color: var(--warn); }

.revue { display: grid; gap: var(--sp-3); }
.revue .contexte { padding: var(--sp-3); border-radius: var(--r-card); background: var(--surface-2); font-size: var(--fs-sm); }
.revue .verdicts { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.revue .verdicts .btn { min-height: var(--cible-console); }
.liste-candidats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.liste-candidats button { min-width: 64px; }
.liste-candidats .abusive { border-color: var(--danger); color: var(--danger); }
.liste-candidats .non { border-color: var(--ok); color: var(--ok); }
.liste-candidats .incertain { border-style: dashed; }
.liste-candidats .courant { outline: 3px solid var(--accent); outline-offset: 1px; }

.revue .question-revue { font-weight: 650; margin: 0; }
.motifs-coupure { margin: 0; }
.ligne-contexte { margin: 0 0 4px; }
.ligne-contexte.senior strong { color: var(--senior); }
.ligne-contexte.agent strong { color: var(--agent); }
.ajout-coupure, .bilan-revue { display: grid; gap: var(--sp-2); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.barre-fiche { padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.resultat-wer-bloc { display: grid; gap: var(--sp-2); }
.wer-saisie textarea { min-height: 240px; font: 400 var(--fs-lg)/var(--lh-read) var(--f-serif); }
.resultat-wer { font: 700 var(--fs-3xl)/1 var(--f-serif); font-variant-numeric: tabular-nums; }

.chapitre-texte { font: 400 var(--fs-lg)/1.7 var(--f-serif); max-width: 68ch; font-variant-numeric: oldstyle-nums; }
.chapitre-texte h1, .chapitre-texte h2, .chapitre-texte h3 { font-family: var(--f-serif); margin-top: var(--sp-5); }
.chapitre-texte p { margin-bottom: var(--sp-4); }
.chapitre-edition { min-height: 50vh; font: 400 var(--fs-md)/1.6 var(--f-mono); }
.chapitre-texte mark.a-verifier { background: var(--warn-soft); color: var(--ink); border-bottom: 2px dotted var(--warn); padding: 0 2px; }
.bloc-rappel, .verification { display: grid; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface-2); }
.bloc-rappel h3, .verification h3 { margin: 0; }
.choix-rappel { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-2) 0; border-bottom: 1px dotted var(--line); }
.choix-rappel:last-child { border-bottom: 0; }
.choix-rappel > .btn, .choix-rappel > .tc { flex: none; white-space: nowrap; }
.colonne-transcript .carte-titre select { width: auto; max-width: 100%; }
.choix-rappel .aide, .liste-problemes .aide { display: block; margin-top: 2px; }
.cartes-souvenirs { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }
.carte-souvenir { padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); display: grid; gap: var(--sp-2); }
.carte-souvenir.non-source { border-style: dashed; opacity: .85; }
blockquote.citation { margin: 0; padding-inline-start: var(--sp-3); border-inline-start: 3px solid var(--line-strong); font-family: var(--f-serif); color: var(--ink-2); }
blockquote.citation.douteuse { border-inline-start-color: var(--warn); }
.grille-entites { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-3); }
.liste-entites, .liste-evenements, .liste-problemes { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); font-size: var(--fs-sm); }
.liste-entites li, .liste-evenements li, .liste-problemes li { padding: 4px 0; border-bottom: 1px dotted var(--line); }
.groupe-evenements + .groupe-evenements { margin-top: var(--sp-3); }

/* ------------------------------------------------------------------ RÉSULTATS DU TEST */
.verdict { font: 600 var(--fs-xl)/1.35 var(--f-serif); display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.cellule-go { display: inline-flex; gap: 4px; align-items: baseline; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cellule-go.atteint { color: var(--ok); font-weight: 650; }
.cellule-go.manque { color: var(--danger); font-weight: 650; }
.cellule-go.confirmer { color: var(--warn); }
.cellule-go.attente { color: var(--ink-3); }
/* Texte de la règle sous la valeur : « ✕ 50 %1/2 » était collé (revue du 4/10). */
.bloc { display: block; }
.tableau-go td { min-width: 9ch; }
/* La colonne « Personne » garde la place d'écrire le profil en mots ; les en-têtes passent à la
   ligne pour que les 7 colonnes tiennent à 1280 px (sans défilement caché). */
.tableau-go tbody th { min-width: 160px; }
.tableau-go tbody th .bloc { margin-top: 2px; font-weight: 400; }
.tableau-go thead th { white-space: normal; }
.tableau-go .ligne-total td, .tableau-go .ligne-total th { border-bottom: 2px solid var(--line-strong); }
.lien-cellule { color: inherit; text-decoration: none; display: inline-block; }
.lien-cellule:hover .cellule-go, .lien-cellule:focus-visible .cellule-go { text-decoration: underline; }

/* ------------------------------------------------------------------ DONNÉES & RÉGLAGES */
.audit-etat { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.echeance-groupe { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
.reglages-table td:first-child { font-weight: 600; }
.reglages-table code { color: var(--ink-2); }
.filtres-audit { margin-bottom: var(--sp-3); }
.filtres-audit input[type="search"] { width: auto; flex: 1 1 18ch; }
.filtres-audit select { width: auto; }
.section-serree { margin-top: var(--sp-3); }
.liste-retraits { margin: var(--sp-1) 0 0; }
/* Dialogue de retrait : choix de l'étendue de l'effacement */
.choix-portees { display: grid; gap: var(--sp-2); }
.choix-portee { padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-ctl); }
.choix-portee:has(input:checked) { border-color: var(--danger); background: var(--danger-soft); }
pre.bloc-code { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: var(--sp-3); overflow-x: auto; font-size: var(--fs-sm); white-space: pre-wrap; }
/* Réglages : la partie technique, repliée. */
.details-techniciens { margin-top: var(--sp-6); }
.details-techniciens > summary { color: var(--ink-2); }
.details-techniciens .reglages-table { font-size: var(--fs-sm); }

/* ------------------------------------------------------------------ ACCÈS (console en ligne) */
/* Pages servies sans compte (connexion, code de secours, création de la clé d'accès, refus) : une
   carte au centre, la marque, UNE action en couleur. */
.page-acces { display: grid; justify-items: center; align-content: start; padding: clamp(24px, 9vh, 96px) var(--sp-4) var(--sp-7); }
.carte-acces, .page-connexion {
  width: min(100%, 540px); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: var(--sp-6); box-shadow: var(--shadow-1);
}
.carte-acces h1, .page-connexion h1 { font-size: var(--fs-2xl); margin-bottom: var(--sp-3); }
.carte-acces .guide, .page-connexion p { margin-bottom: var(--sp-4); }
.marque-acces { margin: 0 0 var(--sp-5); }
.carte-acces h1.marque-acces { font: 600 var(--fs-3xl)/1 var(--f-serif); margin-bottom: var(--sp-5); }
h1.marque-acces::before { width: 28px; height: 28px; border-radius: 7px; }
.carte-acces .bandeau-carte { margin-bottom: var(--sp-4); }
.carte-acces form { margin-bottom: var(--sp-4); }
.btn-large { min-height: 52px; width: 100%; font-size: var(--fs-md); }
.message-acces {
  margin: var(--sp-4) 0 var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-ctl);
  background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); font-weight: 500;
}
.message-acces:empty { display: none; }
.pied-acces { margin: var(--sp-5) 0 0; padding-top: var(--sp-4); border-top: 1px solid var(--line); color: var(--ink-2); }
.saisie-code { font-family: var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.page-connexion pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: var(--sp-3); overflow-x: auto; margin: 0 0 var(--sp-4); }
/* Les dix codes de secours : gros, numérotés, faits pour être recopiés à la main. */
.codes-secours { list-style: none; counter-reset: code; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-3); }
.codes-secours li { counter-increment: code; display: flex; align-items: baseline; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface-2); }
.codes-secours li::before { content: counter(code) "."; min-width: 1.7em; text-align: right; color: var(--ink-3); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.codes-secours code { font: 600 var(--fs-lg)/1.3 var(--f-mono); letter-spacing: .06em; color: var(--ink); }
.consignes-codes { padding-inline-start: 1.25em; margin-top: var(--sp-3); }
/* Titre qui reçoit le focus à l'arrivée des codes (annoncé par le lecteur d'écran) : sans anneau. */
.carte-acces h1[tabindex="-1"]:focus, dialog h2[tabindex="-1"]:focus { outline: none; }
.autres-appareils { margin-top: var(--sp-5); }
/* Vos appareils (Réglages, et après un remplacement d'appareil). */
.appareils { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.appareil { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); }
.appareil > div { display: grid; gap: 2px; min-width: 0; }
/* En-tête : qui est connecté, et « Se déconnecter ». */
.compte-connecte { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--ink-2); white-space: nowrap; }
.compte-connecte strong { color: var(--ink); }
/* Bouton étroit (l'en-tête tient sur une ligne à 1280 px), cible de 44 px de haut conservée. */
.entete-outils .compte-connecte .btn { min-width: 0; padding-inline: var(--sp-3); }
/* Console d'un appel : le nom seul sur la ligne d'en-tête, le bouton rangé dessous. */
.menu-compte { position: relative; display: block; }
.menu-compte > summary { list-style: none; font-weight: 600; }
.menu-compte > summary::-webkit-details-marker { display: none; }
.menu-compte-contenu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 50; display: grid; gap: var(--sp-2); padding: var(--sp-3); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-card); box-shadow: var(--shadow-2); }
.choix-segment label.indisponible { color: var(--ink-3); cursor: not-allowed; }

/* ------------------------------------------------------------------ responsive */
@media (min-width: 1101px) {
  /* La console tient dans l'écran : seules ses colonnes défilent (en dessous de 1100 px, elle passe
     volontairement en hauteur libre). */
  body.page-console { overflow: hidden; }
  /* Barre d'actions sur UNE rangée. Les sous-libellés restent visibles (ils tiennent dans les 44 px) :
     « l'IA conclut gentiment » / « coupure immédiate » est ce qui distingue Clôturer de Raccrocher. */
  .barre-actions, .barre-actions .groupe { flex-wrap: nowrap; }
  .barre-actions { padding-block: var(--sp-2); }
  .barre-actions .btn { padding-inline: var(--sp-3); }
}
@media (max-width: 1100px) {
  .console-app { height: auto; min-height: 100vh; }
  .console-grille { grid-template-columns: minmax(0, 1fr); }
  .console-gauche { border-inline-end: 0; overflow: visible; }
  .console-droite { overflow: visible; }
  .fil-conteneur { min-height: 50vh; }
  .fil { max-height: 60vh; }
  .barre-actions { position: sticky; bottom: 0; z-index: 30; }
  .barre-etat { position: sticky; top: 0; z-index: 31; }
  .barre-etat .rangee { flex-wrap: wrap; padding-block: var(--sp-2); }
  .bande-mode { flex-wrap: wrap; }
  .bande-mode .voix { order: 3; }
  .menu-plus-contenu { left: auto; right: 0; }
  .grille-12 { grid-template-columns: minmax(0, 1fr); }
  .rapport-grille { grid-template-columns: minmax(0, 1fr); }
  .colonne-outils { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 900px) {
  .grille-2, .accueil-grille { grid-template-columns: minmax(0, 1fr); }
  .en-tete-page { margin-bottom: var(--sp-5); }
  .seuil-ligne { grid-template-columns: 1fr auto; }
  .seuil-ligne .valeur, .seuil-ligne .regle, .seuil-ligne .jauge { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .entete { padding: var(--sp-2) var(--sp-4); gap: var(--sp-2); }
  .nav-principale { order: 3; width: 100%; overflow-x: auto; }
  .nav-principale ul { flex-wrap: nowrap; }
  .contenu { padding: var(--sp-5) var(--sp-4) var(--sp-7); }
  .sommaire { margin-inline: calc(-1 * var(--sp-4)); padding-inline: var(--sp-4); overflow-x: auto; }
  .sommaire ul { flex-wrap: nowrap; }
  h1 { font-size: var(--fs-2xl); }
  .accueil-date { font-size: var(--fs-3xl); }
  .carte { padding: var(--sp-4); }
  .a-faire li { grid-template-columns: 22px 1fr; }
  .a-faire li > a, .a-faire li > .btn { grid-column: 2; justify-self: start; }
  .consent-ligne { grid-template-columns: 26px minmax(0, 1fr); }
  .consent-ligne form { grid-column: 1 / -1; justify-content: flex-start; }
  .liste-def { grid-template-columns: 1fr; }
  .raccourcis-liste { grid-template-columns: 1fr; }
  .ligne-tr { grid-template-columns: 48px minmax(0, 1fr); }
  .ligne-tr .texte { grid-column: 1 / -1; }
  /* Console en petite largeur : l'en-tête (346 px) et la barre d'actions (383 px) collants ne
     laissaient que 77 px de contenu. Seule la bande de mode (QUI A LA MAIN) reste collée en haut ;
     la barre d'actions, compacte (2 colonnes, sans sous-libellés), reste en bas. */
  .barre-etat { position: static; }
  .barre-etat .identite { flex-wrap: wrap; }
  .barre-etat .identite .chapitre { white-space: normal; }
  .chrono-bloc { flex-wrap: wrap; }
  .frise { width: 120px; }
  .bande-mode { position: sticky; top: 0; z-index: 31; }
  .bande-mode .actions-mode { margin-inline-start: 0; flex-basis: 100%; }
  .voix { width: 100%; }
  .locuteur { flex: 1 1 0; min-width: 0; max-width: none; }
  .ligne-fil { grid-template-columns: 44px minmax(0, 1fr); }
  .ligne-fil .qui { grid-column: 2; }
  .ligne-fil .texte { grid-column: 1 / -1; }
  .consignes-rapides, .marqueurs { grid-template-columns: minmax(0, 1fr); }
  .consignes-rapides .btn:last-child:nth-child(odd), .marqueurs .btn:last-child:nth-child(odd) { grid-column: auto; }
  .barre-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-1); padding: var(--sp-2); max-height: 30vh; overflow-y: auto; }
  .barre-actions .groupe { display: contents; }
  .barre-actions .groupe.graves { margin-inline-start: 0; padding-inline-start: 0; border-inline-start: 0; }
  .barre-actions .voix-boutons { grid-column: 1 / -1; }
  .barre-actions .voix-boutons .btn { flex: 1 1 0; }
  .barre-actions .menu-plus { grid-column: 1 / -1; }
  .menu-plus-contenu { position: fixed; left: var(--sp-2); right: var(--sp-2); bottom: calc(30vh + 8px); min-width: 0; }
  .barre-actions .btn { flex: 1 1 auto; min-height: 40px; padding-inline: var(--sp-2); }
  .barre-actions .btn-maintenu .sous-libelle { display: none; }
  .barre-actions .btn-maintenu.en-maintien .sous-libelle { display: block; }
  .page-console .toasts { bottom: calc(30vh + 8px); }
  .carte-acces, .page-connexion { padding: var(--sp-5) var(--sp-4); }
  .entete-outils { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 420px) {
  .codes-secours { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------------ mouvement réduit & impression */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .entete, .nav-principale, .toasts, .barre-actions, .sommaire, .lecteur, .btn { display: none !important; }
  /* Les codes de secours se recopient à la main : rien ne part vers une imprimante ou un PDF. */
  .codes-secours { display: none !important; }
  body { background: #fff; color: #000; }
  .carte { box-shadow: none; border-color: #999; }
}
