/* CONTROL CENTER V2 — centre de commandement sombre, lisible des heures durant.
   Couleurs d'ÉTAT (jamais décoratives) :
   cyan = actif · vert = établi/terminé · ambre = ATTENTE (légitime, ≠ erreur)
   violet = modèle · rouge = incertain/incident · bleu = autorité · gris = à faire / éteint
   ⛔ Aucune animation permanente : une animation = un ÉVÉNEMENT réel (ou un nœud réellement
   en cours d'exécution). Hors live, l'interface se désature et le DIT. */
:root {
  --fond: #03060d;
  --fond-2: #070d1a;
  --verre: rgba(10, 20, 40, 0.74);
  --verre-2: rgba(6, 13, 28, 0.82);
  --verre-bord: rgba(88, 164, 255, 0.15);
  --trait: rgba(90, 150, 255, 0.09);
  --texte: #d8e6ff;
  --texte-2: #8ea3c7;
  --texte-3: #5c6f93;
  --actif: #38e1ff;
  --ok: #3ef5a0;
  --attente: #ffb547;
  --modele: #a58bff;
  --alerte: #ff4d6d;
  --info: #5aa9ff;
  --humain: #ffd166;
  --gris: #4a5a7a;
  --mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --barre: 56px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background:
    radial-gradient(1200px 800px at 50% 45%, rgba(40, 90, 170, 0.17), transparent 60%),
    radial-gradient(900px 600px at 85% 110%, rgba(120, 70, 220, 0.10), transparent 60%),
    linear-gradient(180deg, var(--fond-2), var(--fond));
  color: var(--texte);
  font: 13px/1.45 var(--sans);
  overflow: hidden;
}
body::before {                      /* trame très discrète : profondeur, pas de bruit */
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(90, 150, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 150, 255, 0.032) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 45%, black 0%, transparent 75%);
}
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.petit { font-size: 10.5px; }
.inconnu { color: var(--attente); font-style: normal; }
.alerte-texte { color: var(--alerte); font-style: normal; }
.note { color: var(--texte-3); font-size: 11px; }
.rien { color: var(--texte-3); font-size: 12px; padding: 4px 2px; }
.rien.grand { padding: 30px; text-align: center; font-size: 13px; }

/* ── barre ─────────────────────────────────────────────────────────── */
.barre {
  height: var(--barre); display: flex; align-items: center; gap: 18px; padding: 0 18px;
  border-bottom: 1px solid var(--verre-bord);
  background: linear-gradient(180deg, rgba(10, 20, 40, 0.94), rgba(5, 10, 22, 0.7));
  position: relative; z-index: 5;
}
.barre::after {                     /* filet lumineux fixe sous la barre */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 225, 255, 0.45), transparent);
}
.marque { display: flex; align-items: center; gap: 10px; }
.marque-noyau {
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle, #bff4ff 0%, var(--actif) 45%, rgba(56, 225, 255, 0) 72%);
  box-shadow: 0 0 14px rgba(56, 225, 255, 0.6);
}
body[data-live="non"] .marque-noyau { filter: grayscale(1); box-shadow: none; }
.marque-nom { font-weight: 700; letter-spacing: 0.22em; font-size: 14px; }
.marque-sous { color: var(--texte-3); font-size: 10.5px; letter-spacing: 0.14em; }
.navigation { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.navigation a {
  color: var(--texte-2); text-decoration: none; padding: 7px 12px; border-radius: 8px; white-space: nowrap;
  font-size: 12px; letter-spacing: 0.06em; border: 1px solid transparent; position: relative;
}
.navigation a:hover { color: var(--texte); background: rgba(30, 50, 90, 0.35); }
.navigation a.choisi { color: var(--texte); border-color: var(--verre-bord); background: rgba(56, 225, 255, 0.08); }
.navigation a.choisi::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--actif);
}
.pastille-nav { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; font: 700 10.5px/17px var(--mono);
  text-align: center; background: var(--attente); color: #1a1000; }
.liaison { display: flex; align-items: center; gap: 8px; color: var(--texte-2); font-size: 12px; white-space: nowrap;
  padding: 5px 10px; border-radius: 8px; border: 1px solid var(--verre-bord); }
.liaison-point { width: 9px; height: 9px; border-radius: 50%; background: var(--gris); }
.liaison[data-etat="live"] { color: var(--ok); border-color: rgba(62, 245, 160, 0.35); }
.liaison[data-etat="live"] .liaison-point { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.liaison[data-etat="reconnexion"] { color: var(--attente); }
.liaison[data-etat="reconnexion"] .liaison-point { background: var(--attente); }
.liaison[data-etat="interrompu"], .liaison[data-etat="coupe"] { color: var(--alerte); border-color: rgba(255, 77, 109, 0.5); }
.liaison[data-etat="interrompu"] .liaison-point, .liaison[data-etat="coupe"] .liaison-point { background: var(--alerte); }
.bandeau-live {
  position: relative; z-index: 4; padding: 7px 18px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  background: repeating-linear-gradient(135deg, rgba(255, 77, 109, 0.18) 0 12px, rgba(255, 77, 109, 0.10) 12px 24px);
  border-bottom: 1px solid rgba(255, 77, 109, 0.5); color: #ffd2da;
}
body[data-live="non"] .espaces { filter: saturate(0.45); }

/* ── espaces ───────────────────────────────────────────────────────── */
.espaces { height: calc(100% - var(--barre)); position: relative; }
body:has(.bandeau-live:not([hidden])) .espaces { height: calc(100% - var(--barre) - 33px); }
.espace { height: 100%; min-height: 0; }
#espace-commande { display: flex; flex-direction: column; }

/* panneaux : verre + coins HUD (statiques) */
.panneau {
  background: var(--verre); border: 1px solid var(--verre-bord); border-radius: 12px; position: relative;
  backdrop-filter: blur(6px); display: flex; flex-direction: column; min-height: 0;
}
.panneau::before, .panneau::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none; border-color: rgba(56, 225, 255, 0.5);
}
.panneau::before { top: -1px; left: -1px; border-top: 1px solid; border-left: 1px solid; border-top-left-radius: 12px; }
.panneau::after { bottom: -1px; right: -1px; border-bottom: 1px solid; border-right: 1px solid; border-bottom-right-radius: 12px; }
.panneau h2 {
  margin: 0; padding: 9px 12px 7px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--texte-2); border-bottom: 1px solid var(--verre-bord); font-weight: 600;
}
.panneau h2 small { text-transform: none; letter-spacing: 0; color: var(--texte-3); font-weight: 400; margin-left: 6px; }
.panneau .contenu { padding: 8px 10px; overflow: auto; min-height: 0; }

