/* Memoria — la feuille unique de la console : système « Épure » (charte M1, choisie le 14/10/2026).
 *
 * L'idée : un luxe minimal d'aujourd'hui, la sobriété d'une maison de parfum ou d'un éditeur de
 * design. Fond blanc cassé, encre presque noire teintée de vert, UNE couleur signature (vert forêt)
 * posée avec parcimonie : le bouton principal, l'emblème, la page courante, le soulignement des
 * liens, un beau souvenir. Ni or, ni serif, ni dégradé, ni ombre (sauf ce qui flotte : messages,
 * dialogues, menus) : le chic vient des titres serrés, des filets d'un pixel, de la grille et du vide.
 *
 * Police : Aptos (ex-Bierstadt), appelée par son NOM seulement. Licence Microsoft : aucun fichier de
 * police dans le dépôt ni servi, ni @font-face ni local() ; à défaut, la police du système. Graisses
 * réelles 400 et 700, italique 400 ; font-synthesis: none interdit tout gras ou italique simulé.
 * Une exception fonctionnelle : la chasse fixe du système pour les codes à recopier (--f-mono).
 *
 * Ce qui ne bouge pas (principes ISA-101, recherche ux-console.md) :
 *  - l'écran est neutre ; une couleur d'état n'apparaît que pour ce qui demande une action :
 *    bleu = action humaine, ambre = attention, rouge = critique, vert pré = atteint. La signature
 *    n'en est jamais une (vert forêt sombre et bleuté en clair ; en sombre, jade pâle, et le bouton
 *    principal passe en blanc d'encre) ;
 *  - chaque voix a sa teinte (la personne bleu canard, l'IA prune, vous bleu), toujours doublée
 *    d'un libellé ;
 *  - contrastes WCAG, clair comme sombre : texte ≥ 4,5:1, bordures, focus et repères ≥ 3:1
 *    (tests/unit/test_charte.py lit les blocs « @jetons » ci-dessous) ;
 *  - cibles de 44 px, pages et console ;
 *  - aucune ressource externe (CSP default-src 'self') : l'emblème et les pictogrammes de l'en-tête
 *    sont des SVG en data: URI.
 *
 * CLAIR PAR DÉFAUT (demande du fondateur, 15/10/2026), même quand l'ordinateur est en sombre : sans
 * attribut sur <html> (pages produites par le serveur, premier rendu avant tout script), la feuille
 * est claire. Le sombre ne s'applique que sur data-theme="dark" (bouton de l'en-tête, Réglages →
 * Sombre), ou sur data-theme="auto" (Réglages → Comme l'ordinateur) quand le système est en sombre.
 *
 * Plan : 1. jetons clairs · 2. jetons sombres (deux copies identiques : « Comme l'ordinateur », choix
 * du sombre) · 3. base · 4. en-tête · 5. bandeaux · 6. boutons · 7. formulaires · 8. cartes et sections ·
 * 9. étiquettes · 10. tableaux · 11. listes, jauges, onglets · 12. messages et dialogues · puis les
 * pages (accueil, personnes, fiche, console, rapport, résultats, données et réglages, accès),
 * les petites largeurs et l'impression. La charte expliquée : docs/Charte graphique — Épure.md.
 */

/* ================================================================== 1. JETONS — CLAIR */
/* Le clair est le thème de base : contrôles natifs et barres de défilement clairs eux aussi, même
   système en sombre (« light dark » les laissait suivre le système sous une page claire). */
:root {
  color-scheme: light;
  /* @jetons clair */
  --bg: #F3F4F1;            /* gris vert très clair : la page (direction « Tableau de bord », 20/10/2026) */
  --surface: #FFFFFF;       /* blanc : cartes, champs, sous-titres */
  --surface-2: #F0EFEA;     /* aplat discret : survol, champ inactif, ligne système */
  --line: #E4E7E2;          /* filet d'un pixel (décoratif) */
  --line-strong: #7E847F;   /* bordure de champ et de bouton (≥ 3:1) */
  --ink: #111814;           /* encre presque noire, teintée de vert */
  --ink-2: #3B4440;
  --ink-3: #59625D;
  --accent: #1B4434;        /* LA signature : vert forêt (emblème, page courante, liens, beau souvenir) */
  --accent-soft: #E6EEEA;
  --plein: #1B4434;         /* fond du bouton principal */
  --plein-survol: #123227;
  --sur-plein: #FFFFFF;     /* texte du bouton principal */
  --on-fill: #FFFFFF;       /* texte sur les aplats d'état (bleu, rouge, vert) */
  --senior: #0B5D69;        /* la personne : bleu canard */
  --senior-soft: #DDEDED;
  --agent: #5F447E;         /* l'IA : prune */
  --agent-soft: #EEE8F4;
  --magicien: #2452A4;      /* vous, et toute action humaine : bleu */
  --magicien-soft: #E0E7FA;   /* bleu pâle : ΔE2000 ≥ 10 avec le vert pâle de la signature */
  --ok: #2E6A22;            /* atteint : vert pré, plus clair et plus jaune que la signature */
  --ok-soft: #E8F2D2;       /* aplat jaune-vert : ΔE2000 ≥ 10 avec le vert pâle de la signature */
  --warn: #7A5000;          /* attention : ambre (teinte OKLCH 74°, à 45° du rouge critique) */
  --warn-soft: #FBF0D6;
  --danger: #B2231B;        /* critique : vermillon */
  --danger-soft: #FBE3DF;
  --focus: #1B4434;         /* anneau de focus : 2 px, décalé de 3 px */
  --panneau-acces: #1B4434; /* connexion : le panneau vert plein (la seule grande surface de vert) */
  --panneau-texte: #F3F4EF; /* la marque posée sur ce panneau */
  /* @fin */
  --voile: rgb(17 24 20 / .42);
  /* La seule ombre : ce qui flotte (messages, dialogues, menus, « Retour au direct »). */
  --ombre: 0 1px 2px rgb(17 24 20 / .06), 0 18px 40px -18px rgb(17 24 20 / .28);
  /* L'emblème : deux arches d'un trait (un « m », deux voix qui se répondent), posé sur la signature. */
  --embleme: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 19V10.5a3.5 3.5 0 0 1 7 0V19M12 10.5a3.5 3.5 0 0 1 7 0V19' fill='none' stroke='%23FFFFFF' stroke-width='1.9'/%3E%3C/svg%3E");
  /* Le même, au trait clair, sur le panneau de connexion ; et en filigrane, avec sa silhouette en écho. */
  --embleme-panneau: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 19V10.5a3.5 3.5 0 0 1 7 0V19M12 10.5a3.5 3.5 0 0 1 7 0V19' fill='none' stroke='%23F3F4EF' stroke-width='1.9'/%3E%3C/svg%3E");
  --filigrane: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 400' fill='none' stroke='%23F3F4EF' stroke-opacity='.16' stroke-width='1.5'%3E%3Cpath d='M60 400V190a70 70 0 0 1 140 0v210M200 190a70 70 0 0 1 140 0v210'/%3E%3Cpath d='M40 400V190A90 90 0 0 1 200 133.4A90 90 0 0 1 360 190V400' stroke-opacity='.09'/%3E%3C/svg%3E");
  /* Les pictogrammes de l'en-tête, au trait fin comme l'emblème (24 × 24, trait 1,6, bouts ronds) ;
     posés en MASQUE (.picto) : ils prennent la couleur du texte du bouton, en clair comme en sombre.
     L'œil barré : le mode écran partagé (la barre coupe le contour et la pupille, avec un jour). */
  --icone-oeil-barre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.13 6.17A10.52 10.52 0 0 1 21.5 12A10.52 10.52 0 0 1 19.15 15.19M13.87 17.83A10.52 10.52 0 0 1 2.5 12A10.52 10.52 0 0 1 4.85 8.81M12.2 8.81A3.2 3.2 0 0 1 15.19 11.8M11.8 15.19A3.2 3.2 0 0 1 8.81 12.2M4.5 4.5l15 15'/%3E%3C/svg%3E");
  /* Le bouton de thème montre où il mène : la lune en clair (« Passer en sombre »), le soleil en sombre. */
  --icone-lune: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19.97 12.7A8 8 0 1 1 11.3 4.03A6.3 6.3 0 0 0 19.97 12.7Z'/%3E%3C/svg%3E");
  --icone-soleil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3.6'/%3E%3Cpath d='M12 3.4v2.4M12 18.2v2.4M3.4 12h2.4M18.2 12h2.4M5.92 5.92l1.7 1.7M16.38 16.38l1.7 1.7M5.92 18.08l1.7-1.7M16.38 7.62l1.7-1.7'/%3E%3C/svg%3E");
  /* L'icône du bouton de thème suit le thème AFFICHÉ, par la feuille seule (pas par aria-pressed, posé
     par les modules) : dès la première image, même avant le JavaScript, la lune en clair, le soleil en sombre. */
  --icone-theme: var(--icone-lune);
  /* Menu latéral (refonte du 20/10/2026) : un panneau d'encre verte, le même en clair et en sombre. */
  --nav-l: 236px;
  /* Les cartes, légèrement soulevées (direction « Tableau de bord ») ; la tuile principale en vert plein. */
  --ombre-carte: 0 1px 2px rgb(17 24 20 / .05), 0 6px 18px -10px rgb(17 24 20 / .16);
  --tuile-forte: #1B4434; --tuile-forte-texte: #FFFFFF; --tuile-forte-doux: #CFE3DA; --pastille: #E3EFE9;
  --i-cle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='15' r='4'/%3E%3Cpath d='M11 12l8-8M16 7l2 2M14 9l2 2'/%3E%3C/svg%3E");
  --nav-bg: #13211B; --nav-ink: #B9C6BF; --nav-ink-fort: #FFFFFF; --nav-filet: #2A3A33;
  --nav-survol: #1C2D25; --nav-actif: #24392F; --nav-repere: #8FD3B3; --nav-marque: #2F7A5C;
  --i-accueil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11l8-6 8 6v8a1 1 0 0 1-1 1h-4v-6h-6v6H5a1 1 0 0 1-1-1z'/%3E%3C/svg%3E");
  --i-personnes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.2'/%3E%3Cpath d='M3.5 19a5.5 5.5 0 0 1 11 0M15.5 5.2a3 3 0 0 1 0 5.6M17.5 14.2a5 5 0 0 1 3 4.8'/%3E%3C/svg%3E");
  --i-resultats: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M21 20H3'/%3E%3C/svg%3E");
  --i-donnees: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='6' rx='7' ry='2.8'/%3E%3Cpath d='M5 6v12c0 1.5 3.1 2.8 7 2.8s7-1.3 7-2.8V6M5 12c0 1.5 3.1 2.8 7 2.8s7-1.3 7-2.8'/%3E%3C/svg%3E");
  --i-reglages: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h10M18 7h2M4 17h4M12 17h8'/%3E%3Ccircle cx='16' cy='7' r='2'/%3E%3Ccircle cx='10' cy='17' r='2'/%3E%3C/svg%3E");

  /* Typographie : une seule famille, deux graisses (400, 700). */
  --f-sans: "Aptos", "Bierstadt", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;   /* codes à recopier seulement */
  --fs-xs: .8125rem; --fs-sm: .9375rem; --fs-md: 1.0625rem; --fs-lg: 1.1875rem; --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem; --fs-3xl: 2.75rem; --fs-4xl: 3.5rem;
  --fs-capitales: .75rem;   /* libellés en petites majuscules */
  --capitales: .16em;       /* leur interlettrage */
  --serre: -.035em;         /* interlettrage des grands titres */
  --lh-body: 1.6; --lh-read: 1.65; --lh-tight: 1.15;

  /* Espaces, formes, mouvement. */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 72px;
  --r-ctl: 4px; --r-card: 6px; --r-cartouche: 3px; --r-pill: 999px;
  --t-fast: 120ms; --t-med: 200ms; --ease: cubic-bezier(.2, .7, .2, 1);
  /* Cibles de 44 px partout ; la console règle seulement la marge et le corps de ses libellés. */
  --cible-console: 44px;
  --ctl-h: 44px; --ctl-h-petit: 44px; --btn-px: var(--sp-5); --fs-libelle: var(--fs-md);
}

/* ================================================================== 2. JETONS — SOMBRE (encre de nuit) */
/* Deux copies identiques : « Comme l'ordinateur » (data-theme="auto") quand le système est en sombre,
   puis le choix du sombre (data-theme="dark" : bouton de l'en-tête, Réglages). Sans attribut, CLAIR. */
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0E1210; --surface: #151A17; --surface-2: #1C2320; --line: #2A322E; --line-strong: #7A847E;
    --ink: #ECEEE9; --ink-2: #C3C9C4; --ink-3: #9AA39D;
    --accent: #A7D0C2; --accent-soft: #1A2A24;
    --plein: #ECEEE9; --plein-survol: #FFFFFF; --sur-plein: #0E1210; --on-fill: #0E1210;
    --senior: #7BCFD6; --senior-soft: #12302F; --agent: #C7AEE6; --agent-soft: #2A2238;
    --magicien: #93B8F5; --magicien-soft: #1A2A42;
    --ok: #93CF88; --ok-soft: #203214; --warn: #E8B65A; --warn-soft: #352A12;
    --danger: #FF8B80; --danger-soft: #45201C; --focus: #A7D0C2;
    --panneau-acces: #12291F;
    --voile: rgb(0 0 0 / .62);
    --ombre: 0 18px 40px -16px rgb(0 0 0 / .75);
    --embleme: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 19V10.5a3.5 3.5 0 0 1 7 0V19M12 10.5a3.5 3.5 0 0 1 7 0V19' fill='none' stroke='%230E1210' stroke-width='1.9'/%3E%3C/svg%3E");
    --icone-theme: var(--icone-soleil);
  }
}
:root[data-theme="dark"] {
  /* @jetons sombre */
  --bg: #0E1210; --surface: #151A17; --surface-2: #1C2320; --line: #2A322E; --line-strong: #7A847E;
  --ink: #ECEEE9; --ink-2: #C3C9C4; --ink-3: #9AA39D;
  --accent: #A7D0C2; --accent-soft: #1A2A24;
  --plein: #ECEEE9; --plein-survol: #FFFFFF; --sur-plein: #0E1210; --on-fill: #0E1210;
  --senior: #7BCFD6; --senior-soft: #12302F; --agent: #C7AEE6; --agent-soft: #2A2238;
  --magicien: #93B8F5; --magicien-soft: #1A2A42;
  --ok: #93CF88; --ok-soft: #203214; --warn: #E8B65A; --warn-soft: #352A12;
  --danger: #FF8B80; --danger-soft: #45201C; --focus: #A7D0C2;
  --panneau-acces: #12291F;
  /* @fin */
  --voile: rgb(0 0 0 / .62);
  --ombre: 0 18px 40px -16px rgb(0 0 0 / .75);
  --embleme: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 19V10.5a3.5 3.5 0 0 1 7 0V19M12 10.5a3.5 3.5 0 0 1 7 0V19' fill='none' stroke='%230E1210' stroke-width='1.9'/%3E%3C/svg%3E");
  --icone-theme: var(--icone-soleil);
}
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] { color-scheme: dark; }
}

/* ================================================================== 3. BASE : une famille, deux graisses */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-block: 96px 120px; font-synthesis: none; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--ink);
  font: 400 var(--fs-md)/var(--lh-body) var(--f-sans);
  font-kerning: normal; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
/* Titres : gras, serrés ; le h1 est le seul cri de la page. */
h1, h2, h3, h4 { margin: 0 0 var(--sp-3); font-family: var(--f-sans); font-weight: 700; line-height: var(--lh-tight); }
h1 { font-size: var(--fs-3xl); line-height: 1.02; letter-spacing: var(--serre); }
h2 { font-size: var(--fs-xl); letter-spacing: -.022em; }
h3 { font-size: var(--fs-md); letter-spacing: -.012em; }
p { margin: 0 0 var(--sp-3); }
/* Pas de mot orphelin en fin de paragraphe ; titres équilibrés. */
p, li, .guide, .aide { text-wrap: pretty; }
h1, h2, .titre-mode { text-wrap: balance; }
strong, b { font-weight: 700; }
/* Le chapeau sous le titre : ce qu'on fait ici, en gris d'encre, sur une mesure courte. */
.guide { font: 400 var(--fs-lg)/1.55 var(--f-sans); color: var(--ink-2); max-width: 58ch; margin: 0 0 var(--sp-2); }
/* Les liens : l'encre, soulignée d'un trait vert fin (la signature, à petite dose). */
a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
code, .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: 2px solid var(--focus); outline-offset: 3px; }
::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); }
/* Chiffres alignés (horaires, chrono, compteurs) — en Aptos, pas en machine à écrire. */
.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 » (nom gardé par le JavaScript) : la parole de la personne citée — en Aptos, comme tout. */
.serif { font-family: var(--f-sans); }
.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; }
.pseudo-discret { font: 700 var(--fs-capitales)/1 var(--f-sans); letter-spacing: .08em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* Petites majuscules espacées, discrètes : surtitres, légendes, en-têtes de tableau, fil d'Ariane. */
.surtitre, legend, .accueil-date, .fil-ariane, .tableau thead th, .fil-conteneur > header h2, .carte-prochaine > h2:first-child {
  font-family: var(--f-sans); font-weight: 400; font-size: var(--fs-capitales); line-height: 1.3;
  letter-spacing: var(--capitales); text-transform: uppercase; color: var(--ink-2);
}
.surtitre { margin: 0 0 var(--sp-4); }
/* .petit (15 px) l'emportait sur legend et sur l'en-tête de colonne : « PROPOSITIONS », « (INDICATIF) ». */
legend.petit { font-size: var(--fs-capitales); }
.tableau thead th .petit { font-size: 1em; }

/* Page : la grille et le vide. */
.contenu { max-width: 1160px; margin: 0 auto; padding: var(--sp-8) var(--sp-7) 120px; }
.contenu.large { max-width: 1440px; }
.en-tete-page {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-6); flex-wrap: wrap;
  padding-bottom: var(--sp-6); margin-bottom: var(--sp-7); border-bottom: 1px solid var(--line);
}
.en-tete-page h1 { font-size: var(--fs-4xl); margin: 0 0 var(--sp-4); }
/* « Personnes (3) » : le compte en exposant, comme une note de magazine. */
.en-tete-page h1 .discret { font-size: .32em; font-weight: 400; letter-spacing: .04em; vertical-align: super; margin-inline-start: .3em; }
.en-tete-page .guide { margin: var(--sp-1) 0 0; }
.en-tete-page .actions-page { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }

