/* ── charte.css ── */
/* LA CHARTE KAORDIA — les jetons, repris de Kaordia (projet 1) en lecture seule, le 27/09/2026.
   Source : kaordia/frontend/src/styles/variables.css et src/theme/palette.ts (commit ff7444e).
   ⭐ Seuls les jetons servis ici sont repris ; les alias hérités (« sepia »…) ne le sont pas.
   ⭐ DEUX THÈMES (mission #7.3), en jetons : `html[data-mode="sombre"]` recouvre les couleurs du clair.
      `data-theme` porte le CHOIX (clair · sombre · systeme) ; `data-mode` le RÉSULTAT, posé avant le premier
      rendu par le script de tête des pages (« systeme » suit le réglage de l'ordinateur, en direct).
   ⭐ Les valeurs de la zone de saisie, du fond de page et du bouton d'envoi sont celles de la maquette validée
      par Guillaume le 27/09 à 13 h 28.
   ⭐ (echo #478.2) L'accent vaut le violet de la maquette (#7C3AED), ou la couleur choisie par la personne (posée sur <html>) ; ses
      nuances en DÉRIVENT (color-mix) — elles suivent donc la couleur et le thème.
   ⭐ (everbrain #1020.1) Inter est SERVIE PAR LE PROJET (le module d'administration, /public/polices/, OFL) :
      ⛔ plus aucune police chargée d'un CDN. Absente (un banc sans ce module), la page prend celle de l'appareil. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
             src: url("/public/polices/inter.woff2") format("woff2"); }
/* (echo #478.2) LES TITRES DE LA MAQUETTE : Space Grotesk, SERVIE PAR L'APPLICATION (/static/polices/, OFL, licence à
   côté) — la maquette la chargeait d'un service extérieur par commodité ; ⛔ jamais ici. */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap;
             src: url("/static/polices/space-grotesk.woff2") format("woff2"); }
