/* =====================================================================================================
   Showupro V2 — système visuel « poste de pilotage » : noir profond, vert Showupro, blanc.
   Toutes les couleurs, formes et durées passent par les jetons ci-dessous.
   Propriétés logiques partout (inline-start / inline-end) : l'arabe (dir="rtl") se retourne tout seul.
   ===================================================================================================== */
:root {
  --fond-0: #030605;
  --fond: #060A08;
  --surface: #0B120F;
  --surface-2: #101A15;
  --surface-3: #16231C;
  --trait: rgba(64, 255, 160, .12);
  --trait-fort: rgba(64, 255, 160, .34);
  --vert: #2BE98A;
  --vert-vif: #8DFFC8;
  --vert-fonce: #14B866;
  --vert-encre: #02170C;
  --vert-voile: rgba(43, 232, 136, .1);
  --blanc: #F5F8F6;
  --texte-2: #A9BAB1;
  --texte-3: #7E9388;
  --ambre: #FFC857;
  --ambre-voile: rgba(247, 185, 85, .12);
  --rouge: #FF7B7B;
  --rouge-voile: rgba(255, 110, 110, .12);
  --bleu: #6CC7FF;
  --bleu-voile: rgba(108, 199, 255, .12);
  --gris: #8A9A92;
  --gris-voile: rgba(138, 154, 146, .12);
  --champ: rgba(0, 0, 0, .45);
  --ombre: 0 30px 60px -34px rgba(0, 0, 0, .95);
  --lueur: 0 0 0 1px rgba(43, 232, 136, .45), 0 0 28px -6px rgba(43, 232, 136, .6);
  --angle: rgba(125, 255, 192, .8);
  --coins:
    linear-gradient(var(--angle), var(--angle)) 0 0 / 12px 1.5px no-repeat,
    linear-gradient(var(--angle), var(--angle)) 0 0 / 1.5px 12px no-repeat,
    linear-gradient(var(--angle), var(--angle)) 100% 0 / 12px 1.5px no-repeat,
    linear-gradient(var(--angle), var(--angle)) 100% 0 / 1.5px 12px no-repeat,
    linear-gradient(var(--angle), var(--angle)) 0 100% / 12px 1.5px no-repeat,
    linear-gradient(var(--angle), var(--angle)) 0 100% / 1.5px 12px no-repeat,
    linear-gradient(var(--angle), var(--angle)) 100% 100% / 12px 1.5px no-repeat,
    linear-gradient(var(--angle), var(--angle)) 100% 100% / 1.5px 12px no-repeat;
  --panneau: linear-gradient(180deg, rgba(16, 26, 21, .9), rgba(7, 11, 9, .94));
  --r-1: 3px; --r-2: 6px; --r-3: 10px; --r-pilule: 999px;
  --dur-1: .14s; --dur-2: .26s; --dur-3: .6s;
  --sortie: cubic-bezier(.16, .84, .24, 1);
  --titre: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "SF Pro Display", Roboto, "Helvetica Neue", Arial, sans-serif;
  --texte: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "SF Pro Text", Roboto, "Helvetica Neue", Arial, sans-serif;
  --code: ui-monospace, "Cascadia Mono", "SF Mono", "Roboto Mono", Consolas, "Liberation Mono", monospace;
  --rail: 236px;
  --nav-basse: 62px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--fond-0); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--blanc); font: 400 15px/1.5 var(--texte);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
html[dir="rtl"] body { font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif; }
h1, h2, h3, h4 { font-family: var(--titre); letter-spacing: -.01em; margin: 0; line-height: 1.2; }
p { margin: 0; }
a { color: var(--vert); text-underline-offset: 3px; }
a:hover { color: var(--vert-vif); }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(43, 232, 136, .35); }
:focus-visible { outline: 2px solid var(--vert-vif); outline-offset: 2px; border-radius: var(--r-1); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: fixed; inset-block-start: -60px; inset-inline-start: 12px; z-index: 100; background: var(--vert); color: var(--vert-encre); padding: 10px 14px; border-radius: var(--r-2); font-weight: 600; text-decoration: none; }
.evitement:focus { inset-block-start: 12px; color: var(--vert-encre); }
[hidden] { display: none !important; }

/* --- Fond : grille fine et lueurs --- */
#fond {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(rgba(64, 255, 160, .04) 1px, transparent 1px) 0 0 / 46px 46px,
    linear-gradient(90deg, rgba(64, 255, 160, .04) 1px, transparent 1px) 0 0 / 46px 46px,
    radial-gradient(1000px 560px at 10% -12%, rgba(43, 232, 136, .16), transparent 62%),
    radial-gradient(820px 520px at 108% 6%, rgba(243, 248, 245, .05), transparent 60%),
    radial-gradient(900px 480px at 50% 114%, rgba(43, 232, 136, .09), transparent 60%),
    var(--fond);
}

/* --- Amorce --- */
.amorce { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px; }
.amorce-logo { width: 68px; height: 68px; filter: drop-shadow(0 0 22px rgba(43, 233, 138, .5)); }
.amorce-nom { font: 700 26px var(--titre); letter-spacing: -.02em; }
.amorce-texte { color: var(--texte-2); font: 500 12px var(--code); letter-spacing: .14em; text-transform: uppercase; }

/* --- Coque : rail (ordinateur) ou barre basse (téléphone) --- */
.coque { min-height: 100dvh; }
.rail { display: none; }
.barre-haute {
  position: sticky; inset-block-start: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; padding-block-start: max(10px, env(safe-area-inset-top));
  background: rgba(4, 7, 6, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--trait);
}
.barre-haute::after { content: ''; position: absolute; inset-inline: 0; inset-block-end: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--vert) 30%, rgba(243, 248, 245, .5) 70%, transparent); opacity: .55; }
.marque { display: inline-flex; align-items: center; gap: 9px; color: var(--blanc); text-decoration: none; font: 700 18px var(--titre); letter-spacing: -.02em; }
.marque:hover { color: var(--blanc); }
.marque svg { width: 28px; height: 28px; filter: drop-shadow(0 0 10px rgba(43, 233, 138, .45)); flex: none; }
.barre-etat { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.horloge { font: 500 12px var(--code); color: var(--texte-2); letter-spacing: .06em; white-space: nowrap; }
.voyant { display: inline-flex; align-items: center; gap: 6px; font: 500 10.5px var(--code); letter-spacing: .14em; text-transform: uppercase; color: var(--texte-2); white-space: nowrap; }
.voyant::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--vert); box-shadow: 0 0 10px var(--vert); }
.voyant[data-etat="hors"]::before { background: var(--ambre); box-shadow: 0 0 10px var(--ambre); }
#badge-demo {
  font: 600 10.5px var(--code); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  color: var(--ambre); background: var(--ambre-voile); border: 1px solid rgba(247, 185, 85, .45); border-radius: var(--r-pilule); padding: 4px 10px;
}
.contenu { padding: 18px 16px calc(var(--nav-basse) + 34px + env(safe-area-inset-bottom)); max-width: 1320px; margin-inline: auto; min-width: 0; }
.contenu:focus { outline: none; }