/* ── 1. COMMAND CENTER ─────────────────────────────────────────────── */
.indicateurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; padding: 10px 10px 0; }
.indicateur {
  display: flex; flex-direction: column; padding: 6px 11px; border-radius: 9px; min-width: 0;
  border: 1px solid var(--verre-bord); background: rgba(12, 24, 48, 0.55); position: relative; overflow: hidden;
}
.indicateur::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--gris); }
.indicateur b { font: 600 15px/1.25 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.indicateur span { color: var(--texte-3); font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap; }
.indicateur.actif::before { background: var(--actif); } .indicateur.actif b { color: var(--actif); }
.indicateur.attente::before { background: var(--attente); } .indicateur.attente b { color: var(--attente); }
.indicateur.alerte::before { background: var(--alerte); } .indicateur.alerte b { color: var(--alerte); }
.indicateur.ok::before { background: var(--ok); } .indicateur.ok b { color: var(--ok); }
.poste { display: grid; grid-template-columns: 330px 1fr 410px; flex: 1; min-height: 0; }
.colonne { display: flex; flex-direction: column; gap: 10px; padding: 10px; min-height: 0; overflow: hidden; z-index: 1; }
.gauche #panneau-agents { flex: 1; }
.gauche #panneau-sante { flex: 0.8; }
.gauche #panneau-conso { flex: 1.3; }
.droite .attention { flex: 0 0 auto; max-height: 42%; }
.droite .timeline { flex: 1; }

.agent { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; padding: 6px 4px; border-radius: 8px; }
.agent + .agent { border-top: 1px solid var(--trait); }
.agent-point { width: 10px; height: 10px; border-radius: 50%; background: var(--gris); }
.agent.actif .agent-point { background: var(--actif); box-shadow: 0 0 10px var(--actif); }
.agent.inactif { opacity: 0.45; }
.agent-nom { font-weight: 600; }
.agent-sous { color: var(--texte-3); font-size: 11px; }
.agent-compte { font: 600 12px var(--mono); color: var(--actif); }

.conso-tenant { margin-bottom: 10px; }
.conso-tenant h3 { margin: 2px 0 6px; font-size: 11px; color: var(--texte-2); letter-spacing: 0.06em; }
.conso-grille { display: grid; grid-template-columns: minmax(120px, auto) minmax(0, 1fr); gap: 3px 10px; font-size: 12px; margin: 0; }
.conso-grille dt { color: var(--texte-3); }
.conso-grille dd { margin: 0; font-family: var(--mono); text-align: right; white-space: normal; }
.conso-agents { margin-top: 6px; border-top: 1px dashed rgba(90, 150, 255, 0.12); padding-top: 5px; }
.conso-agent { font: 11px var(--mono); color: var(--texte-2); padding: 3px 0; line-height: 1.5; }
.conso-agent b { color: var(--modele); font-weight: 600; }

.sante-global { font: 600 13px var(--mono); margin-bottom: 6px; }
.sante-global.sain { color: var(--ok); }
.sante-global.degrade { color: var(--attente); }
.sante-global.indisponible { color: var(--alerte); }
.worker { font: 11px var(--mono); color: var(--texte-2); padding: 3px 0; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.worker .e-sain { color: var(--ok); }
.worker .e-degrade { color: var(--attente); }
.worker .e-eteint { color: var(--texte-3); }
.worker-tache { flex-basis: 100%; color: var(--actif); }

.scene { position: relative; min-width: 0; min-height: 0; }
#systeme { width: 100%; height: 100%; display: block; }
.legende {
  position: absolute; left: 14px; bottom: 12px; display: flex; gap: 14px; flex-wrap: wrap; max-width: 60%;
  font-size: 11px; color: var(--texte-3);
}
.legende i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.legende .l-actif { background: var(--actif); } .legende .l-ok { background: var(--ok); }
.legende .l-attente { background: var(--attente); } .legende .l-modele { background: var(--modele); }
.legende .l-alerte { background: var(--alerte); } .legende .l-gris { background: var(--gris); }
.activite { position: absolute; right: 14px; bottom: 10px; width: 320px; padding: 8px 10px; border-radius: 10px;
  background: var(--verre-2); border: 1px solid var(--verre-bord); }
.activite-titre { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--texte-2); margin-bottom: 4px; }
.activite-titre small { text-transform: none; letter-spacing: 0; color: var(--texte-3); display: block; }
.activite svg { width: 100%; height: 46px; display: block; }
.activite rect { fill: rgba(56, 225, 255, 0.55); }
.liste-missions { display: none; }

/* graphe système (orbites) */
.lien { fill: none; stroke: rgba(110, 170, 255, 0.16); stroke-width: 1.2; transition: d 0.8s ease, stroke 0.6s; }
.lien.chaud { stroke: rgba(56, 225, 255, 0.55); }
.lien.dep { stroke: rgba(160, 190, 240, 0.22); stroke-dasharray: 2 3; }
.objet { transition: transform 0.8s cubic-bezier(.2,.8,.2,1), opacity 0.6s; cursor: default; }
.objet text { fill: var(--texte-2); font-size: 11px; pointer-events: none; }
.objet .etiquette { font-family: var(--mono); font-size: 11px; fill: var(--texte-2); }
.mission.e-close .etiquette { fill: var(--texte-3); }
.noyau circle.coeur { fill: url(#grad-noyau); }
.noyau circle.anneau { fill: none; stroke: rgba(56, 225, 255, 0.35); stroke-width: 1; stroke-dasharray: 3 7; transform-origin: 0 0; }
.noyau.vivant circle.anneau { animation: rotation 9s linear infinite; stroke: rgba(56, 225, 255, 0.7); }
body[data-live="non"] .noyau circle.anneau { animation: none; stroke: var(--gris); }
.noyau text.titre { fill: var(--texte); font-weight: 700; letter-spacing: 0.3em; font-size: 12px; opacity: 0.85; }
.tenant circle { fill: rgba(20, 40, 80, 0.85); stroke: var(--info); stroke-width: 1.4; }
.tenant.chaud circle { stroke: var(--actif); filter: url(#lueur); }
.tenant.inactif circle { stroke: var(--gris); }
.agent-noeud rect { fill: rgba(16, 30, 60, 0.9); stroke: rgba(120, 180, 255, 0.45); stroke-width: 1.2; }
.agent-noeud.chaud rect { stroke: var(--actif); filter: url(#lueur); }
.mission { cursor: pointer; }
.mission circle.corps { fill: rgba(12, 26, 52, 0.95); stroke: var(--info); stroke-width: 1.6; transition: stroke 0.4s; }
.mission.e-en_cours circle.corps { stroke: var(--actif); }
.mission.e-attente_decision circle.corps { stroke: var(--attente); stroke-dasharray: 5 3; }
.mission.e-close circle.corps { stroke: var(--gris); }
.mission.e-close.r-terminee circle.corps { stroke: rgba(62, 245, 160, 0.55); }
.mission.e-close { opacity: 0.55; }
.mission.incident circle.corps { stroke: var(--alerte); }
.mission.chaud circle.corps { filter: url(#lueur); }
.mission:hover circle.corps { stroke-width: 2.6; }
.noeud-sat circle { stroke-width: 1.3; transition: fill 0.35s, stroke 0.35s; fill: rgba(40, 55, 85, 0.9); stroke: var(--gris); }
.noeud-sat.e-en_cours circle { fill: rgba(56, 225, 255, 0.35); stroke: var(--actif); animation: souffle 1.1s ease-in-out infinite; }
.noeud-sat.e-attente_decision circle { fill: rgba(255, 181, 71, 0.25); stroke: var(--attente); }
.noeud-sat.e-termine circle { fill: rgba(62, 245, 160, 0.45); stroke: var(--ok); }
.noeud-sat.e-refuse circle { fill: rgba(255, 77, 109, 0.3); stroke: var(--alerte); }
.noeud-sat.effet-incertain circle { stroke: var(--alerte); stroke-width: 2.4; }
.impulsion { pointer-events: none; }
.impulsion.modele { fill: var(--modele); filter: url(#lueur); }
.impulsion.autorite { fill: var(--info); filter: url(#lueur); }
.impulsion.effet { fill: var(--actif); filter: url(#lueur); }
.impulsion.humain { fill: var(--attente); filter: url(#lueur); }
.impulsion.alerte { fill: var(--alerte); filter: url(#lueur); }
.onde { fill: none; stroke-width: 1.5; pointer-events: none; animation: onde 1s ease-out forwards; }
.onde.ok { stroke: var(--ok); } .onde.autorite { stroke: var(--info); } .onde.attente { stroke: var(--attente); }
.onde.alerte { stroke: var(--alerte); } .onde.actif { stroke: var(--actif); }
body[data-live="non"] .noeud-sat.e-en_cours circle, body[data-live="non"] .dag-noeud.v-en_cours rect { animation: none; }

/* attention */
.alerte-bloc { border-left: 3px solid var(--gris); padding: 6px 9px; margin-bottom: 7px; border-radius: 4px; background: rgba(8, 16, 32, 0.6); cursor: pointer; }
.alerte-bloc:hover { background: rgba(20, 34, 64, 0.8); }
.alerte-bloc.attente { border-color: var(--attente); }
.alerte-bloc.alerte { border-color: var(--alerte); }
.alerte-bloc.info { border-color: var(--info); }
.alerte-bloc .titre { font-weight: 700; font-size: 11.5px; letter-spacing: 0.06em; }
.alerte-bloc.attente .titre { color: var(--attente); }
.alerte-bloc.alerte .titre { color: var(--alerte); }
.alerte-bloc.info .titre { color: var(--info); }
.alerte-bloc .detail { color: var(--texte-2); font-size: 11.5px; font-family: var(--mono); }

/* timeline (compacte et complète) */
#timeline, .timeline-complete { list-style: none; margin: 0; padding: 0; }
#timeline { flex: 1; padding: 8px 10px; }
.ligne { display: grid; grid-template-columns: 92px 1fr; gap: 8px; padding: 4px; border-radius: 6px; cursor: pointer; border-left: 2px solid transparent; }
.ligne.neuf { animation: entree 0.35s ease-out; background: rgba(56, 225, 255, 0.07); }
.ligne:hover { background: rgba(30, 50, 90, 0.45); }
.ligne time { font: 11px var(--mono); color: var(--texte-3); padding-top: 1px; }
.ligne .quoi { font-size: 12.5px; }
.ligne .ou { display: block; color: var(--texte-3); font: 10.5px var(--mono); }
.ligne .detail-appel { display: block; color: var(--texte-2); font: 10.5px var(--mono); }
.ligne.c-mission .quoi { color: var(--texte); font-weight: 600; }
.ligne.c-noeud .quoi { color: var(--actif); }
.ligne.c-modele .quoi { color: var(--modele); }
.ligne.c-autorite .quoi { color: var(--info); }
.ligne.c-attente .quoi, .ligne.c-humain .quoi { color: var(--attente); }
.ligne.c-effet .quoi, .ligne.c-fin .quoi { color: var(--ok); }
.ligne.c-alerte .quoi, .ligne.c-incident .quoi { color: var(--alerte); }
.ligne.c-reprise .quoi { color: var(--actif); font-weight: 600; }
.ligne.historique { opacity: 0.6; }
.ligne.f-systeme { border-left-color: var(--gris); } .ligne.f-agent { border-left-color: var(--actif); }
.ligne.f-modele { border-left-color: var(--modele); } .ligne.f-autorite { border-left-color: var(--info); }
.ligne.f-outil { border-left-color: #3fc7d8; } .ligne.f-effet { border-left-color: var(--ok); }
.ligne.f-humain { border-left-color: var(--humain); } .ligne.f-incident { border-left-color: var(--alerte); }
.ligne.f-reconciliation { border-left-color: #7df0c8; }
.famille { display: inline-block; font: 600 9.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 0 6px; margin-right: 7px;
  border-radius: 5px; border: 1px solid var(--gris); color: var(--texte-2); vertical-align: 1px; }
.famille.f-agent { border-color: var(--actif); color: var(--actif); } .famille.f-modele { border-color: var(--modele); color: var(--modele); }
.famille.f-autorite { border-color: var(--info); color: var(--info); } .famille.f-outil { border-color: #3fc7d8; color: #3fc7d8; }
.famille.f-effet { border-color: var(--ok); color: var(--ok); } .famille.f-humain { border-color: var(--humain); color: var(--humain); }
.famille.f-incident { border-color: var(--alerte); color: var(--alerte); } .famille.f-reconciliation { border-color: #7df0c8; color: #7df0c8; }
.bouton-discret {
  margin: 6px 10px 10px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--verre-bord);
  background: transparent; color: var(--texte-2); cursor: pointer; font: 12px var(--sans);
}
.bouton-discret:hover { color: var(--texte); border-color: var(--actif); }

/* puces / onglets */
.puces { display: flex; gap: 6px; flex-wrap: wrap; }
.puce, .onglets button {
  border: 1px solid var(--verre-bord); background: rgba(12, 24, 48, 0.55); color: var(--texte-3); border-radius: 999px;
  padding: 4px 11px; font: 11.5px var(--sans); cursor: pointer;
}
.puce.choisie, .onglets button.choisie { color: var(--texte); border-color: var(--actif); background: rgba(56, 225, 255, 0.1); }
.onglets { display: flex; gap: 6px; padding: 12px 14px 0; }
.onglets button { border-radius: 9px; padding: 7px 16px; font-size: 12.5px; }

/* ── 2. MISSION LIVE (#tiroir) ──────────────────────────────────────── */
#tiroir { display: none; }
#tiroir.ouvert { display: block; }
.tiroir-panneau { height: 100%; display: grid; grid-template-columns: 270px 1fr; min-height: 0; }
.ml-vide { display: contents; }
.ml-invite { display: grid; place-items: center; color: var(--texte-3); padding: 40px; text-align: center; }
.ml-liste { border-right: 1px solid var(--verre-bord); background: var(--verre-2); padding: 12px 10px; overflow: auto; min-height: 0; }
.ml-liste-titre { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--texte-2); margin-bottom: 8px; }
.ml-liste-titre small { letter-spacing: 0; text-transform: none; color: var(--texte-3); }
.ml-liste ul { list-style: none; margin: 10px 0 0; padding: 0; }
.ml-liste li { display: grid; grid-template-columns: 12px 1fr; gap: 8px; align-items: center; padding: 6px 7px; border-radius: 8px; cursor: pointer; }
.ml-liste li:hover { background: rgba(30, 50, 90, 0.45); }
.ml-liste li.choisie { background: rgba(56, 225, 255, 0.1); outline: 1px solid rgba(56, 225, 255, 0.35); }
.ml-liste li b { font: 600 12px var(--mono); display: block; }
.ml-liste li small { color: var(--texte-3); font-size: 10.5px; }
.pt { width: 9px; height: 9px; border-radius: 50%; background: var(--gris); display: inline-block; }
.pt.e-en_cours { background: var(--actif); } .pt.e-attente_decision, .pt.attente { background: var(--attente); }
.pt.e-close { background: rgba(62, 245, 160, 0.5); }
.ml-principal { overflow: auto; padding: 14px 18px 30px; min-width: 0; }
.m-entete { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.m-entete h2 { margin: 0 0 6px; font: 600 16px var(--mono); letter-spacing: 0.02em; word-break: break-all; }
.m-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--texte-2); font-size: 12px; align-items: center; }
.m-meta b { color: var(--texte); font-weight: 600; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font: 600 11px var(--mono); border: 1px solid; }
.badge.e-en_cours { color: var(--actif); border-color: var(--actif); }
.badge.e-attente_decision { color: var(--attente); border-color: var(--attente); }
.badge.e-close { color: var(--ok); border-color: rgba(62, 245, 160, 0.6); }
.fermer { background: none; border: 1px solid var(--verre-bord); color: var(--texte-2); border-radius: 8px; padding: 6px 11px; cursor: pointer; white-space: nowrap; }
.fermer:hover { color: var(--texte); border-color: var(--actif); }
.decision-requise {
  margin-top: 12px; padding: 10px 14px; border: 1px solid var(--attente); border-radius: 10px;
  color: var(--attente); font-weight: 700; letter-spacing: 0.08em; background: rgba(255, 181, 71, 0.06);
}
.decision-requise small { display: block; font-weight: 400; letter-spacing: 0; color: var(--texte-2); margin-top: 3px; }
.bandeau-branches { margin-top: 10px; padding: 8px 12px; border-radius: 9px; font-size: 12.5px; color: var(--texte);
  background: linear-gradient(90deg, rgba(255, 181, 71, 0.10), rgba(56, 225, 255, 0.08)); border: 1px solid var(--verre-bord); }
.bandeau-branches b { color: var(--attente); }
.ml-scene { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 12px; margin-top: 12px; align-items: start; }
.m-dag { background: rgba(6, 12, 26, 0.7); border: 1px solid var(--verre-bord); border-radius: 12px; overflow: auto; max-height: 64vh; }
.m-dag svg { display: block; }
.couloir rect { fill: rgba(20, 36, 70, 0.28); stroke: var(--trait); }
.couloir text { fill: var(--texte-3); font: 600 10px var(--mono); letter-spacing: 0.12em; }
.couloir.b-attente rect { stroke: rgba(255, 181, 71, 0.45); fill: rgba(255, 181, 71, 0.04); }
.couloir.b-attente text { fill: var(--attente); }
.couloir.b-en_cours rect { stroke: rgba(56, 225, 255, 0.35); }
.couloir.b-en_cours text { fill: var(--actif); }
.couloir.b-termine text { fill: var(--ok); }
.couloir.b-alerte rect { stroke: rgba(255, 77, 109, 0.45); }
.couloir.b-alerte text { fill: var(--alerte); }
.dag-noeud { cursor: pointer; }
.dag-noeud rect { fill: rgba(22, 36, 66, 0.95); stroke: var(--gris); stroke-width: 1.4; transition: stroke 0.35s, fill 0.35s; }
.dag-noeud text { fill: var(--texte); font: 600 12px var(--mono); }
.dag-noeud text.sous { fill: var(--texte-2); font: 10.5px var(--sans); }
.dag-noeud text.marques { fill: var(--modele); font: 10px var(--mono); }
.dag-noeud.choisi rect { stroke-width: 2.6; filter: drop-shadow(0 0 6px rgba(56, 225, 255, 0.5)); }
.dag-noeud.v-pret rect { stroke: var(--info); }
.dag-noeud.v-bloque rect { stroke: var(--gris); stroke-dasharray: 3 3; fill: rgba(22, 30, 50, 0.9); }
.dag-noeud.v-en_cours rect { stroke: var(--actif); fill: rgba(20, 60, 90, 0.9); animation: souffle 1.1s ease-in-out infinite; }
.dag-noeud.v-attente rect { stroke: var(--attente); stroke-dasharray: 6 3; fill: rgba(70, 50, 20, 0.6); }
.dag-noeud.v-termine rect { stroke: var(--ok); fill: rgba(16, 60, 44, 0.75); }
.dag-noeud.v-reconcilie rect { stroke: #7df0c8; fill: rgba(16, 60, 54, 0.75); stroke-dasharray: 8 2; }
.dag-noeud.v-refuse rect { stroke: var(--alerte); fill: rgba(70, 20, 30, 0.7); }
.dag-noeud.v-incertain rect { stroke: var(--alerte); stroke-width: 2.4; fill: rgba(70, 20, 30, 0.5); stroke-dasharray: 2 2; }
.dag-noeud.v-erreur rect { stroke: var(--alerte); fill: rgba(90, 18, 30, 0.8); }
.dag-noeud.v-non_execute rect { stroke: var(--gris); opacity: 0.55; }
.dag-fleche { stroke: rgba(150, 190, 250, 0.4); stroke-width: 1.4; fill: none; marker-end: url(#pointe); }
.dag-fleche.passe { stroke: rgba(56, 225, 255, 0.7); }
.dag-pointe { fill: rgba(150, 190, 250, 0.6); }
.legende-etats { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--texte-3); margin-top: 8px; }
.legende-etats i { display: inline-block; width: 12px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1.5px solid var(--gris); }
.legende-etats .v-pret { border-color: var(--info); } .legende-etats .v-bloque { border-style: dashed; }
.legende-etats .v-en_cours { border-color: var(--actif); background: rgba(56, 225, 255, 0.3); }
.legende-etats .v-attente { border-color: var(--attente); border-style: dashed; }
.legende-etats .v-termine { border-color: var(--ok); background: rgba(62, 245, 160, 0.3); }
.legende-etats .v-refuse, .legende-etats .v-erreur { border-color: var(--alerte); background: rgba(255, 77, 109, 0.3); }
.legende-etats .v-incertain { border-color: var(--alerte); border-style: dotted; }
.legende-etats .v-reconcilie { border-color: #7df0c8; }
.inspecteur { background: var(--verre-2); border: 1px solid var(--verre-bord); border-radius: 12px; padding: 12px; max-height: 64vh; overflow: auto; }
.inspecteur h4 { margin: 12px 0 5px; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texte-2); }
.inspecteur h4 small { letter-spacing: 0; text-transform: none; color: var(--texte-3); font-weight: 400; }
.ins-titre { font: 600 14px var(--mono); display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ins-titre em { font: 11.5px var(--sans); color: var(--texte-2); }
.ins-titre .pt.v-en_cours { background: var(--actif); } .ins-titre .pt.v-attente { background: var(--attente); }
.ins-titre .pt.v-termine, .ins-titre .pt.v-reconcilie { background: var(--ok); }
.ins-titre .pt.v-refuse, .ins-titre .pt.v-erreur, .ins-titre .pt.v-incertain { background: var(--alerte); }
.ins-titre .pt.v-pret { background: var(--info); }
.ins-l { display: grid; grid-template-columns: 90px 1fr; gap: 2px 8px; font-size: 12px; padding: 2px 0; }
.ins-l span { color: var(--texte-3); }
.ins-l b { font: 500 12px var(--mono); word-break: break-all; }
.ins-l small { grid-column: 2; color: var(--texte-3); font-size: 10px; }
.ins-evt { font-size: 11.5px; padding: 4px 0; border-bottom: 1px dashed var(--trait); word-break: break-word; }
.ins-evt .mono, .ins-evt.mono { color: var(--texte-2); font-size: 10.5px; }
.ins-alerte { border: 1px solid var(--alerte); color: var(--alerte); border-radius: 8px; padding: 6px 8px; font-size: 12px; margin-bottom: 8px; }
.m-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; margin-top: 14px; }
.m-bloc { background: rgba(8, 16, 32, 0.7); border: 1px solid var(--verre-bord); border-radius: 10px; padding: 10px 12px; }
.m-bloc.large { grid-column: 1 / -1; }
.m-bloc h3 { margin: 0 0 8px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texte-2); }
.m-bloc h3 small { letter-spacing: 0; text-transform: none; color: var(--texte-3); font-weight: 400; }
.m-bloc ul { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.m-bloc li { padding: 3px 0; border-bottom: 1px dashed var(--trait); }
.m-bloc li .mono { color: var(--texte-2); font-size: 11px; }
.m-bloc .bouton-discret { margin: 8px 0 0; }

/* ── 3. TIMELINE ───────────────────────────────────────────────────── */
#espace-timeline { display: flex; flex-direction: column; }
.outils-timeline { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--verre-bord); }
.outils-timeline label { color: var(--texte-3); font-size: 12px; }
.outils-timeline .bouton-discret { margin: 0; }
select { background: rgba(4, 10, 22, 0.9); color: var(--texte); border: 1px solid var(--verre-bord); border-radius: 7px; padding: 4px 8px; font: 12px var(--sans); }
#timeline-filtre-mission { cursor: pointer; }
.timeline-complete { flex: 1; overflow: auto; padding: 8px 14px 20px; }
.timeline-complete .ligne { grid-template-columns: 100px 1fr; padding: 5px 8px; }

/* ── 4. HUMAN AUTHORITY ────────────────────────────────────────────── */
.autorite-grille { display: flex; flex-direction: column; gap: 12px; padding: 12px; height: 100%; min-height: 0; }
.autorite-grille > .panneau:first-child { flex: 0 0 auto; max-height: 55%; }
.autorite-grille > .panneau:last-child { flex: 1 1 auto; }
.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.carte-decision { border: 1px solid rgba(255, 181, 71, 0.4); border-radius: 11px; padding: 10px 12px; background: rgba(255, 181, 71, 0.04); cursor: pointer; }
.carte-decision header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.carte-decision .titre { color: var(--attente); font-weight: 700; letter-spacing: 0.08em; font-size: 12px; }
.carte-decision .depuis { color: var(--texte-3); font-size: 11.5px; }
.carte-decision dl { display: grid; grid-template-columns: 110px 1fr; gap: 3px 8px; margin: 0 0 6px; font-size: 12px; }
.carte-decision dt { color: var(--texte-3); }
.carte-decision dd { margin: 0; word-break: break-all; }

/* ── 5. COÛT / PROOF / INCIDENTS ───────────────────────────────────── */
#espace-registre { display: flex; flex-direction: column; }
#registre-corps { flex: 1; overflow: auto; padding: 12px 14px 30px; }
.r-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); gap: 12px; margin-top: 10px; }
.r-bloc { background: var(--verre); border: 1px solid var(--verre-bord); border-radius: 11px; padding: 10px 12px; overflow: auto; }
.r-bloc h3 { margin: 0 0 8px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texte-2); }
.r-bloc h3 small { letter-spacing: 0; text-transform: none; color: var(--texte-3); font-weight: 400; }
.r-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.r-table th { text-align: left; color: var(--texte-3); font-weight: 500; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 6px; border-bottom: 1px solid var(--verre-bord); }
.r-table td { padding: 5px 6px; border-bottom: 1px dashed var(--trait); vertical-align: top; }
.r-table td.n { font-family: var(--mono); text-align: right; white-space: nowrap; }
.r-table tr.cliquable, .r-table tbody tr[data-m] { cursor: pointer; }
.r-table tbody tr[data-m]:hover { background: rgba(30, 50, 90, 0.35); }
.r-table .issue.i-approbation_accordee, .r-table .issue.i-consommee, .r-table .issue.i-accordee { color: var(--ok); }
.r-table .issue.i-approbation_refusee, .r-table .issue.i-refusee { color: var(--alerte); }
.r-table .issue.i-demandee { color: var(--attente); }
.r-dl { display: grid; grid-template-columns: 150px 1fr; gap: 4px 10px; margin: 0; font-size: 12px; }
.r-dl dt { color: var(--texte-3); } .r-dl dd { margin: 0; word-break: break-all; }
.proof-form { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.proof-form label { color: var(--texte-3); font-size: 12px; }
.proof-form input { background: rgba(4, 10, 22, 0.9); border: 1px solid var(--verre-bord); color: var(--texte); border-radius: 8px; padding: 6px 9px; font: 12px var(--mono); width: 360px; max-width: 100%; }
.proof-form button { border: 1px solid var(--actif); background: rgba(56, 225, 255, 0.12); color: var(--texte); border-radius: 8px; padding: 6px 12px; cursor: pointer; }

/* ── session, connexion, décisions ─────────────────────────────────── */
.identite { display: flex; align-items: center; gap: 8px; color: var(--texte-2); font-size: 12px; white-space: nowrap; }
.identite b { color: var(--texte); font-family: var(--mono); font-weight: 600; }
.identite .tenants { color: var(--texte-3); font-family: var(--mono); font-size: 11px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.connexion { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center;
  background: radial-gradient(900px 600px at 50% 40%, rgba(40, 90, 170, 0.25), rgba(2, 5, 12, 0.96)); }
.connexion-carte { width: min(420px, 92vw); display: flex; flex-direction: column; gap: 10px; padding: 26px 26px 20px;
  background: var(--verre); border: 1px solid var(--verre-bord); border-radius: 14px; backdrop-filter: blur(8px); }
.connexion-carte label { color: var(--texte-2); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 8px; }
.connexion-carte input { background: rgba(4, 10, 22, 0.9); border: 1px solid var(--verre-bord); color: var(--texte);
  border-radius: 8px; padding: 9px 10px; font: 13px var(--mono); }
.connexion-carte input:focus { outline: none; border-color: var(--actif); box-shadow: 0 0 0 3px rgba(56, 225, 255, 0.15); }
.connexion-carte button, .decision-boutons button {
  border: 1px solid var(--actif); background: rgba(56, 225, 255, 0.12); color: var(--texte); border-radius: 8px;
  padding: 8px 12px; font: 600 12px var(--sans); letter-spacing: 0.08em; cursor: pointer; }
.connexion-note { color: var(--texte-3); font-size: 11.5px; margin: 4px 0 0; }
.connexion-erreur { color: var(--alerte); font-size: 12px; min-height: 1em; margin: 0; }
.decision-boutons { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.decision-boutons button.accorder { border-color: var(--ok); background: rgba(62, 245, 160, 0.12); }
.decision-boutons button.refuser { border-color: var(--alerte); background: rgba(255, 77, 109, 0.10); }
.decision-boutons button:disabled { opacity: 0.45; cursor: wait; }
.decision-boutons .resultat { font-size: 11.5px; color: var(--texte-2); }
.decision-arguments { font: 11.5px var(--mono); color: var(--texte); margin-top: 4px; }
.bouton-session { background: none; border: 1px solid var(--verre-bord); color: var(--texte-2); border-radius: 7px; padding: 3px 8px; cursor: pointer; font-size: 11px; }

/* ── animations (déclenchées par des ÉVÉNEMENTS réels) ─────────────── */
@keyframes souffle { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes rotation { to { transform: rotate(360deg); } }
@keyframes onde { from { opacity: 0.9; r: 8; } to { opacity: 0; r: 42; } }
@keyframes entree { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ── écrans moyens ─────────────────────────────────────────────────── */
@media (max-width: 1440px) {
  .marque-sous { display: none; }
  .identite .tenants { display: none; }
  .ml-scene { grid-template-columns: 1fr; }
  .inspecteur, .m-dag { max-height: none; }
}
@media (max-width: 1280px) {
  .poste { grid-template-columns: 1fr 360px; grid-template-rows: 1fr auto; }
  .gauche { grid-column: 1 / 3; grid-row: 2; flex-direction: row; max-height: 240px; }
  .gauche .panneau { flex: 1; }
  .scene { grid-column: 1; grid-row: 1; }
  .droite { grid-column: 2; grid-row: 1; }
  .activite { width: 240px; }
  .tiroir-panneau { grid-template-columns: 220px 1fr; }
}
/* ── téléphone / fenêtre étroite : défilement vertical, listes simples ── */
@media (max-width: 860px) {
  body { overflow: auto; }
  .barre { height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .navigation { order: 3; flex-basis: 100%; }
  .espaces, body:has(.bandeau-live:not([hidden])) .espaces { height: auto; }
  .indicateurs { grid-template-columns: repeat(3, 1fr); }
  .poste { display: flex; flex-direction: column; height: auto; }
  #systeme, .legende, .activite { display: none; }
  .liste-missions { display: block; padding: 10px; }
  .gauche { flex-direction: column; max-height: none; }
  .carte-mission { background: var(--verre); border: 1px solid var(--verre-bord); border-radius: 10px; padding: 9px 12px; margin-bottom: 8px; }
  .carte-mission .noeuds { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
  .carte-mission .pastille { font: 10px var(--mono); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--gris); }
  .tiroir-panneau { display: block; height: auto; }
  .ml-liste { max-height: 220px; border-right: 0; border-bottom: 1px solid var(--verre-bord); }
  .r-grille { grid-template-columns: 1fr; }
  .cartes { grid-template-columns: 1fr; }
}

/* ── PILOTE (AV2-CONTROL-003) : zone de dialogue intégrée, point d'entrée ─────────
   ⛔ Aucune animation : l'état (en file, en cours, répondu, indisponible) est un TEXTE,
   ses durées sont des horloges réelles. Synthèse (modèle) ≠ faits sourcés (V2). */
#espace-pilote { display: flex; flex-direction: column; }
.pilote { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 12px 14px; gap: 10px; }
.pilote-entete { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pilote-titre { font-weight: 700; letter-spacing: 0.2em; font-size: 15px; color: var(--actif); }
.pilote-titre small { letter-spacing: 0; font-weight: 400; color: var(--texte-3); margin-left: 8px; font-size: 11.5px; }
.pilote-tenant { color: var(--texte-3); font-size: 12px; }
.pilote-tenant select { margin-left: 6px; background: var(--verre-2); color: var(--texte); border: 1px solid var(--actif); border-radius: 7px; padding: 4px 8px; font-weight: 600; }
.pilote-etat { font-size: 11.5px; padding: 3px 10px; border-radius: 20px; border: 1px solid var(--verre-bord); margin-left: auto; }
.pilote-etat.ok { color: var(--ok); border-color: rgba(62, 245, 160, 0.35); }
.pilote-etat.attente { color: var(--attente); border-color: rgba(255, 181, 71, 0.4); }
.pilote-etat.alerte { color: var(--alerte); border-color: rgba(255, 77, 109, 0.4); }
.pilote-corps { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 12px; }
.pilote-fil, .pilote-faits { overflow: auto; min-height: 0; border: 1px solid var(--verre-bord); border-radius: 12px; background: var(--verre); padding: 12px; }
.pilote-accueil { max-width: 720px; margin: 8% auto; text-align: center; color: var(--texte-2); }
.pilote-accueil h3 { font-size: 20px; color: var(--texte); font-weight: 600; margin: 0 0 10px; }
.echange { border-bottom: 1px dashed var(--trait); padding: 10px 4px 14px; cursor: default; }
.echange.choisie { border-left: 2px solid var(--actif); padding-left: 10px; }
.question { display: flex; gap: 10px; align-items: baseline; }
.question .qui { color: var(--texte-3); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.question p { margin: 0; flex: 1; font-size: 14px; color: var(--texte); font-weight: 500; }
.question time { color: var(--texte-3); font-size: 10.5px; font-family: var(--mono); }
.reponse { margin: 8px 0 0 38px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--verre-bord); background: var(--verre-2); }
.reponse.attente { border-color: rgba(255, 181, 71, 0.35); color: var(--attente); }
.reponse.cours { border-color: rgba(56, 225, 255, 0.35); color: var(--actif); }
.reponse.indisponible { border-color: rgba(255, 77, 109, 0.45); color: var(--alerte); }
.reponse-tete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.statut-pilote { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; padding: 2px 8px; border-radius: 6px; border: 1px solid; }
.statut-pilote.s-etabli { color: var(--ok); }
.statut-pilote.s-partiel { color: var(--attente); }
.statut-pilote.s-non_etabli { color: var(--texte-2); }
.synthese { margin: 0 0 8px; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; color: var(--texte); }
.points { margin: 0 0 8px; padding-left: 18px; }
.points li { margin: 3px 0; }
.puce-source { font: 10.5px var(--mono); color: var(--info); background: rgba(90, 169, 255, 0.08); border: 1px solid rgba(90, 169, 255, 0.35); border-radius: 5px; padding: 0 5px; cursor: pointer; }
.puce-source:hover { border-color: var(--actif); color: var(--texte); }
.non-etabli { border-left: 2px solid var(--attente); padding-left: 8px; margin: 6px 0; color: var(--texte-2); }
.non-etabli b { color: var(--attente); font-size: 10.5px; letter-spacing: 0.1em; }
.non-etabli ul { margin: 2px 0; padding-left: 16px; }
.ouvrir-objet { margin: 4px 0; background: rgba(56, 225, 255, 0.08); color: var(--actif); border: 1px solid rgba(56, 225, 255, 0.4); border-radius: 8px; padding: 5px 12px; cursor: pointer; font-size: 12px; }
.avert { color: var(--attente); font-size: 11px; margin-top: 4px; }
.pied-pilote { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--trait); color: var(--texte-3); font-size: 10.5px; }
.pied-pilote .lien { background: none; border: 0; color: var(--info); cursor: pointer; padding: 0; font-size: 10.5px; }
.pilote-faits h3 { margin: 0 0 8px; font-size: 11.5px; letter-spacing: 0.12em; color: var(--texte-2); }
.pilote-faits h3 small { letter-spacing: 0; color: var(--texte-3); font-weight: 400; margin-left: 6px; }
.fait { border: 1px solid var(--verre-bord); border-radius: 9px; padding: 7px 9px; margin-bottom: 7px; background: rgba(6, 13, 28, 0.6); }
.fait.choisi { border-color: var(--actif); }
.fait-tete { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.fait-tete b { font-family: var(--mono); color: var(--info); font-size: 11px; }
.fait-tete .type { color: var(--texte-3); font-size: 10.5px; flex: 1; }
.fait-tete .bouton-discret { margin: 0; padding: 1px 8px; font-size: 10.5px; }
.fait p { margin: 0; font-size: 12px; color: var(--texte-2); word-break: break-word; }
.dossier summary { cursor: pointer; color: var(--texte-3); font-size: 11.5px; margin: 8px 0; }
.pilote-saisie { display: flex; flex-direction: column; gap: 6px; }
.pilote-ligne { display: flex; gap: 8px; }
.pilote-ligne textarea { flex: 1; resize: vertical; min-height: 44px; max-height: 160px; background: var(--verre-2); color: var(--texte); border: 1px solid var(--verre-bord); border-radius: 10px; padding: 9px 12px; font: 13.5px var(--sans); }
.pilote-ligne textarea:focus { outline: none; border-color: var(--actif); }
.pilote-ligne button { background: rgba(56, 225, 255, 0.14); color: var(--actif); border: 1px solid var(--actif); border-radius: 10px; padding: 0 22px; font-weight: 600; cursor: pointer; }
.pilote-ligne button:disabled { opacity: 0.5; cursor: default; }
.pilote-focus { font-size: 12px; color: var(--texte-2); border: 1px solid rgba(90, 169, 255, 0.35); border-radius: 8px; padding: 3px 8px; display: inline-flex; gap: 8px; align-items: center; }
.pilote-focus .bouton-discret { margin: 0; padding: 0 6px; }
.tag-pilote { font: 9.5px var(--mono); color: var(--actif); border: 1px solid rgba(56, 225, 255, 0.4); border-radius: 4px; padding: 0 4px; margin-right: 6px; }
.ligne.pilote { opacity: 0.85; }
.m-id { color: var(--texte-3); font-size: 11px; margin: -4px 0 4px; }
.m-actions { display: flex; gap: 8px; align-items: flex-start; }
.m-actions .bouton-discret { margin: 0; }

/* Timeline : détail contextuel de l'événement choisi (observation 5) */
.timeline-cadre { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); }
.timeline-cadre .timeline-complete { min-height: 0; }
.timeline-detail { border-left: 1px solid var(--verre-bord); padding: 12px 14px; overflow: auto; background: var(--verre-2); }
.timeline-detail h3 { margin: 0 0 8px; font-size: 13px; }
.timeline-detail h4 { margin: 12px 0 4px; font-size: 11px; color: var(--texte-2); letter-spacing: 0.08em; }
.timeline-detail .r-dl dd { word-break: break-all; }
.detail-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.detail-actions .bouton-discret { margin: 0; }
.timeline-complete .ligne.selection { outline: 1px solid var(--actif); border-radius: 6px; }

/* Human Authority : troncature DITE, pagination (C4) ; Proof : lecture humaine */
.historique-pied { padding: 8px 4px; font-size: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.historique-pied .bouton-discret { margin: 0; }
.lecture-humaine { margin: 12px 14px 0; }
.lecture-humaine ul { margin: 4px 0; padding-left: 18px; line-height: 1.6; }
.proof-brute { margin: 10px 14px 20px; }
.proof-brute summary { cursor: pointer; color: var(--texte-3); }
.proof-brute pre { white-space: pre-wrap; word-break: break-all; max-height: 420px; overflow: auto; background: var(--verre-2); padding: 10px; border-radius: 8px; }

@media (max-width: 1100px) {
  .pilote-corps { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1.6fr) minmax(0, 1fr); }
  .timeline-cadre { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .timeline-detail { border-left: 0; border-top: 1px solid var(--verre-bord); max-height: 40vh; }
  .reponse { margin-left: 0; }
}

/* ── AV2-CONTROL-004 : réponse courte, hiérarchie opérateur, détail replié, OBSERVER ── */
.synthese { font-size: 14px; line-height: 1.5; margin: 2px 0 6px; }
.tag-det { font-size: 10.5px; color: var(--ok); border: 1px dashed rgba(62, 245, 160, 0.45); border-radius: 6px; padding: 1px 7px; }
.rubrique { font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; padding: 0 5px; border-radius: 4px; border: 1px solid; }
.rubrique.rub-action_requise { color: var(--humain); }
.rubrique.rub-a_surveiller { color: var(--attente); }
.rubrique.rub-information { color: var(--texte-3); }
.rubrique-bloc { margin: 6px 0; padding: 4px 10px; border-left: 3px solid; border-radius: 4px; background: rgba(255, 255, 255, 0.02); }
.rubrique-bloc b { font-size: 10.5px; letter-spacing: 0.1em; }
.rubrique-bloc ul { margin: 2px 0; padding-left: 16px; }
.rubrique-bloc.rub-action_requise { border-color: var(--humain); }
.rubrique-bloc.rub-action_requise b { color: var(--humain); }
.rubrique-bloc.rub-a_surveiller { border-color: var(--attente); }
.rubrique-bloc.rub-a_surveiller b { color: var(--attente); }
.choix-liste { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.choix { background: rgba(255, 209, 102, 0.08); color: var(--humain); border: 1px solid rgba(255, 209, 102, 0.45); border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 12px; }
.choix:hover { background: rgba(255, 209, 102, 0.16); }
.actions-reponse { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.detail-reponse { margin-top: 6px; }
.detail-reponse > summary { cursor: pointer; color: var(--texte-3); font-size: 11px; }
.detail-reponse[open] > summary { color: var(--texte-2); margin-bottom: 4px; }
.objets { margin: 6px 0; color: var(--texte-2); font-size: 11.5px; }
.objets ul { margin: 2px 0; padding-left: 16px; }
.pilote-suite { font-size: 12px; color: var(--texte-2); border: 1px dashed rgba(90, 169, 255, 0.35); border-radius: 8px; padding: 3px 8px; display: inline-flex; gap: 8px; align-items: center; margin-left: 6px; }
.pilote-suite .bouton-discret { margin: 0; padding: 0 6px; }
.obs-ok { color: var(--ok); }
.obs-attente { color: var(--attente); }
.obs-alerte { color: var(--alerte); }
meter.obs-jauge { width: 100%; height: 12px; margin: 4px 0 8px; }

/* ── AV2-CONTROL-005 : synthèse des coûts ── */
.c-synthese { margin-bottom: 14px; }
.c-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 6px; }
.c-carte { border: 1px solid var(--verre-bord); background: var(--verre-2); border-radius: 10px; padding: 10px 12px; }
.c-titre { color: var(--texte-3); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.c-valeur { font-size: 18px; font-weight: 600; margin: 4px 0; }
.c-valeur em { font-size: 11px; font-weight: 400; display: block; }
.c-sous { color: var(--texte-3); font-size: 11px; }
.c-detail-titre { color: var(--texte-2); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; margin: 10px 0 4px; }

/* N°958 — boîte de dépôt des rapports (livrables immuables, lecture seule) */
.rapport-contenu { white-space: pre-wrap; word-break: break-word; max-height: 60vh; overflow: auto;
  font: 13px/1.5 var(--mono); padding: 10px; border: 1px solid var(--verre-bord); border-radius: 6px; }
.rapport-meta { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; margin: 8px 0 10px; }
.rapport-meta dt { opacity: .7; }
.rapport-meta dd { margin: 0; overflow-wrap: anywhere; }

/* ── JARVIS : espace de travail commun ───────────────────────────────────── */
.jarvis { display: grid; grid-template-columns: 300px 1fr 360px; gap: 12px; min-height: 80vh; padding: 8px; }
.jv-gauche, .jv-droite { border: 1px solid rgba(120,170,220,.2); border-radius: 8px; padding: 8px; overflow: auto; }
.jv-centre { display: flex; flex-direction: column; border: 1px solid rgba(120,170,220,.2); border-radius: 8px; padding: 8px; }
.jv-convs li, .jv-dossiers li { list-style: none; padding: 6px; border-radius: 6px; cursor: pointer; }
.jv-convs li.choisi, .jv-convs li:hover, .jv-dossiers li:hover { background: rgba(80,160,255,.15); }
.jv-convs, .jv-dossiers, .jv-fil, .jv-taches, .jv-activite { padding-left: 0; margin: 0; }
.jv-fil { flex: 1; overflow: auto; }
.jv-msg { list-style: none; margin: 6px 0; padding: 8px; border-radius: 8px; background: rgba(255,255,255,.04); }
.jv-msg.moi { background: rgba(80,160,255,.12); }
.jv-saisie, .jv-form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.jv-saisie textarea { flex: 1 1 100%; min-height: 70px; }
.jv-taches li, .jv-activite li { list-style: none; margin: 4px 0; }
.pastille { background: #e0534a; color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; }
.alerte { color: #ff8a7a; }
/* Accès navigateur (MFA) : QR d'enrôlement et codes de secours, dans la carte de connexion existante */
.connexion-carte img { align-self: center; background: #fff; border-radius: 6px; padding: 6px; }
.connexion-carte code, .connexion-carte pre { font-family: var(--mono, ui-monospace, monospace); color: var(--texte); }
.connexion-carte pre { background: rgba(4, 10, 22, 0.9); border: 1px solid var(--verre-bord); border-radius: 8px;
  padding: 10px 12px; margin: 0; font-size: 13px; line-height: 1.6; user-select: all; }
.connexion-carte > div:not(.marque) { display: flex; flex-direction: column; gap: 10px; }
.connexion-carte > div[hidden] { display: none; }

/* T-532 — espace SYSTÈME (tout ce qui tourne) : cartes agents, santé, fil d'alertes. Lecture seule. */
.systeme { padding: 8px 14px 24px; overflow: auto; max-height: calc(100vh - var(--barre)); }
.sy-entete { display: flex; gap: 14px; align-items: baseline; padding: 6px 0 10px; border-bottom: 1px solid var(--verre-bord); }
.sy-entete small { color: var(--gris); }
.systeme h2 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); margin: 18px 0 8px; font-weight: 600; }
.sy-grille { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.sy-carte { background: var(--verre); border: 1px solid var(--verre-bord); border-radius: 10px; padding: 12px 14px; }
.sy-carte h3 { margin: 0 0 2px; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.sy-sous { color: var(--gris); font-size: 12px; margin-bottom: 8px; }
.sy-carte dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: 13px; }
.sy-carte dt { color: var(--gris); } .sy-carte dd { margin: 0; text-align: right; font-family: var(--mono); }
.sy-barre { height: 5px; background: rgba(255,255,255,.07); border-radius: 3px; margin: 8px 0 2px; overflow: hidden; }
.sy-barre i { display: block; height: 100%; background: var(--actif); }
.sy-alerte { margin-top: 8px; color: var(--alerte); font-size: 12px; }
.sy-pt { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--ok); color: var(--ok); box-shadow: 0 0 8px currentColor; }
.sy-pt.att { background: var(--attente); color: var(--attente); } .sy-pt.ko { background: var(--alerte); color: var(--alerte); } .sy-pt.gris { background: var(--gris); color: var(--gris); }
.sy-sante { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.sy-sante > div { background: var(--verre); border: 1px solid var(--verre-bord); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.sy-sante small { display: block; color: var(--gris); font-family: var(--mono); font-size: 11px; margin-top: 2px; }
.sy-cts { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.sy-ct { font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 9px; border: 1px solid currentColor; } .sy-ct.ok { color: var(--ok); } .sy-ct.ko { color: var(--alerte); }
.sy-fil { background: var(--verre); border: 1px solid var(--verre-bord); border-radius: 10px; padding: 4px 14px; list-style: none; margin: 0; }
.sy-fil li { padding: 8px 0; border-bottom: 1px solid var(--trait); display: flex; gap: 10px; font-size: 13px; } .sy-fil li:last-child { border: 0; }
.sy-fil time { color: var(--gris); font-family: var(--mono); font-size: 12px; min-width: 110px; }
.sy-tag { font-size: 11px; padding: 1px 7px; border-radius: 9px; border: 1px solid currentColor; } .sy-tag.ko { color: var(--alerte); } .sy-tag.att { color: var(--attente); }
.sy-filtres { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.sy-filtre { font: 12px var(--mono); color: var(--texte); background: var(--verre); border: 1px solid var(--verre-bord); border-radius: 14px; padding: 3px 11px; cursor: pointer; }
.sy-filtre.choisi { border-color: var(--actif); color: var(--actif); }
.sy-app > h2 { color: var(--actif); font-size: 13px; } .sy-tenant h3 { font-size: 13px; margin: 10px 0 6px; color: var(--texte); }
.sy-tenant h3 small { color: var(--gris); font-weight: 400; margin-left: 6px; } .sy-vide { color: var(--gris); font-size: 13px; }
.sy-actions { display: flex; gap: 6px; margin-top: 10px; } .sy-actions button { font: 12px var(--mono); color: var(--texte); background: transparent; border: 1px solid var(--verre-bord); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.sy-actions button:hover { border-color: var(--actif); }
