/* Acenspeed Testing : système de design.
   Jetons sémantiques partagés par les thèmes sombre et clair, puis composants.
   Règles : 13 px, lignes de 32 px, rayons de 6 px (contrôles) et 8 px (surfaces), une seule couleur d'accent,
   la couleur ne sert qu'à dire un état. Voir docs/DESIGN_SYSTEM.md. */
:root {
  color-scheme: dark;
  --voile: 255 255 255;
  --fond: #08090A; --surface: #0F1011; --surface-2: #151618; --surface-3: #1B1C1F;
  --survol: rgb(var(--voile) / .045); --actif: rgb(var(--voile) / .08);
  --bord: rgb(var(--voile) / .085); --bord-fort: rgb(var(--voile) / .15);
  --texte: #F2F3F5; --texte-2: #B6BAC2; --texte-3: #858A94; --texte-4: #5F636B;
  --accent: #5E6AD2; --accent-fort: #6F7BE3; --accent-texte: #A9B1F5; --accent-fond: rgb(94 106 210 / .16);
  --succes: #4CB782; --succes-texte: #7FD4A8; --succes-fond: rgb(76 183 130 / .13);
  --danger: #EB5757; --danger-texte: #F59595; --danger-fond: rgb(235 87 87 / .13);
  --alerte: #E2A03F; --alerte-texte: #EDBE7C; --alerte-fond: rgb(226 160 63 / .13);
  --info: #4EA7FC; --info-texte: #8CC5FD; --info-fond: rgb(78 167 252 / .13);
  --ombre: 0 8px 28px rgb(0 0 0 / .5), 0 0 0 1px rgb(var(--voile) / .09);
  --police: "Inter Variable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --r: 6px; --r2: 8px; --ligne: 32px; --lat: 232px;
}
:root[data-theme="clair"] {
  color-scheme: light;
  --voile: 12 16 28;
  --fond: #F3F4F6; --surface: #FFFFFF; --surface-2: #F8F9FB; --surface-3: #EEF0F3;
  --survol: rgb(var(--voile) / .04); --actif: rgb(var(--voile) / .07);
  --bord: rgb(var(--voile) / .1); --bord-fort: rgb(var(--voile) / .2);
  --texte: #16181D; --texte-2: #3D424C; --texte-3: #676D79; --texte-4: #969BA6;
  --accent: #4C58C7; --accent-fort: #3E49B3; --accent-texte: #3B46AE; --accent-fond: rgb(76 88 199 / .1);
  --succes: #1F8F5F; --succes-texte: #17704A; --succes-fond: rgb(31 143 95 / .1);
  --danger: #D13F3F; --danger-texte: #B02E2E; --danger-fond: rgb(209 63 63 / .09);
  --alerte: #B7791F; --alerte-texte: #8F5C12; --alerte-fond: rgb(183 121 31 / .11);
  --info: #1F7FD6; --info-texte: #1766AF; --info-fond: rgb(31 127 214 / .09);
  --ombre: 0 8px 28px rgb(15 20 35 / .14), 0 0 0 1px rgb(var(--voile) / .1);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 13px/1.45 var(--police); letter-spacing: -.005em; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: var(--accent-texte); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent-fort); outline-offset: 1px; border-radius: var(--r); }