:root {
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ui: var(--font-body);
  --font-titre: 'Space Grotesk', var(--font-body);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --text-xs: 0.75rem;  --text-sm: 0.875rem;  --text-base: 1rem;  --text-lg: 1.125rem;
  --text-xl: 1.25rem;  --text-2xl: 1.5rem;
  --font-normal: 400;  --font-medium: 500;  --font-semibold: 600;  --font-bold: 700;
  --leading-normal: 1.5;  --leading-relaxed: 1.6;

  /* Neutres du clair (échelle Zinc de Kaordia ; fond de page de la maquette) */
  --bg-primary: #FBFBF9;
  --bg-secondary: #FFFFFF;
  --bg-surface: #F1F1F4;
  --bg-hover: #F4F4F6;
  --bg-volet: #F3F3F1;
  --bg-hover-volet: color-mix(in srgb, #18181B 6%, transparent);
  --text-primary: #18181B;
  --text-secondary: #3F3F46;
  --text-muted: #71717A;
  --text-disabled: #A1A1AA;
  --border-default: #D4D4D8;
  --border-light: #ECECEF;
  --titre: #1e2c52;                 /* les titres : le marine du logo */
  --fond-marque: #1e2c52;           /* les ronds d'initiales, l'icône de l'orchestrateur */
  --voile: rgba(24, 24, 27, .35);

  /* Fonctionnelles */
  --color-success: #3F9C6A;  --color-warning: #C98A1E;  --color-error: #CF4A45;  --color-info: #3B6FE0;

  /* Marque — le logo : marine, vert, gris-bleu */
  --marque-marine: #1e2c52;  --marque-vert: #39a935;  --marque-gris: #5a768c;

  /* Accent — vert Kaordia (palette.ts), ou la couleur de la personne ; les nuances en dérivent */
  --accent: #7C3AED;                /* (echo #478.2) le violet de la maquette ; la couleur choisie le remplace */
  --accent-hover: color-mix(in srgb, var(--accent) 85%, #000);
  --accent-active: color-mix(in srgb, var(--accent) 72%, #000);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--bg-secondary));
  --accent-border: color-mix(in srgb, var(--accent) 45%, var(--bg-secondary));
  --accent-text: #FFFFFF;

  /* ⭐ (echo #623.3) LES DÉCLINAISONS DE L'ACCENT — le violet d'Agil-IA (volet Jarvis, Pixel, sphère, liens et barres du
     sombre), défini UNE fois, ici. Leurs défauts sont les valeurs servies AVANT #623.3, à l'identique : rien n'est
     recalculé tant que la personne n'a pas choisi sa couleur (Réglages › Apparence › Affichage). L'a-t-elle choisie,
     apparence.js les pose sur <html>, calculées depuis elle et ajustées pour garder le contraste du texte.
     ⛔ Aucune autre feuille, aucun script n'écrit ces teintes : ils lisent ces variables (tests/test_couleur_d_accent.py). */
  --accent-vif: #7C3AED;              /* le plein : bulles, boutons, volet à l'écoute */
  --accent-clair: #C9B8FF;            /* textes et liens sur le sombre, yeux du personnage */
  --accent-pale: #A78BFA;             /* barre et anneau, sur le sombre */
  --accent-fond: #1A1438;             /* fond teinté */
  --accent-fond-profond: #150F2E;     /* fond teinté profond */
  --accent-bord: #3A2C7A;             /* bord teinté */
  --accent-ombre: rgba(60, 20, 140, .35);   /* ombre colorée */

  /* La zone de saisie (maquette du 27/09, 13 h 28) — ⛔ aucun vert sur sa bordure */
  --saisie-fond: #FFFFFF;
  --saisie-bordure: #E2E2DC;
  --saisie-bordure-focus: #CFCFC7;
  --envoi-repos: #F0F0EC;
  --envoi-icone: #B3B6BD;

  /* Formes */
  --radius-sm: 4px;  --radius-md: 6px;  --radius-lg: 10px;  --radius-xl: 14px;  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.05);
  --shadow-md: 0 1px 2px rgba(24, 24, 27, .04), 0 4px 12px rgba(24, 24, 27, .06);
  --shadow-lg: 0 2px 8px rgba(24, 24, 27, .05), 0 16px 40px rgba(24, 24, 27, .10);

  --space-1: 0.25rem;  --space-2: 0.5rem;  --space-3: 0.75rem;  --space-4: 1rem;
  --space-5: 1.25rem;  --space-6: 1.5rem;  --space-8: 2rem;  --space-10: 2.5rem;
  --duration-fast: 150ms;  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* ⭐ (echo #478.2) LES RÔLES DE LA MAQUETTE validée le 11/11 (LISEZ-MOI, « Le socle visuel ») — le clair les décline
     avec les mêmes rôles ; le sombre (plus bas) porte les valeurs de la maquette. */
  --surface-avant: color-mix(in srgb, var(--accent) 9%, var(--bg-secondary));   /* la tuile ou l'onglet mis en avant */
  --accent-barre: var(--accent);       /* la barre de progression, l'anneau */
  --lien: color-mix(in srgb, var(--accent) 80%, #000);
  --etat-relie: #1E9E67;               /* en mission · relié */
  --etat-surveiller: #B7791F;          /* à surveiller · attend */
  --etat-rapport: #2F6FD6;             /* un rapport */
  --bulle-anneau: #8B92BC;             /* la bulle d'une action, à faire */
  --bulle-taille: 22px;
  --rayon-tuile: 20px;  --rayon-ligne: 16px;  --rayon-pilule: 9999px;
  --cible: 44px;                       /* une cible se touche du doigt : 44 px au moins */

  /* La bulle de la personne (Kaordia : color-mix de l'encre à 8 %) */
  --bulle-personne: color-mix(in srgb, #18181B 7%, transparent);

  /* La mise en page du chatbot (mission #7.1) */
  --largeur-fil: 720px;
  color-scheme: light;
}

/* ── LE SOMBRE (mission #7.3) : les mêmes jetons, d'autres valeurs — (echo #478.2) celles de la maquette du 11/11. ──────────────────────────────────────────────────────────── */
html[data-mode="sombre"] {
  /* ⭐ (echo #478.2) LES VALEURS DE LA MAQUETTE validée par Guillaume le 11/11 (« les couleurs, c'est top ») */
  --bg-primary: #0B0D17;            /* fond de page */
  --bg-secondary: #121526;          /* surface : tuile, ligne */
  --bg-surface: #171A2E;
  --bg-hover: #1A1E33;
  --bg-volet: #0B0D17;
  --bg-hover-volet: color-mix(in srgb, #FFFFFF 6%, transparent);
  --text-primary: #ECEEF6;
  --text-secondary: #B9BEDA;
  --text-muted: #8E94AD;            /* texte secondaire de la maquette */
  --text-disabled: #5E6482;         /* discret */
  --border-default: #262B47;        /* bordure de champ */
  --border-light: #1B1F33;          /* filet */
  --titre: #ECEEF6;
  --fond-marque: #23284A;
  --voile: rgba(3, 4, 10, .6);
  --surface-avant: var(--accent-fond);
  --accent-barre: var(--accent-pale);
  --lien: var(--accent-clair);
  --etat-relie: #3DDC97;  --etat-surveiller: #F5B84A;  --etat-rapport: #6FA8FF;
  --bulle-anneau: #5B6396;
  --accent-active: color-mix(in srgb, var(--accent) 55%, #FFF);
  --accent-soft: color-mix(in srgb, var(--accent) 22%, var(--bg-primary));
  --accent-border: color-mix(in srgb, var(--accent) 55%, var(--bg-secondary));
  --saisie-fond: #121526;
  --saisie-bordure: #262B47;
  --saisie-bordure-focus: #3A4170;
  --envoi-repos: #1A1E33;
  --envoi-icone: #5E6482;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 14px rgba(0, 0, 0, .3);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .5);
  --bulle-personne: color-mix(in srgb, #FFFFFF 7%, transparent);
  color-scheme: dark;
}

/* ── La densité et la taille du texte (Kaordia : Confortable · Compact ; Petit · Moyen · Grand) ─────── */
html[data-taille="petit"] { font-size: 93.75%; }
html[data-taille="grand"] { font-size: 109.375%; }
html[data-densite="compacte"] {
  --space-2: 0.375rem;  --space-3: 0.5rem;  --space-4: 0.75rem;  --space-5: 1rem;
  --space-6: 1.125rem;  --space-8: 1.5rem;  --space-10: 2rem;
}

/* ── LA LIGNE SURVOLÉE OU CHOISIE (echo #182.2) — UNE définition, appelée par toutes les listes (classe `ligne-elevable`).
   Guillaume, 03/11 : « légèrement surélevé, avec une légère ombre […] plutôt qu'un contour ». Au survol ou choisie, la
   ligne prend un fond un peu plus clair que la page et une ombre douce ; AUCUNE bordure ni contour de couleur (remplace
   l'encadré vert de #104.4). Le clavier garde un contour, NEUTRE, et seulement au clavier (:focus-visible).
   ⛔ modules/cronos/ecran/garde_couleurs.py rougit sur une bordure ou un contour de couleur posé au survol d'une ligne. */
:root {
  --ligne-elevee-fond: var(--bg-secondary);
  --ligne-elevee-ombre: var(--shadow-md);
  --ligne-contour-clavier: var(--text-muted);
}
.ligne-elevable { transition: background-color var(--duration-fast) var(--ease-in-out), box-shadow var(--duration-fast) var(--ease-in-out); }
.ligne-elevable:hover, .ligne-elevable.choisi, .ligne-elevable[aria-selected="true"] {
  background: var(--ligne-elevee-fond); box-shadow: var(--ligne-elevee-ombre); }
.ligne-elevable:focus { outline: none; }
.ligne-elevable:focus-visible { outline: 2px solid var(--ligne-contour-clavier); outline-offset: 1px; }

/* ── socle.css ── */
/* LES ÉCRANS DE kv2 — l'ergonomie d'un assistant moderne (mission #7.1, maquette validée par Guillaume le 27/09),
   aux couleurs de Kaordia. ⛔ Aucune marque, aucun logo, aucun élément graphique d'un tiers. Jetons : charte.css. */
* { box-sizing: border-box; }
/* ⛔ Sans cette ligne, « display: flex » l'emporte sur l'attribut hidden : une vue cachée prend
   quand même la moitié de l'écran (vu au banc d'écran du 27/09). */
[hidden] { display: none !important; }
/* (echo #661) LES BARRES DE DÉFILEMENT — définies ICI, une seule fois, pour tout ce qui défile (pages, colonnes, listes, tableaux, code, modales) :
   fines (8 px), piste transparente, curseur arrondi à l'accent atténué, plus vif au survol et au glisser, flèches à l'accent.
   ⛔ Aucune feuille ne pose « scrollbar-width » / « scrollbar-color » : Chromium ignore alors ::-webkit-scrollbar. Firefox passe par @supports. */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent) 45%, transparent); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { background: var(--accent); }
::-webkit-scrollbar-button { color: var(--accent); }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--accent) 55%, transparent) transparent; }
}
html, body { margin: 0; height: 100%; }
body { font-family: var(--font-body); font-size: var(--text-base); color: var(--text-primary);
       background: var(--bg-primary); line-height: var(--leading-normal); }
:where(button, input, textarea, kv-selecteur) { font: inherit; color: inherit; }   /* (echo #610.3) sans poids : le champ du socle (espace.css) garde sa couleur */

.bouton { border: 1px solid var(--border-default); background: var(--bg-secondary); border-radius: var(--radius-md);
          padding: var(--space-2) var(--space-4); cursor: pointer; font-weight: var(--font-medium);
          transition: background var(--duration-fast); }
.bouton:hover:not(:disabled) { background: var(--bg-hover); }
.bouton:disabled { opacity: .45; cursor: not-allowed; }
.bouton-principal { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.bouton-principal:hover:not(:disabled) { background: var(--accent-hover); }
/* (#59.1) le geste qu'on ne défait pas : en rouge (la barre de sélection de l'Historique ; la modale a le sien) */
.bouton-danger { background: var(--color-error); border-color: var(--color-error); color: #fff; }
.bouton-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--color-error) 85%, #000); }
.refus { color: var(--color-error); background: color-mix(in srgb, var(--color-error) 8%, transparent);
         border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); margin: 0; font-size: var(--text-sm); }
.bouton-icone { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; background: none;
                border-radius: var(--radius-md); cursor: pointer; color: var(--text-secondary); }
.bouton-icone:hover { background: var(--bg-hover); }
svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6;
      stroke-linecap: round; stroke-linejoin: round; }

/* ── Connexion ─────────────────────────────────────────────────────────── */
.page-connexion { display: grid; place-items: center; }
.carte-connexion { width: min(380px, 92vw); background: var(--bg-secondary); border: 1px solid var(--border-light);
                   border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: var(--space-8); }
.connexion-marque { display: block; width: 220px; margin: 0 auto; }
.connexion-sous-titre { text-align: center; color: var(--text-muted); font-size: var(--text-sm); margin: 0 0 var(--space-6); }
.carte-connexion form { display: grid; gap: var(--space-4); }
.carte-connexion label { display: grid; gap: var(--space-1); font-size: var(--text-sm); color: var(--text-secondary); }
.carte-connexion input { border: 1px solid var(--border-default); border-radius: var(--radius-md);
                         padding: var(--space-2) var(--space-3); background: var(--bg-secondary); }
.carte-connexion input:focus { outline: 2px solid var(--accent-border); outline-offset: 0; }

/* ── La coquille : le volet sobre + le principal ───────────────────────── */
.marque-sombre, html[data-mode="sombre"] .marque-clair { display: none; }
html[data-mode="sombre"] .marque-sombre { display: block; }
.initiales { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: var(--radius-full);
             background: var(--fond-marque); color: #fff; font-size: 11px; font-weight: var(--font-semibold); letter-spacing: .03em; }
.prenom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--font-medium); }