/* ================================================================== 4. EN-TÊTE : une ligne, un filet */
.entete {
  display: flex; align-items: center; gap: var(--sp-7); flex-wrap: wrap;
  min-height: 72px; padding: 0 var(--sp-7); background: var(--bg); border-bottom: 1px solid var(--line);
}
/* La marque : l'emblème, puis MEMORIA en capitales très espacées (une griffe). */
.marque {
  display: inline-flex; align-items: center; gap: 14px; min-height: 44px;
  font: 700 .875rem/1 var(--f-sans); letter-spacing: .34em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; margin-inline-end: -.34em;
}
.marque::before {
  content: ""; flex: none; width: 26px; height: 26px; border-radius: 5px;
  background: var(--accent) var(--embleme) center / 18px no-repeat;
}
.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: 72px; padding: 0 14px; white-space: nowrap;
  font: 400 var(--fs-sm)/1 var(--f-sans); letter-spacing: .005em; color: var(--ink-2); text-decoration: none;
}
.nav-principale a:hover { color: var(--ink); box-shadow: inset 0 -1px 0 var(--ink-3); }
/* Page courante : l'encre en gras, et deux pixels de vert posés sur le filet. */
.nav-principale a[aria-current="page"] { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); }
.entete-outils { margin-inline-start: auto; display: flex; gap: var(--sp-1); align-items: center; }
.entete-outils .btn { min-height: 44px; min-width: 44px; }
.entete-outils .btn-rond { border-color: var(--line-strong); background: transparent; }

/* ================================================================== 5. BANDEAUX (toutes les pages) */
/* Une couleur d'état, un trait de 4 px à gauche, un filet dessous. Rouge par défaut (critique). */
.bandeau-global {
  display: flex; align-items: center; gap: var(--sp-3) var(--sp-4); flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-7); font-weight: 700;
  background: var(--danger-soft); color: var(--danger);
  border-bottom: 1px solid var(--danger); border-inline-start: 4px 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); }
.page-console .bandeau-global { padding-inline: var(--sp-5); }
/* Dans la console d'un appel, les bandeaux de page (rendez-vous, accès) passent au second plan : fond de
   carte, texte à leur couleur d'état, filet gardé ; ils ne se collent pas en haut (au zoom 200 %, le
   bandeau d'un rendez-vous manqué recouvrait la bande d'état critique). Seule .bande-mode est franche. */
.page-console .bandeau-global { background: var(--surface); font-weight: 400; }
.page-console .bandeau-global :is(strong, b) { font-weight: 700; }
.page-console :is(.bandeau-rendez-vous, .bandeau-acces, .bandeau-veille) { position: static; }
/* Un lien seul dans un bandeau (« Page de connexion ↗ ») : une cible de 44 px, à la couleur du bandeau. */
.bandeau-global a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration-color: currentColor; }
/* 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: 2px; }
.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; }
/* Mode écran partagé : une ligne bleue en tête (action humaine en cours : vous montrez l'écran). */
.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: 700;
}

/* ================================================================== 6. 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: 700 var(--fs-sm)/1.2 var(--f-sans); letter-spacing: .005em; 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); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
/* Le bouton principal : vert forêt plein en clair, blanc d'encre en sombre (jamais une pastille d'état). */
.btn-primaire { background: var(--plein); border-color: var(--plein); color: var(--sur-plein); }
.btn-primaire:hover { background: var(--plein-survol); border-color: var(--plein-survol); }
.btn-humain { background: var(--magicien); border-color: var(--magicien); color: var(--on-fill); }
.btn-humain:hover { background: var(--magicien); border-color: var(--magicien); filter: brightness(.94); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: var(--on-fill); }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); filter: brightness(.94); }
.btn-contour-danger { border-color: var(--danger); color: var(--danger); }
.btn-contour-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-discret { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-discret:hover { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.btn-lien {
  border: 0; background: none; padding: 0; min-height: 24px; color: var(--ink); font-weight: 400;
  text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px;
}
.btn-lien:hover { background: none; text-decoration-thickness: 2px; }
/* Un lien-bouton hors d'une phrase (« ▸ 9:49 ») : 24 px à l'œil, 44 px au doigt. */
.btn-lien { overflow: visible; position: relative; }
.btn-lien::after { content: ""; position: absolute; inset: -10px -4px; }
.btn-petit { min-height: var(--ctl-h-petit); padding: 0 var(--sp-4); font-size: .875rem; }
.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); }
/* Pictogramme au trait (jetons --icone-…), en masque : il prend la couleur du texte du bouton (gris
   d'encre, l'encre au survol, la page sur le bouton pressé de l'écran partagé). */
.picto {
  flex: none; display: block; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: var(--picto) center / contain no-repeat; mask: var(--picto) center / contain no-repeat;
}
.picto-ecran-partage { --picto: var(--icone-oeil-barre); }
.picto-theme { --picto: var(--icone-theme); }      /* lune en clair, soleil en sombre : jetons 1 et 2 */
/* Le bouton de thème dit « thème sombre » (aria-pressed) : en sombre, il reste discret (le soleil
   suffit) ; seul l'écran partagé, un mode qui floute, s'affiche pressé à l'aplat d'encre. */
.btn.btn-discret[data-action="theme"][aria-pressed="true"] { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn.btn-discret[data-action="theme"][aria-pressed="true"]:hover { background: var(--surface-2); color: var(--ink); }
@media (forced-colors: active) {
  .picto { forced-color-adjust: none; background: ButtonText; }
}
.btn .touche { margin-inline-start: var(--sp-1); }
.btn .sous-libelle { font-weight: 400; }

/* Appui maintenu 1 s : 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-size: var(--fs-xs); opacity: .9; }

/* Touches : un cartouche au trait, à la couleur du texte qui l'entoure. */
kbd, .touche {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.7em; height: 1.7em;
  padding: 0 .35em; border: 1px solid color-mix(in srgb, currentColor 55%, transparent); border-radius: var(--r-cartouche);
  font: 700 .6875rem/1 var(--f-sans); letter-spacing: 0; vertical-align: middle;
}

/* ================================================================== 7. FORMULAIRES */
label, .libelle { font-weight: 700; font-size: var(--fs-libelle); color: var(--ink); letter-spacing: -.003em; }
.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-color: 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%;
}
/* Une liste au libellé long (« Ses paroles — transcription soignée… ») ne déborde jamais de la page :
   à 320 px (zoom 400 %), le rapport défilait à l'horizontale (WCAG 1.4.10, revue du 15/10). Les
   éléments flexibles qui la portent peuvent rétrécir sous la largeur de leur contenu. */
select { max-width: 100%; min-width: 0; }
.carte-titre > *, .ligne-flex > label, .rapport-grille > * { min-width: 0; max-width: 100%; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }
textarea { min-height: 96px; line-height: var(--lh-read); resize: vertical; }
input:disabled, select:disabled, textarea:disabled, textarea[readonly], input[readonly] { background-color: 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: 44px; }
.case { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 400; cursor: pointer; min-height: 44px; }
.aide { font-size: var(--fs-sm); line-height: 1.55; color: var(--ink-3); font-weight: 400; margin: 0; }
/* 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: 700; 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); }
.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: 400; 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 -2px 0 var(--accent); font-weight: 700; }
.choix-segment label.indisponible { color: var(--ink-3); cursor: not-allowed; }
.choix-segment input { width: 16px; height: 16px; }

/* Puces (sujets à éviter, prénoms) : des cartouches au trait ; ajout et 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-cartouche);
  background: var(--surface); border: 1px solid var(--line-strong); font-size: var(--fs-sm);
}
/* Le « × » : 28 px à l'œil, 44 px au doigt. */
.puce button { position: relative; border: 0; background: none; color: var(--ink-2); width: 28px; height: 28px; border-radius: var(--r-cartouche); cursor: pointer; font: inherit; font-size: 1rem; line-height: 1; }
.puce button::after { content: ""; position: absolute; inset: -8px; }
.puce button:hover { background: var(--surface-2); color: var(--ink); }
.ajout-puce { display: flex; gap: var(--sp-2); }
.ajout-puce input { flex: 1; }
/* Bornes de saisie (« 3/8 ») : la limite de ce que l'IA recevra, visible avant le refus. */
.borne { font-weight: 400; color: var(--ink-3); font-variant-numeric: tabular-nums; margin-inline-start: var(--sp-1); }
.borne.pleine { color: var(--warn); font-weight: 700; }

/* ================================================================== 8. CARTES & SECTIONS */
/* Les cartes sont posées, pas soulevées : blanches, un filet, coins de 6 px, aucune ombre. */
.carte {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: var(--sp-6) 36px; min-width: 0;
}
.carte > h2:first-child:not(.surtitre) { font-size: 1.25rem; letter-spacing: -.02em; margin: 0 0 var(--sp-5); }
.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-4); }
.carte-titre h2, .carte-titre h3 { margin: 0; font-size: 1.125rem; letter-spacing: -.015em; }
.carte-titre .discret.petit { font-size: var(--fs-capitales); letter-spacing: .08em; }
.carte.calme { background: var(--surface-2); border-color: transparent; }
/* Cartes à sens : un trait de deux pixels en tête (vert = à faire ici ; prune = ce que l'IA saura). */
.carte.ia-saura { box-shadow: inset 0 2px 0 var(--agent); }
.carte.ia-saura .carte-titre .discret { color: var(--agent); }
.carte.pour-vous { border: 1px dashed var(--line-strong); background: transparent; }
/* Bandeau dans une page (état d'une conversation, accès de secours) : neutre, info, ou décision requise. */
.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); 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: 4px solid var(--danger); }
.bandeau-carte.att { background: var(--warn-soft); border-color: var(--warn); border-inline-start: 4px solid var(--warn); }
.bandeau-carte > .texte { flex: 1 1 28ch; min-width: 0; }
.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-8); }
/* Titre de section : grand, serré, posé sur un filet. */
.section-titre {
  display: flex; align-items: center; gap: var(--sp-2) var(--sp-3); justify-content: space-between; flex-wrap: wrap;
  padding-bottom: var(--sp-4); margin-bottom: var(--sp-6); border-bottom: 1px solid var(--line);
}
.section-titre h2 { margin: 0; font-size: 2rem; letter-spacing: -.03em; }
.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: 700; min-height: var(--ctl-h); display: flex; align-items: center; gap: var(--sp-2); }
details > summary::marker { color: var(--ink-3); }
summary .discret, summary .petit { font-weight: 400; }
.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-5); 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); }
.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); }

/* ================================================================== 9. ÉTIQUETTES & STATUTS (jamais la couleur seule) */
/* Des cartouches nets, coins presque droits ; colorés seulement quand un état l'exige. */
.etiquette {
  display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 0 10px;
  border: 0; border-radius: 999px; background: var(--surface-2);
  font-size: var(--fs-xs); font-weight: 700; 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: 700; }
.statut.ok { color: var(--ok); } .statut.att { color: var(--warn); } .statut.crit { color: var(--danger); }
.statut.neutre { color: var(--ink-3); font-weight: 400; }

/* ================================================================== 10. TABLEAUX */
/* En-tête : petites majuscules sur un filet d'encre ; les lignes, sur des filets clairs.
   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-4); border-bottom: 1px solid var(--line); vertical-align: top; }
.tableau thead th { padding: 0 var(--sp-4) var(--sp-2); border-bottom: 1px solid var(--ink); vertical-align: bottom; white-space: nowrap; }
.tableau thead th:first-child, .tableau tbody > tr > :first-child { padding-inline-start: 0; }
.tableau tbody tr:hover td, .tableau tbody tr:hover th { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.tableau th button.tri { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: flex-end; min-height: 44px; line-height: 1.3; }
.tableau th button.tri:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.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 .btn { white-space: nowrap; }
/* Liens des tableaux (pseudonyme, conversation) : 44 px de haut, sans épaissir la ligne. */
.tableau a:not(.btn):not(.lien-cellule) { display: inline-flex; align-items: center; min-height: 44px; margin-block: -12px; }
.tableau .id-pseudo { font: 700 .8125rem/1 var(--f-sans); letter-spacing: .08em; color: var(--ink-2); text-decoration-color: var(--accent); }
.tableau .id-pseudo:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.tableau tr.ligne-seuil td, .tableau tr.ligne-seuil th { background: var(--surface-2); font-weight: 700; }
.tableau tr.ligne-alerte td, .tableau tr.ligne-alerte th { background: var(--danger-soft); }
.tableau tr.ligne-notable td { background: var(--surface-2); }
/* Journal des accès (revue du 28/10/2026) : une ligne de titre par jour ; la cible sur une ligne. */
.tableau-audit tr.jour th { text-align: start; font-weight: 700; font-size: .8rem; color: var(--ink-3); background: var(--surface-2);
  padding-block: .45rem; text-transform: capitalize; }
.tableau-audit td.cible { white-space: nowrap; }
.tableau-audit details summary { cursor: pointer; }
.tableau-audit details ul { margin: .4rem 0 0; padding-inline-start: 1rem; }

/* ================================================================== 11. LISTES DE CONTRÔLE, JAUGES, ONGLETS */
/* Avant d'appeler, fin d'appel, état du poste : une ligne par point, sur un filet ; teintée seulement
   quand elle demande quelque chose (ambre) ou bloque (rouge). */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.checklist li {
  display: grid; grid-template-columns: 28px 1fr; gap: var(--sp-2); align-items: center; min-height: 44px;
  padding: var(--sp-3) var(--sp-3); border-bottom: 1px solid var(--line);
}
.checklist li:last-child { border-bottom: 0; }
.checklist .icone { font-weight: 700; text-align: center; line-height: 1.5; color: var(--ink-3); }
.checklist li.ok .icone { color: var(--ok); }
.checklist li.att { background: var(--warn-soft); box-shadow: inset 4px 0 0 var(--warn); } .checklist li.att .icone { color: var(--warn); }
.checklist li.bloquant { background: var(--danger-soft); box-shadow: inset 4px 0 0 var(--danger); }
.checklist li.bloquant .icone, .checklist li.bloquant strong { color: var(--danger); }
.checklist li .aide { margin-top: 2px; }
/* Prénom de la fiche cité dans un sujet à éviter (CONV-25) : l'avertissement, sous la liste des sujets. */
.avert-sujets { margin-top: var(--sp-2); padding: var(--sp-2) var(--sp-3); color: var(--ink-2);
  background: var(--warn-soft); box-shadow: inset 4px 0 0 var(--warn); }
.avert-sujets p { margin: 0; } .avert-sujets p + p { margin-top: var(--sp-2); }
.avert-sujets span[aria-hidden] { color: var(--warn); font-weight: 700; }

/* Jauges : un trait de 4 px, rempli d'encre ou de la couleur d'un état ; le seuil, un trait d'encre. */
.jauge { position: relative; height: 4px; background: 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); 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: 0; bottom: 0; width: 2px; left: calc(var(--pos, 0) * 100%); background: var(--ink); }

/* Onglets : des mots sur un filet ; le courant en gras, souligné de deux pixels verts. */
.onglets { display: flex; gap: var(--sp-2); 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: 400 var(--fs-md)/1 var(--f-sans);
  min-height: 44px; padding: 0 var(--sp-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.onglets.onglets-outils [role="tab"] { font-size: var(--fs-sm); }
/* Outils du test : les quatre onglets sur UNE ligne, même dans la colonne de 500 px (1440 px) ; un
   libellé passe plutôt sur deux lignes (« Repères de l'appel » tombait seul sous les autres). */
.onglets.onglets-outils { flex-wrap: nowrap; gap: 0; }
.onglets.onglets-outils [role="tab"] { flex: 1 1 auto; white-space: normal; line-height: 1.25; padding: var(--sp-2) var(--sp-3); text-align: left; }
.onglets [role="tab"][aria-selected="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
.onglets [role="tab"]:hover { color: var(--ink); }

/* ================================================================== 12. MESSAGES & DIALOGUES (ce qui flotte : les seules ombres) */
.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-ctl); background: var(--ink); color: var(--bg);
  box-shadow: var(--ombre); 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: 44px; background: transparent; color: inherit; border-color: currentColor; }
.toast .btn:hover { background: color-mix(in srgb, currentColor 14%, transparent); border-color: currentColor; }
/* Sur l'aplat du message, l'anneau vert ne se verrait pas : il prend la couleur de la page. */
.toast :focus-visible { outline-color: var(--bg); }
@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(--ombre);
  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-6) var(--sp-6) var(--sp-5); overflow: auto; }
.dialogue-corps h2 { font-size: 1.5rem; letter-spacing: -.025em; 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-6); border-top: 1px solid var(--line); background: var(--bg); border-radius: 0 0 var(--r-card) var(--r-card); }
.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); }
/* Titre qui reçoit le focus à l'ouverture (annoncé par le lecteur d'écran) : sans anneau. */
dialog h2[tabindex="-1"]:focus { outline: none; }

/* 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 */
/* La page se compose comme une couverture de rapport : « Bonjour. » à gauche, les trois chiffres de
   l'avancement à droite, sur le même filet ; puis la prochaine conversation et ce qu'il reste à faire.
   Trois colonnes (5 · gouttière · 7) : les deux rangées tombent sur la même grille. */
.accueil-bonjour { font: 700 5rem/.95 var(--f-sans); letter-spacing: -.05em; margin: 0 0 var(--sp-4); }
.accueil-date { margin: 0; }
.accueil-grille { display: grid; gap: var(--sp-6); grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.contenu:has(> .accueil-grille) { display: grid; grid-template-columns: minmax(0, 5fr) var(--sp-6) minmax(0, 7fr); align-items: start; }
.contenu:has(> .accueil-grille) > * { grid-column: 1 / -1; }
.contenu:has(> .accueil-grille) > .en-tete-page { grid-column: 1 / 3; grid-row: 1; align-self: stretch; margin-bottom: var(--sp-7); }
.contenu:has(> .accueil-grille) > .section:has(> #titre-test) {
  grid-column: 3; grid-row: 1; align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end;
  margin: 0 0 var(--sp-7); padding-bottom: var(--sp-5); border-bottom: 1px solid var(--line);
}
.contenu:has(> .accueil-grille) > .accueil-grille { margin-top: 0; }
.contenu:has(> .accueil-grille) > .etat-technique { margin-top: var(--sp-7); }
/* La prochaine conversation : une carte blanche, ouverte par deux pixels de vert ; l'heure en grand. */
.carte-prochaine { box-shadow: inset 0 2px 0 var(--accent); padding-inline: var(--sp-6); }
.carte.carte-prochaine > h2:first-child { font-size: var(--fs-capitales); line-height: 1.3; letter-spacing: var(--capitales); color: var(--accent); margin-bottom: var(--sp-5); }
.carte-prochaine .vide { padding: var(--sp-2) 0; }
.carte-prochaine .petit.discret { color: var(--ink-3); }
.carte-prochaine .btn-primaire { min-height: 52px; padding-inline: var(--sp-5); margin-top: var(--sp-3); font-size: 1rem; }
.carte-prochaine .aide { margin-top: var(--sp-3); }
.prochain .heure { font: 700 1.875rem/1.1 var(--f-sans); letter-spacing: var(--serre); font-variant-numeric: tabular-nums; margin-bottom: var(--sp-2); }
.prochain .heure .discret { font: 400 var(--fs-md)/1.4 var(--f-sans); letter-spacing: 0; color: var(--ink-2); }
.prochain .qui { font: 400 1rem/1.4 var(--f-sans); color: var(--ink-2); margin: var(--sp-1) 0 var(--sp-2); }
.prochain .qui strong { color: var(--ink); font-size: var(--fs-lg); }
.prochain .qui .pseudo-discret { margin-inline-start: var(--sp-2); }
/* Ce qu'il reste à faire : une ligne par geste, sur un filet ; l'icône dit l'urgence. */
#nb-a-faire { font-size: .875rem; font-weight: 400; letter-spacing: .04em; color: var(--ink-3); vertical-align: super; }
.a-faire { list-style: none; padding: 0; margin: 0; }
.a-faire li { display: grid; grid-template-columns: 24px 1fr auto; gap: var(--sp-4); align-items: center; padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); font-size: .9688rem; line-height: 1.5; }
.a-faire li:first-child { padding-top: var(--sp-1); }
.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 { font-size: 1rem; text-align: center; color: var(--ink-3); font-weight: 700; }
.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: 700; color: var(--ink); }
.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: 24px minmax(0, 1fr); }
.a-faire li.rendez-vous .actions-rdv { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
/* « Agenda » (bouton discret) seul sous trois boutons bordés se lisait comme un libellé : même contour qu'eux. */
.actions-rdv .btn-discret { border-color: var(--line-strong); }
.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); }
/* Avancement du test : trois chiffres de rapport annuel, sur un filet d'encre. Le libellé au-dessus,
   le chiffre dessous ; le premier compteur se lit d'une traite (« 3 personnes sur 10 »). */