::selection { background: var(--accent-fond); }
[hidden] { display: none !important; }
code, .mono { font-family: var(--mono); font-size: 12px; }
svg.ico { flex: none; display: block; }
.discret { color: var(--texte-3); } .petit { font-size: 12px; } .fort { font-weight: 600; } .droite { text-align: right; } .tronque { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rang { display: flex; align-items: center; gap: 8px; min-width: 0; } .rang.large { gap: 16px; } .rang.entre { justify-content: space-between; } .rang.haut { align-items: flex-start; } .pousse { margin-left: auto; }
.pile { display: flex; flex-direction: column; gap: 12px; min-width: 0; } .pile.serre { gap: 6px; } .pile.large { gap: 20px; }
.grille { display: grid; gap: 16px; } .grille.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grille.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grille.c21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.evitement { position: absolute; left: -999px; } .evitement:focus { left: 8px; top: 8px; background: var(--surface-2); padding: 6px 10px; z-index: 100; }

/* ---------- coquille ---------- */
.app { display: grid; grid-template-columns: var(--lat) minmax(0, 1fr); height: 100vh; }
.app.replie { --lat: 52px; }
.lat { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--bord); background: var(--fond); }
.lat-tete { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 8px 0 10px; flex: none; }
.marque { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; height: 30px; padding: 0 6px; border: 0; background: none; border-radius: var(--r); font-weight: 600; text-align: left; }
.marque:hover { background: var(--survol); }
.sigle { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; flex: none; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); }
.lat-defile { flex: 1; overflow-y: auto; padding: 4px 8px 12px; scrollbar-width: thin; }
.nav-groupe { margin-top: 14px; } .nav-groupe:first-child { margin-top: 2px; }
.nav-titre { display: flex; align-items: center; width: 100%; height: 24px; padding: 0 8px; border: 0; background: none; color: var(--texte-4); font-size: 11.5px; font-weight: 500; text-align: left; border-radius: var(--r); }
.nav-titre:hover { color: var(--texte-2); }
.nav-titre svg { margin-left: 4px; opacity: .7; transition: transform .12s; } .nav-groupe.ferme .nav-titre svg { transform: rotate(-90deg); }
.nav-groupe.ferme .nav-lien { display: none; }
.nav-lien { display: flex; align-items: center; gap: 9px; height: 28px; padding: 0 8px; border-radius: var(--r); color: var(--texte-2); font-weight: 500; white-space: nowrap; }
.nav-lien svg { color: var(--texte-3); }
.nav-lien:hover { background: var(--survol); color: var(--texte); text-decoration: none; }
.nav-lien[aria-current="page"] { background: var(--actif); color: var(--texte); } .nav-lien[aria-current="page"] svg { color: var(--texte); }
.nav-lien .compteur { margin-left: auto; font-size: 11px; color: var(--texte-3); }
.lat-pied { flex: none; padding: 8px; border-top: 1px solid var(--bord); }
.agent { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r); color: var(--texte-3); font-size: 12px; min-height: 30px; }
.agent:hover { background: var(--survol); text-decoration: none; } .agent b { color: var(--texte); font-weight: 500; }
.temoin { width: 7px; height: 7px; border-radius: 50%; background: var(--texte-4); flex: none; }
.temoin.vif { background: var(--accent-fort); box-shadow: 0 0 0 3px var(--accent-fond); animation: pouls 1.5s ease-in-out infinite; }
@keyframes pouls { 50% { box-shadow: 0 0 0 6px transparent; } }
.app.replie .lat-tete .marque span:not(.sigle), .app.replie .nav-titre, .app.replie .nav-lien span, .app.replie .agent span, .app.replie .lat-tete .btn { display: none; }
.app.replie .nav-groupe { margin-top: 8px; } .app.replie .nav-groupe.ferme .nav-lien { display: flex; } .app.replie .nav-lien, .app.replie .agent { justify-content: center; padding: 0; }
.corps { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); }
.haut { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 8px; border-bottom: 1px solid var(--bord); flex: none; }
.fil { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--texte-3); flex: 1; }
.fil a { color: var(--texte-3); } .fil a:hover { color: var(--texte); text-decoration: none; } .fil > :last-child { color: var(--texte); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fil .sep { color: var(--texte-4); }
.rech-globale { display: flex; align-items: center; gap: 8px; width: 240px; height: 28px; padding: 0 8px; border: 1px solid var(--bord); border-radius: var(--r); background: var(--surface-2); color: var(--texte-3); text-align: left; }
.rech-globale:hover { border-color: var(--bord-fort); } .rech-globale .kbd { margin-left: auto; }
.kbd { font: 11px var(--police); padding: 1px 5px; border: 1px solid var(--bord); border-radius: 4px; color: var(--texte-3); background: var(--surface); }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--bord); font-size: 10.5px; font-weight: 600; color: var(--texte-2); flex: none; }
.scene { flex: 1; overflow: auto; min-height: 0; outline: none; }
.page { padding: 18px 24px 56px; min-width: 0; }
.page.etroite { max-width: 880px; }
.bandeau { display: flex; align-items: center; gap: 8px; padding: 6px 24px; font-size: 12px; border-bottom: 1px solid var(--bord); flex: none; }
.bandeau.demo { background: var(--info-fond); color: var(--info-texte); } .bandeau.prod { background: var(--danger-fond); color: var(--danger-texte); } .bandeau.alerte { background: var(--alerte-fond); color: var(--alerte-texte); }