.vue { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* (echo #498.2) ouverte à l'adresse d'un autre écran : la conversation ne se peint pas avant le choix de la section (socle.html) */
html[data-vue-depart] #vue-chat { display: none; }
/* (echo #498.5) « / » : la conversation à rouvrir n'est pas encore connue (socle.html, socle.js) — rien ne se peint à sa
   place, ni son nom dans la barre : le premier affichage est l'accueil ou la dernière conversation, jamais la conversation
   vide. `visibility` et non `display` : la conversation se met en page cachée (son défilement va en bas). Même chose pour
   le nom de l'écran tant que la section demandée par l'adresse n'est pas choisie (« Accueil » se lisait avant « Équipe »). */
html[data-chat-en-lecture] #vue-chat, html[data-chat-en-lecture] #vue-chat * { visibility: hidden !important; }
/* ⭐ (echo #552.2) L'ARRIVÉE SUR « / » EN UNE SEULE IMAGE : la marque retient aussi la BARRE — mesuré en service le 12/11
   (Réglages → application, scripts/mesurer-les-passages-des-reglages.mjs ④) : la barre se peignait seule ~250 ms avant
   la conversation, deux images. Rien du corps ne se peint tant que le premier écran n'est pas dessiné (socle.js, fin de
   l'entrée : la dernière conversation rendue, ou l'accueil et ses tuiles posés) ; d'ici là, le navigateur garde l'écran
   d'avant. La règle de #526 (« un écran ne se montre qu'une fois dessiné »), à l'entrée : ni voile, ni délai. */
html[data-chat-en-lecture] body, html[data-chat-en-lecture] body * { visibility: hidden !important; }
html[data-chat-en-lecture] #titre-mobile, html[data-vue-depart] #titre-mobile { visibility: hidden; }

/* ── La conversation : centrée, étroite, aérée ─────────────────────────── */
.fil-defilement { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.fil { width: 100%; max-width: var(--largeur-fil); margin: 0 auto; padding: var(--space-8) var(--space-5) var(--space-6);
       display: flex; flex-direction: column; gap: var(--space-6); }
/* (echo #478.3) l'accueil a sa feuille : accueil.css */

/* (echo #623.2) le message envoyé : la couleur d'accent PLEINE, texte blanc — dans le volet comme sur l'écran Conversation */
.message-personne { align-self: flex-end; max-width: 85%; background: var(--accent); color: var(--accent-text); border-radius: var(--radius-xl);
                    padding: var(--space-2) var(--space-4); white-space: pre-wrap; overflow-wrap: anywhere; line-height: var(--leading-relaxed); }
.reponse { line-height: var(--leading-relaxed); overflow-wrap: anywhere; outline: none; }
.reponse-agent { display: flex; align-items: center; gap: 6px; font-size: var(--text-xs); color: var(--text-muted);
                 font-weight: var(--font-medium); margin-bottom: var(--space-1); }
.reponse-agent::before { content: ""; width: 7px; height: 7px; border-radius: var(--radius-full); background: var(--accent); }
.reponse-texte p { margin: 0 0 var(--space-3); }
.reponse-texte ul { margin: 0 0 var(--space-3); padding-left: var(--space-5); }
.reponse-texte > :last-child { margin-bottom: 0; }
.reponse-texte code { font-family: var(--font-mono); font-size: .88em; background: var(--bg-surface); padding: .1em .3em; border-radius: var(--radius-sm); }
.reponse-texte pre { background: var(--bg-surface); padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg); overflow-x: auto; margin: 0 0 var(--space-3); }
.reponse-texte pre code { background: none; padding: 0; }
/* ⭐ Les détails techniques n'apparaissent qu'au SURVOL (ou au focus : clavier, toucher).
   ⛔ Les montrer en permanence fait rougir le banc d'écran — c'est son sabotage (./banc-ecran.sh). */
.reponse-details { margin-top: var(--space-2); font-size: var(--text-xs); color: var(--text-muted);
                   font-variant-numeric: tabular-nums; opacity: 0; visibility: hidden;
                   transition: opacity var(--duration-fast), visibility var(--duration-fast); }
.reponse:hover .reponse-details, .reponse:focus .reponse-details { opacity: 1; visibility: visible; }
.attente { display: inline-flex; gap: 5px; align-items: center; color: var(--text-muted); font-size: var(--text-sm); }
.attente i { width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--accent); animation: pouls 1.2s infinite ease-in-out; }
.attente i:nth-child(2) { animation-delay: .15s; }
.attente i:nth-child(3) { animation-delay: .3s; }
.attente-texte { margin-left: 4px; }
@keyframes pouls { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }

/* ── La zone de saisie ÉPURÉE — la maquette validée par Guillaume (27/09, 13 h 28) fait foi ─────────
   zone : coins 18 px, padding 10 px (16 à gauche), bordure 1 px NEUTRE — ⛔ aucun vert sur la bordure, jamais,
   même au focus (le banc d'écran le mesure, dans les deux thèmes ; son sabotage la remet verte) ;
   champ : une ligne, 15 px, grandit jusqu'à 120 px puis défile ; envoi 32×32, rayon 10, neutre au repos,
   à la couleur de la charte seulement quand il y a du texte ; dessous, à 8 px, en 13 px gris : joindre et
   dicter à gauche, l'agent en texte simple à droite. Plus de ligne d'aide : l'infobulle suffit. */
.saisie-zone { flex: none; width: 100%; max-width: var(--largeur-fil); margin: 0 auto; padding: 0 var(--space-5) var(--space-4); }
.saisie { display: flex; align-items: flex-end; gap: 8px; background: var(--saisie-fond); border: 1px solid var(--saisie-bordure);
          border-radius: 18px; padding: 10px 10px 10px 16px; transition: border-color var(--duration-fast); }
.saisie:focus-within { border-color: var(--saisie-bordure-focus); }
.saisie textarea { flex: 1; min-width: 0; display: block; resize: none; border: 0; outline: none; background: none; padding: 5px 0;
                   font-size: 15px; line-height: 22px; min-height: 32px; max-height: 120px; overflow-y: auto; color: var(--text-primary); }
.saisie textarea::placeholder { color: var(--text-muted); }
.envoi { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border: 0; border-radius: 10px;
         background: var(--envoi-repos); color: var(--envoi-icone); cursor: default;
         transition: background var(--duration-fast), color var(--duration-fast); }
.envoi svg { width: 16px; height: 16px; stroke-width: 2.2; }
.envoi.pret { background: var(--accent); color: var(--accent-text); cursor: pointer; }
.envoi.pret:hover { background: var(--accent-hover); }
/* (echo #134.2) pendant une réponse, le même bouton arrête : plein, à la couleur du texte */
.envoi.stop { background: var(--text-primary); color: var(--bg-primary); cursor: pointer; }
.envoi.stop:disabled { opacity: .5; cursor: default; }
.saisie-sous { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
               margin-top: 8px; padding: 0 4px 0 6px; font-size: 13px; color: var(--text-muted); }
.saisie-outils { display: flex; gap: 2px; }
.outil { display: grid; place-items: center; width: 28px; height: 28px; border: 0; background: none; border-radius: var(--radius-md);
         color: var(--text-muted); cursor: default; }
.outil svg { width: 17px; height: 17px; }
.outil:hover { background: var(--bg-hover-volet); }
/* (echo #147.2) La dictée : le micro qui écoute se voit — la couleur de la charte, et un léger battement. */
.outil:not([aria-disabled]) { cursor: pointer; }
.outil.ecoute { color: var(--accent, currentColor); background: var(--bg-hover-volet); animation: ecoute 1.4s ease-in-out infinite; }
@keyframes ecoute { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .outil.ecoute { animation: none; } }
/* (echo #165) LE TÉMOIN DE LA VEILLE « HÉ ÉCHO » : un point discret au coin des trois traits — plein, elle écoute ;
   creux, elle attend un clic dans la page ; rouge, le micro lui est refusé. */
#converser { position: relative; }
#converser[class*="veille-"]::after { content: ""; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px;
  border-radius: 50%; box-sizing: border-box; }