#titre-test.surtitre { margin-bottom: 0; padding-bottom: var(--sp-3); border-bottom: 1px solid var(--ink); }
.compteurs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; align-items: start; }
.compteur { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: var(--sp-4) var(--sp-5) var(--sp-1) 0; color: var(--ink-2); }
.compteur + .compteur { padding-inline-start: var(--sp-5); border-inline-start: 1px solid var(--line); }
.compteur:first-child { flex-direction: row; justify-content: flex-start; align-items: baseline; gap: 10px; padding-top: calc(var(--sp-4) + 1.5rem + 6px); }
.compteur strong { font: 700 2.5rem/1 var(--f-sans); letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums; margin: 0; }
.compteur span { font-size: var(--fs-sm); line-height: 1.5rem; }
#titre-test ~ p.petit { margin-top: var(--sp-4); }
#titre-test ~ p.petit > a { display: inline-flex; align-items: center; min-height: 44px; }
/* É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; }
.tableau-personnes td, .tableau-personnes th { padding-block: 22px; vertical-align: middle; }
.personne-cellule { display: grid; gap: 6px; }
.personne-cellule .id-pseudo { font-size: .8125rem; display: inline-flex; align-items: center; min-height: 44px; margin-block: -12px; margin-inline-end: 6px; }
.personne-cellule .serif { font: 700 1.375rem/1 var(--f-sans); letter-spacing: -.03em; color: var(--ink); }
.personne-cellule .profil-texte { font-size: .8125rem; color: var(--ink-3); font-weight: 400; }
.ou-en-est { font-weight: 700; }
.ou-en-est .detail { display: block; margin-top: 2px; font-weight: 400; font-size: var(--fs-sm); color: var(--ink-3); }

/* ================================================================== FICHE D'UNE PERSONNE */
.fil-ariane { margin-bottom: var(--sp-2); color: var(--ink-3); }
.fil-ariane a { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.fil-ariane a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }
.fiche-entete { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.en-tete-page .fiche-entete h1 { margin: 0; font-size: 4rem; letter-spacing: -.045em; }
.fiche-entete .pseudo {
  font: 700 var(--fs-capitales)/1 var(--f-sans); letter-spacing: .1em; color: var(--ink-2); font-variant-numeric: tabular-nums;
  border: 1px solid var(--line-strong); border-radius: var(--r-cartouche); padding: 6px 8px 5px;
}
/* L'essentiel et UNE action en haut. */
.fiche-action { display: grid; gap: var(--sp-2); justify-items: start; }
.fiche-action .btn { min-height: 52px; padding-inline: var(--sp-5); font-size: var(--fs-md); }
.fiche-action .aide { max-width: 36ch; }
/* Le sommaire : une ligne de mots entre deux filets, collée en haut au défilement (un seul jeu de
   filets sous la fiche : celui du sommaire, pas celui de l'en-tête). */
.en-tete-page:has(+ .sommaire) { border-bottom: 0; padding-bottom: 0; margin-bottom: var(--sp-6); }
.sommaire { position: sticky; top: 0; z-index: 10; background: var(--bg); border-block: 1px solid var(--line); margin: 0 0 var(--sp-7); padding: 0; }
.sommaire ul { display: flex; gap: var(--sp-5); list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.sommaire a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; font: 400 var(--fs-sm)/1 var(--f-sans); color: var(--ink-2); text-decoration: none; }
.sommaire a:hover { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.telephone-masque { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.telephone-masque output { font: 700 var(--fs-lg)/1 var(--f-sans); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
/* 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 solid var(--line); }
.consent-ligne:last-child { border-bottom: 0; }
.consent-ligne .icone { font-weight: 700; 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%; }
.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: 44px; }
.consent-ligne .repli-saisie[open] > summary { margin-bottom: var(--sp-2); }
.statut-mots { font-weight: 700; }
.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); }
/* Avant d'appeler : la carte du lancement, ouverte par deux pixels de vert. */
.carte-lancement { box-shadow: inset 0 2px 0 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; }

/* ================================================================== CONSOLE DE L'APPEL */
/* 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) ; la signature n'y paraît que
   pour un beau souvenir. Libellés en corps réduit ; cibles de 44 px comme sur les pages. */
.page-console { font-size: var(--fs-md); --btn-px: var(--sp-4); --fs-libelle: var(--fs-sm); }
.page-console details > summary { min-height: 44px; }
.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, blanche, sur un filet — le prénom en gras, le chapitre en italique, le chrono en grand. */
.barre-etat { background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 var(--sp-5); }
.barre-etat .rangee { display: flex; align-items: center; gap: 10px; min-height: 64px; }
.barre-etat .retour {
  display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; text-decoration: none;
  font: 400 var(--fs-capitales)/1 var(--f-sans); letter-spacing: var(--capitales); text-transform: uppercase; color: var(--ink-2);
}
.barre-etat .retour:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }
.barre-etat .identite { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.barre-etat .identite .prenom { font: 700 1.5rem/1.1 var(--f-sans); letter-spacing: -.03em; white-space: nowrap; }
.barre-etat .identite .prenom:empty { display: none; }
.barre-etat .identite .chapitre { font: italic 400 1rem/1.2 var(--f-sans); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.barre-etat .identite .sid {
  font: 700 .6875rem/1 var(--f-sans); letter-spacing: .1em; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums;
  padding: 5px 6px 4px; border: 1px solid var(--line-strong); border-radius: var(--r-cartouche);
}
.barre-etat .identite .canal { font-weight: 400; color: var(--ink-2); border-color: var(--line-strong); }
.barre-etat .identite .fiche { font-size: var(--fs-capitales); }
/* Les outils de la barre : écouter, écran partagé, thème, aide. Le bouton de thème (15/10/2026) y a pris
   52 px ; la barre les rend à l'identité : 4 px entre les outils (comme l'en-tête des pages), 10 px entre
   les blocs de la rangée, la frise à 112 px. À 1280 px, « ■ Arrêter l'écoute » affiché, le titre du
   chapitre garde sa place, à 4 px près (vérifié dans Chrome, appel en cours). */
.outils-entete { display: flex; align-items: center; gap: var(--sp-1); flex: none; }
.chrono-bloc { display: inline-flex; align-items: center; gap: 14px; flex: none; }
.chrono { font: 700 1.625rem/1 var(--f-sans); letter-spacing: -.04em; white-space: nowrap; }
.chrono.depasse { color: var(--warn); }
.frise-bloc { display: flex; flex-direction: column; gap: 4px; }
/* La frise : un filet de deux pixels, rempli à l'encre ; la durée prévue marquée d'un trait.
   112 px : à 1280 px avec « Arrêter l'écoute » et le bouton de thème, le titre du chapitre doit rester lisible. */
.frise { position: relative; width: 112px; height: 2px; background: var(--line-strong); }
.frise > .rempli { position: absolute; inset: 0 auto 0 0; width: calc(var(--avance, 0) * 100%); background: var(--ink); 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: -4px; bottom: -4px; width: 1px; left: calc(var(--pos, 0) * 100%); background: var(--ink-3); }
.frise .jalon.cible { background: var(--ink); width: 2px; top: -6px; bottom: -6px; }
.jalons-legende { font-size: var(--fs-capitales); 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 ; franche dès qu'un état l'exige. */
.bande-mode {
  display: flex; align-items: center; gap: var(--sp-3) var(--sp-5);
  min-height: 80px; padding: var(--sp-3) var(--sp-5);
  background: var(--bg); color: var(--ink); border: 0; border-bottom: 1px solid var(--line);
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease);
}
.bande-mode .icone-mode {
  display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-strong); font-size: 1rem; line-height: 1; color: var(--ink-2);
}
.bande-mode .texte-mode { display: flex; flex-direction: column; gap: 2px; flex: 1 1 0; min-width: 0; }
.bande-mode .titre-mode { font: 700 var(--fs-xl)/1.2 var(--f-sans); letter-spacing: -.025em; display: flex; gap: var(--sp-2); align-items: baseline; flex-wrap: wrap; }
/* Sans opacité : « · silence 9 s » doit tenir 4,5:1 sur les bandes ambre et bleue. */
.bande-mode #mode-duree { font: 400 var(--fs-sm)/1 var(--f-sans); letter-spacing: 0; }
/* Détail sur UNE ligne (texte complet au survol) : la hauteur va aux sous-titres. */
.bande-mode .detail-mode { font-size: 1rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.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(--bg); color: var(--ink); }
.mode-prep { background: var(--bg); color: var(--ink-2); border-bottom: 1px dashed var(--line-strong); }
/* Sur la bande neutre, le cercle prend la teinte de qui parle (doublée du libellé des voix, à droite) ;
   sur une bande d'état, il garde la couleur de l'état (votre bleu sur la bande bleue serait invisible). */
.bande-mode:not(.mode-silence, .mode-att, .mode-pause, .mode-main, .mode-crit):has(#loc-senior.parle) .icone-mode { color: var(--senior); border-color: var(--senior); }
.bande-mode:not(.mode-silence, .mode-att, .mode-pause, .mode-main, .mode-crit):has(#loc-agent.parle) .icone-mode { color: var(--agent); border-color: var(--agent); }
.bande-mode:not(.mode-silence, .mode-att, .mode-pause, .mode-main, .mode-crit):has(#loc-magicien.parle) .icone-mode { color: var(--magicien); border-color: var(--magicien); }
.mode-silence, .mode-att { background: var(--warn-soft); color: var(--warn); border-block: 1px solid var(--warn); border-inline-start: 6px solid var(--warn); }
.mode-silence .icone-mode, .mode-att .icone-mode { background: var(--warn); border-color: var(--warn); color: var(--warn-soft); }
.mode-silence .detail-mode, .mode-att .detail-mode { color: var(--warn); }
.mode-pause { background: var(--magicien-soft); color: var(--magicien); border-block: 1px solid var(--magicien); }
.mode-pause .icone-mode { background: var(--magicien); border-color: var(--magicien); color: var(--on-fill); }
.mode-pause .detail-mode { color: var(--magicien); }
.mode-main { background: var(--magicien); color: var(--on-fill); border-block: 1px solid var(--magicien); }
.mode-main .btn { background: var(--on-fill); color: var(--magicien); border-color: var(--on-fill); }
.mode-crit { background: var(--danger); color: var(--on-fill); border-block: 1px solid 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); }
.mode-main .icone-mode, .mode-crit .icone-mode { border-color: var(--on-fill); color: var(--on-fill); }
.mode-main .detail-mode, .mode-crit .detail-mode { color: var(--on-fill); }
/* Sur les bandes pleines (bleu, rouge), l'anneau de focus vert disparaîtrait : de la couleur du texte. */
.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 nom en petites majuscules à sa teinte, un vumètre d'un trait ; encadré quand
   elle parle. Jamais un cadre coloré pour rien : la teinte double le libellé. */
.voix { display: flex; gap: var(--sp-2); flex: none; }
.locuteur {
  display: grid; gap: 7px; align-content: center; min-width: 92px; max-width: 128px; padding: 7px 10px 9px;
  border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); color: inherit; font-size: var(--fs-xs);
}
.locuteur .nom { font: 700 var(--fs-capitales)/1.2 var(--f-sans); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bande-mode:not(.mode-main):not(.mode-crit) .locuteur.senior { color: var(--senior); }
.bande-mode:not(.mode-main):not(.mode-crit) .locuteur.agent { color: var(--agent); }
.bande-mode:not(.mode-main):not(.mode-crit) .locuteur.magicien { color: var(--magicien); }
.bande-mode:is(.mode-main, .mode-crit) .locuteur { background: transparent; border-color: color-mix(in srgb, currentColor 45%, transparent); }
.locuteur.parle { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
/* La personne se tait depuis longtemps : son cadre en pointillé (on attend sa voix). */
.locuteur.silence-long { border-color: currentColor; border-style: dashed; }
.bande-mode:not(.mode-main):not(.mode-crit) .locuteur.senior.parle { background: var(--senior-soft); }
.bande-mode:not(.mode-main):not(.mode-crit) .locuteur.agent.parle { background: var(--agent-soft); }
.bande-mode:not(.mode-main):not(.mode-crit) .locuteur.magicien.parle { background: var(--magicien-soft); }
.vumetre { display: block; height: 2px; background: color-mix(in srgb, currentColor 22%, transparent); overflow: hidden; }
.vumetre > span { display: block; height: 100%; width: calc(var(--niveau, 0) * 100%); background: currentColor; transition: width 80ms linear; }

/* Bandes de service, sous la bande d'état : la ligne coupée (ambre), le son à armer, la parole coupée. */
.bande-connexion { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-2) var(--sp-5); background: var(--warn-soft); color: var(--warn); font-weight: 700; 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-5); background: var(--magicien-soft); color: var(--magicien); font-weight: 700; border-bottom: 1px solid var(--magicien); }
/* « ▶ Écouter l'appel » : un geste qu'on attend de vous (action humaine), jamais la couleur de la maison. */
.bande-son .btn-primaire { background: var(--magicien); border-color: var(--magicien); color: var(--on-fill); }
.bande-son .btn-primaire:hover { background: var(--magicien); border-color: var(--magicien); filter: brightness(.94); }
.puce-chevauchement { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; padding: var(--sp-2) var(--sp-5); background: var(--warn-soft); color: var(--warn); font-weight: 700; font-size: var(--fs-sm); border-bottom: 1px solid var(--warn); }
/* Affichage figé (page déconnectée) : gris, mais encore lisible. */
.fige-donnees .fil, .fige-donnees .voix, .fige-donnees .machine, .fige-donnees .carnet-genres { opacity: .9; filter: grayscale(.8); }

/* Deux colonnes : la page des sous-titres à gauche (la place), l'établi à droite, sur un filet.
   Chaque colonne défile seule. 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. */
.console-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); min-height: 0; }
.console-gauche, .console-droite { position: relative; min-height: 0; overflow: auto; scroll-padding-block: 12px; }
.console-gauche { display: flex; flex-direction: column; gap: var(--sp-3); overflow-x: hidden; overflow-y: auto; padding: var(--sp-5) var(--sp-4) var(--sp-4) var(--sp-5); }
.console-droite { display: flex; flex-direction: column; gap: var(--sp-3); background: var(--bg); border-inline-start: 1px solid var(--line); padding: var(--sp-5) var(--sp-5) var(--sp-4) var(--sp-4); }
.panneau { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--sp-3) var(--sp-4) 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: 700 var(--fs-sm)/1.2 var(--f-sans); letter-spacing: -.008em; margin: 0; display: inline-flex; align-items: center; gap: var(--sp-2); }
/* Bulles d'aide « ? » : 28 px à l'œil, 44 px au doigt. */
.aide-bulle {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink-2); font: 700 var(--fs-xs)/1 var(--f-sans); cursor: pointer;
}
.aide-bulle::after { content: ""; position: absolute; inset: -8px; }
.aide-bulle:hover { background: var(--surface-2); color: var(--ink); }

/* Le fil : une page blanche. La personne en grand (la matière du livre), l'IA en retrait d'un filet
   prune, vos consignes d'un filet bleu ; les 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; }
/* Décision d'Alexandre du 28/10/2026 : mode sans écoute, pendant la conversation — rien ne s'entend, ne se lit ni ne se
   dit ici (le serveur n'envoie ni son ni sous-titres et refuse les commandes) ; seul « Raccrocher » reste. */
.sans-ecoute-direct .fil-conteneur, .sans-ecoute-direct #btn-ecoute, .sans-ecoute-direct #bande-son,
.sans-ecoute-direct #locuteurs, .sans-ecoute-direct #chevauchement, .sans-ecoute-direct #p-micro,
.sans-ecoute-direct #p-souffler, .sans-ecoute-direct #p-marquer, .sans-ecoute-direct #p-progression,
.sans-ecoute-direct #p-carnet, .sans-ecoute-direct #reglages-son, .sans-ecoute-direct #m-tampon,
.sans-ecoute-direct #e-consentement button, .sans-ecoute-direct .barre-actions .groupe:not(.graves),
.sans-ecoute-direct #menu-plus, .sans-ecoute-direct #btn-cloturer { display: none !important; }
.fil-conteneur > header { display: flex; align-items: center; gap: var(--sp-3); min-height: 52px; padding: var(--sp-1) var(--sp-5); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.fil-conteneur > header h2 { margin: 0; color: var(--ink); font-weight: 700; }
.fil-conteneur > header #fil-info { flex: 1 1 auto; min-width: 0; color: var(--ink-3); }
.fil { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: var(--sp-4) 28px var(--sp-7); overscroll-behavior: contain; }
.fil.sans-coulisses .ligne-fil.coulisses { display: none; }
.ligne-fil { display: grid; grid-template-columns: 48px 92px minmax(0, 1fr); gap: var(--sp-4); padding: 9px 0; align-items: baseline; }
.ligne-fil .tc { font: 400 var(--fs-xs)/1 var(--f-sans); color: var(--ink-3); }
.ligne-fil .qui { font: 700 .6875rem/1 var(--f-sans); text-transform: uppercase; letter-spacing: .14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); }
.ligne-fil.senior .qui { color: var(--senior); }
.ligne-fil.agent .qui { color: var(--agent); }
.ligne-fil.magicien .qui { color: var(--magicien); }
.tr-senior { font: 400 1.5rem/1.42 var(--f-sans); letter-spacing: -.014em; color: var(--ink); max-width: 58ch; }
.tr-agent { font: 400 var(--fs-md)/1.5 var(--f-sans); color: var(--ink-2); padding-inline-start: 14px; border-inline-start: 2px solid color-mix(in srgb, var(--agent) 55%, transparent); max-width: 68ch; }
.ligne-fil.magicien .tr-agent { border-inline-start-color: color-mix(in srgb, var(--magicien) 55%, transparent); }
.tr-partiel { font-style: italic; color: var(--ink-3); }
.ligne-fil.parle-encore .texte { color: var(--ink-3); font-style: italic; font-size: var(--fs-sm); }
.ligne-fil.systeme { grid-template-columns: 48px minmax(0, 1fr); font-size: var(--fs-sm); color: var(--ink-2); padding: var(--sp-1) 0; }
.ligne-fil.systeme .texte { padding: 3px var(--sp-3); border-radius: var(--r-cartouche); background: var(--surface-2); }
.ligne-fil.consigne .texte { color: var(--magicien); background: var(--magicien-soft); }
/* Les moments marqués : un trait à gauche ; la couleur dit la catégorie (classe « marqueur-<catégorie> »).
   Un beau souvenir porte le vert de la maison (jamais une alerte) ; une détresse, le rouge critique ;
   les autres (coupure, incident, note) restent à l'encre. */
.ligne-fil.marqueur .texte { color: var(--ink); background: var(--surface-2); box-shadow: inset 2px 0 0 var(--ink-3); font-weight: 700; }
.ligne-fil.marqueur-souvenir .texte { color: var(--accent); background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.ligne-fil.marqueur-detresse .texte { color: var(--danger); background: var(--danger-soft); box-shadow: inset 2px 0 0 var(--danger); }
.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: 700; }
.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(--ombre); background: var(--ink); color: var(--bg); border-color: var(--ink); border-radius: var(--r-pill); }
.retour-direct:hover { background: var(--ink); border-color: var(--ink); filter: brightness(1.1); }