.nav-basse {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 40; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(4, 7, 6, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-block-start: 1px solid var(--trait); padding-block-end: env(safe-area-inset-bottom);
}
.nav-basse a, .nav-basse button {
  display: grid; justify-items: center; gap: 3px; padding: 9px 2px 8px; min-height: var(--nav-basse); background: none; border: 0; cursor: pointer;
  color: var(--texte-3); text-decoration: none; font: 500 10.5px var(--texte); position: relative; min-width: 0;
}
.nav-basse .ico { width: 22px; height: 22px; }
.nav-basse span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-basse [aria-current="page"] { color: var(--vert); }
.nav-basse [aria-current="page"]::before { content: ''; position: absolute; inset-block-start: -1px; inset-inline: 22%; height: 2px; background: var(--vert); box-shadow: 0 0 12px var(--vert); border-radius: 2px; }

@media (min-width: 960px) {
  .coque { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); }
  .rail {
    display: flex; flex-direction: column; gap: 6px; position: sticky; inset-block-start: 0; height: 100dvh; padding: 20px 14px 16px;
    background: linear-gradient(180deg, rgba(8, 13, 10, .92), rgba(3, 6, 5, .96)); border-inline-end: 1px solid var(--trait); overflow-y: auto;
  }
  .rail .marque { font-size: 21px; padding: 4px 8px 16px; }
  .rail .marque svg { width: 32px; height: 32px; }
  .rail-titre { font: 500 10px var(--code); letter-spacing: .2em; text-transform: uppercase; color: var(--texte-3); padding: 12px 10px 4px; }
  .rail a.lien, .rail button.lien {
    display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-2); color: var(--texte-2); text-decoration: none;
    font-weight: 500; font-size: 14px; border: 1px solid transparent; background: none; cursor: pointer; text-align: start; width: 100%;
    transition: background var(--dur-1), color var(--dur-1), border-color var(--dur-1);
  }
  .rail .lien .ico { width: 19px; height: 19px; flex: none; }
  .rail .lien:hover { color: var(--blanc); background: rgba(255, 255, 255, .04); }
  .rail .lien[aria-current="page"] { color: var(--vert-vif); background: var(--vert-voile); border-color: var(--trait-fort); box-shadow: inset 2px 0 0 var(--vert); }
  html[dir="rtl"] .rail .lien[aria-current="page"] { box-shadow: inset -2px 0 0 var(--vert); }
  .rail-pied { margin-block-start: auto; display: grid; gap: 8px; padding-block-start: 14px; border-block-start: 1px solid var(--trait); }
  .rail-qui { padding: 2px 10px; min-width: 0; }
  .rail-qui strong { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rail-qui span { display: block; color: var(--texte-3); font: 500 10.5px var(--code); letter-spacing: .1em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .barre-haute { padding: 12px 28px; }
  .barre-haute .marque { display: none; }
  .barre-titre { font: 500 11px var(--code); letter-spacing: .2em; text-transform: uppercase; color: var(--texte-3); }
  .nav-basse { display: none; }
  .contenu { padding: 26px 28px 60px; }
}
@media (max-width: 959.98px) {
  .barre-titre, .horloge { display: none; }
  .barre-haute { gap: 8px; }
  .barre-etat { flex: 1 1 0; justify-content: flex-end; }
  #badge-demo { font-size: 9.5px; letter-spacing: .03em; padding: 3px 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .voyant { font-size: 0; gap: 0; letter-spacing: 0; flex: none; } /* seul le voyant lumineux reste ; le libellé est lu par les lecteurs d'écran */
}

/* --- En-tête d'écran --- */
.entete { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-block-end: 18px; }
.entete > div:first-child { min-width: 0; flex: 1 1 240px; }
.kicker { font: 500 10.5px var(--code); letter-spacing: .2em; text-transform: uppercase; color: var(--vert); margin-block-end: 6px; }
.entete h1 { font-size: clamp(24px, 4.4vw, 34px); font-weight: 700; }
.entete .sous { color: var(--texte-2); margin-block-start: 6px; max-width: 70ch; }
.entete-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* --- Panneaux --- */
.panneau {
  position: relative; background: var(--coins), var(--panneau); border: 1px solid var(--trait); border-radius: var(--r-2);
  box-shadow: var(--ombre), inset 0 1px 0 rgba(243, 248, 245, .04); padding: 18px; min-width: 0;
  transition: border-color var(--dur-2);
}
.panneau:hover { border-color: rgba(64, 255, 160, .24); }
.panneau.vert { background: var(--coins), linear-gradient(160deg, rgba(12, 46, 28, .9), rgba(5, 16, 10, .95)); border-color: var(--trait-fort); box-shadow: 0 0 40px -18px rgba(43, 232, 136, .55), var(--ombre); }
.panneau.ambre { border-color: rgba(247, 185, 85, .4); background: var(--coins), linear-gradient(160deg, rgba(48, 34, 10, .86), rgba(14, 10, 4, .95)); }
.panneau.rouge { border-color: rgba(255, 110, 110, .4); background: var(--coins), linear-gradient(160deg, rgba(48, 16, 16, .86), rgba(16, 7, 7, .95)); }
.panneau > h2, .panneau > .panneau-tete h2 { font-size: 16px; font-weight: 600; }
.panneau-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-block-end: 14px; }
.etiquette { font: 500 10.5px var(--code); letter-spacing: .16em; text-transform: uppercase; color: var(--texte-3); }
.aide { color: var(--texte-2); font-size: 13.5px; }
.note { color: var(--texte-3); font-size: 12.5px; }
.grille { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.pile { display: grid; gap: 14px; min-width: 0; align-content: start; }
.pile.serre { gap: 8px; }
.rangee { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
.pousse { margin-inline-start: auto; }
.coupe { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.casse { overflow-wrap: anywhere; word-break: break-word; }
.mono { font-family: var(--code); font-size: .92em; }
@media (min-width: 760px) { .grille.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grille.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grille.c21 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } .grille.c12 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); } .grille.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: no-preference) {
  .apparait { animation: materialise .55s var(--sortie) both; animation-delay: calc(var(--i, 0) * 45ms); }
  @keyframes materialise { from { opacity: 0; transform: translateY(10px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
  .pulse { animation: pulse 1.8s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: .45; } }
  .voyant::before { animation: pulse 2.4s ease-in-out infinite; }
}

/* --- Boutons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 14px; cursor: pointer; text-decoration: none;
  border: 1px solid var(--trait-fort); border-radius: var(--r-2); background: rgba(255, 255, 255, .03); color: var(--blanc); font-weight: 600; font-size: 14px; line-height: 1.2;
  transition: background var(--dur-1), border-color var(--dur-1), box-shadow var(--dur-2), transform var(--dur-1); text-align: center;
}
.btn:hover { background: var(--vert-voile); border-color: var(--vert); color: var(--blanc); }
.btn:active { transform: translateY(1px); }
.btn .ico { width: 17px; height: 17px; flex: none; }
.btn.primaire { background: linear-gradient(180deg, #45F29C, var(--vert)); border-color: var(--vert); color: var(--vert-encre); box-shadow: 0 0 26px -8px rgba(43, 232, 136, .8); }
.btn.primaire:hover { background: linear-gradient(180deg, #6BFFB5, #3BF094); color: var(--vert-encre); box-shadow: 0 0 34px -6px rgba(43, 232, 136, .95); }
.btn.fantome { border-color: transparent; background: none; color: var(--texte-2); }
.btn.fantome:hover { color: var(--blanc); background: rgba(255, 255, 255, .05); border-color: var(--trait); }
.btn.danger { border-color: rgba(255, 110, 110, .5); color: var(--rouge); }
.btn.danger:hover { background: var(--rouge-voile); border-color: var(--rouge); color: #FFB0B0; }
.btn.petit { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.btn.grand { min-height: 52px; padding: 12px 20px; font-size: 16px; }
.btn.bloc { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; }
/* Présent et Absent bloqués avant l'heure : même aspect éteint pour les deux (le vert restait trop vif à côté du rouge). */
.btn.present[disabled]:not([aria-pressed="true"]), .btn.absent[disabled]:not([aria-pressed="true"]) { border-color: var(--trait-fort); color: var(--gris); opacity: .55; }
.btn.present { border-color: var(--vert); color: var(--vert-vif); }
.btn.present:hover:not([disabled]), .btn.present[aria-pressed="true"] { background: var(--vert); color: var(--vert-encre); box-shadow: 0 0 30px -6px rgba(43, 232, 136, .9); }
.btn.absent { border-color: rgba(255, 110, 110, .6); color: var(--rouge); }
.btn.absent:hover:not([disabled]), .btn.absent[aria-pressed="true"] { background: var(--rouge); color: #230505; border-color: var(--rouge); }
.btn[aria-pressed="true"] { border-color: var(--vert); background: var(--vert-voile); color: var(--vert-vif); }
.lien-bouton { background: none; border: 0; padding: 0; color: var(--vert); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
.lien-bouton:hover { color: var(--vert-vif); }

/* --- Puces : statut, risque, réponse --- */
.statut, .risque-badge, .badge-reponse, .puce {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: var(--r-pilule); white-space: nowrap;
  font: 600 11.5px var(--texte); border: 1px solid var(--trait); background: var(--gris-voile); color: var(--texte-2);
}
.statut::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.statut[data-statut="a_venir"] { color: var(--bleu); background: var(--bleu-voile); border-color: rgba(108, 199, 255, .35); }
.statut[data-statut="confirme"], .statut[data-statut="present"], .statut[data-statut="envoye"] { color: var(--vert-vif); background: var(--vert-voile); border-color: var(--trait-fort); }
.statut[data-statut="present"] { background: var(--vert); color: var(--vert-encre); border-color: var(--vert); }
.statut[data-statut="retard"], .statut[data-statut="a_verifier"], .statut[data-statut="en_attente"], .statut[data-statut="simule"] { color: var(--ambre); background: var(--ambre-voile); border-color: rgba(247, 185, 85, .4); }
.statut[data-statut="absent"], .statut[data-statut="echec"] { color: var(--rouge); background: var(--rouge-voile); border-color: rgba(255, 110, 110, .4); }
.risque-badge { font-family: var(--code); cursor: pointer; }
button.risque-badge:hover { filter: brightness(1.25); }
.risque-badge[data-niveau="faible"] { color: var(--texte-2); }
.risque-badge[data-niveau="moyen"] { color: var(--ambre); background: var(--ambre-voile); border-color: rgba(247, 185, 85, .4); }
.risque-badge[data-niveau="eleve"] { color: var(--rouge); background: var(--rouge-voile); border-color: rgba(255, 110, 110, .5); box-shadow: 0 0 18px -6px var(--rouge); }
.badge-reponse { color: var(--bleu); background: var(--bleu-voile); border-color: rgba(108, 199, 255, .4); }
.puce.vert { color: var(--vert-vif); background: var(--vert-voile); border-color: var(--trait-fort); }
.puce.ambre { color: var(--ambre); background: var(--ambre-voile); border-color: rgba(247, 185, 85, .4); }
.puce.rouge { color: var(--rouge); background: var(--rouge-voile); border-color: rgba(255, 110, 110, .4); }
.puce .ico { width: 13px; height: 13px; }

/* --- Formulaires --- */
.champ { display: grid; gap: 6px; min-width: 0; align-content: start; }
.champ > label, .champ > .libelle { font-weight: 600; font-size: 13px; color: var(--blanc); }
.champ .aide { font-size: 12.5px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="url"], input[type="number"], input[type="search"], input[type="date"], input[type="time"], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; background: var(--champ); border: 1px solid rgba(64, 255, 160, .22); border-radius: var(--r-2); color: var(--blanc);
  transition: border-color var(--dur-1), box-shadow var(--dur-1); min-width: 0;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--vert) 50%), linear-gradient(135deg, var(--vert) 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 32px; }
html[dir="rtl"] select { background-position: 12px 18px, 17px 18px; }
select option { background: #0B120F; color: var(--blanc); }
input::placeholder, textarea::placeholder { color: var(--texte-3); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: rgba(64, 255, 160, .4); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--vert); box-shadow: 0 0 0 3px rgba(43, 232, 136, .22); }
input[type="range"] { width: 100%; accent-color: var(--vert); min-height: 32px; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--vert); flex: none; }
.coche { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.coche span { min-width: 0; }
.ligne-champs { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 620px) { .ligne-champs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ligne-champs.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.erreur-champ, .message-erreur { color: #FFA3A3; font-size: 13.5px; }
.message-erreur { background: var(--rouge-voile); border: 1px solid rgba(255, 110, 110, .4); border-radius: var(--r-2); padding: 10px 12px; }
.message-ok { color: var(--vert-vif); background: var(--vert-voile); border: 1px solid var(--trait-fort); border-radius: var(--r-2); padding: 10px 12px; font-size: 13.5px; }
.message-info { color: var(--blanc); background: var(--bleu-voile); border: 1px solid rgba(108, 199, 255, .35); border-radius: var(--r-2); padding: 10px 12px; font-size: 13.5px; }
.message-alerte { color: #FFDFA6; background: var(--ambre-voile); border: 1px solid rgba(247, 185, 85, .45); border-radius: var(--r-2); padding: 10px 12px; font-size: 13.5px; }
.bascule { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.bascule input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bascule i { width: 42px; height: 24px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid var(--trait-fort); position: relative; flex: none; transition: background var(--dur-1); }
.bascule i::after { content: ''; position: absolute; inset-block-start: 2px; inset-inline-start: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--texte-2); transition: inset-inline-start var(--dur-1), background var(--dur-1); }
.bascule input:checked + i { background: rgba(43, 232, 136, .3); }
.bascule input:checked + i::after { inset-inline-start: 20px; background: var(--vert); box-shadow: 0 0 10px var(--vert); }
.bascule input:focus-visible + i { outline: 2px solid var(--vert-vif); outline-offset: 2px; }
.code-bloc { font: 500 12.5px/1.6 var(--code); background: rgba(0, 0, 0, .5); border: 1px solid var(--trait); border-radius: var(--r-2); padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; color: #CFF7E2; margin: 0; max-width: 100%; }
.secret { font: 600 13px var(--code); background: rgba(0, 0, 0, .55); border: 1px dashed var(--trait-fort); border-radius: var(--r-2); padding: 10px 12px; overflow-wrap: anywhere; color: var(--vert-vif); }

/* --- Onglets et filtres --- */
.onglets { display: flex; gap: 6px; overflow-x: auto; padding-block-end: 6px; margin-block-end: 16px; scrollbar-width: thin; border-block-end: 1px solid var(--trait); }
.onglet, .filtre, .periode-btn {
  flex: none; min-height: 36px; padding: 6px 12px; border-radius: var(--r-pilule); border: 1px solid var(--trait); background: rgba(255, 255, 255, .02); color: var(--texte-2);
  font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; transition: background var(--dur-1), color var(--dur-1), border-color var(--dur-1);
}
.onglet:hover, .filtre:hover, .periode-btn:hover { color: var(--blanc); border-color: var(--trait-fort); }
.onglet[aria-selected="true"], .filtre[aria-pressed="true"], .periode-btn[aria-pressed="true"] { color: var(--vert-encre); background: var(--vert); border-color: var(--vert); box-shadow: 0 0 20px -8px var(--vert); }
.filtres { display: flex; flex-wrap: wrap; gap: 6px; }
.barre-filtres { display: grid; gap: 10px; margin-block-end: 14px; }
@media (min-width: 760px) { .barre-filtres .ligne-selecteurs { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 10px; } }
.barre-filtres .ligne-selecteurs { display: grid; gap: 10px; }

/* --- Indicateurs --- */
.kpi { display: grid; gap: 4px; text-align: start; cursor: pointer; width: 100%; color: inherit; }
button.kpi { font: inherit; }
.kpi .valeur { font: 700 clamp(34px, 7vw, 46px)/1 var(--titre); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi .valeur small { font: 500 13px var(--code); color: var(--texte-3); letter-spacing: 0; margin-inline-start: 6px; }
.kpi.vert .valeur { color: var(--vert-vif); text-shadow: 0 0 26px rgba(43, 232, 136, .55); }
.kpi.rouge .valeur { color: var(--rouge); text-shadow: 0 0 26px rgba(255, 110, 110, .45); }
.kpi.ambre .valeur { color: var(--ambre); text-shadow: 0 0 26px rgba(247, 185, 85, .45); }
.anneau-bloc { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.anneau { width: 132px; height: 132px; flex: none; position: relative; }
.anneau svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anneau circle { fill: none; stroke-width: 9; }
.anneau .piste { stroke: rgba(255, 255, 255, .07); }
.anneau .arc { stroke: var(--vert); stroke-linecap: round; filter: drop-shadow(0 0 8px rgba(43, 232, 136, .7)); transition: stroke-dashoffset 1s var(--sortie); }
.anneau .centre { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.anneau .centre strong { font: 700 30px/1 var(--titre); font-variant-numeric: tabular-nums; }
.anneau .centre span { font: 500 10px var(--code); letter-spacing: .14em; text-transform: uppercase; color: var(--texte-3); margin-block-start: 4px; }
.barre-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; }
.barre-ligne .nom { font-weight: 600; font-size: 13.5px; }
.barre-ligne .chiffre { font: 500 12px var(--code); color: var(--texte-2); white-space: nowrap; }
.jauge { grid-column: 1 / -1; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.jauge i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--vert-fonce), var(--vert)); box-shadow: 0 0 12px rgba(43, 232, 136, .6); transition: width .9s var(--sortie); }
.jauge[data-alerte="oui"] i { background: linear-gradient(90deg, #C98A1C, var(--ambre)); box-shadow: 0 0 12px rgba(247, 185, 85, .6); }
.jauge[data-alerte="plein"] i { background: linear-gradient(90deg, #B93B3B, var(--rouge)); box-shadow: 0 0 12px rgba(255, 110, 110, .6); }
.jours { display: flex; align-items: flex-end; gap: 4px; height: 120px; overflow-x: auto; padding-block-end: 2px; }
.jour { flex: 1 0 18px; max-width: 64px; display: grid; grid-template-rows: 1fr auto; gap: 5px; height: 100%; min-width: 18px; }
.jour .pile-barres { display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 2px; }
.jour .pile-barres i { display: block; border-radius: 2px; min-height: 3px; }
.jour .pile-barres .p { background: var(--vert); box-shadow: 0 0 10px rgba(43, 232, 136, .5); }
.jour .pile-barres .a { background: var(--rouge); opacity: .85; }
.jour span { font: 500 9.5px var(--code); color: var(--texte-3); text-align: center; white-space: nowrap; }
.legende { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--texte-2); }
.legende i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-inline-end: 5px; }

/* --- Lignes de rendez-vous --- */
.liste { display: grid; gap: 8px; }
.rdv-ligne {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 11px 12px; border: 1px solid var(--trait); border-radius: var(--r-2);
  background: rgba(255, 255, 255, .02); transition: border-color var(--dur-1), background var(--dur-1); position: relative; min-width: 0;
}
.rdv-ligne:hover { border-color: var(--trait-fort); background: rgba(43, 232, 136, .05); }
.rdv-ligne[data-encours="oui"] { border-color: var(--vert); box-shadow: var(--lueur); background: rgba(43, 232, 136, .07); }
.rdv-ligne[data-nouveau="oui"] { animation: arrivee 1.6s var(--sortie); }
@keyframes arrivee { 0% { box-shadow: 0 0 0 2px var(--vert), 0 0 40px 0 rgba(43, 232, 136, .8); transform: scale(1.012); } 100% { box-shadow: none; transform: none; } }
.rdv-heure { font: 600 15px var(--code); font-variant-numeric: tabular-nums; color: var(--blanc); text-align: center; min-width: 52px; }
.rdv-heure small { display: block; font: 500 10px var(--code); color: var(--texte-3); letter-spacing: .06em; text-transform: uppercase; }
.rdv-corps { min-width: 0; display: grid; gap: 4px; }
.rdv-nom { font-weight: 600; color: var(--blanc); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
a.rdv-nom:hover { color: var(--vert-vif); }
a.rdv-nom::after { content: ''; position: absolute; inset: 0; }
.rdv-meta { color: var(--texte-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rdv-puces { display: flex; flex-wrap: wrap; gap: 6px; position: relative; z-index: 1; }
.rdv-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-block-start: 6px; position: relative; z-index: 1; }
.rdv-actions.issue { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rdv-actions .titre-issue { grid-column: 1 / -1; font-size: 12.5px; color: var(--texte-2); }
.vide { text-align: center; padding: 28px 16px; color: var(--texte-2); border: 1px dashed var(--trait-fort); border-radius: var(--r-2); display: grid; gap: 10px; justify-items: center; }
.vide .ico { width: 34px; height: 34px; color: var(--vert); opacity: .8; }
.vide strong { color: var(--blanc); font: 600 16px var(--titre); }
.vide p { max-width: 52ch; }

/* --- Fiche pré-appel --- */
.fiche-nom { font-size: clamp(22px, 5vw, 30px); font-weight: 700; overflow-wrap: anywhere; }
.fiche-quand { font: 600 15px var(--code); color: var(--vert-vif); }
.fiche-decision { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.issue-groupe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.qr { display: grid; gap: 12px; }
.qr dt { color: var(--texte-3); font-size: 12.5px; }
.qr dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.infos { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 520px) { .infos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.infos > div { min-width: 0; }
.infos dt, .info-cle { color: var(--texte-3); font: 500 10.5px var(--code); letter-spacing: .12em; text-transform: uppercase; }
.infos dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.raisons { display: grid; gap: 6px; }
.raisons li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--texte-2); }
.raisons li::before { content: ''; flex: none; width: 6px; height: 6px; margin-block-start: 7px; border-radius: 1px; background: var(--ambre); transform: rotate(45deg); }
.raisons li.plus::before { background: var(--vert); }
.score { display: flex; align-items: baseline; gap: 8px; }
.score strong { font: 700 40px/1 var(--titre); font-variant-numeric: tabular-nums; }
.score span { color: var(--texte-3); font: 500 12px var(--code); }

/* --- Frise des messages --- */
.frise { display: grid; gap: 0; position: relative; }
.frise-groupe { font: 500 10.5px var(--code); letter-spacing: .16em; text-transform: uppercase; color: var(--texte-3); padding: 10px 0 6px; }
.etape {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 8px 8px 8px 0; position: relative; text-align: start; width: 100%;
  background: none; border: 0; border-radius: var(--r-2); color: inherit; cursor: default; padding-inline: 0 8px;
}
button.etape { cursor: pointer; }
button.etape:hover, .etape[aria-current="true"] { background: rgba(43, 232, 136, .07); }
.etape[aria-current="true"] { box-shadow: inset 0 0 0 1px var(--trait-fort); }
.etape::before { content: ''; position: absolute; inset-inline-start: 12.5px; inset-block: 0; width: 1px; background: var(--trait-fort); }
.etape:first-of-type::before { inset-block-start: 16px; }
.etape:last-of-type::before { inset-block-end: calc(100% - 16px); }
.etape .pastille { width: 26px; height: 26px; border-radius: 50%; display: grid; place-content: center; background: var(--surface-3); border: 1px solid var(--trait-fort); position: relative; z-index: 1; color: var(--texte-2); }
.etape .pastille .ico { width: 13px; height: 13px; }
.etape[data-etat="envoye"] .pastille, .etape[data-etat="simule"] .pastille { background: var(--vert); color: var(--vert-encre); border-color: var(--vert); box-shadow: 0 0 12px rgba(43, 232, 136, .6); }
.etape[data-etat="en_attente"] .pastille { border-color: var(--ambre); color: var(--ambre); }
.etape[data-etat="echec"] .pastille { border-color: var(--rouge); color: var(--rouge); }
.etape[data-etat="ignore"] .pastille, .etape[data-etat="annule"] .pastille { opacity: .55; }
.etape-titre { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.etape-sous { color: var(--texte-3); font-size: 12.5px; overflow-wrap: anywhere; }
.etape-corps-zone { min-width: 0; display: grid; gap: 2px; }

/* --- Journal --- */
.journal-ligne { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px 12px; border: 1px solid var(--trait); border-radius: var(--r-2); background: rgba(255, 255, 255, .02); min-width: 0; }
.journal-ligne .haut { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.journal-ligne time { font: 500 11.5px var(--code); color: var(--texte-3); white-space: nowrap; }
.journal-ligne .texte { font-size: 13.5px; overflow-wrap: anywhere; }
.journal-ligne .raison { font-size: 12.5px; color: var(--ambre); overflow-wrap: anywhere; }
.journal-ligne[data-statut="echec"] .raison { color: var(--rouge); }

/* --- Séquences --- */
.seq-carte, .closer-carte, .choix-carte {
  display: grid; gap: 8px; text-align: start; width: 100%; padding: 14px; border: 1px solid var(--trait); border-radius: var(--r-2); background: rgba(255, 255, 255, .02); color: inherit; cursor: pointer; min-width: 0;
  transition: border-color var(--dur-1), background var(--dur-1), box-shadow var(--dur-2);
}
.seq-carte:hover, .closer-carte:hover, .choix-carte:hover { border-color: var(--trait-fort); background: rgba(43, 232, 136, .05); }
.seq-carte[aria-current="true"], .closer-carte[aria-current="true"], .choix-carte[aria-pressed="true"], .choix-carte[data-etat="connecte"] { border-color: var(--vert); box-shadow: var(--lueur); background: rgba(43, 232, 136, .08); }
.seq-carte h3, .closer-carte h3, .choix-carte h3 { font-size: 15.5px; font-weight: 600; overflow-wrap: anywhere; }
.variables { display: flex; flex-wrap: wrap; gap: 6px; }
.variables button { font: 500 12px var(--code); padding: 5px 9px; border-radius: var(--r-1); border: 1px solid var(--trait-fort); background: rgba(43, 232, 136, .07); color: var(--vert-vif); cursor: pointer; }
.variables button:hover { background: var(--vert); color: var(--vert-encre); }
.apercu { background: rgba(0, 0, 0, .45); border: 1px solid var(--trait); border-radius: var(--r-3); padding: 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; min-height: 80px; }
.apercu-sujet { font-weight: 600; padding-block-end: 8px; margin-block-end: 8px; border-block-end: 1px solid var(--trait); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-content: center; font: 700 14px var(--titre); background: var(--vert-voile); border: 1px solid var(--trait-fort); color: var(--vert-vif); flex: none; }

/* --- Assistant --- */
.progression { display: flex; align-items: center; gap: 10px; margin-block-end: 18px; }
.progression strong { font: 600 13px var(--code); color: var(--vert-vif); white-space: nowrap; }
.progression .jauge { flex: 1; }
.etroit { max-width: 760px; margin-inline: auto; }

/* --- Accès (connexion, inscription) --- */
.acces { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; padding: 24px 16px; }
.acces-carte { width: 100%; max-width: 440px; margin-inline: auto; display: grid; gap: 18px; }
.acces-carte .marque { font-size: 24px; justify-self: center; }
.acces-carte .marque svg { width: 36px; height: 36px; }
.acces-carte h1 { font-size: 24px; text-align: center; }
.acces-carte .accroche { text-align: center; color: var(--texte-2); }
.acces-pied { text-align: center; color: var(--texte-2); font-size: 14px; display: grid; gap: 8px; }
.acces-langues { display: flex; justify-content: center; gap: 6px; }

/* --- Dialogue --- */
dialog.dialogue {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; color: var(--blanc); border: 1px solid var(--trait-fort); border-radius: var(--r-3);
  background: var(--coins), linear-gradient(180deg, #101A15, #070B09); box-shadow: 0 0 60px -20px rgba(43, 232, 136, .5), 0 40px 90px -30px #000;
}
dialog.dialogue.large { width: min(760px, calc(100vw - 24px)); }
dialog.dialogue::backdrop { background: rgba(2, 4, 3, .78); backdrop-filter: blur(4px); }
.dialogue-tete { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-block-end: 1px solid var(--trait); }
.dialogue-tete h2 { font-size: 18px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dialogue-corps { padding: 18px; display: grid; gap: 14px; overflow-y: auto; }
.dialogue-pied { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-block-start: 1px solid var(--trait); }

/* --- Messages furtifs --- */
#toasts { position: fixed; inset-inline: 12px; inset-block-end: calc(var(--nav-basse) + 14px + env(safe-area-inset-bottom)); z-index: 90; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; max-width: min(520px, 100%); padding: 11px 16px; border-radius: var(--r-2); font-weight: 600; font-size: 14px; overflow-wrap: anywhere;
  background: #0E1A14; border: 1px solid var(--vert); color: var(--blanc); box-shadow: 0 0 34px -10px rgba(43, 232, 136, .8), 0 20px 40px -20px #000;
}
.toast[data-type="erreur"] { border-color: var(--rouge); box-shadow: 0 0 34px -10px rgba(255, 110, 110, .7), 0 20px 40px -20px #000; }
.toast[data-type="info"] { border-color: var(--bleu); box-shadow: 0 0 34px -10px rgba(108, 199, 255, .6), 0 20px 40px -20px #000; }
@media (prefers-reduced-motion: no-preference) { .toast { animation: materialise .4s var(--sortie) both; } }
@media (min-width: 960px) { #toasts { inset-block-end: 22px; inset-inline-start: calc(var(--rail) + 12px); } }

/* --- Bandeaux --- */
.bandeau { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 11px 14px; border-radius: var(--r-2); border: 1px solid var(--trait-fort); background: var(--vert-voile); margin-block-end: 16px; font-size: 14px; }
.bandeau.ambre { border-color: rgba(247, 185, 85, .45); background: var(--ambre-voile); }
.bandeau.rouge { border-color: rgba(255, 110, 110, .45); background: var(--rouge-voile); }
.bandeau strong { font-weight: 600; }
.bandeau > :first-child { flex: 1 1 220px; min-width: 0; }

/* --- Menu « Plus » (téléphone) --- */
.feuille { position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; background: rgba(2, 4, 3, .72); backdrop-filter: blur(4px); }
.feuille-corps { background: linear-gradient(180deg, #101A15, #060A08); border-block-start: 1px solid var(--trait-fort); border-radius: 16px 16px 0 0; padding: 14px 14px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 6px; max-height: 86dvh; overflow-y: auto; }
.feuille-corps a, .feuille-corps button.lien { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-radius: var(--r-2); color: var(--blanc); text-decoration: none; font-weight: 600; background: none; border: 1px solid transparent; width: 100%; cursor: pointer; text-align: start; }
.feuille-corps a:hover, .feuille-corps button.lien:hover, .feuille-corps a[aria-current="page"] { background: var(--vert-voile); border-color: var(--trait-fort); }
.feuille-corps .ico { width: 20px; height: 20px; color: var(--vert); }

/* --- Démo : maquette de téléphone neutre --- */
#demo-tel {
  position: fixed; z-index: 70; inset-inline-end: 16px; inset-block-end: calc(var(--nav-basse) + 16px); width: min(320px, calc(100vw - 32px)); height: min(600px, calc(100dvh - var(--nav-basse) - 90px));
  border-radius: 34px; padding: 12px; background: linear-gradient(160deg, #1B2620, #050807); border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 0 0 1px #000, 0 0 60px -14px rgba(43, 232, 136, .55), 0 40px 80px -30px #000; display: grid; grid-template-rows: minmax(0, 1fr);
}
@media (min-width: 960px) { #demo-tel { inset-block-end: 28px; inset-inline-end: 28px; height: min(640px, calc(100dvh - 56px)); } }
@media (prefers-reduced-motion: no-preference) { #demo-tel { animation: glisse .55s var(--sortie) both; } @keyframes glisse { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } } }
.tel-ecran { border-radius: 24px; background: #0A0F0D; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; min-width: 0; }
.tel-tete { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #121B17; border-block-end: 1px solid rgba(255, 255, 255, .07); }
.tel-tete div { min-width: 0; flex: 1; }
.tel-tete strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tel-tete div span { display: block; font-size: 11px; color: var(--texte-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tel-tete .avatar { width: 36px; height: 36px; }
.tel-fermer { background: none; border: 0; color: var(--texte-2); cursor: pointer; width: 32px; height: 32px; border-radius: 50%; display: grid; place-content: center; }
.tel-fermer:hover { background: rgba(255, 255, 255, .08); color: var(--blanc); }
.tel-fil { overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.tel-jour { align-self: center; font: 500 10px var(--code); letter-spacing: .1em; color: var(--texte-3); text-transform: uppercase; padding: 3px 8px; }
.tel-bulle { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; background: #1A2620; align-self: flex-start; border-start-start-radius: 4px; }
.tel-bulle.entrant { background: #1E5B3C; align-self: flex-end; border-start-start-radius: 14px; border-start-end-radius: 4px; }
.tel-bulle time { display: block; font: 500 10px var(--code); color: rgba(255, 255, 255, .55); margin-block-start: 4px; text-align: end; }
.tel-boutons { display: grid; gap: 6px; align-self: flex-start; width: 88%; }
.tel-bouton { min-height: 38px; border-radius: 10px; border: 1px solid rgba(125, 255, 192, .35); background: #121B17; color: var(--vert-vif); font-weight: 600; font-size: 13.5px; cursor: pointer; padding: 6px 10px; }
.tel-bouton:hover:not([disabled]) { background: var(--vert); color: var(--vert-encre); }
.tel-bouton[disabled] { opacity: .5; cursor: default; }
.tel-bouton[data-touche="oui"] { opacity: 1; background: #1E5B3C; color: var(--blanc); border-color: var(--vert); }
.tel-mention { text-align: center; font: 500 10px var(--code); letter-spacing: .12em; text-transform: uppercase; color: var(--texte-3); padding: 8px; border-block-start: 1px solid rgba(255, 255, 255, .07); }
.tel-notif { margin: 10px 4px; padding: 12px; border-radius: 14px; background: #17221C; border: 1px solid rgba(255, 255, 255, .1); display: grid; gap: 8px; font-size: 13.5px; }
.tel-notif .etiquette { color: var(--vert); }
#demo-accueil { position: fixed; inset: 0; z-index: 95; background: radial-gradient(700px 500px at 50% 0%, rgba(43, 232, 136, .2), transparent 65%), #040706; display: grid; grid-template-rows: auto 1fr auto; padding: 22px; }
#demo-accueil .accueil-heure { text-align: center; font: 600 58px/1 var(--titre); letter-spacing: -.03em; margin-block-start: 8vh; }
#demo-accueil .accueil-date { text-align: center; color: var(--texte-2); margin-block-start: 8px; }
#demo-accueil .accueil-grille { align-self: center; display: grid; grid-template-columns: repeat(4, 64px); gap: 26px 22px; justify-content: center; }
#demo-accueil .accueil-app { display: grid; justify-items: center; gap: 6px; font-size: 11.5px; color: var(--texte-2); background: none; border: 0; cursor: pointer; padding: 0; }
#demo-accueil .accueil-app i { width: 60px; height: 60px; border-radius: 16px; background: rgba(255, 255, 255, .07); display: grid; place-content: center; }
#demo-accueil .accueil-app.showupro i { background: none; box-shadow: 0 0 26px -6px rgba(43, 233, 138, .8); }
#demo-accueil .accueil-app.showupro svg { width: 60px; height: 60px; }
#demo-accueil .accueil-app.showupro { color: var(--blanc); font-weight: 600; }
#demo-accueil.ouvre { animation: ouvre .5s var(--sortie) forwards; }
@keyframes ouvre { to { opacity: 0; transform: scale(1.25); } }

/* --- Paramétrage : conversation avec l'assistant, propositions, pas-à-pas --- */
.fil { display: flex; flex-direction: column; gap: 10px; max-height: min(62vh, 640px); overflow-y: auto; padding: 4px 2px; }
.fil-bulle { max-width: min(88%, 720px); padding: 10px 13px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; background: var(--surface-3); border: 1px solid var(--trait); align-self: flex-start; border-start-start-radius: 4px; }
.fil-bulle.client { align-self: flex-end; background: rgba(43, 233, 138, .14); border-color: var(--trait-fort); border-start-start-radius: 14px; border-start-end-radius: 4px; }
.fil-qui { display: block; font: 600 10.5px var(--code); letter-spacing: .12em; text-transform: uppercase; color: var(--vert); margin-block-end: 4px; }
.fil-note { align-self: center; text-align: center; font-size: 12.5px; color: var(--texte-2); max-width: 62ch; padding: 4px 8px; }
.fil-erreur { align-self: stretch; }
.fil-carte { align-self: stretch; min-width: 0; }
.proposition { padding: 14px; }
.tel-apercu { margin-block-start: 6px; padding: 10px; border-radius: 16px; background: #0A0F0D; border: 1px solid rgba(255, 255, 255, .12); display: grid; gap: 6px; max-width: 360px; }
.tel-apercu .tel-bulle { max-width: 100%; }
.tel-apercu .tel-boutons { width: 100%; }
.tel-apercu .tel-mention { padding: 4px; border: 0; }
.modele-apercu { max-width: none; align-content: start; }
.modele-apercu .etiquette { color: var(--vert); }
ol.pas { list-style: none; counter-reset: pas; display: grid; gap: 10px; padding: 0; }
ol.pas > li { counter-increment: pas; display: block; position: relative; padding-inline-start: 38px; min-height: 26px; overflow-wrap: anywhere; }
ol.pas > li::before { content: counter(pas); position: absolute; inset-inline-start: 0; inset-block-start: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-content: center; font: 600 12px var(--code); color: var(--vert-vif); background: var(--vert-voile); border: 1px solid var(--trait-fort); }
.terme { color: var(--blanc); font-weight: 600; }
.aide-etape .puce, .proposition .puce, .journal-ligne .puce { white-space: normal; text-align: start; }
.sources { border-block-start: 1px solid var(--trait); padding-block-start: 10px; font-size: 12.5px; }
.sources .raisons li { overflow-wrap: anywhere; }
.a-copier { display: grid; gap: 8px; justify-items: start; }
.a-copier .apercu { width: 100%; min-height: 0; }
details.modele-meta { border: 1px solid var(--trait); border-radius: var(--r-2); padding: 10px 12px; background: rgba(255, 255, 255, .02); min-width: 0; }
details.modele-meta[open] { border-color: var(--trait-fort); }
details.modele-meta summary { cursor: pointer; font-weight: 600; overflow-wrap: anywhere; }
details.modele-meta .apercu { min-height: 0; }
.aide-etape .panneau-tete h2 { flex: 1 1 260px; min-width: 0; }

/* --- Divers --- */
@media (max-width: 1099.98px) { .masque-etroit { display: none; } }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
hr.filet { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--trait-fort), transparent); margin: 4px 0; }
.retour { display: inline-flex; align-items: center; gap: 6px; color: var(--texte-2); text-decoration: none; font-weight: 600; font-size: 13.5px; margin-block-end: 12px; }
.retour:hover { color: var(--vert-vif); }
html[dir="rtl"] .retour .ico, html[dir="rtl"] .ico.fleche { transform: scaleX(-1); }
.compte-a-rebours { font: 600 13px var(--code); color: var(--vert-vif); }
table.apercu-table { width: 100%; border-collapse: collapse; font: 500 11.5px var(--code); }
table.apercu-table th, table.apercu-table td { border: 1px solid var(--trait); padding: 5px 7px; text-align: start; white-space: nowrap; }
.defile-x { overflow-x: auto; max-width: 100%; }
.formule { display: grid; gap: 10px; align-content: start; }
.formule[data-active="oui"] { border-color: var(--vert); box-shadow: var(--lueur); }
.formule h3 { font-size: 20px; }
.formule ul { display: grid; gap: 6px; color: var(--texte-2); font-size: 13.5px; }
.formule li { display: flex; gap: 8px; }
.formule li::before { content: '›'; color: var(--vert); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ── Proposition de paramétrage : contenu complet des messages, liens écrits en dur (audit final, E-08) ── */
.contenu-sequence { margin-block-start: 10px; border-block-start: 1px solid var(--trait); padding-block-start: 10px; }
.contenu-sequence > summary { cursor: pointer; font-weight: 600; color: var(--blanc); padding-block: 4px; }
.contenu-sequence > ol { list-style: none; padding: 0; margin: 10px 0 0; }
.contenu-etape { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--trait); border-radius: var(--r-2); background: rgba(255,255,255,.02); min-width: 0; }
.contenu-etape .haut { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.contenu-etape[data-marque="inchangee"] { opacity: .78; }
.contenu-etape[data-marque="retiree"] .contenu-corps, .contenu-etape[data-marque="retiree"] .contenu-sujet { text-decoration: line-through; opacity: .7; }
.contenu-sujet { font-weight: 600; overflow-wrap: anywhere; }
.contenu-corps { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
mark.lien-dur { background: rgba(255, 184, 77, .2); color: #ffd28a; border-radius: 4px; padding: 0 3px; outline: 1px solid rgba(255, 184, 77, .55); overflow-wrap: anywhere; font-family: var(--code); font-size: .92em; }
.liens-en-dur { display: grid; gap: 8px; margin-block-end: 12px; }
.liens-en-dur ul { list-style: none; padding: 0; margin: 0; }
.liens-en-dur li { overflow-wrap: anywhere; }

/* Message affiché sans JavaScript (aucun style en ligne : la politique de sécurité du contenu les interdit). */
.sans-js { padding: 24px; font-family: sans-serif; color: #fff; background: #040706; }

/* ── Guide vidéo : bouton d'en-tête, lecteur en fenêtre, page « Guide vidéo » ── */
.video-bouton { color: var(--vert-vif, var(--vert)); border-color: var(--trait); white-space: nowrap; }
.video-bouton:hover { border-color: var(--trait-fort); }
.video-sous-retour { display: flex; justify-content: flex-end; margin-block: -6px 10px; }
.video-cadre { background: #000; border: 1px solid var(--trait); border-radius: var(--r-2); overflow: hidden; display: grid; place-items: center; }
.video-lecteur { display: block; width: 100%; height: auto; max-height: 70vh; aspect-ratio: 16 / 9; background: #000; }
.video-lecteur::cue { font-family: var(--texte); font-size: 1rem; line-height: 1.35; color: #fff; background: rgba(0, 0, 0, .78); }
dialog.dialogue#video-dialogue { width: min(980px, calc(100vw - 24px)); }
.video-autres { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.video-autres .lien-bouton { display: inline-flex; align-items: center; gap: 8px; text-align: start; }
.video-groupe { margin-block-end: 22px; }
.video-groupe > h2 { margin-block-end: 10px; }
.video-grille { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.video-carte {
  display: grid; gap: 8px; align-content: start; text-align: start; padding: 10px; min-width: 0; cursor: pointer;
  background: var(--panneau); border: 1px solid var(--trait); border-radius: var(--r-2); color: var(--blanc); font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.video-carte:hover, .video-carte:focus-visible { border-color: var(--vert); box-shadow: var(--lueur); }
.video-carte strong { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.video-vignette { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; border-radius: calc(var(--r-2) - 4px); overflow: hidden; }
.video-vignette img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .86; }
.video-jouer { position: absolute; inset: 0; display: grid; place-items: center; color: var(--vert); }
.video-jouer .ico { width: 46px; height: 46px; background: rgba(3, 8, 6, .72); border-radius: 50%; padding: 4px; }
.video-duree { position: absolute; inset-block-end: 6px; inset-inline-end: 6px; background: rgba(3, 8, 6, .86); border: 1px solid var(--trait); border-radius: 999px; padding: 2px 8px; font: 600 11.5px var(--code, monospace); color: var(--blanc); }
@media (prefers-reduced-motion: no-preference) { .video-carte:hover { transform: translateY(-2px); } }
@media (hover: none), (max-width: 560px) { .video-echap { display: none; } }

/* Aucun contenu venu d'une proposition (nom de séquence, e-mail, lien sans coupure possible) ne peut élargir la page (audit de contrôle, N-25). */
#param-ia, #param-sans-ia, #param-assistant, #ia-proposition, .fil-carte, .proposition, .proposition .pile { grid-template-columns: minmax(0, 1fr); min-width: 0; max-width: 100%; }
.proposition, .proposition :is(p, li, span, strong, code, summary, div, mark) { overflow-wrap: anywhere; min-width: 0; }
.proposition .haut > strong { flex: 1 1 14ch; }
.proposition .panneau-tete { flex-wrap: wrap; }
.raisons li { min-width: 0; overflow-wrap: anywhere; }
.raisons li > * { min-width: 0; }

/* Adresse e-mail : d'un seul tenant, jamais coupée au milieu ; tronquée par une ellipse si la place manque (titre = adresse complète). */
.adresse { display: inline-block; max-width: 100%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
p.adresse { display: block; }
/* Aperçu d'un message dans l'historique : les retours à la ligne du message sont gardés (« Bonjour Bastien, » puis le texte). */
.apercu-message { white-space: pre-line; color: var(--texte-2); }
.version-conditions { display: inline-block; margin-block-start: 4px; }

/* Guide d'installation sur l'écran d'accueil (24/10/2026) */
.picto-installation { display: inline-grid; place-content: center; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--trait-fort); background: var(--vert-voile); color: var(--vert-vif); vertical-align: middle; }
.picto-installation .ico { width: 16px; height: 16px; }
#guide-installation section[data-appareil="oui"] { border-color: var(--vert); box-shadow: 0 0 0 1px var(--vert) inset; }
#guide-installation ol.pas > li { line-height: 1.6; }
code.lien-code { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; font: 500 13px var(--code); padding: 8px 10px; border-radius: var(--r-2); border: 1px solid var(--trait); background: var(--panneau); }
#lien-installer { display: inline-flex; align-items: center; gap: 6px; }