#converser.veille-ecoute::after { background: var(--accent, currentColor); opacity: .7; }
#converser.veille-chargement::after, #converser.veille-attente::after { border: 1px solid currentColor; opacity: .5; }
#converser.veille-erreur::after { background: #c0392b; }
#converser.ecoute::after { display: none; }
/* (echo #410.2) LE SIGNE DU RÉVEIL : le mot entendu, les trois traits s'allument aussitôt (anneau de la charte, un
   battement), avant la seconde écoute et la réponse ; écarté, ils s'éteignent. */
#converser.reveil-entendu { color: var(--accent, currentColor); background: var(--bg-hover-volet);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, currentColor) 35%, transparent); animation: ecoute .9s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { #converser.reveil-entendu { animation: none; } }
/* (echo #147.5) LE MODE CONVERSATION : l'écran partagé — la sphère à gauche, le fil et la saisie à droite ;
   au téléphone, la sphère au-dessus. */
.vue-chat.mode-voix { display: grid; grid-template-columns: minmax(260px, 42%) 1fr; grid-template-rows: 1fr auto; }
.mode-voix > .voix-panneau { grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: center; justify-content: center;
                             gap: var(--space-3); padding: var(--space-5); min-height: 0; border-right: 1px solid var(--border-light); }
.mode-voix > .fil-defilement { grid-column: 2; }
.mode-voix > .saisie-zone { grid-column: 2; }
.voix-sphere { width: 100%; flex: 1; min-height: 220px; max-height: 520px; }
.voix-etat { margin: 0; color: var(--text-muted); font-size: var(--text-sm); text-align: center; }
.voix-enonce { margin: 0; min-height: 1.4em; max-width: 36ch; text-align: center; color: var(--titre); }
/* (echo #771) la ligne discrète tant qu'il parle : « Dis « Pixel » ou touche-moi pour m'arrêter » ; la sphère se touche */
.voix-arreter { margin: 0; color: var(--text-muted); font-size: var(--text-xs, 12px); text-align: center; }
.voix-arreter[hidden] { display: none; }
.mode-voix .voix-sphere, .jp-voix .voix-sphere { cursor: pointer; }
/* (echo #389.2) les gestes de la conversation vocale : « Couper » pendant la réponse, « Relancer l'écoute » si elle est perdue */
.voix-gestes { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; }
.voix-gestes > [hidden] { display: none; }
@media (max-width: 760px) {
  .vue-chat.mode-voix { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .mode-voix > .voix-panneau { grid-row: 1; border-right: 0; padding: var(--space-3); gap: var(--space-2); }
  .mode-voix > .fil-defilement, .mode-voix > .saisie-zone { grid-column: 1; }
  .voix-sphere { min-height: 160px; max-height: 30vh; }
}
/* ③ (echo #212.2) le témoin d'après une phrase d'arrêt : le micro est coupé, plus rien n'est transcrit. */
.voix-micro-coupe { margin: var(--space-2) auto 0; padding: var(--space-1) var(--space-3); border-radius: 999px;
                    background: var(--surface-2, rgba(127,127,127,.12)); color: var(--text-muted); font-size: var(--text-sm); }
.voix-arret { margin-top: var(--space-4); }
.arret-liste textarea { width: 100%; font: inherit; resize: vertical; }
.arret-gestes { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-2); }
/* ⭐ (echo #461.4) LES RÉGLAGES DE LA CONVERSATION : un bouton sous la zone, à droite ; son menu s'ouvre au-dessus,
   assez large pour que rien ne se tronque (volet ouvert compris) ; les sélecteurs y sont des champs pleins. */
.saisie-reglages { position: relative; flex: none; }
.outil.ouvert { background: var(--bg-hover-volet); color: var(--text-primary); }
.reglages-menu { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 30; width: min(320px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-3) var(--space-4) var(--space-4);
  background: var(--bg-primary); border: 1px solid var(--border-default); border-radius: var(--radius-lg, 12px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .14); color: var(--text-primary); font-size: var(--text-sm); }
.reglages-menu[hidden], .reglages-menu [hidden] { display: none; }
.reglages-titre { margin: 0; font-size: var(--text-xs); font-weight: var(--font-semibold); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em; }
.reglages-ligne { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.reglages-ligne kv-selecteur { width: 100%; max-width: none; }
.reglages-nom { font-weight: var(--font-medium, 500); }
.reglages-aide { color: var(--text-muted); font-size: var(--text-xs); }
.reglages-bascule { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-2); }
.reglages-actions { display: flex; flex-direction: column; gap: 2px; padding-top: var(--space-3); border-top: 1px solid var(--border-light, var(--border-default)); }
.reglages-actions .reglages-titre { margin-bottom: var(--space-1); }
.reglage-action, .reglages-action { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%;
  border: 0; background: none; padding: 6px 8px; margin: 0 -8px; border-radius: var(--radius-md); font: inherit;
  color: var(--text-primary); text-align: left; text-decoration: none; cursor: pointer; }