/* ---------- en-tête de page ---------- */
.entete { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.entete h1 { font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -.015em; overflow-wrap: anywhere; }
.entete .sous { color: var(--texte-3); margin-top: 3px; max-width: 90ch; }
.entete .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; color: var(--texte-3); font-size: 12px; align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
h2.titre-section { font-size: 13px; font-weight: 600; color: var(--texte); margin: 0 0 8px; }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r); border: 1px solid var(--bord-fort); background: var(--surface-2); color: var(--texte); font-weight: 500; white-space: nowrap; flex: none; }
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn.primaire { background: var(--accent); border-color: transparent; color: #fff; } .btn.primaire:hover { background: var(--accent-fort); }
:root[data-theme="clair"] .btn.primaire:hover { background: var(--accent-fort); }
.btn.discret { background: none; border-color: transparent; color: var(--texte-2); } .btn.discret:hover { background: var(--survol); color: var(--texte); }
.btn.danger { color: var(--danger-texte); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: var(--danger-fond); } .btn.danger:hover { background: color-mix(in srgb, var(--danger) 22%, transparent); }
.btn.petit { height: 24px; padding: 0 8px; font-size: 12px; }
.btn.icone { width: 28px; padding: 0; } .btn.icone.petit { width: 24px; }
.btn.charge { position: relative; color: transparent !important; pointer-events: none; }
.btn.charge::after { content: ""; position: absolute; width: 12px; height: 12px; border: 2px solid rgb(var(--voile) / .5); border-top-color: transparent; border-radius: 50%; animation: tourne .7s linear infinite; }
.btn.primaire.charge::after { border-color: #fff; border-top-color: transparent; }
@keyframes tourne { to { transform: rotate(360deg); } }

/* ---------- formulaires ---------- */
.champ { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.champ > label, .champ > .lib { font-size: 12px; font-weight: 500; color: var(--texte-2); }
.champ .aide { font-size: 12px; color: var(--texte-3); } .champ .err { font-size: 12px; color: var(--danger-texte); }
.saisie { width: 100%; height: 30px; padding: 0 9px; border: 1px solid var(--bord-fort); border-radius: var(--r); background: var(--surface); color: var(--texte); min-width: 0; }
textarea.saisie { height: auto; min-height: 72px; padding: 7px 9px; resize: vertical; line-height: 1.45; }
select.saisie { padding-right: 24px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23858A94' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
.saisie:hover { border-color: rgb(var(--voile) / .26); } .saisie:focus { outline: none; border-color: var(--accent-fort); box-shadow: 0 0 0 3px var(--accent-fond); }
.saisie::placeholder { color: var(--texte-4); } .saisie:disabled { opacity: .55; } .saisie.petit { height: 26px; font-size: 12px; }
.saisie[aria-invalid="true"] { border-color: var(--danger); }
.case { display: inline-flex; align-items: center; gap: 8px; color: var(--texte-2); cursor: pointer; } .case input { accent-color: var(--accent); width: 14px; height: 14px; margin: 0; }
.formulaire { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; } .formulaire .large { grid-column: 1 / -1; }
.form-pied { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; } .form-erreur { margin-top: 12px; }
.multi { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow: auto; border: 1px solid var(--bord-fort); border-radius: var(--r); padding: 4px; background: var(--surface); }
.multi .case { padding: 4px 6px; border-radius: 4px; } .multi .case:hover { background: var(--survol); }
.alerte { display: flex; gap: 8px; padding: 8px 10px; border-radius: var(--r); font-size: 12.5px; border: 1px solid transparent; }
.alerte.danger { background: var(--danger-fond); color: var(--danger-texte); } .alerte.info { background: var(--info-fond); color: var(--info-texte); } .alerte.alerte-ton { background: var(--alerte-fond); color: var(--alerte-texte); } .alerte.succes { background: var(--succes-fond); color: var(--succes-texte); }

/* ---------- panneaux, mesures ---------- */
.panneau { border: 1px solid var(--bord); border-radius: var(--r2); background: var(--surface); min-width: 0; }
.panneau-tete { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 4px 8px 4px 12px; border-bottom: 1px solid var(--bord); }
.panneau-tete h2 { font-size: 12.5px; font-weight: 600; flex: 1; min-width: 0; } .panneau-tete .discret { font-weight: 400; }
.panneau-corps { padding: 12px; } .panneau.sans-marge .panneau-corps { padding: 0; }
.panneau .tab-cadre { border: 0; border-radius: 0; }
.mesures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--bord); border-radius: var(--r2); overflow: hidden; background: var(--surface); }
.mesure { padding: 10px 14px 11px; border-left: 1px solid var(--bord); display: flex; flex-direction: column; gap: 1px; color: inherit; min-width: 0; margin-left: -1px; }
a.mesure:hover { background: var(--survol); text-decoration: none; }
.mesure .lib { font-size: 12px; color: var(--texte-3); } .mesure .val { font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; } .mesure .det { font-size: 11.5px; color: var(--texte-3); }
.mesure.succes .val { color: var(--succes-texte); } .mesure.danger .val { color: var(--danger-texte); } .mesure.alerte .val { color: var(--alerte-texte); }
.def { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 16px; } .def dt { color: var(--texte-3); } .def dd { min-width: 0; overflow-wrap: anywhere; }

/* ---------- pastilles et états ---------- */
.pastille { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 11.5px; font-weight: 500; background: var(--actif); color: var(--texte-2); white-space: nowrap; }
.pastille.succes { background: var(--succes-fond); color: var(--succes-texte); } .pastille.danger { background: var(--danger-fond); color: var(--danger-texte); } .pastille.alerte { background: var(--alerte-fond); color: var(--alerte-texte); }
.pastille.info { background: var(--info-fond); color: var(--info-texte); } .pastille.accent { background: var(--accent-fond); color: var(--accent-texte); }
.statut { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.statut i { width: 8px; height: 8px; border-radius: 50%; background: var(--texte-4); flex: none; }
.statut.succes i { background: var(--succes); } .statut.danger i { background: var(--danger); } .statut.alerte i { background: var(--alerte); } .statut.info i { background: var(--info); }
.statut.cours i { background: var(--accent-fort); box-shadow: 0 0 0 3px var(--accent-fond); animation: pouls 1.5s ease-in-out infinite; }
.statut.creux i { background: none; border: 1.5px solid var(--texte-4); }
.puce { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border: 1px solid var(--bord); border-radius: 4px; font-size: 11px; color: var(--texte-3); white-space: nowrap; }
.prio { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 12px; } .prio i { width: 3px; background: var(--texte-4); border-radius: 1px; opacity: .45; } .prio i.on { background: var(--texte-2); opacity: 1; }
.prio i:nth-child(1) { height: 5px; } .prio i:nth-child(2) { height: 8px; } .prio i:nth-child(3) { height: 11px; } .prio.p1 i.on { background: var(--alerte); }
.etat-vide { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 40px 20px; color: var(--texte-3); }
.etat-vide svg { color: var(--texte-4); margin-bottom: 4px; } .etat-vide h3 { font-size: 13px; font-weight: 600; color: var(--texte); } .etat-vide p { max-width: 52ch; } .etat-vide .actions { margin-top: 8px; justify-content: center; }
.squelette { display: flex; flex-direction: column; gap: 8px; padding: 12px; } .squelette i { height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--survol), var(--actif), var(--survol)); background-size: 200% 100%; animation: lueur 1.3s linear infinite; }
.squelette i:nth-child(3n) { width: 62%; } .squelette i:nth-child(3n+1) { width: 88%; }
@keyframes lueur { to { background-position: -200% 0; } }

/* ---------- tableaux ---------- */
.tab-outils { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; min-height: 28px; }
.tab-outils .rech { position: relative; width: 240px; } .tab-outils .rech svg { position: absolute; left: 8px; top: 7px; color: var(--texte-3); pointer-events: none; } .tab-outils .rech input { padding-left: 28px; height: 28px; }
.tab-outils select.saisie { width: auto; height: 28px; max-width: 200px; }
.tab-outils .selection { display: flex; align-items: center; gap: 6px; padding: 0 4px 0 10px; height: 28px; border-radius: var(--r); background: var(--accent-fond); color: var(--accent-texte); font-weight: 500; }
.tab-cadre { border: 1px solid var(--bord); border-radius: var(--r2); overflow: auto; background: var(--surface); }
table.tab { width: 100%; border-collapse: collapse; }
.tab th { position: sticky; top: 0; z-index: 1; height: 30px; padding: 0 10px; text-align: left; font-size: 11.5px; font-weight: 500; color: var(--texte-3); background: var(--surface-2); border-bottom: 1px solid var(--bord); white-space: nowrap; user-select: none; }
.tab th.tri { cursor: pointer; } .tab th.tri:hover { color: var(--texte); } .tab th .fleche { display: inline-block; width: 10px; margin-left: 3px; color: var(--accent-texte); }
.tab td { height: var(--ligne); padding: 4px 10px; border-bottom: 1px solid var(--bord); vertical-align: middle; max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab td.libre { white-space: normal; }
.tab tr:last-child td { border-bottom: 0; }
.tab tbody tr.cliquable { cursor: pointer; } .tab tbody tr:hover { background: var(--survol); } .tab tbody tr.choisie { background: var(--accent-fond); }
.tab td.coche, .tab th.coche { width: 32px; padding-right: 0; } .tab .droite { text-align: right; } .tab td a.principal { color: var(--texte); font-weight: 500; }
.tab td .sous { color: var(--texte-3); font-size: 12px; }
.pagin { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-top: 8px; color: var(--texte-3); font-size: 12px; }

/* ---------- onglets ---------- */
.onglets { display: flex; gap: 2px; border-bottom: 1px solid var(--bord); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.onglet { height: 32px; padding: 0 10px; border: 0; background: none; color: var(--texte-3); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.onglet:hover { color: var(--texte); } .onglet[aria-selected="true"] { color: var(--texte); border-bottom-color: var(--accent-fort); }
.onglet .compteur { font-size: 11px; padding: 0 5px; border-radius: 8px; background: var(--actif); color: var(--texte-3); }

/* ---------- surfaces flottantes ---------- */
.menu-flottant { position: fixed; z-index: 60; min-width: 190px; max-width: 320px; max-height: 60vh; overflow: auto; padding: 4px; border-radius: var(--r2); background: var(--surface-2); box-shadow: var(--ombre); }
.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; height: 28px; padding: 0 8px; border: 0; background: none; border-radius: 4px; color: var(--texte); text-align: left; white-space: nowrap; }
.menu-item:hover, .menu-item:focus-visible, .menu-item.actif { background: var(--actif); outline: none; text-decoration: none; } .menu-item svg { color: var(--texte-3); } .menu-item.danger { color: var(--danger-texte); } .menu-item.danger svg { color: var(--danger-texte); }
.menu-item:disabled { opacity: .45; cursor: not-allowed; } .menu-item .pousse { color: var(--texte-3); font-size: 11.5px; }
.menu-sep { height: 1px; margin: 4px 0; background: var(--bord); } .menu-titre { padding: 6px 8px 3px; font-size: 11.5px; color: var(--texte-3); }
.voile { position: fixed; inset: 0; z-index: 55; background: rgb(0 0 0 / .5); display: flex; align-items: flex-start; justify-content: center; padding: 9vh 16px 16px; overflow: auto; }
:root[data-theme="clair"] .voile { background: rgb(20 24 36 / .28); }
.dialogue { width: 100%; max-width: 480px; border-radius: 10px; background: var(--surface-2); box-shadow: var(--ombre); } .dialogue.large { max-width: 760px; } .dialogue.tres-large { max-width: 1040px; }
.dialogue-tete { display: flex; align-items: center; gap: 8px; padding: 12px 10px 0 16px; } .dialogue-tete h2 { font-size: 14px; font-weight: 600; flex: 1; }
.dialogue-corps { padding: 12px 16px 16px; }
.tiroir-voile { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .32); }
.tiroir { position: fixed; top: 0; right: 0; bottom: 0; z-index: 51; width: min(560px, 100vw); display: flex; flex-direction: column; background: var(--surface-2); box-shadow: var(--ombre); animation: glisse .14s ease-out; } .tiroir.large { width: min(820px, 100vw); }
@keyframes glisse { from { transform: translateX(16px); opacity: .6; } }
.tiroir-tete { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--bord); flex: none; } .tiroir-tete h2 { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tiroir-corps { flex: 1; overflow: auto; padding: 16px; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 8px; max-width: 420px; padding: 9px 12px; border-radius: var(--r2); background: var(--surface-3); box-shadow: var(--ombre); }
.toast.danger { color: var(--danger-texte); } .toast.succes svg { color: var(--succes); }
.palette { width: 100%; max-width: 600px; border-radius: 10px; background: var(--surface-2); box-shadow: var(--ombre); overflow: hidden; }
.palette input { width: 100%; height: 46px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--bord); background: none; font-size: 14px; outline: none; }
.palette-liste { max-height: 380px; overflow: auto; padding: 4px; } .palette .menu-item { height: 32px; }
[data-bulle] { position: relative; }
[data-bulle]:hover::after, [data-bulle]:focus-visible::after { content: attr(data-bulle); position: absolute; z-index: 70; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 4px 7px; border-radius: 4px; background: var(--surface-3); box-shadow: var(--ombre); color: var(--texte); font-size: 11.5px; font-weight: 400; white-space: nowrap; pointer-events: none; }

/* ---------- volets, arbres, flux ---------- */
.volets { display: grid; grid-template-columns: var(--gauche, 260px) 5px minmax(0, 1fr); min-height: 0; }
.volets > .poignee { cursor: col-resize; border-left: 1px solid var(--bord); margin-left: 2px; } .volets > .poignee:hover { border-left-color: var(--accent-fort); }
.arbre { display: flex; flex-direction: column; gap: 1px; }
.arbre-noeud { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px; border: 0; background: none; border-radius: var(--r); color: var(--texte-2); text-align: left; width: 100%; min-width: 0; }
.arbre-noeud:hover { background: var(--survol); color: var(--texte); } .arbre-noeud[aria-current="true"] { background: var(--actif); color: var(--texte); } .arbre-noeud .compteur { margin-left: auto; font-size: 11px; color: var(--texte-3); }
.arbre-noeud > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flux { display: flex; flex-direction: column; } .flux li { display: grid; grid-template-columns: 14px minmax(0, 1fr) max-content; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--bord); align-items: baseline; }
.flux li:last-child { border-bottom: 0; } .flux li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--texte-4); margin: 0 4px; align-self: center; } .flux time { color: var(--texte-3); font-size: 12px; white-space: nowrap; }
.liste-ligne { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 5px 12px; border-bottom: 1px solid var(--bord); color: inherit; min-width: 0; } .liste-ligne:last-child { border-bottom: 0; } a.liste-ligne:hover { background: var(--survol); text-decoration: none; }