/* Alertes (une alerte = une action) : le panneau n'existe que s'il y en a une. Franches, avec leur
   trait latéral ; aucune ombre. */
.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: 400; 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; }
.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-4); border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); }
.accord.att { border-color: var(--warn); background: var(--warn-soft); box-shadow: inset 4px 0 0 var(--warn); }
.accord.crit { border-color: var(--danger); background: var(--danger-soft); box-shadow: inset 4px 0 0 var(--danger); }
.pilule { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 28px; font-size: var(--fs-sm); font-weight: 700; 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: 700; 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, .marqueurs .btn { justify-content: flex-start; min-height: var(--cible-console); text-align: left; font-weight: 400; background: var(--surface); }
.consignes-rapides .btn:hover, .marqueurs .btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.consignes-rapides kbd, .marqueurs kbd, .panneau h2 kbd { border-color: var(--line-strong); color: var(--ink-2); }
.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: 400; }
.plus-options[open] > summary { margin-bottom: var(--sp-2); }
.marqueurs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
/* « Beau souvenir » porte le trait vert de la maison ; « Détresse », le rouge critique. */
.marqueurs .btn[data-categorie="souvenir"] { box-shadow: inset 2px 0 0 var(--accent); }
.marqueurs .btn[data-categorie="souvenir"] kbd { color: var(--accent); border-color: var(--accent); }
.marqueurs .btn.detresse { border-color: var(--danger); color: var(--danger); }
.marqueurs .btn.detresse kbd { color: var(--danger); border-color: var(--danger); }
.marqueurs .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.progression .intitule { font: italic 400 1rem/1.4 var(--f-sans); margin: 0 0 var(--sp-2); }
.progression .compte { font-weight: 700; font-variant-numeric: tabular-nums; font-size: var(--fs-sm); color: var(--ink-2); }
.progression .jauge { height: 2px; background: var(--line-strong); }
.progression .jauge > span { background: var(--ink); }
.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: 44px; }
.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, .carnet-genre h4, .fiche-reperes h4 {
  font: 400 var(--fs-capitales)/1.3 var(--f-sans); text-transform: uppercase; letter-spacing: var(--capitales); color: var(--ink-2); margin: 0 0 var(--sp-2);
}
.details-console h3 .discret { text-transform: none; letter-spacing: 0; }
.details-console details.bloc-detail > summary { min-height: 44px; }
.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 { margin-bottom: 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-cartouche); 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 solid 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: 4px; 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: 400; }
.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; }
.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, sur un filet. Les actions graves (à droite) se confirment par un
   appui maintenu d'une seconde ; Raccrocher reste rouge. */
.barre-actions {
  display: flex; align-items: stretch; gap: var(--sp-2); flex-wrap: wrap;
  padding: var(--sp-2) var(--sp-5); background: var(--surface); border-top: 1px solid var(--line);
}
.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 qui flotte 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(--ombre); }
.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 .btn:focus-visible { outline: 2px solid currentColor; outline-offset: -5px; }
.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: 700; white-space: nowrap; }

/* Cartes plein écran (avant l'appel, rendez-vous, fin) : un titre net, une phrase, UNE action principale. */
.carte-centrale { max-width: 720px; width: 100%; margin: var(--sp-5) auto; }
.carte-centrale h2 { font-size: 2rem; letter-spacing: -.03em; }
.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; }
.page-console .carte { padding: var(--sp-5) var(--sp-6); }
.page-console .carte-centrale .checklist li { padding-block: var(--sp-2); }
.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: 700; }
.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); letter-spacing: -.02em; color: var(--danger); font-variant-numeric: tabular-nums; }

/* ================================================================== RAPPORT D'UNE CONVERSATION */
.en-tete-page h1.titre-rapport { font-size: var(--fs-3xl); }
.titre-rapport .pseudo-discret { margin-inline-start: var(--sp-3); vertical-align: middle; }
/* « 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: 700; }
.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; }
.badge-seuil { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: var(--fs-sm); padding: 3px var(--sp-3); border-radius: var(--r-cartouche); border: 1px solid currentColor; white-space: nowrap; }
@media (max-width: 480px) { .badge-seuil { white-space: normal; } }
.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); }

/* 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); letter-spacing: -.01em; font-variant-numeric: tabular-nums; min-width: 9ch; }
.lecteur select { width: auto; }
.lecteur .btn-primaire { padding-inline: var(--sp-5); }
.lecteur details { flex: 1 1 100%; }
.lecteur details > summary { font-weight: 400; font-size: var(--fs-sm); color: var(--ink-2); }
.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; }
/* Repères de la légende : la couleur de leur signe sur le fil de l'appel (rapport-lecteur.js). */
.partition-legende .repere-souvenir { color: var(--accent); }
.partition-legende .repere-detresse, .partition-legende .repere-coupure { color: var(--danger); }
.partition-legende .repere-candidate, .partition-legende .repere-incident, .partition-legende .repere-alerte { color: var(--warn); }
.partition-legende .repere-consigne { color: var(--magicien); }
.partition-legende .repere-consentement { color: var(--ok); }

/* 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; }
.colonne-transcript .carte-titre select { width: auto; max-width: 100%; }
/* « 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: .9; }   /* .85 : 4,4:1 pour le gris discret */
/* Une seule colonne qui ne s'élargit jamais au contenu le plus large (colonne implicite « auto » de
   391 px à 320 px de large : défilement horizontal du rapport, revue du 15/10). */
.panneau-onglet { display: grid; grid-template-columns: minmax(0, 1fr); 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); }
.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); 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); }
/* La ligne en cours d'écoute : la signature, comme la page courante. */
.ligne-tr.en-cours { background: var(--accent-soft); box-shadow: inset 2px 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-cartouche); 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 { position: relative; }
.tc-bouton::after { content: ""; position: absolute; inset: -9px -2px; }
.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: 700; text-transform: uppercase; letter-spacing: .1em; }
.ligne-tr.senior .qui { color: var(--senior); } .ligne-tr.agent .qui { color: var(--agent); } .ligne-tr.magicien .qui { color: var(--magicien); }
.ligne-tr.senior .texte { font: 400 var(--fs-xl)/1.5 var(--f-sans); letter-spacing: -.01em; }
.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); }
.revue .question-revue { font-weight: 700; margin: 0; }
.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: 2px solid var(--accent); outline-offset: 2px; }
.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-sans); }
.resultat-wer { font: 700 var(--fs-3xl)/1 var(--f-sans); letter-spacing: var(--serre); font-variant-numeric: tabular-nums; }

/* Le chapitre : de la prose, sur une mesure de lecture. */
.chapitre-texte { font: 400 var(--fs-lg)/1.7 var(--f-sans); max-width: 68ch; }
.chapitre-texte h1, .chapitre-texte h2, .chapitre-texte h3 { 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-sans); }
.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 solid var(--line); }
.choix-rappel:last-child { border-bottom: 0; }
.choix-rappel > .btn, .choix-rappel > .tc { flex: none; white-space: nowrap; }
.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) var(--sp-4); 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: 2px solid var(--line-strong); 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 solid var(--line); }
.groupe-evenements + .groupe-evenements { margin-top: var(--sp-3); }

/* ================================================================== RÉSULTATS DU TEST */
.verdict { font: 700 var(--fs-xl)/1.35 var(--f-sans); letter-spacing: -.02em; 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: 700; }
.cellule-go.manque { color: var(--danger); font-weight: 700; }
.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: 1px solid var(--ink); }
/* Cible de 44 px, comme toute marque cliquable (charte §4 règle 7) ; la marge négative garde la hauteur de ligne. */
.lien-cellule { color: inherit; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; margin-block: -8px; }
.lien-cellule:hover .cellule-go, .lien-cellule:focus-visible .cellule-go { text-decoration: underline; text-decoration-color: currentColor; }

/* ================================================================== 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: 700; }
.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); }
/* 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 » (bouton étroit, 44 px de haut). */
.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); }
.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é dans un menu qui flotte. */
.menu-compte { position: relative; display: block; }
.menu-compte > summary { list-style: none; font-weight: 700; }
.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(--ombre); }

/* ================================================================== ACCÈS (console en ligne) */
/* Pages servies sans compte (connexion, code de secours, création de la clé d'accès, refus du
   serveur) : la seule grande surface de vert de la console, comme l'écrin d'une maison — un panneau
   plein à gauche (la marque, l'emblème en filigrane), la page blanc cassé à droite, sans boîte,
   alignée à gauche ; UNE action en couleur. */
.page-acces {
  min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: center;
  padding: var(--sp-7) var(--sp-6) var(--sp-7) calc(44vw + var(--sp-6));
}
.page-acces::before {
  content: ""; position: fixed; inset: 0 auto 0 0; width: 44vw;
  background: var(--panneau-acces) var(--filigrane) left 8% bottom -2px / min(78%, 560px) auto no-repeat;
}
/* La marque, sortie de la page et posée en haut du panneau (elle reste la première chose lue). Elle
   porte aussi le fond du panneau : la mesure de contraste le voit. */
.marque-acces, .carte-acces h1.marque-acces, .page-connexion .marque-acces {
  position: fixed; top: 44px; left: var(--sp-7); z-index: 1; margin: 0;
  display: flex; align-items: center; gap: 14px;
  font: 700 var(--fs-sm)/1 var(--f-sans); letter-spacing: .34em; text-transform: uppercase;
  color: var(--panneau-texte); background: var(--panneau-acces);
}
.marque-acces::before, h1.marque-acces::before {
  content: ""; flex: none; width: 34px; height: 34px; border-radius: var(--r-card);
  background: transparent var(--embleme-panneau) center / 24px no-repeat;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--panneau-texte) 50%, transparent);
}
.carte-acces, .page-connexion { width: min(100%, 440px); text-align: left; background: transparent; border: 0; padding: 0; }
.carte-acces > .guide { font: 400 var(--fs-2xl)/1.3 var(--f-sans); letter-spacing: -.025em; color: var(--ink); max-width: none; margin: 0 0 40px; }
.carte-acces h1:not(.marque-acces), .page-connexion h1 { font-size: 2.5rem; letter-spacing: var(--serre); margin-bottom: var(--sp-4); }
.carte-acces h1:not(.marque-acces) + .guide { font-size: var(--fs-lg); line-height: 1.5; letter-spacing: 0; color: var(--ink-2); margin-bottom: var(--sp-5); }
.page-connexion p { margin-bottom: var(--sp-4); color: var(--ink-2); }
.page-connexion p strong { color: var(--ink); }
.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); }
.carte-acces .btn-large { min-height: 56px; font-size: 1rem; }
.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: 400;
}
.message-acces:empty { display: none; }
.pied-acces { margin: var(--sp-7) 0 0; padding-top: var(--sp-3); border-top: 1px solid var(--line); color: var(--ink-2); }
.pied-acces a { display: inline-flex; align-items: center; min-height: 44px; }
.saisie-code { font-family: var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.page-connexion pre { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: var(--sp-3); overflow-x: auto; margin: 0 0 var(--sp-4); }
/* Une commande à recopier passe à la ligne au lieu d'imposer sa largeur (vu à 390 px : la page de
   refus débordait de 75 px, texte coupé au bord droit, panneau vert tronqué). */
.page-connexion pre, .page-connexion pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Les dix codes de secours : gros, numérotés, en chasse fixe (0 et O, 1 et l ne se confondent pas),
   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); }
.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: 700 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 { outline: none; }
.autres-appareils { margin-top: var(--sp-5); }

/* ================================================================== CONVERSATION PAR UN LIEN */
/* Page publique /parler (décision des fondateurs du 26/10/2026), ouverte par la personne, souvent âgée, sur son
   téléphone : l'écrin des pages d'accès (panneau vert, marque), de très grands caractères, une phrase à la fois,
   UN grand bouton. L'état dit qui parle, aux couleurs de la console (la personne : bleu canard ; l'IA : prune). */
.parler { width: min(100%, 560px); text-align: left; }
/* Texte de base à 20 px (et plus pour l'essentiel), encre pleine : contrastes forts, sur un petit écran tenu à bout de bras. */
body.page-parler { font-size: 1.25rem; }
.parler h1 { font-size: clamp(2rem, 8.5vw, var(--fs-3xl)); line-height: 1.1; letter-spacing: var(--serre); margin: 0 0 var(--sp-5); overflow-wrap: anywhere; }
.parler section p { font-size: var(--fs-xl); line-height: 1.5; color: var(--ink); margin: 0 0 var(--sp-4); }
.parler section .aide-parler { font-size: 1.25rem; color: var(--ink); }
.parler .aide-parler:empty { display: none; }
/* Pendant la conversation, « Bonjour… » rapetisse : le repère et l'état passent avant, « Terminer » reste à portée. */
body.page-parler[data-etape="etape-conversation"] .parler h1 { font-size: var(--fs-xl); margin-bottom: var(--sp-2); }
.parler .message-parler { font-weight: 700; }
.parler .titre-conseils { font-size: var(--fs-xl); margin: var(--sp-4) 0 var(--sp-2); }
.conseils-parler { margin: 0 0 var(--sp-3); padding: 0; list-style: none; display: grid; gap: var(--sp-1); }
.conseils-parler li { font-size: 1.25rem; line-height: 1.35; padding: var(--sp-2) 0 var(--sp-2) 1.4em; position: relative; color: var(--ink); }
.conseils-parler li::before { content: "✓"; position: absolute; left: 0; font-weight: 700; color: var(--accent); }
/* Cibles d'au moins 56 px ; « Commencer » et « Terminer » bien plus grands. */
body.page-parler .btn-parler { width: 100%; min-height: 88px; margin-top: var(--sp-4); font-size: var(--fs-2xl); font-weight: 700; border-radius: 16px; justify-content: center; }
body.page-parler .btn-parler-secondaire { min-height: 64px; font-size: var(--fs-xl); background: var(--surface); color: var(--ink); border: 2px solid var(--ink); }
body.page-parler .btn-terminer { margin-top: var(--sp-7); background: var(--surface); color: var(--danger); border: 2px solid var(--danger); }
/* Le grand repère : un cercle qui pulse doucement quand l'IA parle ; plein et calme quand elle écoute. */
.repere-parler { width: min(52vw, 200px); aspect-ratio: 1; margin: var(--sp-3) auto var(--sp-4); display: grid; place-items: center; }
.repere-cercle { width: 100%; height: 100%; border-radius: 50%; background: var(--senior-soft); border: 8px solid var(--senior); }
.repere-parler[data-qui="ia"] .repere-cercle { background: var(--agent-soft); border-color: var(--agent); border-width: 14px; animation: pulsation-parler 1.6s ease-in-out infinite; }
@keyframes pulsation-parler { 0%, 100% { transform: scale(.9); } 50% { transform: scale(1); } }
.parler section .etat-parler { margin: 0 0 var(--sp-4); padding: var(--sp-4); border-radius: 16px; text-align: center;
  font-size: var(--fs-2xl); font-weight: 700; background: var(--senior-soft); color: var(--senior); }
.parler section .etat-parler[data-qui="ia"] { background: var(--agent-soft); color: var(--agent); }
.niveau-parler { height: 24px; margin: 0 0 var(--sp-5); border-radius: 999px; background: var(--surface-2); border: 2px solid var(--line-strong); overflow: hidden; }
.niveau-parler > span { display: block; height: 100%; background: var(--senior); transform: scaleX(0); transform-origin: left center; transition: transform .08s linear; }
.niveau-parler[data-qui="ia"] > span { background: var(--agent); }
/* Aide repliée : « Je n'entends rien… ». */
.depannage-parler { margin: 0 0 var(--sp-4); border: 2px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.depannage-parler summary { min-height: 56px; display: flex; align-items: center; padding: var(--sp-3) var(--sp-4); font-size: 1.25rem; font-weight: 700; color: var(--ink); cursor: pointer; }
.depannage-parler ul { margin: 0; padding: 0 var(--sp-4) var(--sp-4) calc(var(--sp-4) + 1.1em); }
.depannage-parler li { font-size: 1.25rem; line-height: 1.45; margin-bottom: var(--sp-3); color: var(--ink); }
.bandeau-parler { margin: 0 0 var(--sp-4); padding: var(--sp-4); border-radius: 12px; background: var(--warn-soft); border: 2px solid var(--warn); }
.parler section .bandeau-parler p { margin: 0; font-weight: 700; }
.parler section .reconnexion-parler { font-weight: 700; text-align: center; }
/* Qualité de la connexion : discrète (petit texte, point de couleur), jamais une alarme. */
.parler section .qualite-parler { margin: calc(-1 * var(--sp-4)) 0 var(--sp-4); font-size: 1rem; color: var(--ink-2); display: flex; align-items: center; gap: var(--sp-2); }
.qualite-parler::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: none; }
.qualite-parler[data-niveau="faible"]::before { background: var(--warn); }
/* Petites largeurs : marges sûres de l'iPhone (encoche, barre du bas), en portrait et en paysage. */
@media (max-width: 900px) {
  body.page-parler {
    padding-left: max(var(--sp-5), env(safe-area-inset-left));
    padding-right: max(var(--sp-5), env(safe-area-inset-right));
    padding-bottom: calc(var(--sp-6) + env(safe-area-inset-bottom));
  }
  body.page-parler .marque-acces { left: max(var(--sp-5), env(safe-area-inset-left)); top: 21px; }
  /* Bandeau vert plus bas que sur les pages d'accès : « Commencer » tient dans l'écran d'un iPhone. */
  body.page-parler { padding-top: calc(76px + var(--sp-5)); }
  body.page-parler::before { height: 76px; }
}
/* Téléphone en paysage : peu de hauteur, le repère et les titres rapetissent. */
@media (orientation: landscape) and (max-height: 500px) {
  .parler h1 { font-size: var(--fs-2xl); margin-bottom: var(--sp-3); }
  .repere-parler { width: min(30vh, 120px); margin-top: 0; }
  body.page-parler .btn-parler { min-height: 64px; }
}
/* Fiche d'une personne : l'adresse du lien, à copier (affichée une seule fois). */
.bloc-lien { margin-top: var(--sp-4); }
.lien-adresse { flex: 1 1 260px; min-width: 0; font-family: var(--f-mono); }
.message-lien { padding: var(--sp-3); border-radius: 8px; background: var(--surface-2); color: var(--ink); overflow-wrap: anywhere; }
.actions-lien .btn { flex: 1 1 200px; justify-content: center; }
.liste-liens { list-style: none; margin: 0; padding: 0; }
.liste-liens li { padding: var(--sp-2) 0; border-top: 1px solid var(--line); }