.reglages-action:hover, .reglages-action:focus-visible { background: var(--bg-hover-volet); }
.reglages-action small { color: var(--text-muted); font-size: var(--text-xs); }
.outil-texte { border: 0; background: none; padding: 2px 6px; border-radius: var(--radius-md); font: inherit; font-size: 13px;
  color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.outil-texte:hover { background: var(--bg-hover-volet); color: var(--text-primary); }
.outil-texte[aria-pressed="true"] b { color: var(--accent, currentColor); }
.journal-eveils { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: var(--space-2); }
.journal-eveils th, .journal-eveils td { text-align: left; padding: 3px 8px 3px 0; border-bottom: 1px solid var(--border-default); }
.journal-eveils td.score { font-variant-numeric: tabular-nums; }

/* ── Les paramètres : une tuile par brique (l'esprit des tuiles d'agents de Kaordia) ── */
.vue-parametres, .vue-taches { overflow-y: auto; overflow-x: hidden; }
.parametres { width: 100%; max-width: 1040px; margin: 0 auto; padding: var(--space-8) var(--space-6); }
.parametres h1 { font-size: var(--text-2xl); font-weight: var(--font-semibold); color: var(--titre); margin: 0 0 var(--space-1); letter-spacing: -.01em; }
.parametres h2 { font-size: var(--text-xs); font-weight: var(--font-semibold); color: var(--text-muted);
                 text-transform: uppercase; letter-spacing: .05em; margin: var(--space-8) 0 var(--space-3); }
.parametres .sous { color: var(--text-muted); margin: 0; font-size: var(--text-sm); overflow-wrap: anywhere; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-3); }
.tuile { display: flex; flex-direction: column; gap: var(--space-3); text-align: left; background: var(--bg-secondary);
         border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: var(--space-4); cursor: pointer;
         box-shadow: var(--shadow-sm); transition: border-color var(--duration-fast), box-shadow var(--duration-fast); min-width: 0; }
.tuile:hover, .tuile:focus-visible { border-color: var(--accent-border); box-shadow: var(--shadow-md); outline: none; }
.tuile-tete { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.tuile-icone { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: var(--radius-lg);
               background: var(--accent-soft); color: var(--accent-active); font-weight: var(--font-semibold); }
.tuile-orchestrateur .tuile-icone { background: var(--fond-marque); color: #fff; }
.tuile-nom { flex: 1; min-width: 0; }
.tuile-nom b { display: block; font-size: var(--text-sm); font-weight: var(--font-semibold); }
.tuile-nom small { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
                   white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statut-actif { font-size: var(--text-xs); font-weight: var(--font-medium); color: var(--color-success); white-space: nowrap; }
.tuile-desc { font-size: var(--text-sm); color: var(--text-secondary); margin: 0; display: -webkit-box; -webkit-line-clamp: 2;
              line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tuile-badges { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.badge { font-size: 11px; padding: 1px var(--space-2); border-radius: var(--radius-full); background: var(--bg-surface);
         color: var(--text-secondary); white-space: nowrap; }
.badge-role { background: var(--accent-soft); color: var(--accent-active); font-weight: var(--font-medium); }
.badge-modele { font-family: var(--font-mono); border-radius: var(--radius-sm); }
.tuile-chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2);
                  border-top: 1px solid var(--border-light); padding-top: var(--space-3); }
.chiffre b { display: block; font-size: var(--text-base); font-weight: var(--font-semibold); font-variant-numeric: tabular-nums; }
.chiffre span { font-size: 11px; color: var(--text-muted); }
.refus-montage { display: grid; gap: var(--space-2); }

/* ── Les sections des Paramètres (mission #7.2) : une section à la fois. ⭐ (mission #30.1) Plus de second volet :
      des onglets en haut de page, le contenu en pleine largeur. ── */
.parametres-coquille { display: flex; flex-direction: column; gap: var(--space-6); width: 100%; max-width: 1180px;
                       margin: 0 auto; padding: var(--space-6) var(--space-6) var(--space-8); }
.parametres-coquille .parametres { flex: 1; min-width: 0; max-width: none; margin: 0; padding: 0; }
.parametres-nav { display: flex; flex-wrap: wrap; gap: var(--space-1); border-bottom: 1px solid var(--border-light); }
.parametres-nav a { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3);
                    margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: var(--text-sm);
                    color: var(--text-secondary); text-decoration: none; white-space: nowrap; }
.parametres-nav a:hover { color: var(--text-primary); }
.parametres-nav a.actif { border-bottom-color: var(--accent); color: var(--text-primary); font-weight: var(--font-medium); }
.bientot { font-size: 10px; color: var(--text-muted); border: 1px solid var(--border-light); border-radius: var(--radius-full);
           padding: 0 6px; font-weight: var(--font-normal); }
.section-parametres h1 { margin-top: 0; }
.section-parametres > .sous { margin-bottom: var(--space-5); }
.retour { display: inline-block; font-size: var(--text-sm); color: var(--text-secondary); text-decoration: none;
          margin-bottom: var(--space-4); }
.retour:hover { color: var(--accent-active); }
.agent-tete { display: flex; align-items: center; gap: var(--space-3); }
.agent-tete h1 { margin: 0; font-size: var(--text-xl); }
.agent-tete .tuile-nom small { white-space: normal; }
.agent-desc { color: var(--text-secondary); font-size: var(--text-sm); margin: var(--space-3) 0 var(--space-5); }
.section-parametres .onglets { padding: 0; }
.section-parametres .onglet-contenu { padding: var(--space-5) 0; }
.a-venir { display: flex; gap: var(--space-3); align-items: flex-start; background: var(--bg-secondary);
           border: 1px dashed var(--border-default); border-radius: var(--radius-lg); padding: var(--space-5); }
.a-venir p { margin: 0; color: var(--text-secondary); font-size: var(--text-sm); }

/* Utilisateurs */
.invitation { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; background: var(--bg-secondary);
              border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: var(--space-4);
              margin: var(--space-5) 0 var(--space-3); box-shadow: var(--shadow-sm); }
.invitation label { display: grid; gap: var(--space-1); font-size: var(--text-xs); color: var(--text-muted); }
.invitation label:first-child { flex: 1 1 240px; }
.invitation input { min-width: 0; }   /* (echo #610.3) son dessin : le champ du socle (espace.css) */
.invitation kv-selecteur { min-width: 170px; }
.lien-transmis { background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: var(--radius-lg);
                 padding: var(--space-3) var(--space-4); margin-bottom: var(--space-3); font-size: var(--text-sm); }
.lien-transmis p { margin: 0 0 var(--space-2); }
.lien-ligne { display: flex; gap: var(--space-2); }
.lien-ligne input { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: var(--text-xs); border: 1px solid var(--border-default);
                    border-radius: var(--radius-md); padding: 6px var(--space-2); background: var(--bg-secondary); }
/* ⛔ (echo #191.2) Plus de règle `.compte` : celle des anciennes lignes de comptes (une grille à 28 px en tête, sans
   écran depuis #974.1) tombait sur la page de Mon compte (`.parametres.compte`) et serrait son titre dans 28 px — le
   titre et sa phrase se chevauchaient. Les comptes vivent dans /admin › Utilisateurs. */
.statut-compte { font-size: var(--text-xs); font-weight: var(--font-medium); }
.statut-ouvert { color: var(--color-success); }
.statut-invite { color: var(--color-warning); }
.statut-expire { color: var(--color-error); }
.statut-secours { color: var(--text-muted); }

.onglets { display: flex; gap: var(--space-1); padding: 0 var(--space-6); border-bottom: 1px solid var(--border-light); overflow-x: auto; flex: none; }
.onglet { border: 0; background: none; cursor: pointer; padding: var(--space-2) var(--space-3); font-size: var(--text-sm);
          color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.onglet.actif { color: var(--accent-active); border-bottom-color: var(--accent); font-weight: var(--font-medium); }
.onglet-contenu { padding: var(--space-5) var(--space-6); overflow-y: auto; font-size: var(--text-sm); }
.onglet-contenu pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: var(--text-xs);
                      background: var(--bg-primary); border: 1px solid var(--border-light); padding: var(--space-4);
                      border-radius: var(--radius-lg); margin: 0; }
.onglet-contenu dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-4); margin: 0; }
.onglet-contenu dt { color: var(--text-muted); }
.onglet-contenu dd { margin: 0; overflow-wrap: anywhere; }
.travaux-tableau { overflow-x: auto; }
table.travaux { width: 100%; border-collapse: collapse; font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
table.travaux th, table.travaux td { text-align: left; padding: 6px var(--space-2); border-bottom: 1px solid var(--border-light); white-space: nowrap; }
table.travaux th { color: var(--text-muted); font-weight: var(--font-medium); }
.statut-refuse { color: var(--color-error); }
.statut-fait { color: var(--color-success); }
.vide { color: var(--text-muted); margin: 0; }


/* ── Personnalisation (mission #7.3) : l'apparence de CHACUN, et le nom affiché de l'organisation ──── */
.reglage { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-4); align-items: start;
           padding: var(--space-5) 0; border-top: 1px solid var(--border-light); }