/* ---------- graphiques ---------- */
.graph { display: block; width: 100%; } .graph text { fill: var(--texte-3); font-size: 10.5px; font-family: var(--police); }
.graph .axe { stroke: var(--bord); } .graph .ok { fill: var(--succes); } .graph .ko { fill: var(--danger); } .graph .neutre { fill: var(--texte-4); } .graph .trait { fill: none; stroke: var(--accent-fort); stroke-width: 1.6; }
.legende { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--texte-3); } .legende i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.ruban { display: flex; gap: 1.5px; height: 14px; align-items: stretch; min-width: 60px; } .ruban i { flex: 1 1 0; min-width: 2px; border-radius: 1.5px; background: var(--texte-4); opacity: .5; }
.ruban i.ok { background: var(--succes); opacity: 1; } .ruban i.failed { background: var(--danger); opacity: 1; } .ruban i.skipped { background: var(--texte-4); }
.jauge { height: 6px; border-radius: 3px; background: var(--actif); overflow: hidden; display: flex; min-width: 60px; } .jauge i { display: block; height: 100%; } .jauge .ok { background: var(--succes); } .jauge .ko { background: var(--danger); } .jauge .att { background: var(--alerte); }

/* ---------- étapes (studio, exécution) ---------- */
.etape { display: grid; grid-template-columns: 28px 22px minmax(0, 1fr) max-content; gap: 8px; align-items: center; min-height: 34px; padding: 4px 10px; border-bottom: 1px solid var(--bord); }
.etape:last-child { border-bottom: 0; } .etape .num { color: var(--texte-4); font-size: 12px; text-align: right; } .etape.inactive { opacity: .5; } .etape.choisie { background: var(--accent-fond); } .etape.echec { background: var(--danger-fond); }
.etape .msg { grid-column: 3 / -1; color: var(--danger-texte); font-size: 12px; } .etape[draggable="true"] { cursor: grab; } .etape.survolee { box-shadow: inset 0 2px 0 var(--accent-fort); }