/* ================================================================== PETITES LARGEURS */
@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 .btn { padding-inline: var(--sp-3); }
  /* Console d'un rendez-vous, « Avant l'appel » : avec deux bandeaux ouverts, « Je suis prêt » et
     « Lancer » tombaient sous la ligne de flottaison (1440 × 900, 1280 × 800). L'action principale de
     la carte reste collée en bas de la colonne, sur un filet ; le reste de la carte défile au-dessus. */
  /* bottom négatif : Chrome retire la marge intérieure basse de la colonne (16 px) de la zone collante ;
     sans lui, la fin de la carte se lisait sous les boutons. */
  .page-console .carte-centrale .actions-carte {
    position: sticky; bottom: calc(-1 * var(--sp-4)); z-index: 2;
    margin: var(--sp-4) calc(-1 * var(--sp-6)) calc(-1 * var(--sp-5)); padding: var(--sp-3) var(--sp-6);
    background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-card) var(--r-card);
  }
}
/* ================================================================== 13. DIRECTION « TABLEAU DE BORD » (20/10/2026) */
/* Choisie par le fondateur parmi trois maquettes (Drive : « Maquettes console — 3 directions ») : menu
   vert sombre à gauche, page gris vert clair, cartes blanches légèrement soulevées, tuiles d'indicateurs
   dont la première en vert plein ; tout est resserré sur une grille de 8 px. La console d'un appel garde
   son en-tête ; sur téléphone, le menu revient en haut. */
.contenu { max-width: 1280px; padding: var(--sp-6) var(--sp-6) 96px; }
h1, .en-tete-page h1 { font-size: 1.75rem; letter-spacing: -.025em; }
.en-tete-page { padding: 0; margin-bottom: var(--sp-5); border-bottom: 0; align-items: center; }
.en-tete-page h1 { margin: 0; }
.en-tete-page .guide { font-size: var(--fs-sm); color: var(--ink-3); }
.en-tete-page .fiche-entete h1 { font-size: 2rem; }
.carte { padding: var(--sp-5); border-radius: 12px; border-color: transparent; box-shadow: var(--ombre-carte); }
.carte.calme { box-shadow: none; }
.carte > h2:first-child:not(.surtitre), .carte-titre h2, .carte-titre h3 { font-size: 1rem; letter-spacing: -.01em; margin-bottom: var(--sp-3); }
.section + .section { margin-top: var(--sp-6); }
.section-titre { margin-bottom: var(--sp-3); }
.section-titre h2 { font-size: 1.125rem; letter-spacing: -.015em; }
.checklist li { min-height: 40px; padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); }
.bandeau-global { padding: var(--sp-2) var(--sp-5); font-size: var(--fs-sm); }
.btn { border-radius: 8px; }

/* Accueil : des rangées de même largeur — en-tête, une ligne d'alerte, quatre tuiles, deux cartes, le projet. */
.contenu.accueil { display: flex; flex-direction: column; gap: var(--sp-5); }
.contenu.accueil > * { margin: 0; }
.acc-tete { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.accueil-bonjour { font: 700 1.75rem/1.15 var(--f-sans); letter-spacing: -.025em; margin: 0; }
.acc-date { margin: var(--sp-1) 0 0; color: var(--ink-3); font-size: var(--fs-sm); }
#zone-problemes:not(:has(*)) { display: none; }
.alerte-ligne { background: var(--surface); border-radius: 12px; box-shadow: var(--ombre-carte); font-size: var(--fs-sm); }
.alerte-ligne > summary { display: flex; align-items: center; gap: var(--sp-3); min-height: 48px; padding: 0 var(--sp-5); cursor: pointer; list-style: none; }
.alerte-ligne > summary::-webkit-details-marker { display: none; }
.alerte-ligne .pastille { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.alerte-ligne.crit .pastille { background: var(--danger); }
.alerte-ligne .alerte-voir { margin-inline-start: auto; font-weight: 700; color: var(--accent); white-space: nowrap; }
.alerte-ligne[open] .alerte-voir { visibility: hidden; }
.alerte-ligne ul { margin: 0; padding: 0 var(--sp-5) 0 calc(var(--sp-5) + 20px); color: var(--ink-2); }
.alerte-ligne li { padding: 2px 0; overflow-wrap: anywhere; }
.alerte-ligne > p { margin: var(--sp-2) 0 0; padding: 0 var(--sp-5) var(--sp-4) calc(var(--sp-5) + 20px); }
.compteurs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
.compteur, .compteur + .compteur, .compteur:first-child {
  flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: var(--sp-1);
  padding: var(--sp-4) var(--sp-5); background: var(--surface); border: 0; border-radius: 12px; box-shadow: var(--ombre-carte);
  color: var(--ink-3);
}
.compteur:first-child { background: var(--tuile-forte); color: var(--tuile-forte-doux); }
.compteur:first-child strong { color: var(--tuile-forte-texte); }
.compteur:first-child .compteur-detail { color: var(--tuile-forte-texte); }
.compteur strong { font-size: 1.625rem; letter-spacing: -.02em; }
.compteur span { font-size: var(--fs-sm); line-height: 1.4; }
.accueil-grille { gap: var(--sp-4); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.carte-prochaine { box-shadow: var(--ombre-carte); padding-inline: var(--sp-5); }
.carte.carte-prochaine > h2:first-child { font-size: 1rem; letter-spacing: -.01em; text-transform: none; color: var(--ink); margin-bottom: var(--sp-3); }
.carte-prochaine .btn-primaire { min-height: 44px; }
.a-faire li { padding: var(--sp-3) 0; font-size: var(--fs-sm); }
.a-faire li.urgent, .a-faire li.bloquant { background: none; box-shadow: none; }
#nb-a-faire { vertical-align: baseline; }
/* Où en est le projet : une ligne par étape, son état en étiquette. */
.etapes { list-style: none; margin: 0 0 var(--sp-3); padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sp-6); }
.etapes li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: var(--sp-3); align-items: start; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.etape-etat { justify-self: start; padding: 1px 10px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.etapes li.fait .etape-etat { background: var(--ok-soft); color: var(--ok); }
.etapes li.en_cours .etape-etat { background: var(--magicien-soft); color: var(--magicien); }
.etape-texte { display: grid; gap: 2px; min-width: 0; }
.etape-texte span { color: var(--ink-3); }
@media (max-width: 900px) {
  .compteurs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .accueil-grille, .etapes { grid-template-columns: minmax(0, 1fr); }
}

.contenu.accueil > *, .contenu.resultats > * { width: 100%; max-width: none; margin: 0; }
.alerte-ligne { display: block; }
.acc-tete .guide { display: none; }

/* Résultats du test : une ligne de verdict, six tuiles, le tableau des personnes, le recrutement. */
.contenu.resultats { display: flex; flex-direction: column; gap: var(--sp-5); }
.verdict-ligne { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; padding-block: var(--sp-4); }
.verdict-ligne .verdict { margin: 0; font-weight: 700; flex: 1 1 320px; }
.verdict-chiffres { margin: 0; display: flex; gap: var(--sp-4); font-size: var(--fs-sm); }
.titre-rangee { font-size: 1rem; margin: 0 0 var(--sp-3); }
.objectifs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
.objectif { display: grid; gap: 2px; padding: var(--sp-4) var(--sp-5); background: var(--surface); border-radius: 12px; box-shadow: var(--ombre-carte); }
.objectif-nom { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 700; }
.objectif strong { font-size: 1.5rem; letter-spacing: -.02em; }
.objectif-cible { font-size: var(--fs-xs); color: var(--ink-3); }
.etat-objectif { justify-self: start; margin-top: var(--sp-2); padding: 1px 10px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; background: var(--surface-2); color: var(--ink-2); }
.etat-objectif.atteint { background: var(--ok-soft); color: var(--ok); }
.etat-objectif.manque { background: var(--danger-soft); color: var(--danger); }
.etat-objectif.confirmer { background: var(--warn-soft); color: var(--warn); }
.resultats .tableau-go th, .resultats .tableau-go td { font-size: var(--fs-sm); }
.legende { margin: var(--sp-3) 0 0; }
.quotas { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.quotas li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--sp-3); font-size: var(--fs-sm); }
.quotas .jauge { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.quotas .jauge > span { display: block; height: 100%; background: var(--accent); }
@media (max-width: 900px) { .objectifs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.essais { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.essai { border: 1px solid var(--line); border-radius: 12px; padding: var(--sp-4); }
.essai header { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.essai-chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.essai-chiffres div { background: var(--surface-2); border-radius: 8px; padding: var(--sp-2) var(--sp-3); }
.essai-chiffres span { display: block; font-size: var(--fs-xs); color: var(--ink-3); }
.essai-chiffres strong { font-size: 1.125rem; }
.essai ul { margin: var(--sp-3) 0 0; padding-inline-start: 18px; font-size: var(--fs-sm); color: var(--ink-2); }
.etiquette.essai { margin-inline-start: var(--sp-2); min-height: 18px; padding: 0 8px; font-weight: 400; color: var(--ink-3); }
@media (max-width: 900px) { .essais { grid-template-columns: minmax(0, 1fr); } }

/* Tableaux : en-têtes en minuscules, discrets, sur un filet clair ; lignes plus serrées. */
.tableau thead th { text-transform: none; letter-spacing: 0; font: 700 var(--fs-xs)/1.3 var(--f-sans); color: var(--ink-3); white-space: normal; border-bottom-color: var(--line); }
.tableau th, .tableau td { padding-block: var(--sp-3); }
/* Un tableau hors carte (Personnes, Données) : posé dans une carte blanche, comme sur Résultats. */
.defilement-x:not(.carte *):has(> table.tableau) { background: var(--surface); border-radius: 12px; box-shadow: var(--ombre-carte); padding: var(--sp-3) var(--sp-5) var(--sp-1); }
.defilement-x:not(.carte *) > .tableau tbody > tr:last-child > * { border-bottom: 0; }

/* Fiche d'une personne en onglets (js/onglets-fiche.js). */
.carte.ia-saura, .carte.pour-vous { border: 0; background: var(--surface); box-shadow: var(--ombre-carte); }
.carte.ia-saura .carte-titre .discret { color: var(--agent); }
.fiche-entete .pseudo { border: 0; border-radius: 999px; background: var(--surface-2); padding-inline: 10px; }
.fiche-onglets .onglet-cache { display: none; }
.fiche-onglets .sommaire { position: static; background: transparent; border: 0; margin: 0 0 var(--sp-5); }
.fiche-onglets .sommaire ul { gap: var(--sp-1); padding: 4px; background: var(--surface); border-radius: 10px; box-shadow: var(--ombre-carte); display: inline-flex; flex-wrap: wrap; }
.fiche-onglets .sommaire a { min-height: 36px; padding: 0 var(--sp-3); border-radius: 7px; }
.fiche-onglets .sommaire a:hover { box-shadow: none; background: var(--surface-2); color: var(--ink); }
.fiche-onglets .sommaire a[aria-current="page"] { background: var(--plein); color: var(--sur-plein); font-weight: 700; }
.fiche-onglets .section + .section { margin-top: 0; }

/* Formulaires (fiche, réglages, rendez-vous) : libellés petits et gris d'encre, champs plus fins, coins de 8 px ;
   un sous-groupe dans une carte est un filet et un surtitre, pas un cadre dans le cadre. La bordure des champs
   garde --line-strong (3:1, WCAG 1.4.11). */
body:not(.page-console) { --fs-libelle: var(--fs-sm); }
body:not(.page-console) label, body:not(.page-console) .libelle { color: var(--ink-2); }
body:not(.page-console) .case { color: var(--ink); }
body:not(.page-console) :is(input[type="text"], input[type="tel"], input[type="search"], input[type="number"], input[type="datetime-local"], input[type="date"], input[type="time"], select, textarea) {
  min-height: 40px; padding: 6px 12px; font-size: var(--fs-sm); border-radius: 8px;
}
body:not(.page-console) textarea { min-height: 80px; }
body:not(.page-console) .champ { gap: 6px; }
body:not(.page-console) .aide { font-size: var(--fs-xs); line-height: 1.45; }
.carte fieldset { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: var(--sp-4) 0 0; margin: var(--sp-5) 0 0; }
.carte legend { padding: 0 var(--sp-2) 0 0; font: 700 var(--fs-xs)/1 var(--f-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.puce { min-height: 28px; border: 0; border-radius: 999px; background: var(--surface-2); padding-inline-start: var(--sp-3); }
.puce button { width: 24px; height: 24px; border-radius: 999px; }
.ajout-puce .btn { min-height: 40px; }
/* Dans la fiche en onglets, l'onglet nomme déjà la section : son titre reste pour le lecteur d'écran. */
.fiche-onglets .section-titre { border: 0; padding: 0; margin-bottom: var(--sp-4); }
.fiche-onglets .section-titre h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fiche-onglets .section-titre:not(:has(.aide)) { display: contents; }
.fiche-onglets .section-titre { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.fiche-onglets .section-titre .aide { flex: 1 1 280px; order: -1; font-size: var(--fs-sm); }

/* Consentements : une ligne par accord — l'état, le texte, puis la saisie sur UNE rangée sous le texte. */
.consent-ligne { grid-template-columns: 24px minmax(0, 1fr); column-gap: var(--sp-3); row-gap: var(--sp-3); padding: var(--sp-4) 0; }
.consent-ligne > form, .consent-ligne > .repli-saisie, .consent-ligne > .btn { grid-column: 2; justify-self: start; }
.consent-ligne .icone { font-size: var(--fs-md); }
.consent-ligne strong { font-size: var(--fs-sm); }
.consent-ligne .etiquette { margin-inline-start: var(--sp-2); }
.consent-ligne .aide { margin-top: 2px; }
.consent-ligne form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.consent-ligne form > select, .consent-ligne form > input { width: auto; flex: 1 1 180px; max-width: 260px; }
.consent-ligne form > select:first-child { flex: 0 0 120px; }
.consent-ligne form > input[type="date"] { flex: 0 0 160px; }
.consent-ligne form > .btn { min-height: 40px; }
.carte:has(.consent-ligne) { padding-block: var(--sp-2); }

/* Rapport d'une conversation : en-tête compact ; chaque partie dans une carte ; le chapitre dans une colonne de
   lecture qui défile (l'impression le rend en entier). */
.en-tete-page h1.titre-rapport { font-size: 1.75rem; }
.titre-rapport + .guide { margin-top: var(--sp-1); }
#actions-rapport { align-items: flex-end; }
#actions-rapport .aide { max-width: 44ch; font-size: var(--fs-xs); }
@media screen {
  #recit, #ecoute { background: var(--surface); border-radius: 12px; box-shadow: var(--ombre-carte); padding: var(--sp-5); }
  #recit .section-titre, #ecoute .section-titre { border: 0; padding: 0; margin-bottom: var(--sp-3); }
  #panneau-chapitre { max-height: 62vh; overflow: auto; padding-inline-end: var(--sp-3); }
}
.chapitre-texte { font-size: var(--fs-md); line-height: 1.65; }
.badge-seuil { border-color: transparent; border-radius: 999px; padding-inline: 10px; background: var(--surface-2); }
.badge-seuil.atteint { background: var(--ok-soft); } .badge-seuil.manque { background: var(--danger-soft); } .badge-seuil.confirmer { background: var(--warn-soft); }

/* Audit du 21/10/2026. */
/* Accueil : « À faire » replié au-delà de six lignes ; lignes plus serrées. */
.a-faire:not(.tout-voir) > .a-faire-replie { display: none; }
#a-faire-plus { margin-top: var(--sp-2); }
.a-faire li { padding-block: var(--sp-2); }
/* Fiche, « Données et export » : la suppression est une carte blanche marquée de rouge, pas un aplat rouge. */
.zone-danger { background: var(--surface); border: 0; border-inline-start: 3px solid var(--danger); border-radius: 12px; box-shadow: var(--ombre-carte); padding: var(--sp-5); }
.zone-danger h3 { color: var(--danger); }
#donnees .carte .ligne-flex { flex-wrap: wrap; gap: var(--sp-2); }
/* Réglages, « État du poste » : la liste dans une carte, comme le reste. */
#liste-etat { background: var(--surface); border-radius: 12px; box-shadow: var(--ombre-carte); padding: var(--sp-2) var(--sp-4); }

/* Console d'un appel (21/10/2026) : mêmes pastilles qu'ailleurs, bande de préparation sur un filet plein, colonne
   de droite en carte. Rien ne bouge dans la disposition ni dans les gestes. */
.page-console :is(.pseudo, .barre-etat .sid) { border: 0; border-radius: 999px; background: var(--surface-2); padding-inline: 8px; }
.page-console .mode-prep { border-bottom-style: solid; border-bottom-color: var(--line); }
.page-console .console-droite > .carte, .page-console .console-droite > details { border-radius: 12px; }

/* Réglages, « Préférences » : une ligne par préférence — libellé et aide à gauche, le geste à droite. */
.prefs > .pref { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--sp-6); align-items: center; padding: var(--sp-3) 0; }
.prefs > .pref + .pref { border-top: 1px solid var(--line); }
.prefs .pref-texte { display: grid; gap: 2px; min-width: 0; }
.prefs .pref > :not(.pref-texte) { justify-self: end; }
.prefs .pref select { width: 220px; }
.prefs .pref .ligne-flex { flex-wrap: nowrap; gap: var(--sp-2); }
.prefs #pref-volume { width: 160px; min-height: 0; }
.prefs .choix-segment label { min-height: 36px; font-size: var(--fs-sm); }
.prefs #pref-etat:empty { display: none; }
@media (max-width: 760px) {
  .prefs > .pref { grid-template-columns: minmax(0, 1fr); row-gap: var(--sp-2); }
  .prefs .pref > :not(.pref-texte) { justify-self: start; }
  .prefs .pref .ligne-flex { flex-wrap: wrap; }
}

/* Réglages : une ligne par réglage — le libellé et son aide à gauche, le geste à droite. */
.carte.pile-l > .pile {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--sp-5); row-gap: 2px; align-items: center;
  margin: 0; padding: var(--sp-3) 0;
}
.carte.pile-l > .pile + .pile { border-top: 1px solid var(--line); }
.carte.pile-l > .pile > * { grid-column: 1; margin: 0; }
.carte.pile-l > .pile > h3 { font-size: var(--fs-sm); margin: 0; }
.carte.pile-l > .pile > .aide, .carte.pile-l > .pile > p { font-size: var(--fs-xs); color: var(--ink-3); }
.carte.pile-l > .pile > .ligne-flex { grid-column: 2; grid-row: 1 / span 3; justify-self: end; flex-wrap: nowrap; }
.carte.pile-l > .pile > .appareils, .carte.pile-l > .pile > #etat-prenom { grid-column: 1 / -1; }
.carte.pile-l > .pile > .appareils { margin-top: var(--sp-2); }
.carte.pile-l .ligne-flex input { width: 220px; }
.carte.pile-l .btn { min-height: 36px; padding-inline: var(--sp-3); font-size: var(--fs-sm); }
.appareil { border-radius: 8px; padding: var(--sp-2) var(--sp-3); }
@media (max-width: 760px) {
  .carte.pile-l > .pile { grid-template-columns: minmax(0, 1fr); }
  .carte.pile-l > .pile > .ligne-flex { grid-column: 1; grid-row: auto; justify-self: stretch; flex-wrap: wrap; margin-top: var(--sp-2); }
  .carte.pile-l .ligne-flex input { width: 100%; }
}

/* Connexion : la clé d'accès (passkey) en évidence, dans une carte. */
.carte-acces, .page-connexion { background: var(--surface); border-radius: 16px; padding: var(--sp-6); box-shadow: var(--ombre-carte); }
.carte-acces > .guide { font-size: var(--fs-lg); line-height: 1.45; margin-bottom: var(--sp-5); }
#btn-connexion { width: 100%; justify-content: center; gap: var(--sp-3); }
#btn-connexion::before {
  content: ""; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: var(--i-cle) center / contain no-repeat; mask: var(--i-cle) center / contain no-repeat;
}

@media (min-width: 1000px) {
  body:not(.page-console):not(.page-acces) { padding-inline-start: var(--nav-l); }
  body:not(.page-console):not(.page-acces) .entete {
    position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--nav-l); min-height: 0;
    flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: var(--sp-5);
    padding: var(--sp-5) var(--sp-3); background: var(--nav-bg); border: 0; overflow-y: auto;
  }
  body:not(.page-console):not(.page-acces) .marque { color: var(--nav-ink-fort); padding-inline: var(--sp-3); margin: 0; letter-spacing: .18em; }
  body:not(.page-console):not(.page-acces) .marque::before { background-color: var(--nav-marque); border-radius: 8px; }
  body:not(.page-console):not(.page-acces) .nav-principale ul { flex-direction: column; flex-wrap: nowrap; gap: 2px; }
  body:not(.page-console):not(.page-acces) .nav-principale a {
    display: flex; gap: var(--sp-3); min-height: 40px; padding: 0 var(--sp-3); border-radius: 8px;
    color: var(--nav-ink); box-shadow: none;
  }
  body:not(.page-console):not(.page-acces) .nav-principale a::before {
    content: ""; flex: none; width: 18px; height: 18px; background: currentColor;
    -webkit-mask: var(--i-accueil) center / contain no-repeat; mask: var(--i-accueil) center / contain no-repeat;
  }
  body:not(.page-console):not(.page-acces) .nav-principale a[href="/participants"]::before { -webkit-mask-image: var(--i-personnes); mask-image: var(--i-personnes); }
  body:not(.page-console):not(.page-acces) .nav-principale a[href="/tableau"]::before { -webkit-mask-image: var(--i-resultats); mask-image: var(--i-resultats); }
  body:not(.page-console):not(.page-acces) .nav-principale a[href="/donnees"]::before { -webkit-mask-image: var(--i-donnees); mask-image: var(--i-donnees); }
  body:not(.page-console):not(.page-acces) .nav-principale a[href="/reglages"]::before { -webkit-mask-image: var(--i-reglages); mask-image: var(--i-reglages); }
  body:not(.page-console):not(.page-acces) .nav-principale a:hover { background: var(--nav-survol); color: var(--nav-ink-fort); box-shadow: none; }
  body:not(.page-console):not(.page-acces) .nav-principale a[aria-current="page"] { background: var(--nav-actif); color: var(--nav-ink-fort); font-weight: 700; box-shadow: none; }
  body:not(.page-console):not(.page-acces) .nav-principale a[aria-current="page"]::before { background: var(--nav-repere); }
  body:not(.page-console):not(.page-acces) .entete-outils {
    margin: auto 0 0; padding: var(--sp-4) var(--sp-3) 0; border-top: 1px solid var(--nav-filet);
    flex-wrap: wrap; gap: var(--sp-2); color: var(--nav-ink);
  }
  body:not(.page-console):not(.page-acces) .entete-outils .btn { min-height: 36px; min-width: 36px; color: var(--nav-ink); border-color: var(--nav-filet); background: transparent; }
  body:not(.page-console):not(.page-acces) .entete-outils .btn:hover { color: var(--nav-ink-fort); background: var(--nav-survol); }
  body:not(.page-console):not(.page-acces) .compte-connecte {
    flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-2);
  }
  body:not(.page-console):not(.page-acces) .compte-connecte .petit { color: var(--nav-ink); }
  body:not(.page-console):not(.page-acces) .compte-connecte strong { color: var(--nav-ink-fort); }
}

@media (max-width: 1100px) {
  .entete { padding-inline: var(--sp-5); gap: var(--sp-5); }
  .contenu { padding-inline: var(--sp-5); }
  .bandeau-global { padding-inline: var(--sp-5); }
  .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; border-inline-start: 0; border-top: 1px solid var(--line); }
  .fil-conteneur { min-height: 50vh; }
  .fil { max-height: 60vh; }
  .barre-actions { position: sticky; bottom: 0; z-index: 47; }
  /* Zoom 200 % (1440 × 900 → 720 × 450) : l'en-tête collé (177 px) et le bandeau d'un rendez-vous
     manqué (160 px) cachaient la bande d'état ; en alerte critique, elle n'était jamais à l'écran.
     L'en-tête défile ; QUI A LA MAIN reste collé en haut, au-dessus des bandeaux de page. */
  .barre-etat { position: static; }
  .barre-etat .rangee { flex-wrap: wrap; padding-block: var(--sp-2); }
  .bande-mode { flex-wrap: wrap; position: sticky; top: 0; z-index: 46; }
  /* La phrase garde au moins 18 rem : sinon les actions passent à la ligne (à 720 px, « Détresse — l'IA
     vous passe la main » tenait en 4 lignes, écrasé par trois boutons). */
  .bande-mode .texte-mode { flex-basis: 18rem; }
  .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); }
  .seuil-ligne { grid-template-columns: 1fr auto; }
  .seuil-ligne .valeur, .seuil-ligne .regle, .seuil-ligne .jauge { grid-column: 1 / -1; }
  /* Accès : le panneau devient une bande en haut, la marque y reste. */
  .page-acces { align-content: start; justify-items: start; padding: calc(96px + var(--sp-6)) var(--sp-5) var(--sp-6); }
  .page-acces::before { position: absolute; inset: 0 0 auto 0; width: auto; height: 96px; background-image: none; }
  .marque-acces, .carte-acces h1.marque-acces, .page-connexion .marque-acces { position: absolute; top: 31px; left: var(--sp-5); }
  .carte-acces, .page-connexion { width: 100%; max-width: 560px; }
}
@media (max-width: 700px) {
  .entete { padding: var(--sp-2) var(--sp-4); min-height: 56px; gap: var(--sp-2); }
  /* Les cinq rubriques visibles, sur deux lignes au besoin (22/10/2026 : Données et Réglages restaient cachées). */
  .nav-principale { order: 3; width: 100%; }
  .nav-principale ul { flex-wrap: wrap; gap: 0 var(--sp-1); }
  .nav-principale a { min-height: 44px; padding-inline: var(--sp-2); }
  .bandeau-global { padding-inline: var(--sp-4); }
  .contenu { padding: var(--sp-6) var(--sp-4) var(--sp-7); }
  .sommaire { overflow-x: auto; }
  .sommaire ul { flex-wrap: nowrap; }
  h1, .en-tete-page h1, .en-tete-page .fiche-entete h1, .en-tete-page h1.titre-rapport, .accueil-bonjour { font-size: 1.5rem; }
  .carte { padding: var(--sp-4); }
  .a-faire li { grid-template-columns: 24px 1fr; }
  /* Les gestes d'une ligne (lien, bouton, ou groupe « Sa fiche ▸ » + « J'ai vu ») sous le texte, jamais
     dans la colonne de l'icône (24 px : libellés coupés en « fiche » et « 'ai vu »). */
  .a-faire li > :nth-child(n+3) { 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); }
  .onglets.onglets-outils { flex-wrap: wrap; }
  .onglets.onglets-outils [role="tab"] { flex-basis: 40%; }
  .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; padding-inline: var(--sp-4); }
  .barre-etat .identite { flex-wrap: wrap; }
  .barre-etat .identite .chapitre { white-space: normal; }
  .chrono-bloc { flex-wrap: wrap; }
  .bande-mode { position: sticky; top: 0; padding-inline: var(--sp-4); }   /* z-index : celui de 1 100 px (au-dessus des bandeaux) */
  .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; }
  .console-gauche, .console-droite { padding: var(--sp-4); }
  .fil { padding-inline: var(--sp-4); }
  .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; }
  /* La barre compacte défile au-delà de 30 vh : Raccrocher (rouge) et Clôturer en première rangée,
     toujours visibles (à 640 × 400, Raccrocher était à moitié hors de l'écran). Appui maintenu 1 s. */
  .barre-actions .groupe.graves > .btn { order: -1; }
  .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; 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); }
  /* En-tête : la marque et les trois boutons (écran partagé, thème, aide) sur la première ligne,
     « Connecté : … Se déconnecter » sur la deuxième,
     la navigation (qui défile) sur la troisième. Le « ? » ne tombe plus seul sur une ligne. */
  .entete-outils { display: contents; }
  .entete-outils > .btn { order: 1; }
  .entete-outils > .btn:first-of-type { margin-inline-start: auto; }
  .entete-outils > .compte-connecte { order: 2; width: 100%; justify-content: space-between; }
  .carte-acces > .guide { font-size: 1.375rem; }
  .carte-acces h1:not(.marque-acces), .page-connexion h1 { font-size: var(--fs-2xl); }
}
@media (max-width: 420px) {
  .codes-secours { grid-template-columns: minmax(0, 1fr); }
}

