/* APPLICATION SECURITE DE DEMONSTRATION -- W.H.O.O.K (lot DS-1, 20 octobre 2026)
   Reprise de la feuille de la demonstration Proprete (lots DP-1 a DP-3),
   recopiee et adaptee : la feuille livree n'est pas touchee. Clair et sobre
   au bureau, sombre a la console du centre de reception, lisible au
   telephone a 3 h du matin. Un seul signe fort : le lisere en pointilles, la
   ligne de la ronde. Barre laterale nuit, accent bleu ; la couleur de
   l'entreprise remplace le bleu quand le prospect donne la sienne. */
:root {
  --fond: #ECEFF3;
  --surface: #FFFFFF;
  --surface2: #F5F8F8;
  --encre: #13202C;
  --encre2: #34475A;
  --gris: #5B6B78;
  --trait: #D2DBDF;
  --trait2: #E4EAEC;
  --marque: #1E5BB8;
  --marque-fonce: #164490;
  --marque-pale: #E4ECF8;
  --bleu: #1F4E8C;
  --bleu-pale: #E6EEF8;
  --vert: #23794A;
  --vert-pale: #E3F2E8;
  --rouge: #B83226;
  --rouge-pale: #F8E4E1;
  --jaune: #9A6A00;
  --jaune-pale: #FBF0D2;
  --titre: "Bahnschrift", "DIN Alternate", "Barlow Semi Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --texte: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 6px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--fond); color: var(--encre); font: 14px/1.45 var(--texte); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--bleu); }
:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }
.num, td.n, .n { font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: var(--titre); font-weight: 600; letter-spacing: .01em; margin: 0; }
h1 { font-size: 26px; line-height: 1.15; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }

/* ── La coque ─────────────────────────────────────────────────────────── */
.coque { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--encre) 0 232px, var(--fond) 232px); }
.lisere { height: 6px; background: repeating-linear-gradient(90deg, var(--marque) 0 18px, #0B141D 18px 26px); }
.lateral { background: var(--encre); color: #DCE2E0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.lateral .ent { display: flex; gap: 10px; align-items: center; padding: 18px 16px 16px; border-bottom: 1px solid #22384B; }
.logo { width: 38px; height: 38px; border-radius: 8px; background: var(--marque); color: #fff; display: grid; place-items: center;
  font: 700 16px var(--titre); flex: none; }
.ent b { display: block; font: 600 15px/1.2 var(--titre); color: #fff; }
.ent span { font-size: 11.5px; color: #8EA3B4; }
.menu { padding: 10px 8px; flex: 1; overflow-y: auto; }
.menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; color: #C9D1CE; text-decoration: none;
  font-size: 14px; border-left: 3px solid transparent; }
.menu a:hover { background: #1C3245; color: #fff; }
.menu a.est { background: #20394E; color: #fff; border-left-color: var(--marque); }
.menu a svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.menu a .pastille { margin-left: auto; background: var(--marque); color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px;
  padding: 1px 7px; }
.menu .grp { margin: 16px 10px 6px; font-size: 12px; color: #7F8D93; }
.menu .verrou { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 10px; font-size: 13px; color: #7F8D93; }
.menu .verrou i { font-style: normal; font-size: 11px; color: #A1AEB3; border: 1px solid #3A474D; border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.lateral .pied { padding: 12px 16px; border-top: 1px solid #22384B; font-size: 11.5px; color: #8796A0; }
.lateral .pied a { color: #C9D1CE; }

.principal { min-width: 0; display: flex; flex-direction: column; }
.barre { display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: var(--surface); border-bottom: 1px solid var(--trait); position: sticky; top: 0; z-index: 5; }
.barre .fil { color: var(--gris); font-size: 13px; }
.barre .fil a { color: var(--gris); text-decoration: none; }
.barre .fil a:hover { color: var(--encre); text-decoration: underline; }
.barre .esp { flex: 1; }
.bascule { display: inline-flex; border: 1px solid var(--trait); border-radius: 8px; overflow: hidden; }
.bascule button { border: 0; background: var(--surface); padding: 6px 12px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; color: var(--gris); }
.bascule button.est { background: var(--encre); color: #fff; }
.bascule svg { width: 16px; height: 16px; }
.demo-mention { font-size: 12px; color: var(--gris); }
.page { padding: 26px 28px 60px; max-width: 1280px; width: 100%; }
.entete { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.entete .sous { color: var(--gris); margin-top: 4px; }
.entete .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Boutons, champs ─────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--trait); background: var(--surface); color: var(--encre);
  padding: 8px 14px; border-radius: var(--r); cursor: pointer; text-decoration: none; font-weight: 600; font-size: 13.5px; line-height: 1.2; }
.btn:hover { border-color: #B5BDB9; background: var(--surface2); }
.btn.p { background: var(--marque); border-color: var(--marque); color: #fff; }
.btn.p:hover { background: var(--marque-fonce); border-color: var(--marque-fonce); }
.btn.s { background: var(--encre); border-color: var(--encre); color: #fff; }
.btn.danger { color: var(--rouge); }
.btn.petit { padding: 5px 10px; font-size: 12.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.lien { background: none; border: 0; color: var(--bleu); cursor: pointer; padding: 0; text-decoration: underline; font-size: inherit; }
label.ch { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--gris); }
.ch input, .ch select, .ch textarea, input.in, select.in { border: 1px solid var(--trait); border-radius: var(--r); padding: 8px 10px; background: var(--surface); color: var(--encre); font-size: 14px; min-width: 0; }
.ch input:focus, .ch select:focus, .ch textarea:focus, input.in:focus, select.in:focus { border-color: var(--bleu); outline: none; box-shadow: 0 0 0 3px var(--bleu-pale); }
.grille-ch { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 14px; }
.grille-ch .large { grid-column: 1 / -1; }

/* ── Blocs ──────────────────────────────────────────────────────────── */
.bloc { background: var(--surface); border: 1px solid var(--trait); border-radius: 8px; }
.bloc + .bloc { margin-top: 16px; }
.bloc > header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--trait2); }
.bloc > header .act { margin-left: auto; display: flex; gap: 8px; }
.bloc .corps { padding: 16px 18px; }
.deux { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.deux > div > .bloc + .bloc { margin-top: 16px; }

/* Les chiffres du haut : pas des cartes identiques, une ligne de releve. */
.releve { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--trait); border-radius: 8px; margin-bottom: 16px; }
.releve > div { padding: 14px 18px; border-left: 1px solid var(--trait2); }
.releve > div:first-child { border-left: 0; }
.releve b { display: block; font: 600 24px/1.1 var(--titre); font-variant-numeric: tabular-nums; }
.releve span { font-size: 12.5px; color: var(--gris); }
.releve .alerte b { color: var(--rouge); }

/* ── Tableaux ───────────────────────────────────────────────────────── */
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-weight: 600; font-size: 12px; color: var(--gris); padding: 9px 12px; border-bottom: 1px solid var(--trait); background: var(--surface2); white-space: nowrap; }
.t td { padding: 10px 12px; border-bottom: 1px solid var(--trait2); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tr.clic { cursor: pointer; }
.t tr.clic:hover td { background: #F4F7FB; }
.t th.n, .t td.n { text-align: right; white-space: nowrap; }
.t td .s { display: block; font-size: 12px; color: var(--gris); }
.vide { padding: 28px 18px; text-align: center; color: var(--gris); }
.vide b { display: block; color: var(--encre); font-size: 15px; margin-bottom: 4px; }

/* Statuts : la forme du point dit l'etat, la couleur le confirme. */
.etat { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.etat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.etat.gris { background: #EDEFEE; color: var(--encre2); }
.etat.bleu { background: var(--bleu-pale); color: var(--bleu); }
.etat.vert { background: var(--vert-pale); color: var(--vert); }
.etat.rouge { background: var(--rouge-pale); color: var(--rouge); }
.etat.jaune { background: var(--jaune-pale); color: var(--jaune); }
.etat.orange { background: var(--marque-pale); color: var(--marque-fonce); }

.onglets { display: flex; gap: 4px; border-bottom: 1px solid var(--trait); margin-bottom: 14px; flex-wrap: wrap; }
.onglets button { border: 0; background: none; padding: 9px 12px; cursor: pointer; color: var(--gris); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; }
.onglets button.est { color: var(--encre); border-bottom-color: var(--marque); }
.onglets button i { font-style: normal; font-weight: 400; color: var(--gris); margin-left: 4px; }
.recherche { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.recherche input { flex: 1; min-width: 200px; }

/* ── L'action : ce qui attend ───────────────────────────────────────── */
.a-faire { list-style: none; margin: 0; padding: 0; }
.a-faire li { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--trait2); }
.a-faire li:last-child { border-bottom: 0; }
.a-faire .ic { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.a-faire .ic svg { width: 18px; height: 18px; }
.a-faire .ic.rouge { background: var(--rouge-pale); color: var(--rouge); }
.a-faire .ic.orange { background: var(--marque-pale); color: var(--marque-fonce); }
.a-faire .ic.bleu { background: var(--bleu-pale); color: var(--bleu); }
.a-faire .tx { flex: 1; min-width: 0; }
.a-faire .tx b { display: block; }
.a-faire .tx span { font-size: 12.5px; color: var(--gris); }

.totaux { width: 100%; max-width: 380px; margin-left: auto; border-collapse: collapse; }
.totaux td { padding: 6px 0; }
.totaux td.n { text-align: right; font-variant-numeric: tabular-nums; }
.totaux tr.fort td { font: 600 20px var(--titre); border-top: 2px solid var(--encre); padding-top: 10px; }
.totaux tr.marge td { color: var(--vert); font-size: 13px; }

/* ── Fenetres ────────────────────────────────────────────────────────── */
.voile { position: fixed; inset: 0; background: rgba(20, 36, 51, .55); display: grid; place-items: center; z-index: 50; padding: 20px; }
.fenetre { background: var(--surface); border-radius: 10px; width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; box-shadow: 0 18px 50px rgba(20, 30, 35, .35); }
.fenetre.large { width: min(820px, 100%); }
.fenetre > header { padding: 16px 20px; border-bottom: 1px solid var(--trait2); display: flex; align-items: center; gap: 10px; }
.fenetre > header .x { margin-left: auto; }
.fenetre .corps { padding: 18px 20px; }
.fenetre > footer { padding: 14px 20px; border-top: 1px solid var(--trait2); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.note-demo { font-size: 12.5px; color: var(--jaune); background: var(--jaune-pale); border-radius: 6px; padding: 8px 10px; margin-top: 12px; }
.mail { border: 1px solid var(--trait); border-radius: 8px; background: var(--surface2); padding: 12px 14px; white-space: pre-wrap; font-size: 13.5px; }
.mail .obj { font-weight: 700; margin-bottom: 8px; }
canvas.sig { width: 100%; height: 180px; border: 1px dashed #A9B2AE; border-radius: 8px; background: #fff; touch-action: none; display: block; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--encre); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 60; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.toast b { color: #9CC2FF; }

/* ── La preparation de la demo ───────────────────────────────────────── */
.prepa { min-height: 100vh; display: grid; grid-template-rows: 6px 1fr; }
.prepa .centre { display: grid; place-items: center; padding: 30px 16px; }
.prepa .carte { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 28px; width: min(520px, 100%); }
.prepa h1 { margin-bottom: 6px; }
.prepa p { color: var(--gris); margin: 0 0 18px; }
.teintes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.teintes button { width: 34px; height: 34px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.teintes button.est { border-color: var(--encre); box-shadow: inset 0 0 0 2px #fff; }
.teintes input[type=color] { width: 40px; height: 34px; border: 1px solid var(--trait); border-radius: 8px; padding: 2px; background: #fff; }

.offres-prepa { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.offres-prepa label { border: 1px solid var(--trait); border-radius: 8px; padding: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; color: var(--encre); }
.offres-prepa label:has(input:checked) { border-color: var(--marque); box-shadow: inset 0 0 0 1px var(--marque); background: var(--marque-pale); }
.offres-prepa label.off { opacity: .55; cursor: not-allowed; }
.offres-prepa input { position: absolute; opacity: 0; pointer-events: none; }
.offres-prepa b { font: 600 14px var(--titre); }
.offres-prepa span { font-size: 11.5px; color: var(--gris); }
/* ── Le telephone du chef d'equipe ───────────────────────────────────── */
.scene-tel { display: flex; gap: 40px; align-items: flex-start; justify-content: center; padding: 26px 20px 60px; flex-wrap: wrap; }
.aside-tel { max-width: 360px; }
.aside-tel h2 { margin-bottom: 8px; }
.aside-tel p { color: var(--gris); }
.tel { width: 390px; height: 800px; border-radius: 46px; background: #11181B; padding: 14px; box-shadow: 0 30px 60px rgba(20,30,35,.35), inset 0 0 0 2px #2D383D; flex: none; }
.tel .ecran { width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: var(--fond); display: flex; flex-direction: column; position: relative; }
.m-haut { background: var(--encre); color: #fff; padding: 34px 18px 14px; }
.m-haut b { font: 600 19px var(--titre); display: block; }
.m-haut span { font-size: 12.5px; color: #A7B4B9; }
.m-corps { flex: 1; overflow-y: auto; padding: 14px; }
.m-bas { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-top: 1px solid var(--trait); padding: 6px 4px 16px; }
.m-bas button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--gris); cursor: pointer; padding: 6px 2px; }
.m-bas button.est { color: var(--marque-fonce); }
.m-bas button svg { width: 22px; height: 22px; }
.m-carte { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.m-carte b { display: block; font-size: 15px; }
.m-carte .s { font-size: 12.5px; color: var(--gris); }
.m-carte .m { font: 600 20px var(--titre); margin-top: 6px; font-variant-numeric: tabular-nums; }
.m-grand { width: 100%; justify-content: center; padding: 14px; font-size: 15px; border-radius: 10px; margin-top: 8px; }
.m-titre { font: 600 16px var(--titre); margin: 6px 2px 10px; }
.m-verrou { border: 1px dashed #B9C1BD; border-radius: 12px; padding: 12px 14px; color: var(--gris); font-size: 13px; margin-bottom: 10px; }
.m-verrou b { color: var(--encre); display: block; }
.m-retour { border: 0; background: none; color: var(--bleu); padding: 0 0 10px; cursor: pointer; font-weight: 600; }
.tel .voile { position: absolute; border-radius: 34px; }
.tel .fenetre { border-radius: 14px; }

/* ── Le document imprime (devis, facture) ────────────────────────────── */
#impression { display: none; }
.doc { -webkit-print-color-adjust: exact; print-color-adjust: exact; background: #fff; color: #1b1b1b; width: 210mm; min-height: 297mm; padding: 16mm 15mm; margin: 0 auto; font: 10.5pt/1.4 var(--texte); }
.doc .tete { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--marque); padding-bottom: 10px; margin-bottom: 14px; }
.doc .tete .logo { width: 46px; height: 46px; font-size: 19px; }
.doc .tete h1 { font-size: 20pt; white-space: nowrap; }
.doc .adr { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.doc .adr div { max-width: 48%; }
.doc .cli { border: 1px solid #ccc; border-radius: 4px; padding: 8px 10px; min-width: 70mm; }
.doc table.l { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
.doc table.l th { background: #F0F1F0; text-align: left; padding: 5px 6px; border-bottom: 1px solid #999; }
.doc table.l td { padding: 4px 6px; border-bottom: 1px solid #e3e3e3; vertical-align: top; }
.doc table.l td.n, .doc table.l th.n { text-align: right; white-space: nowrap; }
.doc table.l tr.lt td { font-weight: 700; background: #FAFAF8; }
.doc table.l tr.st td { text-align: right; font-style: italic; color: #444; }
.doc table.l .mt { font-size: 8.5pt; color: #555; display: block; }
.doc .tot { width: 80mm; margin: 12px 0 0 auto; border-collapse: collapse; }
.doc .tot td { padding: 3px 0; }
.doc .tot td.n { text-align: right; }
.doc .tot tr.f td { font-weight: 700; font-size: 12pt; border-top: 2px solid #1b1b1b; padding-top: 6px; }
.doc .bas { margin-top: 18px; font-size: 9pt; color: #444; display: flex; gap: 20px; justify-content: space-between; }
.doc .bas .sig { border: 1px solid #ccc; border-radius: 4px; padding: 8px; min-width: 70mm; min-height: 32mm; }
.doc .bas .sig img { max-width: 64mm; max-height: 24mm; display: block; }
.doc table.l tr, .doc .bas, .doc .tot { break-inside: avoid; }
.doc .mention { margin-top: 14px; font-size: 8.5pt; color: #666; border-top: 1px solid #ddd; padding-top: 6px; }
.apercu .doc { box-shadow: 0 4px 18px rgba(0,0,0,.12); transform-origin: top left; margin: 0; }
.apercu { background: #D9DDDA; padding: 20px; border-radius: 8px; overflow: auto; max-height: 70vh; }

@media print {
  body { background: #fff; }
  #app, .voile, .toast { display: none !important; }
  #impression { display: block !important; }
  .doc { width: auto; min-height: 0; padding: 0; margin: 0; }
  @page { size: A4; margin: 14mm 13mm; }
}

/* ── Etroit ──────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .coque { grid-template-columns: 1fr; background: var(--fond); }
  .lateral { position: static; height: auto; }
  .menu { display: flex; overflow-x: auto; padding: 6px; }
  .menu .grp, .menu .verrou, .lateral .pied { display: none; }
  .menu a { white-space: nowrap; }
  .deux { grid-template-columns: 1fr; }
  .releve { grid-template-columns: repeat(2, 1fr); }
  .releve > div:nth-child(3) { border-left: 0; }
  .page { padding: 18px 16px 50px; }
  .barre { padding: 10px 16px; flex-wrap: wrap; }
  .demo-mention { display: none; }
}
@media (max-width: 520px) {
  .tel { width: 100%; height: auto; min-height: 640px; border-radius: 0; padding: 0; box-shadow: none; }
  .tel .ecran { border-radius: 0; min-height: 640px; }
  .aside-tel { display: none; }
  .scene-tel { padding: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }


/* ── Repris de la demonstration Proprete ─────────────────────────────── */
.puce-site { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; padding: 2px 8px 2px 6px; border-radius: 4px;
  background: color-mix(in srgb, var(--c) 12%, #fff); border-left: 3px solid var(--c); color: var(--encre); white-space: nowrap; }
.legende { display: flex; gap: 6px 16px; flex-wrap: wrap; margin: 0 0 10px; align-items: center; font-size: 12.5px; color: var(--gris); }
.legende i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }
.barre-h { position: relative; height: 10px; background: var(--trait2); border-radius: 5px; overflow: hidden; }
.barre-h i { position: absolute; top: 0; bottom: 0; background: var(--marque); border-radius: 5px; }
.fiche-site { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 18px; font-size: 13.5px; }
.fiche-site b { display: block; font-size: 12px; color: var(--gris); font-weight: 600; margin-bottom: 2px; }
.m-agent { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 12px; color: #A9BBC9; }
.m-agent select { flex: 1; background: #1C3245; color: #fff; border: 1px solid #2E4A62; border-radius: 6px; padding: 5px 6px; font-size: 13px; }
.m-scan { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; font-size: 16px; border-radius: 12px; margin-top: 8px; }
.m-scan svg { width: 24px; height: 24px; }
.m-mention { font-size: 11.5px; color: var(--gris); text-align: center; margin: 6px 0 2px; }
.m-ligne { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--trait2); font-size: 13px; }
.m-ligne:last-child { border-bottom: 0; }
.m-role { display: flex; gap: 4px; margin-top: 10px; }
.m-role button { flex: 1; border: 1px solid #2E4A62; background: transparent; color: #A9BBC9; border-radius: 6px; padding: 5px 2px; font-size: 11.5px; cursor: pointer; }
.m-role button.est { background: #fff; color: var(--encre); border-color: #fff; }
.controle { border-radius: var(--r); padding: 12px 14px; margin: 0 0 14px; border: 1px solid; font-size: 13.5px; }
.controle b { display: block; font-family: var(--titre); font-size: 15px; margin-bottom: 4px; }
.controle.ko { background: var(--rouge-pale); border-color: #E7B9B3; color: #7A2018; }
.controle.ok { background: var(--marque-pale); border-color: color-mix(in srgb, var(--marque) 35%, #fff); color: var(--encre); }
.m-haut > span { display: block; font-size: 12px; color: #A9BBC9; }
.vignette { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--trait); display: block; }
.regle-ex { display: inline-block; font-size: 11.5px; color: var(--jaune); background: var(--jaune-pale); padding: 2px 8px; border-radius: 4px; }

/* ── Securite : l'horloge de la nuit, le bandeau d'alerte (DS-1) ─────────── */
.barre .fil { min-width: 0; flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre .demo-mention { white-space: nowrap; }
.barre:has(.bandeau-alerte) .demo-mention { display: none; }
.t td.nw { white-space: nowrap; }
.horloge { display: inline-flex; white-space: nowrap; flex: none; align-items: center; gap: 8px; border: 1px solid var(--trait); border-radius: 999px; padding: 4px 12px 4px 10px; font-size: 12.5px; color: var(--gris); background: var(--surface2); }
.horloge svg { width: 16px; height: 16px; color: var(--marque); }
.horloge b { font: 600 15px var(--titre); color: var(--encre); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.horloge.rejeu { background: var(--jaune-pale); border-color: #E8CF8A; color: var(--jaune); }
.horloge.rejeu svg { color: var(--jaune); }
.bandeau-alerte { white-space: nowrap; flex: none; display: inline-flex; align-items: center; gap: 7px; background: var(--rouge); color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 13px; animation: battre 1.2s ease-in-out infinite; }
.bandeau-alerte svg { width: 16px; height: 16px; }
.bandeau-alerte span { font-variant-numeric: tabular-nums; font-weight: 700; }
@keyframes battre { 50% { box-shadow: 0 0 0 6px rgba(184, 50, 38, .22); } }

/* ── La console du centre de reception ──────────────────────────────── */
.salle { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 16px; background: #0E1822; border-radius: 10px; padding: 16px; margin-bottom: 16px; color: #DCE4EA; }
.salle.salle-seule { grid-template-columns: 1fr; background: none; padding: 0; }
.salle-g, .salle-d { min-width: 0; }
.al-carte { background: #16232F; border: 1px solid #2A3B4A; border-left: 5px solid #5B6B78; border-radius: 10px; padding: 16px 18px; color: #E6ECF1; }
.al-carte.ouverte { border-color: #6E2A24; border-left-color: #E5483A; background: linear-gradient(180deg, #2A1715, #16232F 120px); }
.al-carte.ouverte.vecue { animation: alerter 1.4s ease-in-out infinite; }
@keyframes alerter { 50% { box-shadow: 0 0 0 4px rgba(229, 72, 58, .28); } }
.al-carte.prise { border-left-color: #E3A92B; }
.al-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.al-type { display: inline-flex; align-items: center; gap: 7px; font: 600 13px var(--titre); text-transform: uppercase; letter-spacing: .06em; color: #FF9A8F; }
.al-carte.prise .al-type { color: #F2C66B; }
.al-carte.close .al-type { color: #9FB0BD; }
.al-type svg { width: 18px; height: 18px; }
.al-qui { margin-top: 10px; }
.al-qui b { display: block; font: 600 26px/1.1 var(--titre); color: #fff; }
.al-qui span { font-size: 13px; color: #9FB0BD; }
.al-chrono { margin-top: 10px; font-size: 13px; color: #B5C3CE; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.al-chrono b { font: 600 30px var(--titre); color: #fff; font-variant-numeric: tabular-nums; }
.al-chrono span { margin-left: auto; font-size: 12px; color: #8597A5; }
.al-ou { margin-top: 8px; display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: #fff; flex-wrap: wrap; }
.al-ou svg { width: 17px; height: 17px; color: #FF9A8F; flex: none; margin-top: 2px; }
.al-ou span { font-size: 12px; color: #8597A5; flex-basis: 100%; padding-left: 25px; }
.al-astreinte { margin-top: 10px; display: flex; gap: 8px; align-items: center; background: #3A1D1A; border: 1px solid #6E2A24; color: #FFC2BA; border-radius: 6px; padding: 8px 10px; font-size: 13px; }
.al-astreinte svg { width: 16px; height: 16px; flex: none; }
.al-gestes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.al-gestes .btn { background: #20313F; border-color: #34495A; color: #E6ECF1; justify-content: center; }
.al-gestes .btn:hover { background: #2A3E4F; }
.al-gestes .btn.p { background: var(--marque); border-color: var(--marque); color: #fff; }
.al-gestes .btn.grand { grid-column: 1 / -1; padding: 14px; font-size: 16px; }
.al-gestes .btn.rouge { background: #D23A2C; border-color: #D23A2C; color: #fff; }
.al-gestes .btn.rouge:hover { background: #B83226; }
.al-journal { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid #2A3B4A; font-size: 13px; }
.al-journal li { display: grid; grid-template-columns: 118px 1fr; gap: 10px; padding: 4px 0; color: #D0DAE2; }
.al-journal time { font-variant-numeric: tabular-nums; color: #8597A5; white-space: nowrap; }
.al-journal li.r span { color: #FF9A8F; }
.al-journal li.b span { color: #9CC2FF; }
.al-journal li.e span { color: #F2C66B; }
.al-journal i { font-style: normal; display: block; font-size: 11.5px; color: #8597A5; }
.calme { background: #16232F; border: 1px solid #2A3B4A; border-radius: 10px; padding: 26px 20px; text-align: center; color: #B5C3CE; }
.calme svg { width: 38px; height: 38px; color: #4FBF83; display: block; margin: 0 auto 8px; }
.calme b { display: block; color: #fff; font: 600 20px var(--titre); }
.calme p { font-size: 13px; margin: 12px 0 0; }
.calme .lien { color: #9CC2FF; }
.autres { margin-top: 10px; font-size: 13px; color: #B5C3CE; }
.autres a { color: #9CC2FF; }
.carte-cadre { position: relative; background: #0A1C2B; border-radius: 8px; overflow: hidden; }
.carte-mention { position: absolute; right: 10px; top: 6px; font-size: 10.5px; color: #6E8798; }
svg.carte { display: block; width: 100%; height: auto; }
.carte .mer { fill: #0D2A40; }
.carte .cote { fill: none; stroke: #2C5574; stroke-width: .5; }
.carte .route { fill: none; stroke: #2C3F4E; stroke-width: .9; stroke-linecap: round; }
.carte .lieu { font: 2.5px var(--texte); fill: #6E8798; text-anchor: middle; }
.carte .lieu.v { fill: #3E6F92; }
.carte .site { cursor: pointer; }
.carte .site rect { stroke: #0A1C2B; stroke-width: .4; }
.carte .site text { font: 600 2.4px var(--texte); fill: #C5D2DC; }
.carte .site.vise text { fill: #FF9A8F; }
.carte .onde, .plan-site .onde { fill: none; stroke: #E5483A; stroke-width: .6; animation: onde 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes onde { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }
.carte .agent circle { fill: #2E7BE6; stroke: #0A1C2B; stroke-width: .4; }
.carte .agent.rouge circle { fill: #E5483A; }
.carte .agent text { font: 700 1.9px var(--texte); fill: #fff; text-anchor: middle; }
table.agents-salle { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
.agents-salle td { padding: 7px 6px; border-bottom: 1px solid #22323F; vertical-align: top; color: #E6ECF1; }
.agents-salle td span { display: block; font-size: 11.5px; color: #8597A5; }
.agents-salle td.n { text-align: right; }
.agents-salle td.n span.vie { display: inline-flex; }
.vie { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.vie svg { width: 13px; height: 13px; }
.vie.vert { background: rgba(79, 191, 131, .16); color: #2E9E62; }
.vie.jaune { background: rgba(227, 169, 43, .18); color: #B07E0E; }
.vie.rouge { background: rgba(229, 72, 58, .18); color: #E5483A; }
.vie.gris { background: rgba(140, 155, 168, .18); color: #8597A5; }
.agents-salle .vie.vert { color: #6FD39C; }
.agents-salle .vie.jaune { color: #F2C66B; }
.choix-l { display: flex; flex-direction: column; gap: 8px; }
.choix-l .btn { justify-content: flex-start; }
label.radio { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.dire { background: var(--surface2); border: 1px solid var(--trait); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; }
.dire b { font: 600 13px var(--titre); text-transform: uppercase; letter-spacing: .05em; color: var(--gris); }
.dire ul { margin: 6px 0 0; padding-left: 18px; }
.etapes-cons { margin: 6px 0 0; padding-left: 20px; }
.etapes-cons li { padding: 2px 0; }
.note-demo.sombre { background: rgba(227, 169, 43, .12); color: #F2C66B; }

/* ── Les rondes ──────────────────────────────────────────────────────── */
.frise-rondes { padding: 6px 0; }
.fr-l { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--trait2); }
.fr-l:last-child { border-bottom: 0; }
.fr-qui b { display: block; }
.fr-qui span { font-size: 12px; color: var(--gris); }
.fr-rd { display: flex; gap: 6px; flex-wrap: wrap; }
a.rd { display: flex; flex-direction: column; min-width: 92px; padding: 6px 10px; border-radius: 6px; text-decoration: none; color: var(--encre); background: var(--vert-pale); border-left: 4px solid var(--vert); font-size: 12px; }
a.rd b { font: 600 15px var(--titre); }
a.rd em { font-style: normal; font-weight: 700; color: var(--rouge); }
a.rd em.g { color: var(--gris); font-weight: 600; }
a.rd.ko { background: var(--rouge-pale); border-left-color: var(--rouge); }
a.rd.att { background: var(--jaune-pale); border-left-color: var(--jaune); }
a.rd.cours { background: var(--bleu-pale); border-left-color: var(--bleu); }
a.rd.avenir { background: var(--surface2); border-left-color: #C4CDD3; color: var(--gris); }
.defile { overflow-x: auto; }
table.grille-pts { border-collapse: collapse; width: 100%; }
.grille-pts th { font-size: 12px; color: var(--gris); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--trait); background: var(--surface2); text-align: center; white-space: nowrap; }
.grille-pts th a { color: var(--encre); text-decoration: none; font: 600 14px var(--titre); }
.grille-pts th small { display: block; font-weight: 400; }
.grille-pts td { padding: 4px; border-bottom: 1px solid var(--trait2); text-align: center; }
.grille-pts td.qui { text-align: left; padding: 8px 12px; white-space: nowrap; }
.grille-pts td.qui b { display: block; font-size: 13px; }
.grille-pts td.qui span { font-size: 11px; color: var(--gris); }
.cel { display: inline-block; min-width: 64px; padding: 4px 6px; border-radius: 4px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.legende i.cel { min-width: 0; width: 12px; height: 12px; padding: 0; }
.cel.fait { background: var(--vert-pale); color: var(--vert); }
.cel.repris { background: var(--bleu-pale); color: var(--bleu); }
.cel.manque { background: var(--rouge); color: #fff; }
.cel.retard, .cel.attente { background: var(--jaune-pale); color: var(--jaune); }
.cel.ecourte { background: repeating-linear-gradient(135deg, #EAEFF1 0 5px, #F6F8F9 5px 10px); color: var(--gris); }
.cel.prevu { background: var(--surface2); color: #8A98A3; font-weight: 400; }
.t tr.sep td { background: var(--surface2); padding: 6px 12px; }
svg.plan-site { width: 100%; height: auto; display: block; }
.plan-site .terrain { fill: #EEF3EC; stroke: #C9D5C5; stroke-width: .5; }
.plan-site .maison { fill: #fff; stroke: #9AA7B0; stroke-width: .6; }
.plan-site .lib { font: 3px var(--texte); fill: #8A98A3; text-anchor: middle; }
.plan-site .eau { fill: #CFE6F5; stroke: #9CC7E4; stroke-width: .4; }
.plan-site .allee { stroke: #D8DED3; stroke-width: 3; }
.plan-site .pt circle { stroke: #fff; stroke-width: .8; }
.plan-site .pt .no { font: 700 3.6px var(--texte); fill: #fff; text-anchor: middle; }
.plan-site .pt .nom { font: 2.8px var(--texte); fill: var(--encre2); text-anchor: middle; }
.plan-site .pt.vise .nom { fill: var(--rouge); font-weight: 700; }
.doc .planche { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6mm; }
.doc .etiq { border: 1px dashed #999; border-radius: 3mm; padding: 4mm; text-align: center; break-inside: avoid; }
.doc .etiq svg.qr { width: 30mm; height: 30mm; display: block; margin: 0 auto 2mm; }
.doc .etiq b { display: block; font-size: 9.5pt; }
.doc .etiq span { font-size: 8pt; color: #555; }

/* ── La main courante, le rapport du matin ─────────────────────────────── */
ul.evs { list-style: none; margin: 0; padding: 0; }
li.ev { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--trait2); }
li.ev:last-child { border-bottom: 0; }
li.ev.av { background: #FFFBEF; }
li.ev time { font: 600 15px var(--titre); font-variant-numeric: tabular-nums; }
.ev-t { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.interne { font-size: 11.5px; color: var(--gris); border: 1px solid var(--trait); border-radius: 4px; padding: 1px 6px; }
li.ev p { margin: 6px 0 0; }
li.ev p.reco { display: flex; gap: 6px; align-items: flex-start; color: var(--jaune); font-size: 13px; }
li.ev p.reco svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.ev-pied { display: flex; gap: 10px; align-items: center; margin-top: 8px; font-size: 12.5px; color: var(--gris); flex-wrap: wrap; }
.ev-pied .act { margin-left: auto; display: flex; gap: 6px; }
.ev-pied .act.s { font-size: 12px; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
figure.photo { margin: 0; width: 180px; }
figure.photo svg, figure.photo img { display: block; width: 100%; height: 108px; object-fit: cover; border-radius: 6px; }
figure.photo figcaption { font-size: 11px; color: var(--gris); margin-top: 3px; }
figure.photo .ann { font: 600 7px var(--texte); fill: #F2C66B; }
figure.photo .ex { font: 7px var(--texte); fill: #8597A5; text-anchor: end; }
.photos.m figure.photo { width: 120px; }
.photos.m figure.photo svg { height: 72px; }
.cartes-rap { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
a.carte-rap { display: block; background: var(--surface); border: 1px solid var(--trait); border-radius: 8px; padding: 14px 16px; text-decoration: none; color: var(--encre); }
a.carte-rap:hover { border-color: var(--marque); }
.cr-t { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
a.carte-rap > b { display: block; font: 600 16px var(--titre); }
a.carte-rap > span { font-size: 12.5px; color: var(--gris); }
.cr-n { display: flex; gap: 16px; margin-top: 10px; font-size: 11.5px; color: var(--gris); }
.cr-n b { display: block; font: 600 18px var(--titre); color: var(--encre); font-variant-numeric: tabular-nums; }
.cr-n .k b { color: var(--jaune); }
.rapport-ecran { max-height: none; }
.rapport-ecran .doc { width: auto; max-width: 210mm; min-height: 0; }
.doc .synth { display: grid; grid-template-columns: 1.6fr 1fr 1fr; border: 1px solid #ccc; border-radius: 4px; margin: 0 0 12px; }
.doc .synth > div { padding: 8px 10px; border-left: 1px solid #ddd; font-size: 9.5pt; color: #333; }
.doc .synth > div:first-child { border-left: 0; }
.doc .synth b { display: block; font: 600 17pt var(--titre); color: #111; }
.doc .synth small { display: block; font-size: 8pt; color: #666; }
.doc.rapport h3 { margin: 14px 0 6px; font-size: 12pt; }
.doc .photos figure.photo { width: 54mm; }
.doc .photos figure.photo svg, .doc .photos figure.photo img { height: 32mm; }
.doc ul { margin: 0; padding-left: 18px; }

/* ── Consignes et cles ───────────────────────────────────────────────── */
.code-l { display: flex; gap: 14px; align-items: center; }
.code { font: 600 22px var(--titre); letter-spacing: .2em; color: var(--gris); }
.code-grand { font: 600 52px var(--titre); text-align: center; letter-spacing: .14em; font-variant-numeric: tabular-nums; padding: 10px 0; }
img.sig-mini { height: 30px; display: block; }

/* ── La nuit ─────────────────────────────────────────────────────────── */
details.guide { margin-bottom: 16px; border-color: color-mix(in srgb, var(--marque) 35%, #fff); }
details.guide summary { cursor: pointer; padding: 14px 18px; display: flex; gap: 10px; align-items: baseline; list-style: none; }
details.guide summary::-webkit-details-marker { display: none; }
details.guide summary::before { content: "▸"; color: var(--marque); }
details.guide[open] summary::before { content: "▾"; }
details.guide summary b { font: 600 16px var(--titre); }
details.guide summary span { font-size: 12.5px; color: var(--gris); }
details.guide ol { margin: 0; padding: 0 18px 16px 40px; }
details.guide li { padding: 6px 0; }
details.guide li .btn { margin-left: 6px; vertical-align: middle; }
svg.frise { width: 100%; min-width: 760px; height: auto; display: block; }
.frise .grad { stroke: var(--trait2); stroke-width: 1; }
.frise .hr { font: 11px var(--texte); fill: var(--gris); text-anchor: middle; }
.frise .hr.mt { fill: var(--rouge); font-weight: 700; }
.frise .ag { font: 600 12.5px var(--texte); fill: var(--encre); }
.frise .ag2 { font: 10.5px var(--texte); fill: var(--gris); }
.frise .rail { stroke: var(--trait); stroke-width: 1; stroke-dasharray: 3 3; }
.frise rect.rd { fill: var(--vert); }
.frise rect.rd.ko { fill: var(--rouge); }
.frise rect.rd.att { fill: #E3A92B; }
.frise rect.rd.avenir { fill: #DCE2E7; }
.frise circle.ev { fill: #fff; stroke-width: 2.2; stroke: var(--bleu); }
.frise circle.ev.rouge { stroke: var(--rouge); }
.frise circle.ev.orange { stroke: var(--jaune); }
.frise path.al { fill: var(--rouge); stroke: #fff; stroke-width: 1.5; }
.frise path.al.ouv { animation: battre2 1s ease-in-out infinite; }
@keyframes battre2 { 50% { opacity: .45; } }
.frise .maintenant { stroke: var(--rouge); stroke-width: 1.5; }
.legende i.los { background: var(--rouge); transform: rotate(45deg) scale(.8); border-radius: 1px; }
ul.branche { list-style: none; margin: 0; padding: 6px 0; }
ul.branche li { padding: 8px 18px 8px 40px; position: relative; font-size: 12.5px; color: var(--gris); }
ul.branche li b { display: block; color: var(--encre); font-size: 13.5px; }
ul.branche li::before { position: absolute; left: 16px; top: 9px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; }
ul.branche li.oui::before { content: "✓"; background: var(--vert); }
ul.branche li.non::before { content: "–"; background: #9AA7B0; }
ul.journal { list-style: none; margin: 0; padding: 8px 18px 12px; font-size: 13px; }
ul.journal li { display: grid; grid-template-columns: 58px 1fr; gap: 8px; padding: 4px 0; }
ul.journal li.s { display: block; color: var(--gris); }
ul.journal time { color: var(--gris); font-variant-numeric: tabular-nums; }

/* ── Le telephone de l'agent ─────────────────────────────────────────── */
.m-heure { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #A9BBC9; margin-bottom: 6px; }
.m-heure svg { width: 14px; height: 14px; }
.m-heure b { font: 600 14px var(--titre) !important; color: #fff; display: inline !important; font-variant-numeric: tabular-nums; }
.m-heure i { font-style: normal; background: #9A6A00; color: #fff; border-radius: 4px; padding: 0 6px; font-size: 11px; }
.m-sos-cadre { text-align: center; padding: 6px 0 12px; }
button.m-sos { position: relative; width: 190px; height: 190px; border-radius: 50%; border: 0; background: radial-gradient(circle at 50% 40%, #E5483A, #B02A1F); color: #fff; cursor: pointer;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-shadow: 0 10px 30px rgba(176, 42, 31, .35), inset 0 -6px 0 rgba(0, 0, 0, .15);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
button.m-sos svg { width: 40px; height: 40px; }
button.m-sos b { font: 700 26px var(--titre); letter-spacing: .08em; }
button.m-sos small { font-size: 12px; opacity: .85; }
button.m-sos .anneau { position: absolute; inset: -8px; border-radius: 50%; background: conic-gradient(#13202C var(--a, 0deg), transparent 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
button.m-sos.charge .anneau { animation: remplir 2s linear forwards; }
button.m-sos.charge { transform: scale(.97); }
@keyframes remplir { to { --a: 360deg; } }
.m-carte.rouge { border-color: #E7B9B3; background: var(--rouge-pale); }
.m-al-t { display: flex; align-items: center; gap: 8px; font: 700 18px var(--titre); color: var(--rouge); text-transform: uppercase; letter-spacing: .04em; }
.m-al-t svg { width: 22px; height: 22px; }
ul.m-suivi { list-style: none; margin: 10px 0; padding: 0; font-size: 13px; }
ul.m-suivi li { padding: 4px 0 4px 22px; position: relative; color: var(--gris); }
ul.m-suivi li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid #B9C1BD; }
ul.m-suivi li.ok { color: var(--encre); }
ul.m-suivi li.ok::before { background: var(--vert); border-color: var(--vert); }
.m-carte b svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 5px; color: var(--marque); }
.m-essai { display: block; margin: 4px auto 10px; font-size: 12.5px; }
.m-sous { font: 600 12px var(--titre); text-transform: uppercase; letter-spacing: .05em; color: var(--gris); margin: 10px 0 2px; }
.m-forme { margin-top: 8px; border: 1px solid var(--trait); border-radius: 8px; font-size: 12.5px; }
.m-forme div { padding: 6px 10px; border-bottom: 1px solid var(--trait2); }
.m-forme div:last-child { border-bottom: 0; }
.m-forme i { font-style: normal; display: block; font-size: 11px; color: var(--gris); text-transform: uppercase; letter-spacing: .04em; }
.m-chiffres { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; font-size: 11.5px; color: var(--gris); }
.m-chiffres b { display: block !important; font: 600 20px var(--titre) !important; color: var(--encre); }
.tel .al-carte { padding: 14px; margin-bottom: 10px; }
.tel .al-qui b { font-size: 21px; }
.tel .al-chrono b { font-size: 24px; }
.tel .al-gestes { grid-template-columns: 1fr; }

.barre .bascule { flex: none; }
@media (max-width: 1280px) { .barre .demo-mention { display: none; } }
@media (max-width: 1180px) { .horloge > span { display: none; } }
@media (max-width: 1100px) { .salle { grid-template-columns: 1fr; } }
@media (max-width: 980px) { .fr-l { grid-template-columns: 1fr; } .al-journal li { grid-template-columns: 1fr; gap: 0; } .barre .horloge span { display: none; } }

/* ── Securite Gestion : planning, cartes, alarmes, tableau (DS-2) ─────────── */
.grille-pl { width: 100%; border-collapse: separate; border-spacing: 0; }
.grille-pl th { font-size: 12px; color: var(--gris); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--trait); background: var(--surface2); text-align: center; white-space: nowrap; }
.grille-pl th small { display: block; font-weight: 400; }
.grille-pl td { border-bottom: 1px solid var(--trait2); padding: 4px; vertical-align: top; }
.grille-pl td.qui { padding: 8px 12px; min-width: 150px; white-space: nowrap; }
.grille-pl td.qui b { display: block; }
.grille-pl td.qui span { font-size: 12px; color: var(--gris); }
.grille-pl td.tot { text-align: right; padding: 8px 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.grille-pl td.tot span { display: block; font-size: 11.5px; color: var(--gris); white-space: normal; max-width: 130px; margin-left: auto; }
.grille-pl td.tot .moins { color: var(--jaune); }
.grille-pl td.tot .trop { color: var(--rouge); }
.grille-pl th.auj, .grille-pl td.auj { background: color-mix(in srgb, var(--marque) 6%, #fff); }
.cases { display: flex; flex-direction: column; gap: 3px; min-width: 96px; }
.vac { border: 1px solid transparent; border-left: 3px solid var(--c, var(--marque)); background: color-mix(in srgb, var(--c, var(--marque)) 9%, #fff);
  border-radius: 4px; padding: 3px 6px; text-align: left; cursor: pointer; font-size: 12px; line-height: 1.25; color: var(--encre); width: 100%; }
.vac:hover { border-color: var(--trait); }
.vac b { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 128px; }
.vac span { color: var(--encre2); white-space: nowrap; }
.vac.change::after { content: "changé"; display: inline-block; margin-left: 4px; font-size: 10.5px; color: var(--jaune); font-weight: 700; }
.vac .tj { display: block; font-size: 11px; color: var(--gris); }
.classement { width: 100%; border-collapse: collapse; }
.classement td, .classement th { padding: 8px 8px; border-bottom: 1px solid var(--trait2); text-align: left; font-size: 13px; vertical-align: middle; }
.classement th { font-size: 11.5px; color: var(--gris); font-weight: 600; }
.classement tr.premier td { background: var(--marque-pale); }
.classement .score { font: 600 16px var(--titre); font-variant-numeric: tabular-nums; }
.exclus { margin: 10px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--gris); }
.exclus li { padding: 2px 0; }
.pt-abs { font-size: 12px; color: var(--encre2); background: repeating-linear-gradient(135deg, #EAEFF1 0 5px, #F6F8F9 5px 10px); border-radius: 4px; padding: 2px 8px; }
.rouge-t { color: var(--rouge); }
.vac.couvrir { --c: var(--rouge); background: repeating-linear-gradient(135deg, var(--rouge-pale) 0 6px, #fff 6px 12px); color: var(--rouge); }
.vac.couvrir b { color: var(--rouge); }
.vac.propose { --c: var(--jaune); background: var(--jaune-pale); }
.vac.hors { --c: var(--rouge); background: var(--rouge-pale); }
.vac.ok { --c: var(--marque); }
.grille-pl td.qui span.rouge-t { display: block; font-size: 11.5px; }
ul.fil-v { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--trait); }
ul.fil-v li { position: relative; padding: 0 0 8px 10px; font-size: 13px; }
ul.fil-v li::before { content: ""; position: absolute; left: -20px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--marque); }
.qr-note { display: flex; gap: 12px; align-items: flex-start; border: 1px dashed #A9B6BE; border-radius: 8px; padding: 12px 14px; font-size: 13px; color: var(--encre2); background: var(--surface); }
.qr-note svg { width: 24px; height: 24px; flex: none; color: var(--marque); }
.al-journal.clair { margin: 0; padding: 12px 18px; border-top: 0; }
.al-journal.clair li { color: var(--encre); }
.al-journal.clair time { color: var(--gris); }
.m-carte.jaune { border-color: #E8CF8A; background: var(--jaune-pale); }
svg.graphe { width: 100%; min-width: 700px; height: auto; display: block; }
.graphe .grad { stroke: var(--trait2); }
.graphe .ax { font: 10.5px var(--texte); fill: var(--gris); text-anchor: end; }
.graphe .ax2 { font: 10.5px var(--texte); fill: var(--gris); text-anchor: middle; }
.graphe rect.b { fill: color-mix(in srgb, var(--vert) 75%, #fff); }
.graphe rect.b.ko { fill: var(--rouge); }
.graphe rect.b.cours { fill: var(--marque); }
.graphe path.al { fill: var(--rouge); }
.graphe circle.iv { fill: var(--bleu); }

/* ── Securite Integral : bilans, espace du client, factures, contrats (DS-3) ─ */
.cote-a-cote { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cote-a-cote .apercu { padding: 10px; }
.cote-a-cote .doc { padding: 10mm 9mm; font-size: 9.5pt; }
.portail { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; overflow: hidden; box-shadow: 0 6px 24px rgba(20, 30, 35, .08); }
.portail > header { display: flex; gap: 12px; align-items: center; padding: 16px 20px; background: var(--marque-pale); border-bottom: 1px solid var(--trait); }
.portail > header b { display: block; font: 600 16px var(--titre); }
.portail > header span { font-size: 12.5px; color: var(--gris); }
.portail > header .qui { margin-left: auto; font-size: 13px; color: var(--encre2); }
.portail .pc { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0; }
.portail section { padding: 16px 20px; border-right: 1px solid var(--trait2); border-bottom: 1px solid var(--trait2); }
.portail section h3 { margin: 0 0 8px; }
.portail ul.pl { list-style: none; margin: 0; padding: 0; }
.portail ul.pl li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--trait2); font-size: 13px; }
.portail ul.pl li:last-child { border-bottom: 0; }
.portail .s { font-size: 12px; color: var(--gris); }
@media (max-width: 1100px) { .cote-a-cote { grid-template-columns: 1fr; } }

/* ── VE-3 : la Vue d'ensemble, le terrain en 3D (les memes regles que la demonstration BTP) ── */
.ve-hote { position: relative; height: clamp(540px, calc(100vh - 200px), 900px); border-radius: 12px; overflow: hidden; background: #0A1124; border: 1px solid var(--trait); }
.ve-hote.tel-hote { height: 250px; margin-bottom: 10px; border-radius: 12px; }
.ve-attente { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gris); font: 600 16px var(--titre); }
.ve-plateau { position: absolute; inset: 0; }
.ve-plateau .ve-3d { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.ve-plateau.lecture .ve-3d { touch-action: pan-y; cursor: default; }
.ve-plateau .ve-calque { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ve-kpis, .ve-fiche, .ve-pilule, .ve-aide { background: rgba(255,255,255,.8); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 20px 50px rgba(60,40,20,.16); }
.ve-kpis { position: absolute; top: 16px; left: 16px; display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 14px 18px; border-radius: 16px; max-width: calc(100% - 420px); }
.ve-kpi b { display: block; font: 700 25px/1 var(--titre); font-variant-numeric: tabular-nums; color: var(--encre); }
.ve-kpi span { font-size: 12px; color: #5A5148; }
.ve-kpi.alerte b { color: #C8402F; }
.ve-kpi.bleu b { color: #2F64A8; }
.ve-fiche { position: absolute; top: 16px; right: 16px; width: min(360px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto; box-sizing: border-box; padding: 18px 20px; border-radius: 18px; display: flex; flex-direction: column; gap: 10px; color: var(--encre); }
.ve-fiche[hidden], .ve-kpis[hidden] { display: none; }
.ve-f-tete { display: flex; gap: 8px; align-items: flex-start; }
.ve-f-tete > div { flex: 1; min-width: 0; }
.ve-f-type { font-size: 12px; color: #6A6058; }
.ve-f-nom { font: 600 28px/1.05 var(--titre); }
.ve-f-objet { font-size: 13px; color: #5A5148; }
.ve-x { flex: none; width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(30,39,44,.08); font-size: 20px; cursor: pointer; }
.ve-f-gros { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ve-f-gros b { font: 700 36px/1 var(--titre); font-variant-numeric: tabular-nums; }
.ve-etat { padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.ve-etat.bloque { background: #F8E4E1; color: #B83226; }
.ve-etat.attend { background: #FBF0D2; color: #7E5600; }
.ve-etat.avance { background: #E3F2E8; color: #23794A; }
.ve-etat.projet { background: #E6EEF8; color: #1F4E8C; }
.ve-f-sous { font-size: 12.5px; color: #5A5148; margin-top: -4px; }
.ve-f-lots { display: flex; flex-direction: column; gap: 5px; }
.ve-f-lots > div { display: grid; grid-template-columns: 118px minmax(0, 1fr) 40px; align-items: center; gap: 8px; font-size: 12px; }
.ve-f-lots i { display: block; height: 6px; border-radius: 3px; background: rgba(30,39,44,.1); overflow: hidden; }
.ve-f-lots u { display: block; height: 100%; }
.ve-f-lots b { text-align: right; }
.ve-f-sig { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ve-f-sig li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.ve-f-sig li span { flex: none; padding: 0 7px; border-radius: 4px; font-size: 11px; font-weight: 700; margin-top: 1px; }
.ve-f-pres { font-size: 13px; }
.ve-f-arg { font-size: 12px; color: #5A5148; }
.ve-f-lien { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 12px; background: var(--encre); color: #fff; text-decoration: none; font-weight: 700; }
.ve-bas { position: absolute; left: 16px; bottom: 16px; display: flex; flex-wrap: wrap; gap: 8px; max-width: calc(100% - 32px); }
.ve-pilule { min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 700; cursor: pointer; color: var(--encre); }
.ve-aide { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 12px; color: #3A3530; box-shadow: none; }
.ve-plateau.lecture .ve-kpis { display: none; }
.ve-plateau.lecture .ve-fiche { top: auto; bottom: 8px; left: 8px; right: 8px; width: auto; max-height: 78%; padding: 12px 14px; gap: 7px; border-radius: 14px; }
.ve-plateau.lecture .ve-f-nom { font-size: 20px; }
.ve-plateau.lecture .ve-f-gros b { font-size: 24px; }
.ve-plateau.lecture .ve-f-lots { display: none; }
.ve-plateau.lecture .ve-f-objet, .ve-plateau.lecture .ve-f-sous, .ve-plateau.lecture .ve-f-arg, .ve-plateau.lecture .ve-f-pres, .ve-plateau.lecture .ve-f-lien, .ve-plateau.lecture .ve-f-sig li:nth-child(n+3) { display: none; }
.ve-plateau.lecture .ve-bas { top: 8px; left: 8px; bottom: auto; }
.ve-plateau.lecture .ve-aide { font-size: 11px; min-height: 30px; padding: 0 10px; }
.ve-plateau.lecture .ve-pilule { min-height: 34px; padding: 0 12px; font-size: 12.5px; }
.ve-kpis-tel { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.ve-kpis-tel > div { background: var(--surface); border: 1px solid var(--trait); border-radius: 10px; padding: 9px 11px; }
.ve-kpis-tel b { display: block; font: 600 18px var(--titre); font-variant-numeric: tabular-nums; }
.ve-kpis-tel span { font-size: 11.5px; color: var(--gris); }
.ve-kpis-tel .alerte b { color: var(--rouge); }
.ve-kpis-tel .bleu b { color: var(--bleu); }
.ve-note { background: var(--jaune-pale); color: var(--jaune); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-weight: 600; }
.ve-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; padding: 14px; }
.ve-carte { border: 1px solid var(--trait); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.ve-carte .jauge { width: 100%; }
.ve-c-tete { display: flex; align-items: center; gap: 8px; width: 100%; flex-wrap: wrap; }
.ve-c-tete b { font: 600 17px var(--titre); }
.ve-c-pct { margin-left: auto; font: 600 17px var(--titre); font-variant-numeric: tabular-nums; }
.ve-c-sous, .ve-c-pres, .ve-c-arg { font-size: 12.5px; color: var(--gris); }
.ve-sig { list-style: none; margin: 2px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ve-sig li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.ve-sig li .etat { flex: none; }
@media (max-width: 900px) {
  .ve-kpis { max-width: calc(100% - 32px); gap: 4px 16px; padding: 10px 14px; }
  .ve-kpi b { font-size: 19px; }
  .ve-fiche { top: auto; bottom: 70px; }
}