/* ---------- authentification ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; overflow: auto; background: var(--fond); }
.auth-carte { width: 100%; max-width: 380px; padding: 24px; border: 1px solid var(--bord); border-radius: 10px; background: var(--surface); }
.auth-carte.large { max-width: 560px; } .auth-carte h1 { font-size: 17px; font-weight: 600; margin: 14px 0 4px; } .auth-carte .sous { color: var(--texte-3); margin-bottom: 18px; }
.auth-carte .formulaire { grid-template-columns: 1fr; } .auth-carte .form-pied .btn { flex: 1; height: 32px; }
.etapes-assistant { display: flex; gap: 6px; margin-bottom: 16px; } .etapes-assistant i { flex: 1; height: 3px; border-radius: 2px; background: var(--actif); } .etapes-assistant i.fait { background: var(--accent); }

@media (max-width: 1100px) { .grille.c3, .grille.c21 { grid-template-columns: minmax(0, 1fr); } .rech-globale { width: 36px; } .rech-globale span, .rech-globale .kbd { display: none; } }
@media (max-width: 820px) { .app { --lat: 52px; } .app .lat-tete .marque span:not(.sigle), .app .nav-titre, .app .nav-lien span, .app .agent span, .app .lat-tete .btn { display: none; } .app .nav-lien, .app .agent { justify-content: center; padding: 0; }
  .grille.c2, .formulaire { grid-template-columns: minmax(0, 1fr); } .page { padding: 14px 12px 48px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print { .lat, .haut, .bandeau, .actions, .tab-outils { display: none !important; } body, .scene { overflow: visible; } .app { display: block; height: auto; } }