/* ================================================================== MOUVEMENT RÉDUIT & IMPRESSION */
/* ================================================================== ESPACE PERSONNEL */
/* Les commandes de l'espace sont préfixées « html body.page-espace » : plus fortes que les règles des pages de la
   console (body:not(.page-console) …, 44 px), elles gardent leurs 56 px et leurs 20 px partout. */
/* Espace de la personne et de son proche (cahier des charges du 28/10/2026) : inspiration Apple — un grand titre, une
   seule action principale par écran (la carte « Maintenant »), des cartes en liste, « ‹ Accueil » toujours en haut.
   Texte de base à 20 px, boutons de 56 px de haut au moins, encre pleine ; clair ou sombre par les jetons. */
body.page-espace { font-size: 1.25rem; line-height: 1.5; background: var(--bg); color: var(--ink); }
/* Marges sûres du téléphone (encoche, barre du bas), au moins 16 px de chaque côté ; « html » : plus fort que la règle
   des petites largeurs des pages de la console (body:not(.page-acces)). */
html body.page-espace {
  padding: max(var(--sp-5), env(safe-area-inset-top)) max(var(--sp-4), env(safe-area-inset-right))
           calc(var(--sp-7) + env(safe-area-inset-bottom)) max(var(--sp-4), env(safe-area-inset-left)); }
/* Au téléphone, les titres des pages de la console tiennent sur une ligne (« … ») : jamais dans l'espace, où l'on lit
   tout, en grand. */