.reglage:first-of-type { border-top: 0; }
.reglage-nom b { display: block; font-size: var(--text-sm); font-weight: var(--font-semibold); }
.reglage-nom small { display: block; font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }
.segments { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: var(--radius-lg);
            background: var(--bg-surface); border: 1px solid var(--border-light); }
.segments button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer;
                   padding: 5px var(--space-3); border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--text-secondary); }
.segments button svg { width: 15px; height: 15px; }
.segments button[aria-pressed="true"] { background: var(--bg-secondary); color: var(--text-primary); font-weight: var(--font-medium);
                                        box-shadow: var(--shadow-sm); }
/* (echo #191.2) la page Voix : une carte par voix du relais — la choisie s'élève (`ligne-elevable`, #182.2), sans encadré */
.voix-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-3);
               margin: var(--space-5) 0 var(--space-2); }
.voix-carte { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); cursor: pointer;
              padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg); background: var(--bg-surface); }
.voix-carte-nom { min-width: 0; display: grid; }
.voix-carte-nom b { font-size: var(--text-sm); font-weight: var(--font-semibold); }
.voix-carte.choisi .voix-carte-nom b { color: var(--titre); }
.voix-carte-nom small { font-size: var(--text-xs); color: var(--text-muted); }
.voix-jouer { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 0; cursor: pointer;
              border-radius: var(--radius-full); background: var(--bg-primary); color: var(--text-secondary); box-shadow: var(--shadow-sm); }
.voix-jouer:hover { color: var(--text-primary); }
.voix-jouer svg { width: 14px; height: 14px; fill: currentColor; }
.voix-vitesse { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
.voix-vitesse output { font-variant-numeric: tabular-nums; min-width: 3.5em; }
.teintes { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.teinte { width: 28px; height: 28px; border-radius: var(--radius-full); border: 2px solid var(--bg-primary); cursor: pointer;
          box-shadow: 0 0 0 1px var(--border-default); display: grid; place-items: center; color: #fff; }
.teinte[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text-primary); }
.teinte svg { width: 14px; height: 14px; stroke-width: 2.4; }
.teinte-libre { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--text-muted);
                margin-left: var(--space-2); }
.teinte-libre input { width: 32px; height: 28px; padding: 0; border: 1px solid var(--border-default); border-radius: var(--radius-md);
                      background: none; cursor: pointer; }
.champ-nom { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.champ-nom input { flex: 1 1 200px; min-width: 0; }   /* (echo #610.3) son dessin : le champ du socle (espace.css) */
.enregistre { font-size: var(--text-xs); color: var(--color-success); margin-left: var(--space-2); }
.bientot-ligne { font-size: var(--text-sm); color: var(--text-muted); }

/* ── La consommation d'un agent (mission #7.3) — dans l'esprit de la page Consommation de Kaordia ────── */
.conso-tete { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }
.conso-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-5); }
.conso-chiffre { background: var(--bg-secondary); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); }
.conso-chiffre b { display: block; font-size: var(--text-lg); font-weight: var(--font-semibold); font-variant-numeric: tabular-nums; }
.conso-chiffre span { font-size: var(--text-xs); color: var(--text-muted); }
.conso-bloc { margin-bottom: var(--space-5); }
.conso-bloc h3 { font-size: var(--text-sm); font-weight: var(--font-semibold); margin: 0 0 var(--space-2); }
/* L'histogramme « jetons par jour » : une seule série, pas de légende (le titre la nomme) ; barres fines ancrées
   sur la ligne de base, coin haut arrondi 4 px, 2 px entre elles ; une infobulle par barre ; le pic est ÉCRIT
   (l'accent clair fait 2,96:1 sur le fond — sous 3:1, le guide de visualisation exige des valeurs visibles),
   et l'historique ci-dessous en est la vue en tableau. */
.histogramme-cadre { width: 100%; }
.histogramme { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 120px;
               border-bottom: 1px solid var(--border-default); padding-top: 18px; }
.barre { position: relative; flex: 1 1 0; min-width: 3px; height: 100%; display: flex; align-items: flex-end; cursor: default; }
.barre i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.barre.vide i { background: var(--border-light); }
.barre:hover i, .barre:focus-visible i { background: var(--accent-hover); }
.barre em { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11px;
            color: var(--text-secondary); white-space: nowrap; margin-bottom: 2px; }
.barre .bulle-info { display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 5;
                     background: var(--text-primary); color: var(--bg-primary); font-size: 11px; padding: 4px 8px; border-radius: var(--radius-md);
                     white-space: nowrap; box-shadow: var(--shadow-md); }
.barre:hover .bulle-info, .barre:focus-visible .bulle-info { display: block; }
.axe-jours { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ── La section MCP (mission #7.5) ─────────────────────────────────────────────── */
.mcp-carte { background: var(--bg-secondary); border: 1px solid var(--border-light); border-radius: var(--radius-lg);
             padding: var(--space-4) var(--space-5); margin: var(--space-4) 0; display: grid; gap: var(--space-3); }
.mcp-ligne { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.mcp-adresse { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-secondary); overflow-wrap: anywhere; }
.mcp-etat { font-size: var(--text-sm); font-weight: var(--font-medium); }
.mcp-etat.connecte { color: var(--color-success); }
.mcp-etat.non { color: var(--color-warning); }
.mcp-outils { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.mcp-outils li { background: var(--bg-secondary); border: 1px solid var(--border-light); border-radius: var(--radius-lg);
                 padding: var(--space-3) var(--space-4); }
.mcp-outils b { font-size: var(--text-sm); }
.mcp-outils code { font-family: var(--font-mono); font-size: var(--text-xs); background: var(--bg-surface); padding: 1px 6px;
                   border-radius: var(--radius-sm); margin: 2px 4px 0 0; display: inline-block; }
a.bouton { text-decoration: none; display: inline-block; }

/* ── Le téléphone : le volet se replie derrière un bouton ──────────────── */
@media (max-width: 760px) {
  .fil { padding: var(--space-5) var(--space-4); }
  .saisie-zone { padding: 0 var(--space-3) var(--space-3); }
  .parametres-coquille { gap: var(--space-4); padding: var(--space-4); }
  .parametres-nav { gap: 0; }
  .parametres-nav a { padding: var(--space-2) 10px; }
  .tuiles { grid-template-columns: 1fr; }
  .reglage { grid-template-columns: 1fr; gap: var(--space-2); }
}
.mcp-carte + .mcp-carte { margin-top: var(--space-3); }
.mcp-branches-titre { margin: var(--space-1) 0 0; font-size: var(--text-xs); color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .04em; }


/* (#974.1) Les Paramètres montés dans /admin (`?cadre=admin`) : la section seule, la coquille de /admin fait le reste. */
.cadre-admin .barre-haut, .cadre-admin .ecrans, .cadre-admin .parametres-nav { display: none !important; }

/* ── La marque blanche (everbrain #1020.1) : le logo de l'application (echo #478.2 : dans la barre du haut, barre.css),
   l'avatar de la personne ── */
.initiales.avec-avatar { background: none; overflow: hidden; font-size: 0; }
.initiales img { width: 100%; height: 100%; object-fit: cover; display: block; }
.initiales-grandes { width: 72px; height: 72px; font-size: var(--text-xl); }
.profil-avatar { display: flex; gap: var(--space-4); align-items: center; }
.profil-gestes { display: grid; gap: var(--space-1); min-width: 0; }
.profil-gestes small { color: var(--text-muted); font-size: var(--text-xs); }
.profil-boutons { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-2); }
.profil-boutons label.bouton { cursor: pointer; }
.connexion-marque { max-height: 64px; max-width: 240px; object-fit: contain; }

/* ── (everbrain #1143.1) Le serveur MCP du projet : ses verbes, leur interrupteur, leurs accès ─────────────────── */
.mcp-titre { font-size: var(--text-md, 15px); margin: var(--space-5) 0 var(--space-2); }
.mcp-verbes { margin-top: var(--space-2); }
.mcp-verbe .mcp-description { margin: var(--space-1) 0; }
.mcp-acces-ligne { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: center;
  font-size: var(--text-xs); color: var(--text-secondary); }
.mcp-acces { display: inline-flex; align-items: center; gap: var(--space-1); }
.interrupteur { all: unset; box-sizing: border-box; cursor: pointer; width: 36px; height: 20px; border-radius: 999px; flex: none;
  background: var(--border-default); position: relative; transition: background .15s var(--ease-in-out); }
.interrupteur span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg-primary); box-shadow: var(--shadow-sm); transition: transform .15s var(--ease-in-out); }
.interrupteur[aria-checked="true"] { background: var(--color-success); }
.interrupteur[aria-checked="true"] span { transform: translateX(16px); }
.interrupteur:focus-visible { outline: 2px solid var(--accent-border); outline-offset: 2px; }
.interrupteur:disabled { opacity: .6; cursor: progress; }

/* ⭐ (echo #127.2) L'ACCORD DEMANDÉ PAR CLAUDE CODE : le geste, tel qu'il sera joué, et Accorder / Refuser. */
.demande-accord { border: 1px solid var(--accent-border); border-radius: var(--radius-md); padding: var(--space-3);
                  background: var(--bg-secondary); }
.demande-accord p { margin: 0 0 var(--space-2); }
.demande-accord-geste { margin: 0 0 var(--space-3); max-height: 220px; overflow: auto; white-space: pre-wrap;
                        font-size: var(--text-xs); }
.demande-accord-gestes { display: flex; gap: var(--space-2); }
/* ⭐ (echo #217.3) LA FACULTÉ PROPOSÉE au bout de l'interview : ses parties, et « Valider ».
   ⭐ (echo #229.3) sans encadré vert : l'ombre douce de la charte (#182) ; le rendu d'une faculté garde le sien. */
.faculte-proposee { border-radius: var(--radius-md); padding: var(--space-3); background: var(--ligne-elevee-fond);
                    box-shadow: var(--ligne-elevee-ombre); margin-top: var(--space-3); }
.faculte-proposee.rendu-faculte { border: none; }
.fil blockquote, .faculte-proposee blockquote, blockquote { margin: var(--space-2) 0; padding-left: var(--space-3); border-left: 2px solid var(--border-subtle, currentColor); opacity: .85; }
.faculte-proposee-methode ol { margin: 0; padding-left: var(--space-5); }
.faculte-proposee h4 { margin: var(--space-3) 0 var(--space-1); font-size: var(--text-sm); }
.faculte-proposee p, .faculte-proposee ul { margin: 0; }
.faculte-proposee-titre { margin-bottom: var(--space-2); }
.faculte-proposee .demande-accord-gestes { margin-top: var(--space-3); }
.faculte-proposee-note, .faculte-proposee-etat { margin-top: var(--space-2); font-size: var(--text-sm); }
/* ⭐ (echo #221.3) LE RENDU D'UNE FACULTÉ : ses cases de preuve (« pas fait : … » en clair) et « Ce n'est pas ça » ;
   une CORRECTION proposée : avant / après, côte à côte. */