.espace h1, .espace h2, .espace h3 { white-space: normal; overflow: visible; text-overflow: clip; }
.espace { width: min(100%, 600px); margin: 0 auto; }
.espace h1 { font-size: clamp(2rem, 8vw, var(--fs-3xl)); line-height: 1.1; letter-spacing: var(--serre); margin: 0 0 var(--sp-5); overflow-wrap: anywhere; }
.espace h2 { font-size: var(--fs-2xl); margin: var(--sp-5) 0 var(--sp-3); }
.espace h3 { font-size: var(--fs-xl); margin: var(--sp-4) 0 var(--sp-3); }
.espace p, .espace li, .espace label, .espace summary { font-size: 1.25rem; line-height: 1.5; color: var(--ink); }
.marque-espace { font: 700 var(--fs-sm)/1 var(--f-sans); letter-spacing: .34em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--sp-5); }
.retour-espace-ligne { margin: 0 0 var(--sp-3); }
html body.page-espace .retour-espace { display: inline-flex; align-items: center; min-height: 56px; font-size: var(--fs-xl); font-weight: 700; text-decoration: none; color: var(--accent); }
.bandeau-espace { padding: var(--sp-4); border-radius: 14px; background: var(--warn-soft); color: var(--ink); font-weight: 700; }
.carte-maintenant { background: var(--surface); border-radius: 18px; padding: var(--sp-5); box-shadow: var(--ombre-carte); margin: 0 0 var(--sp-6); display: grid; gap: var(--sp-3); }
.carte-maintenant .titre-carte { font-size: var(--fs-2xl); margin: 0; }
.surtitre-espace { font: 700 var(--fs-capitales)/1 var(--f-sans); letter-spacing: var(--capitales); text-transform: uppercase; color: var(--ink-3); margin: 0; }
.espace .surtitre-espace { font-size: var(--fs-capitales); color: var(--ink-3); }
.info-carte { color: var(--ink-2); }
.espace .info-carte { color: var(--ink-2); }
.pile-espace { display: grid; gap: var(--sp-3); }
html body.page-espace .btn-espace { width: 100%; min-height: 56px; font-size: var(--fs-xl); font-weight: 700; border-radius: 14px; justify-content: center; padding: var(--sp-3) var(--sp-5); white-space: normal; }
html body.page-espace .btn-espace-secondaire { background: var(--surface); color: var(--ink); border: 2px solid var(--line-strong); }
html body.page-espace .btn-espace-danger { background: var(--surface); color: var(--danger); border: 2px solid var(--danger); }
html body.page-espace .liste-espace { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 18px; box-shadow: var(--ombre-carte); overflow: hidden; }
html body.page-espace .liste-espace li + li { border-top: 1px solid var(--line); }
html body.page-espace .ligne-espace { width: 100%; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5); background: transparent; border: 0; color: var(--ink); font: 700 var(--fs-xl)/1.3 var(--f-sans); text-align: left; cursor: pointer; }
html body.page-espace .ligne-espace:hover { background: var(--surface-2); }
.pastilles-espace { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
html body.page-espace .pastille-espace { min-height: 56px; padding: var(--sp-2) var(--sp-4); border-radius: var(--r-pill); border: 2px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: 700 var(--fs-lg)/1.2 var(--f-sans); cursor: pointer; }
html body.page-espace .pastille-espace[aria-pressed="true"] { background: var(--plein); border-color: var(--plein); color: var(--sur-plein); }
.heures-espace { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--sp-2); }
.moment-espace { font-size: var(--fs-2xl); font-weight: 700; }
.espace .moment-espace { font-size: var(--fs-xl); font-weight: 700; }
.liste-faites, .liste-appareils { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.liste-appareils li { background: var(--surface); border-radius: 14px; padding: var(--sp-4); display: grid; gap: var(--sp-2); }
.code-grand { font: 700 var(--fs-4xl)/1.1 var(--f-mono); letter-spacing: .12em; text-align: center; margin: var(--sp-3) 0; }
.espace .code-grand { font-size: var(--fs-4xl); }
html body.page-espace .espace input[type="text"], html body.page-espace .espace input[type="tel"] { min-height: 56px; font-size: var(--fs-xl); }
html body.page-espace .espace input.code-saisie { font: 700 2rem/1.2 var(--f-mono); letter-spacing: .3em; text-align: center; min-height: 64px; width: 100%; }
.adresse-espace { font-family: var(--f-mono); }
.erreur-espace { color: var(--danger); font-weight: 700; }
.espace .erreur-espace { color: var(--danger); }
.succes-espace, .message-espace, .confirmation-espace { font-weight: 700; }
.aide-espace { margin-top: var(--sp-4); }
.aide-espace summary { min-height: 56px; display: flex; align-items: center; font-weight: 700; cursor: pointer; color: var(--accent); }
.espace .aide-espace summary { color: var(--accent); }
/* Lot 2 : le livre. Le texte du livre se lit en grand (20 px, interligne de lecture), paragraphe par paragraphe ; sous
   chacun, deux gestes discrets (« Proposer une correction », « Retirer ce passage ») ; les questions en cartes ; la
   feuille de proposition monte du bas (elle seule flotte, donc elle seule porte une ombre). */
.espace .mention-ia { font-size: var(--fs-lg); color: var(--ink-2); border-inline-start: 3px solid var(--accent); padding-inline-start: var(--sp-3); }
.paragraphe-espace { display: grid; gap: var(--sp-3); padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); }
.espace .texte-livre { font-size: 1.25rem; line-height: var(--lh-read); color: var(--ink); margin: 0; overflow-wrap: anywhere; }
.espace .intertitre-livre { font-size: var(--fs-xl); margin: var(--sp-3) 0 0; }
.citation-livre { margin: 0; padding-inline-start: var(--sp-4); border-inline-start: 2px solid var(--ink); }
.espace .citation-livre p { font-style: italic; }
.actions-paragraphe { display: flex; flex-wrap: wrap; gap: 0 var(--sp-5); }
html body.page-espace .lien-espace { min-height: 56px; padding: 0; background: transparent; border: 0; color: var(--accent);
  font: 700 var(--fs-lg)/1.2 var(--f-sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.question-espace, .proposition-espace, .changement-espace { background: var(--surface); border-radius: 14px; padding: var(--sp-4);
  display: grid; gap: var(--sp-3); border: 1px solid var(--line); }
.question-espace { border-inline-start: 4px solid var(--warn); }
.proposition-espace { border-inline-start: 4px solid var(--accent); }
.espace .question-texte { font-weight: 700; margin: 0; }
.espace .reponse-espace { font-weight: 700; color: var(--accent); margin: 0; }
.ligne-inerte { cursor: default; }
.pile-ligne { display: grid; gap: var(--sp-1); }
.espace .etat-chapitre { font-size: var(--fs-lg); font-weight: 400; color: var(--ink-2); }
.espace .etat-relu { color: var(--ok); font-weight: 700; }
.espace .etat-version_prete { color: var(--warn); font-weight: 700; }
.fin-chapitre { margin-top: var(--sp-5); }
html body.page-espace .btn-espace[disabled] { opacity: 1; background: var(--surface-2); color: var(--ink-3); border: 2px solid var(--line); cursor: not-allowed; }
.espace .ajout-espace { background: var(--ok-soft); color: var(--ink); padding: 0 .12em; border-radius: 3px; }
.espace .retrait-espace { color: var(--ink-2); text-decoration: line-through; text-decoration-thickness: 2px; }
.fond-feuille { position: fixed; inset: 0; z-index: 50; background: var(--voile); display: flex; align-items: flex-end; justify-content: center; }
.feuille-espace { width: min(100%, 600px); max-height: 88vh; overflow-y: auto; background: var(--bg); color: var(--ink);
  border-radius: 20px 20px 0 0; box-shadow: var(--ombre); display: grid; gap: var(--sp-3);
  padding: var(--sp-5) max(var(--sp-4), env(safe-area-inset-right)) calc(var(--sp-5) + env(safe-area-inset-bottom)) max(var(--sp-4), env(safe-area-inset-left)); }
.feuille-espace h2 { font-size: var(--fs-2xl); margin: 0; }
.feuille-espace p, .feuille-espace label { font-size: 1.25rem; line-height: 1.5; color: var(--ink); }
.feuille-espace .extrait-feuille { color: var(--ink-2); font-style: italic; max-height: 9em; overflow: hidden; }
.choix-feuille { display: grid; gap: var(--sp-2); }
html body.page-espace .choix-espace[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
html body.page-espace .choix-espace[aria-pressed="true"]::before { content: "✓\00a0"; }
html body.page-espace .champ-espace { width: 100%; min-height: 160px; font: 400 1.25rem/1.5 var(--f-sans); padding: var(--sp-3);
  border: 2px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); resize: vertical; }
/* Espace personnel, lot 3 (28/10/2026) : « Valider et commander » et « Mes données ». Le compteur − / + en gros boutons,
   la case d'accord grande comme un doigt, la lecture continue du livre, le journal en phrases. */
.lecture-continue { display: grid; gap: var(--sp-3); padding: var(--sp-4); background: var(--surface); border-radius: 14px;
  border: 1px solid var(--line); max-height: 60vh; overflow-y: auto; }
.espace .lecture-continue h3 { margin: var(--sp-4) 0 0; }
.espace .lecture-continue h3:first-child { margin-top: 0; }
.compteur-espace { display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; gap: var(--sp-3); }
html body.page-espace .pas-espace { min-height: 64px; font-size: var(--fs-3xl); padding: 0; }
.espace .nombre-espace { font-size: var(--fs-3xl); font-weight: 700; text-align: center; margin: 0; font-variant-numeric: tabular-nums; }
.espace .ligne-case { display: grid; grid-template-columns: 32px 1fr; gap: var(--sp-3); align-items: start; min-height: 56px; cursor: pointer; }
html body.page-espace .case-espace { width: 32px; height: 32px; margin: 2px 0 0; accent-color: var(--accent); }
.journal-espace { margin: 0; padding-inline-start: 1.2em; display: grid; gap: var(--sp-2); }
@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, .bandeau-global, .lien-evitement { 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; }
  /* Papier : encre noire sur blanc, filets gris, ni panneau vert ni aplat. */
  body { background: #FFFFFF; color: #000000; }
  .page-acces { padding: 0; }
  .page-acces::before { display: none; }
  .marque-acces, .carte-acces h1.marque-acces, .page-connexion .marque-acces { position: static; color: #000000; background: none; margin-bottom: var(--sp-5); }
  /* L'emblème est tracé en clair pour le panneau vert : sur papier blanc, un carré fantôme. */
  .marque-acces::before, h1.marque-acces::before { display: none; }
  .carte, .panneau, .fil-conteneur { background: #FFFFFF; border-color: #999999; }
}

/* Téléphone (essai sur l'iPhone d'Alexandre, 22/10/2026) : en fin de feuille, pour passer après les anciennes
   règles des petites largeurs. */
@media (max-width: 700px) {
  .essai header { flex-wrap: wrap; }
  .essai header .btn { white-space: nowrap; min-height: 44px; padding-inline: var(--sp-2); font-size: var(--fs-xs); }
  .essai-chiffres { gap: 6px; }
  .essai-chiffres div { padding: var(--sp-2); }
  .essai-chiffres span { line-height: 1.25; }
  .essai-chiffres strong { font-size: 1rem; }
  .etapes li { grid-template-columns: minmax(0, 1fr); gap: var(--sp-1); }
  .contenu:is(.accueil, .resultats) > .en-tete-page { margin: 0; }
  .verdict-chiffres { flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); }
  /* Essai sur l'iPhone (22/10/2026, 16 h 26) : l'en-tête prenait la moitié de l'écran et le texte était trop gros.
     Une ligne pour la marque et les outils, une ligne discrète pour le compte, le menu en petites capsules. */
  :root { --fs-xs: .75rem; --fs-sm: .875rem; --fs-md: .9375rem; --fs-lg: 1.0625rem; --fs-xl: 1.25rem; --fs-libelle: var(--fs-sm); }
  body { font-size: var(--fs-md); }
  .entete { padding-block: var(--sp-2); row-gap: var(--sp-1); }
  .entete-outils > .btn { min-height: 44px; min-width: 44px; padding: 0; }
  .entete-outils > .compte-connecte { font-size: var(--fs-xs); }
  .entete-outils > .compte-connecte .btn { min-height: 44px; padding: 0 var(--sp-1); font-size: var(--fs-xs); }
  .nav-principale ul { gap: 4px; padding-block: 2px var(--sp-1); }
  .nav-principale a { min-height: 44px; padding: 0 var(--sp-2); border-radius: 999px; font-size: var(--fs-xs); background: var(--surface); box-shadow: none; }
  .nav-principale a[aria-current="page"] { background: var(--plein); color: var(--sur-plein); box-shadow: none; }
  .contenu { padding-top: var(--sp-5); }
  h1, .en-tete-page h1, .en-tete-page .fiche-entete h1, .en-tete-page h1.titre-rapport, .accueil-bonjour { font-size: 1.375rem; }
  .compteur strong, .objectif strong { font-size: 1.25rem; }
  .compteur, .compteur + .compteur, .compteur:first-child { padding: var(--sp-3); }
  .alerte-ligne > summary { flex-wrap: wrap; row-gap: 2px; padding-block: var(--sp-2); }
  .alerte-ligne .alerte-voir { margin-inline-start: 20px; flex-basis: 100%; }
  .alerte-ligne > summary > :not(.pastille):not(.alerte-voir) { flex: 1 1 0; min-width: 0; }
  .carte-prochaine .btn-primaire { font-size: var(--fs-sm); }
  .btn { min-height: 44px; }
  /* Tableaux : une ligne = une petite fiche, le nom de la colonne devant chaque valeur (commun.js). */
  .tableau:not(.tableau-go) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tableau:not(.tableau-go), .tableau:not(.tableau-go) tbody { display: block; width: 100%; }
  .tableau:not(.tableau-go) tbody tr { display: grid; gap: 6px; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
  .tableau:not(.tableau-go) tbody tr:last-child { border-bottom: 0; }
  .tableau:not(.tableau-go) tbody td, .tableau:not(.tableau-go) tbody th {
    display: block; position: relative; padding: 0 0 0 calc(8.5em + var(--sp-3)); border: 0; min-height: 0;
    font-size: var(--fs-sm); text-align: left;
  }
  .tableau:not(.tableau-go) tbody td::before, .tableau:not(.tableau-go) tbody th::before {
    content: attr(data-label); position: absolute; left: 0; top: 2px; width: 8.5em; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 400;
  }
  .tableau:not(.tableau-go) tbody :is(td, th):is([data-label=""], :not([data-label]), [colspan]) { padding-left: 0; }
  .tableau:not(.tableau-go) tbody :is(td, th):is([data-label=""], :not([data-label]), [colspan])::before { content: none; }
  .tableau:not(.tableau-go) .btn { white-space: normal; max-width: 100%; text-align: left; }
  /* Rapport : sa parole à la taille du texte courant (elle était plus grande que les titres). */
  .colonne-transcript :is(.texte, .serif) { font-size: var(--fs-md); line-height: 1.5; }
  /* Fiche : onglets serrés, en-tête et action du moment plus compacts. */
  .fiche-onglets .sommaire ul { display: flex; gap: 2px; }
  .fiche-onglets .sommaire a { min-height: 44px; padding-inline: var(--sp-2); font-size: var(--fs-xs); }
  .fiche-action .btn-primaire { min-height: 44px; font-size: var(--fs-sm); }
}

/* Revue de la console du 26/10/2026 : chiffres clés cliquables (accueil, résultats, objectifs), gestes repliés
   « Plus ▾ », onglets de la fiche repliés. Les règles du téléphone restent en fin de feuille (elles passent après les
   anciennes règles des petites largeurs). */
a.compteur { color: inherit; text-decoration: none; }
a.compteur:hover strong, a.compteur:focus-visible strong { text-decoration: underline; }
.compteur-detail { font-size: var(--fs-xs); color: var(--ink-3); }
a.objectif { color: inherit; text-decoration: none; }
a.objectif:hover strong, a.objectif:focus-visible strong { text-decoration: underline; }
.verdict-chiffres a.statut, .quotas a.statut { text-decoration: none; }
.quotas .quota-texte { color: inherit; }
.menu-plus-alerte { display: inline-block; }
.menu-plus-alerte > summary { list-style: none; cursor: pointer; }
.menu-plus-alerte > summary::-webkit-details-marker { display: none; }
.menu-plus-alerte[open] { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.sommaire .onglet-plus { display: none; }
#canaux-test > summary { font-size: var(--fs-sm); color: var(--ink-2); min-height: 44px; display: flex; align-items: center; }
@media (max-width: 700px) {
  /* Onglets de la fiche : sur plusieurs lignes, jamais de défilement de côté ; Rendez-vous et Données sous « Plus ▾ »
     (l'onglet ouvert reste visible). */
  .sommaire, .fiche-onglets .sommaire { overflow-x: visible; }
  .sommaire ul, .fiche-onglets .sommaire ul { flex-wrap: wrap; display: flex; }
  .fiche-onglets .sommaire .onglet-secondaire:not(.onglet-ouvert) { display: none; }
  .fiche-onglets .sommaire.tout-voir .onglet-secondaire { display: list-item; }
  .fiche-onglets .sommaire .onglet-plus { display: list-item; }
  .fiche-onglets .sommaire .onglet-plus .btn { min-height: 44px; padding-inline: var(--sp-2); font-size: var(--fs-xs); }
  a.compteur { min-height: 44px; }
  .menu-plus-alerte > summary { min-height: 44px; }
}

/* Accueil, « Prochaine conversation » sans rendez-vous (refonte mobile du 26/10/2026, utile partout) : les personnes
   prêtes, une ligne chacune, qui mène à l'onglet « Lancer » de sa fiche. */
.liste-pretes { list-style: none; margin: 0 0 var(--sp-3); padding: 0; }
.liste-pretes li + li { border-top: 1px solid var(--line); }
.liste-pretes a { display: flex; align-items: center; gap: var(--sp-2) var(--sp-3); flex-wrap: wrap; min-height: 48px; padding-block: var(--sp-1); color: var(--ink); text-decoration: none; }
.liste-pretes a:hover .discret { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }
.liste-pretes a::after { content: "›"; content: "›" / ""; margin-inline-start: auto; font-size: 1.375rem; line-height: 1; color: var(--ink-3); }
.liste-pretes .pseudo-discret { margin-inline-start: var(--sp-2); }
.liste-pretes .discret { font-size: var(--fs-sm); }

/* ================================================================== TÉLÉPHONE, À LA MANIÈRE D'iOS (26/10/2026) */
/* Demande du fondateur (26/10/2026) : « améliore l'ergonomie, l'UX et le design sur version mobile. Inspire-toi
   d'Apple ». Les fondateurs suivent les essais en famille sur un iPhone. Adapté, pas copié : la navigation dans une
   barre d'onglets en bas, sous le pouce ; de grands titres ; des listes groupées (cartes arrondies sur le fond gris
   vert, lignes de 44 px au moins, « › ») ; UNE action principale pleine largeur par écran, collée en bas quand c'est
   LE geste de l'écran ; les confirmations dans des feuilles qui montent du bas ; un corps de 17 px, celui d'iOS (à
   14 ou 15 px, Safari agrandissait la page au toucher d'un champ). Les jetons, les deux graisses et la police ne
   changent pas : Aptos par son nom, et sur un iPhone, où elle n'est pas installée, la police du système (SF Pro).
   En fin de feuille : ces règles passent après les anciennes règles des petites largeurs. Le grand écran ne change
   pas. Charte : docs/Charte graphique — Épure.md, § 8. */
@media (max-width: 999px) {
  /* viewport-fit=cover (pages de la console) : en paysage, rien sous l'encoche. */
  body:not(.page-acces) { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
}
@media (max-width: 700px) {
  :root {
    --fs-xs: .8125rem; --fs-sm: .9375rem; --fs-md: 1.0625rem; --fs-lg: 1.1875rem; --fs-xl: 1.375rem; --fs-libelle: var(--fs-sm);
    --onglets-h: 54px;                                          /* barre d'onglets */
    --bas: calc(var(--onglets-h) + env(safe-area-inset-bottom)); /* ce qu'elle occupe, geste d'accueil compris */
  }
  body { line-height: 1.47; -webkit-tap-highlight-color: transparent; }
  body:not(.page-console):not(.page-acces) { padding-bottom: var(--bas); }
  /* La console d'un appel reste dense (beaucoup d'informations à la fois) ; ses champs à 16 px, sans agrandissement. */
  body.page-console { --fs-xs: .75rem; --fs-sm: .875rem; --fs-md: .9375rem; --fs-lg: 1.0625rem; --fs-xl: 1.25rem; }
  .page-console :is(input, select, textarea) { font-size: 1rem; }

  /* --- En-tête : une ligne, la marque et les trois outils ; elle défile avec la page. */
  body:not(.page-console):not(.page-acces) .entete { min-height: 52px; padding-block: 4px; border-bottom: 0; background: var(--bg); }

  /* --- La barre d'onglets, en bas : les cinq rubriques, un pictogramme et un mot, sous le pouce. */
  body:not(.page-console):not(.page-acces) .nav-principale {
    position: fixed; inset: auto 0 0 0; z-index: 35; order: 0; width: auto;
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
    border-top: 1px solid var(--line);
  }
  body:not(.page-console):not(.page-acces) .nav-principale ul { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; padding: 0; }
  body:not(.page-console):not(.page-acces) .nav-principale a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: var(--onglets-h); padding: 6px 2px 4px; border-radius: 0; background: none; box-shadow: none;
    font: 400 .6875rem/1.1 var(--f-sans); letter-spacing: .01em; color: var(--ink-3);
    transition: color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
  }
  body:not(.page-console):not(.page-acces) .nav-principale a::before {
    content: ""; flex: none; width: 24px; height: 24px; background: currentColor;
    -webkit-mask: var(--i-accueil) center / contain no-repeat; mask: var(--i-accueil) center / contain no-repeat;
  }
  body:not(.page-console):not(.page-acces) .nav-principale a[href="/participants"]::before { -webkit-mask-image: var(--i-personnes); mask-image: var(--i-personnes); }
  body:not(.page-console):not(.page-acces) .nav-principale a[href="/tableau"]::before { -webkit-mask-image: var(--i-resultats); mask-image: var(--i-resultats); }
  body:not(.page-console):not(.page-acces) .nav-principale a[href="/donnees"]::before { -webkit-mask-image: var(--i-donnees); mask-image: var(--i-donnees); }
  body:not(.page-console):not(.page-acces) .nav-principale a[href="/reglages"]::before { -webkit-mask-image: var(--i-reglages); mask-image: var(--i-reglages); }
  body:not(.page-console):not(.page-acces) .nav-principale a:hover { color: var(--ink); background: none; box-shadow: none; }
  body:not(.page-console):not(.page-acces) .nav-principale a:active { opacity: .55; }
  /* La rubrique courante : la signature, comme la page courante sur grand écran. */
  body:not(.page-console):not(.page-acces) .nav-principale a[aria-current="page"] { color: var(--accent); font-weight: 700; background: none; box-shadow: none; }
  body:not(.page-console):not(.page-acces) .nav-principale a:focus-visible { outline-offset: -4px; }
  /* « Résultats du test » : « Résultats » à l'œil (cinq onglets dans 390 px), le nom entier pour le lecteur d'écran. */
  .nav-suite { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  /* --- Grands titres, texte courant. */
  .contenu { padding: var(--sp-3) var(--sp-4) var(--sp-7); }
  h1, .en-tete-page h1, .en-tete-page .fiche-entete h1, .accueil-bonjour { font-size: 2rem; line-height: 1.1; letter-spacing: -.025em; }
  .en-tete-page h1.titre-rapport { font-size: 1.5rem; line-height: 1.15; }
  .en-tete-page { gap: var(--sp-3); margin-bottom: var(--sp-5); }
  .en-tete-page > div:first-child { width: 100%; }
  .en-tete-page .guide { font-size: var(--fs-sm); line-height: 1.45; }
  .section-titre h2 { font-size: 1.25rem; }
  .section + .section { margin-top: var(--sp-6); }
  .aide, body:not(.page-console) .aide { font-size: var(--fs-xs); line-height: 1.45; }

  /* --- Retour : « ‹ Personnes » (fiche), « ‹ P03 » (rapport) — le dernier lien du fil d'Ariane, à la couleur des liens. */
  .fil-ariane { font-size: 0; margin: 0 0 var(--sp-1); letter-spacing: 0; text-transform: none; }
  .fil-ariane > :not(a:last-of-type) { display: none; }
  .fil-ariane > a:last-of-type { font-size: var(--fs-md); font-weight: 400; color: var(--accent); gap: 4px; margin-inline-start: -2px; }
  .fil-ariane > a:last-of-type::before { content: "‹"; content: "‹" / ""; font-size: 1.75rem; line-height: 1; margin-top: -4px; }
  .fil-ariane > a:last-of-type:active { opacity: .55; }

  /* --- Boutons : coins de 10 px ; l'action principale d'un écran sur toute la largeur, en 50 px ; appui visible. */
  .btn { border-radius: 10px; transition: background var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
  .btn:active:not([disabled]):not([aria-disabled="true"]) { transform: scale(.97); opacity: .85; }
  .acc-tete > .btn-primaire, .en-tete-page .actions-page > .btn-primaire, .fiche-action, .fiche-action > .btn {
    width: 100%;
  }
  .acc-tete > .btn-primaire, .en-tete-page .actions-page > .btn-primaire, .fiche-action > .btn { min-height: 50px; border-radius: 12px; font-size: var(--fs-md); }
  .en-tete-page .actions-page { width: 100%; }
  .fiche-action .aide { max-width: none; }

  /* --- Listes groupées : la carte blanche arrondie sur le fond gris vert, des lignes sur un filet. */
  .carte, .alerte-ligne, .compteur, .compteur + .compteur, .compteur:first-child, .objectif,
  .defilement-x:not(.carte *):has(> table.tableau) { border-radius: 12px; }
  .carte { padding: var(--sp-4); }
  .defilement-x:not(.carte *):has(> table.tableau) { padding: 0 var(--sp-4); }

  /* Personnes : une ligne par personne, toute la ligne ouvre sa fiche (« › ») ; le geste du moment reste un bouton. */
  .tableau.tableau-personnes tbody tr { position: relative; gap: 4px; padding: var(--sp-3) 28px var(--sp-3) 0; }
  .tableau-personnes tbody tr:has(.id-pseudo)::after {
    content: "›"; content: "›" / ""; position: absolute; right: 0; top: var(--sp-3);
    font-size: 1.625rem; line-height: 1.2; color: var(--ink-3); pointer-events: none;
  }
  .tableau-personnes tbody tr:active { background: var(--surface-2); }
  .tableau.tableau-personnes tbody :is(td, th) { position: static; padding: 0; font-size: var(--fs-sm); }
  .tableau.tableau-personnes tbody :is(td, th)::before { content: none; }
  .tableau.tableau-personnes tbody td.nombre::before { content: attr(data-label) "\00A0"; position: static; width: auto; font-size: inherit; }
  .tableau.tableau-personnes tbody td.nombre { color: var(--ink-3); font-size: var(--fs-xs); }
  .tableau-personnes .id-pseudo::after { content: ""; position: absolute; inset: 0; }
  .tableau-personnes :is(.btn, a.statut) { position: relative; z-index: 1; }
  .tableau-personnes .personne-cellule { gap: 2px; }
  .tableau-personnes .personne-cellule .serif { font-size: var(--fs-md); }
  .tableau-personnes .ou-en-est { display: block; font-size: var(--fs-sm); }
  .tableau-personnes .ou-en-est::before {
    content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: 8px; border-radius: 50%;
    background: var(--ink-3); vertical-align: 1px;
  }
  .tableau-personnes .ou-en-est.att::before { background: var(--warn); }
  .tableau-personnes .ou-en-est.crit::before { background: var(--danger); }
  .tableau-personnes .ou-en-est.ok::before { background: var(--ok); }
  .tableau-personnes .ou-en-est .detail { font-size: var(--fs-xs); margin-inline-start: 16px; }
  .tableau.tableau-personnes .btn { min-height: 44px; margin-block: 4px; padding-inline: var(--sp-4); border-color: transparent; background: var(--surface-2); border-radius: 999px; font-size: var(--fs-sm); }
  .tableau.tableau-personnes .btn.btn-danger { background: var(--danger); color: var(--on-fill); }

  /* Accueil : « Bonjour. » en grand titre ; ce qu'il reste à faire en lignes groupées. */
  .acc-date { font-size: var(--fs-sm); }
  .contenu.accueil { gap: var(--sp-4); }
  .a-faire li { padding-block: var(--sp-3); font-size: var(--fs-sm); }
  .a-faire li:active, .liste-pretes a:active { background: var(--surface-2); }
  /* Le geste d'une tâche : un bouton teinté, sans cadre, comme celui d'une ligne de « Personnes ». */
  .a-faire .btn:not(.btn-primaire):not(.btn-danger):not(.btn-humain):not(.btn-contour-danger) { border-color: transparent; background: var(--surface-2); border-radius: 999px; }
  .carte-prochaine .btn-primaire { width: 100%; min-height: 50px; border-radius: 12px; font-size: var(--fs-md); }
  .acc-tete:has(> .btn-primaire) ~ .accueil-grille .carte-prochaine .btn-primaire[href="/participants"] { background: var(--surface-2); border-color: transparent; color: var(--ink); }

  /* --- Fiche : les onglets en commande segmentée (la rangée grise, l'onglet ouvert en blanc). */
  .fiche-onglets .sommaire { margin-bottom: var(--sp-4); }
  .fiche-onglets .sommaire ul {
    display: flex; flex-wrap: wrap; gap: 2px; width: 100%; padding: 2px; border-radius: 10px; box-shadow: none;
    background: color-mix(in srgb, var(--ink) 7%, var(--surface));
  }
  .fiche-onglets .sommaire li { flex: 1 1 auto; display: flex; }
  .fiche-onglets .sommaire.tout-voir .onglet-secondaire, .fiche-onglets .sommaire .onglet-plus { display: flex; }
  .fiche-onglets .sommaire a, .fiche-onglets .sommaire .onglet-plus .btn {
    flex: 1 1 auto; justify-content: center; min-height: 44px; padding: 0 var(--sp-2); border-radius: 8px;
    font-size: var(--fs-xs); color: var(--ink-2); background: transparent; border: 0;
  }
  .fiche-onglets .sommaire a[aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: var(--ombre-carte); }
  .fiche-entete { gap: var(--sp-2) var(--sp-3); }
  /* Sur l'onglet « Lancer », le bouton du haut y mène déjà : l'action de l'écran est en bas, collée. */
  .fiche-onglets:has(#lancement:not(.onglet-cache)) .fiche-action:has(> #btn-preparer[href="#lancement"]) { display: none; }

  /* Lancer une conversation : « Comment » en commande segmentée ; LE geste (« Créer le lien ») collé en bas. */
  .choix-segment, .carte-lancement .choix-segment {
    display: flex; flex-wrap: wrap; gap: 2px; width: 100%; padding: 2px; border: 0; border-radius: 10px;
    background: color-mix(in srgb, var(--ink) 7%, var(--surface));
  }
  .choix-segment label, .carte-lancement .choix-segment label, .prefs .choix-segment label {
    position: relative; flex: 1 1 0; justify-content: center; text-align: center; min-height: 44px; padding: 6px var(--sp-2);
    border: 0; border-radius: 8px; font-size: var(--fs-sm); line-height: 1.25; color: var(--ink-2);
  }
  .carte-lancement .choix-segment label:has(input:checked), .choix-segment label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--ombre-carte); }
  .choix-segment label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
  .choix-segment input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
  .carte-lancement #canaux-test { border: 0; padding: 0; background: none; }
  .carte-lancement #canaux-test[open] > summary { border: 0; margin-bottom: var(--sp-2); }
  .carte-lancement > hr { display: none; }
  .carte-lancement > .ligne-flex.espace:has(#btn-lancer) {
    position: sticky; bottom: var(--bas); z-index: 5; flex-direction: column-reverse; align-items: stretch; gap: var(--sp-2);
    margin: var(--sp-4) calc(-1 * var(--sp-4)) 0; padding: var(--sp-3) var(--sp-4);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line);
  }
  .carte-lancement #btn-lancer { width: 100%; min-height: 50px; border-radius: 12px; }
  /* Le lien est créé (« Lien créé ✓ ») : la barre se décolle, le lien et « Envoyer… » viennent juste dessous. */
  .carte-lancement:has(> #bloc-lien:not([hidden])) > .ligne-flex.espace:has(#btn-lancer) { position: static; }
  .carte-lancement #raison-lancement { text-align: center; }
  .carte-lancement #raison-lancement:empty { display: none; }
  /* Le lien créé (sans feuille, ou après l'avoir refermée) : le message en bulle, les gestes sur toute la largeur. */
  .bloc-lien .actions-lien .btn, .bloc-lien #btn-copier-lien { flex: 1 1 100%; min-height: 50px; border-radius: 12px; }
  .bloc-lien .ligne-flex:has(#lien-adresse) { flex-wrap: wrap; }
  .message-lien { border-radius: 14px; padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); line-height: 1.45; }
  .liste-liens li { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding-block: var(--sp-3); font-size: var(--fs-sm); }

  /* Consentements : la saisie sur deux colonnes, en pleine largeur (valeur et preuve, puis date et « Enregistrer ») ;
     le retrait d'accord, geste grave,
     en rouge, à part, sous la liste. */
  #consentements:not(.onglet-cache) { display: flex; flex-direction: column; }
  #consentements > .section-titre { display: contents; }
  #consentements > .section-titre > .aide { order: 0; flex: none; margin-bottom: var(--sp-3); }
  #consentements > .carte { order: 1; }
  #consentements #btn-retrait {
    order: 2; align-self: stretch; margin-top: var(--sp-5); min-height: 50px; border-radius: 12px;
    background: var(--surface); border-color: transparent; color: var(--danger); box-shadow: var(--ombre-carte); font-size: var(--fs-md);
  }
  .consent-ligne > form, .consent-ligne > .repli-saisie { grid-column: 1 / -1; justify-self: stretch; }
  .consent-ligne form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .consent-ligne form > input[type="text"], .consent-ligne form > select:has(+ input[type="text"]), .consent-ligne form > .btn:nth-child(odd) { grid-column: 1 / -1; }
  .consent-ligne form > select, .consent-ligne form > input, .consent-ligne form > select:first-child, .consent-ligne form > input[type="date"] { width: 100%; max-width: none; }
  .consent-ligne form > .btn { width: 100%; min-height: 44px; justify-self: stretch; }
  .consent-ligne .repli-saisie > summary { justify-content: flex-start; }

  /* --- Formulaires : libellés au-dessus, champs de 44 px à 17 px (Safari n'agrandit plus la page au toucher). */
  body:not(.page-console) :is(input[type="text"], input[type="tel"], input[type="search"], input[type="number"], input[type="datetime-local"], input[type="date"], input[type="time"], select, textarea) {
    min-height: 44px; padding: 8px 12px; font-size: var(--fs-md); border-radius: 10px;
  }
  .ajout-puce .btn { min-height: 44px; }
  .puce { min-height: 32px; }

  /* --- Rapport : l'action principale en tête, sur toute la largeur ; les deux autres en boutons texte. */
  #actions-rapport { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); width: 100%; align-items: center; }
  #actions-rapport > .btn-primaire { order: -1; flex: 1 1 100%; min-height: 50px; border-radius: 12px; font-size: var(--fs-md); }
  #actions-rapport > .btn:not(.btn-primaire) { flex: 1 1 0; padding-inline: var(--sp-3); border-color: transparent; background: var(--surface); box-shadow: var(--ombre-carte); }
  #actions-rapport .aide { flex-basis: 100%; max-width: none; }
  /* Onglets d'une carte (« Le chapitre », « Les souvenirs relevés ») : la même commande segmentée. */
  .onglets:not(.onglets-outils) {
    gap: 2px; padding: 2px; border: 0; border-radius: 10px; background: color-mix(in srgb, var(--ink) 7%, var(--surface));
  }
  .onglets:not(.onglets-outils) [role="tab"] { flex: 1 1 0; margin: 0; border: 0; border-radius: 8px; font-size: var(--fs-sm); line-height: 1.2; padding: 6px var(--sp-2); }
  .onglets:not(.onglets-outils) [role="tab"][aria-selected="true"] { background: var(--surface); box-shadow: var(--ombre-carte); }

  /* --- Feuilles : un dialogue monte du bas de l'écran, coins de 14 px en haut ; les gestes empilés sur toute la largeur,
     le principal (ou le geste grave, en rouge) d'abord, « Annuler » dessous. */
  dialog, dialog.large {
    margin: auto 0 0; width: 100%; max-width: 100%; max-height: calc(100dvh - var(--sp-6));
    border: 0; border-radius: 14px 14px 0 0; padding-bottom: env(safe-area-inset-bottom);
    animation: feuille-monte 260ms var(--ease);
  }
  dialog.danger { border: 0; border-top: 3px solid var(--danger); }
  dialog[open]::backdrop { animation: voile-apparait 200ms ease; }
  .dialogue-corps { padding: var(--sp-5) var(--sp-4) var(--sp-3); }
  .dialogue-corps h2 { font-size: 1.25rem; }
  .dialogue-actions { flex-direction: column; align-items: stretch; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4) var(--sp-4); border-top: 0; background: var(--surface); border-radius: 0; }
  .dialogue-actions .btn { width: 100%; min-height: 50px; border-radius: 12px; font-size: var(--fs-md); }
  .dialogue-actions > :is(.btn-primaire, .btn-danger, .btn-humain) { order: -1; }
  .dialogue-actions > .btn:not(.btn-primaire):not(.btn-danger):not(.btn-humain) { border-color: transparent; background: var(--surface-2); }
  .dialogue-actions .gauche { margin: 0; }
  /* La feuille du lien tout juste créé (js/participant.js) : « Fermer » en haut à droite, « Envoyer… » sous le pouce. */
  dialog.feuille { padding: 0 var(--sp-4) calc(var(--sp-5) + env(safe-area-inset-bottom)); }
  .feuille-tete {
    position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end; align-items: center; min-height: 48px;
    margin: 0 calc(-1 * var(--sp-4)); padding: 0 var(--sp-2); background: var(--surface);
  }
  .feuille-fermer { font-size: var(--fs-md); color: var(--ink); }
  /* Dans la feuille : le message d'abord, puis les gestes, collés en bas sous le pouce. Sans partage du téléphone,
     « Copier le message » devient le geste principal. */
  dialog.feuille .bloc-lien { margin: 0; display: flex; flex-direction: column; }
  dialog.feuille .bloc-lien > h3 { font-size: 1.25rem; margin-top: 0; }
  dialog.feuille .bloc-lien > .actions-lien {
    order: 1; position: sticky; bottom: 0; margin: var(--sp-4) calc(-1 * var(--sp-4)) 0; padding: var(--sp-3) var(--sp-4) 0;
    background: var(--surface);
  }
  dialog.feuille #btn-copier-message { background: var(--plein); border-color: var(--plein); color: var(--sur-plein); }
  dialog.feuille #btn-copier-lien { border-color: transparent; background: var(--surface-2); }

  /* --- Messages : en bas, au-dessus de la barre d'onglets, sur toute la largeur. */
  .toasts { left: var(--sp-4); right: var(--sp-4); bottom: calc(var(--bas) + var(--sp-3)); max-width: none; }
  .toast { border-radius: 14px; animation: toast-monte 260ms var(--ease); }

  /* --- En attendant les données : une ligne grise qui respire, plutôt que le mot « Chargement ». */
  .chargement { position: relative; color: transparent; min-height: 1.6em; }
  .chargement::after {
    content: ""; position: absolute; left: 0; top: .35em; height: .9em; width: min(70%, 240px);
    border-radius: 6px; background: var(--surface-2); animation: respire 1.2s ease-in-out infinite;
  }
  .tableau-personnes tbody td.chargement::after { left: 0; }

  /* --- Réglages : les lignes d'une carte sur des filets, à la manière des Réglages de l'iPhone. */
  .prefs > .pref, .carte.pile-l > .pile { padding-block: var(--sp-3); }
  #liste-etat { padding: var(--sp-1) var(--sp-4); }

  /* --- Console d'un appel (plus léger) : la barre d'actions au-dessus du geste d'accueil, des coins de 10 px. */
  .barre-actions { padding-bottom: calc(var(--sp-2) + env(safe-area-inset-bottom)); }
  .barre-etat .retour { min-height: 44px; }
  /* L'en-tête de la console en deux rangées au lieu de trois : « ← Memoria » et les outils, puis qui et le chrono. */
  .barre-etat .rangee > .retour { order: 1; }
  .barre-etat .rangee > .outils-entete { order: 2; margin-inline-start: auto; }
  .barre-etat .rangee > .identite { order: 3; flex-basis: 100%; }
  .barre-etat .rangee > .chrono-bloc { order: 4; }

  /* --- Page de la personne (/parler) : même calme, en plus doux — les conseils dans une carte, des appuis visibles. */
  .conseils-parler { background: var(--surface); border-radius: 16px; padding: var(--sp-1) var(--sp-4); gap: 0; }
  .conseils-parler li + li { border-top: 1px solid var(--line); }
  body.page-parler .btn-parler-secondaire { border-color: var(--line-strong); }
  body.page-parler .btn-parler:active { transform: scale(.98); }
  /* « Commencer » reste sous le pouce, même sur un petit iPhone (375 × 667 : il tombait sous le bas de l'écran) ;
     un anneau du fond de page le détache du texte qui défile derrière. */
  body.page-parler #btn-commencer { position: sticky; bottom: calc(var(--sp-3) + env(safe-area-inset-bottom)); z-index: 2; box-shadow: 0 0 0 var(--sp-3) var(--bg); }
}
@keyframes feuille-monte { from { transform: translateY(100%); } to { transform: none; } }
@keyframes voile-apparait { from { opacity: 0; } to { opacity: 1; } }
@keyframes toast-monte { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes respire { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* Titres sur une seule ligne au téléphone (demande d'Alexandre du 26/10/2026) : les libellés sont raccourcis à la
   source ; si un nom reste trop long (prénom, appellation), il se termine par « … » plutôt que de passer à la ligne. */
@media (max-width: 700px) {
  h1, h2, h3, .section-titre h2, .compteur > span:first-child, .alerte-ligne summary > span,
  .tableau tbody th, .carte > h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}
@media (max-width: 700px) {
  /* Onglets de la fiche sur une seule ligne : libellés courts (« Lien », « Accords »), et défilement latéral
     plutôt qu'une seconde rangée si l'écran est vraiment étroit. */
  .fiche-onglets .sommaire ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .fiche-onglets .sommaire ul::-webkit-scrollbar { display: none; }
  .fiche-onglets .sommaire li { flex: 1 0 auto; }
  .fiche-onglets .sommaire a { white-space: nowrap; }
  .fiche-onglets .sommaire a[data-court] { font-size: 0; }
  .fiche-onglets .sommaire a[data-court]::after { content: attr(data-court); font-size: var(--fs-xs); }
  /* Données : une étiquette longue ne recouvre plus la ligne suivante ; le bouton d'effacement tient sur une ligne. */
  .tableau td::before { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #btn-purger { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
}