.rendu-faculte-preuve summary { cursor: pointer; font-weight: 600; font-size: var(--text-sm); margin-top: var(--space-2); }
.rendu-faculte-preuve .rendu-faculte-cases { margin-top: var(--space-1); }
.rendu-faculte-cases { list-style: none; padding: 0; }
.rendu-faculte-cases .case-pas-faite { color: var(--color-error); }
.rendu-faculte-correction { margin-top: var(--space-3); display: grid; gap: var(--space-2); }
.rendu-faculte-correction label { display: grid; gap: var(--space-1); font-size: var(--text-sm); }
.faculte-version, .faculte-inchangee { font-size: var(--text-sm); color: var(--text-secondary); }
.faculte-avant-apres { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.faculte-avant, .faculte-apres { border-radius: var(--radius-md); padding: var(--space-2); }
.faculte-avant { background: var(--bg-primary); opacity: .8; }
.faculte-apres { border: 1px solid var(--accent-border); }
.faculte-avant-apres-titre { font-size: var(--text-xs); font-weight: 600; }
@media (max-width: 640px) { .faculte-avant-apres { grid-template-columns: 1fr; } }

/* ── (echo #478.4) LA CONVERSATION DE LA MAQUETTE 02 (11/11) — sur le socle et la barre de #478.2, jetons de charte.css ──
   ⭐ La bulle de saisie est collée en bas de la fenêtre (le fil défile au-dessus, elle ne bouge pas) : une PILULE de
      60 px, l'envoi rond de 44 px dedans ; DESSOUS, hors de la bulle, le « + », le micro et la voix haute (cibles de
      44 px), et à droite la ligne discrète des réglages (« <agent> · <moteur> · écoute … : oui — régler »).
   ⭐ Rien ne change de règle : la bordure reste neutre, même au focus ; l'envoi reste neutre au repos, à la couleur
      de la charte quand il y a du texte, « Arrêter » pendant une réponse.
   ⭐ Le volet des documents s'ouvre par l'onglet « Documents » de la barre quand une conversation est ouverte : son
      bouton flottant s'efface alors (il reste là où la barre n'a pas cet onglet : l'accueil, « Traiter avec … »). */
#vue-chat .fil { padding-top: 40px; gap: 28px; }
#vue-chat .message-personne { border-radius: 18px; padding: 12px 18px; max-width: 80%; }
#vue-chat .saisie-zone { padding-top: 8px; padding-bottom: 10px; }
#vue-chat .saisie { align-items: flex-end; min-height: 60px; border-radius: 30px; padding: 7px 7px 7px 24px; gap: 4px; }
#vue-chat .saisie textarea { font-size: 16px; line-height: 24px; padding: 10px 0; min-height: 44px; max-height: 120px; }
#vue-chat .envoi { width: 44px; height: 44px; border-radius: 50%; }
#vue-chat .envoi svg { width: 18px; height: 18px; }
#vue-chat .saisie-sous { margin-top: 2px; padding: 0 0 0 8px; }
#vue-chat .saisie-outils .outil { width: 44px; height: 44px; border-radius: 50%; }
#vue-chat .saisie-outils .outil svg { width: 20px; height: 20px; }
#vue-chat .saisie-reglages { flex: 0 1 auto; min-width: 0; }
.reglages-ligne-discrete { display: flex; align-items: center; max-width: 100%; min-height: 44px; padding: 0 8px; }
.reglages-resume { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* (echo #478.7) la ligne est un flex : l'espace finale du résumé y tombe, « —régler » se collait — une marge la remplace */
.reglages-regler { flex: none; margin-left: .3em; }
.reglages-ligne-discrete.ouvert, .reglages-ligne-discrete:hover .reglages-regler { color: var(--text-primary); }
:is(body:not([data-vue]), body[data-vue="chat"]):has(#barre-onglets [data-onglet="documents"]) #vue-chat > .documents-ouvrir { display: none; }

/* ⭐ (echo #618.2) L'ÉCRAN CONVERSATION MONTÉ DANS LE VOLET DE JARVIS (`/?cadre=volet`) : le chat seul — ni barre, ni
   « tous les écrans », ni tuiles de l'accueil. */
.cadre-volet .barre-haut, .cadre-volet .ecrans, .cadre-volet #accueil-tuiles { display: none !important; }
.cadre-volet body { background: transparent; }
/* ⭐ (echo #780, #775.3) LA VOIX DANS LE VOLET — plus de bandeau. Guillaume, 15/11 : « qu'on voie la boule beaucoup plus
   présente […] il faut qu'elle occupe l'espace. » Le panneau (conversation-vocale.js) se fond dans la grille du chat
   (`display: contents`) : la SPHÈRE grande et centrée en haut (~42 % de la hauteur, jamais moins d'un tiers de la
   largeur, elle grandit avec la fenêtre), l'état dessous (« Je t'écoute », « Pixel réfléchit », « Pixel parle »), la
   ligne d'arrêt (#771) et ce qui est en train d'être dit ; puis le fil, qui défile ; en bas, À LA PLACE DU CHAMP, les
   commandes de voix : les trois traits (le micro de la voix, allumé), « Écrire » (repasser à l'écrit d'un geste),
   « Couper » / « Relancer l'écoute » selon le moment, « Terminer ». La voix fermée, la fenêtre reprend sa forme écrite. */
.cadre-volet .vue-chat.mode-voix { grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto; }
.cadre-volet .mode-voix > .voix-panneau { display: contents; }
.cadre-volet .mode-voix .voix-sphere { grid-row: 1; grid-column: 1 / -1; justify-self: center; flex: none;
  --diametre: max(min(42vh, 85vw), 34vw); width: var(--diametre); height: var(--diametre); min-height: 0; max-height: none;
  margin-top: var(--space-3); }
.cadre-volet .mode-voix .voix-etat { grid-row: 2; grid-column: 1 / -1; margin-top: var(--space-2); color: var(--text-primary);
  font-size: var(--text-base, 15px); font-weight: 500; }
.cadre-volet .mode-voix .voix-arreter { grid-row: 3; grid-column: 1 / -1; }
.cadre-volet .mode-voix .voix-enonce { grid-row: 4; grid-column: 1 / -1; justify-self: center; max-width: min(100%, 60ch);
  padding: 0 var(--space-4); box-sizing: border-box; font-size: var(--text-sm); }
.cadre-volet .mode-voix > .fil-defilement { grid-row: 5; grid-column: 1 / -1; min-height: 0;
  border-top: 1px solid var(--border-light); margin-top: var(--space-2); }
.cadre-volet .mode-voix > .saisie-zone { grid-row: 6; grid-column: 1; align-self: center; padding: var(--space-2) 0 var(--space-2) var(--space-3); }
.cadre-volet .mode-voix > .saisie-zone :is(.pj-zone, .pj-refus, #saisie, #joindre, #dicter) { display: none !important; }
.cadre-volet .mode-voix > .saisie-zone .saisie-sous { justify-content: flex-start; margin-top: 0; }
.cadre-volet .mode-voix .voix-gestes { grid-row: 6; grid-column: 2; align-self: center; justify-content: flex-end; flex-wrap: wrap;
  padding: var(--space-2) var(--space-3); }
.cadre-volet .mode-voix .voix-terminer { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.cadre-volet .mode-voix .voix-terminer:hover { background: var(--accent-hover); }
/* « Écrire » : la voix fermée, le champ reprend la main (socle.js) — il n'existe qu'en mode voix */
.voix-ecrire { display: none; }
.mode-voix .voix-ecrire { display: inline-flex; align-items: center; }
/* ⭐ (echo #645.3) LES VUES DU VOLET (socle.js, `montrerDansLeVolet`) : l'Historique prend la place
   de la conversation ; le volet LARGE (900 px et plus : « Une fenêtre », deux tiers) montre la liste et la conversation
   côte à côte. En tête d'une conversation choisie dans la liste, « ← Historique » (jamais en mode voix). */
@media (max-width: 899.98px) { .cadre-volet[data-vue-du-volet="historique"] #vue-chat { display: none !important; } }
@media (min-width: 900px) {
  .cadre-volet[data-vue-du-volet="historique"] .espace-contenu { flex-direction: row; }
  .cadre-volet[data-vue-du-volet="historique"] #vue-historique { flex: 0 0 clamp(320px, 40%, 480px); border-right: 1px solid var(--border-light); }
}
.cadre-volet .vue-historique .historique { max-width: none; padding: var(--space-4) var(--space-4) var(--space-6); }
/* ⭐ (echo #662) LA PASTILLE « Action n° 120 » EN DÉBUT DE FIL (volet de Jarvis, posée par l'hôte) : petite, cliquable,
   alignée sur le fil ; l'Historique et les Documents se quittent par les onglets de la tête du volet (plus de « ← Historique »). */
.volet-rattachee { display: block; width: fit-content; max-width: var(--largeur-fil); box-sizing: border-box; margin: var(--space-4) auto 0;
  padding: 3px 10px; border-radius: 12px; background: var(--bg-hover); color: var(--text-secondary); font-size: var(--text-xs);
  font-weight: var(--font-medium); text-decoration: none; white-space: nowrap; }
.volet-rattachee:hover, .volet-rattachee:focus-visible { color: var(--text-primary); text-decoration: underline; }
.volet-rattachee[hidden] { display: none; }
.volet-rattachee:not([hidden]) + .fil { padding-top: var(--space-4); }
