:root {
  color-scheme: light;
  --serie-temp: #c25a1c; --serie-hum: #2a78d6; --serie-tint: #7c4dbd; --serie-batt: #2f8a4c;
  --bg: #f4f4f7; --surface: #fcfcfd; --surface-2: #efeff3; --line: #e1e0e8;
  --ink: #0f0f14; --ink-2: #4f4e59; --ink-3: #7b7a86;
  --brand: #1d2a6b; --brand-2: #6a3fb5; --accent: #ffd166;
  --rx: #2a78d6; --tx: #c25a1c; --sys: #7b7a86; --lora: #1b8f62; --wifi: #2a78d6; --lorawan: #d4590b; --zigbee: #8a4fd1; --rfx: #c2378a;
  --good: #0c7a0c; --bad: #c13030; --focus: #2a78d6;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #101014; --surface: #18181d; --surface-2: #222229; --line: #31313a;
    --ink: #ffffff; --ink-2: #c4c3cf; --ink-3: #8d8c99;
    --brand: #a9b6ff; --brand-2: #b796f0;
    --rx: #5aa2f0; --tx: #f0884b; --sys: #8d8c99; --lora: #3fc595; --wifi: #5aa2f0; --lorawan: #ff8c42; --zigbee: #b48cf0; --rfx: #f07ab8;
    --good: #4cc24c; --bad: #f07a7a; --focus: #5aa2f0;
    --serie-temp: #d96d30; --serie-hum: #3f8fe6; --serie-tint: #a07ae6; --serie-batt: #4cb36b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101014; --surface: #18181d; --surface-2: #222229; --line: #31313a;
  --ink: #ffffff; --ink-2: #c4c3cf; --ink-3: #8d8c99;
  --brand: #a9b6ff; --brand-2: #b796f0;
  --rx: #5aa2f0; --tx: #f0884b; --sys: #8d8c99; --lora: #3fc595; --wifi: #5aa2f0; --lorawan: #ff8c42; --zigbee: #b48cf0; --rfx: #f07ab8;
  --good: #4cc24c; --bad: #f07a7a; --focus: #5aa2f0;
  --serie-temp: #d96d30; --serie-hum: #3f8fe6; --serie-tint: #a07ae6; --serie-batt: #4cb36b;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--rx); }
.wrap { max-width: 1400px; margin: 0 auto; padding: 0 16px 40px; }
header { display: flex; align-items: center; gap: 14px; padding: 18px 0 14px; flex-wrap: wrap; }
header img { width: 48px; height: 48px; display: block; }
.marque { font-size: 28px; letter-spacing: -0.02em; line-height: 1; color: var(--brand); font-weight: 300; }
.marque b { font-weight: 800; color: var(--brand-2); }
.tag { color: var(--ink-2); font-size: 13px; margin-top: 3px; }
.droite { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.etat { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid currentColor; }
.etat.ok { color: var(--good); } .etat.ko { color: var(--bad); } .etat.neutre { color: var(--ink-3); }
.etat i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.bouton, button { font: inherit; font-size: 14px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; }
button.principal { background: var(--brand-2); border-color: var(--brand-2); color: #fff; font-weight: 600; }
button.danger { color: var(--bad); border-color: currentColor; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .bouton:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
button[aria-pressed="true"] { background: var(--surface-2); font-weight: 600; }
.grille { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
.carte { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; min-width: 0; }
.carte h2 { font-size: 16px; margin: 0 0 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.carte h2 small { font-weight: 400; color: var(--ink-3); font-size: 12px; }
.outils { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.outils input[type=search] { flex: 1; min-width: 160px; }
input, select, textarea { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); min-width: 0; }
textarea { width: 100%; resize: vertical; font-family: var(--mono); }
label { font-size: 13px; color: var(--ink-2); }
.case { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.journal { height: calc(100vh - 290px); min-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-weight: 600; color: var(--ink-2); font-size: 12px; padding: 6px 8px; z-index: 1; }
td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.h { white-space: nowrap; color: var(--ink-3); font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12px; }
td.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.c { font-family: var(--mono); word-break: break-all; }
td.c .hx { display: block; color: var(--ink-3); font-size: 11.5px; margin-top: 2px; }
.sens { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.sens.RX { color: var(--rx); } .sens.TX { color: var(--tx); } .sens.SYS { color: var(--sys); }
.sens.lora, .sens.radio { color: var(--lora); } .sens.wifi { color: var(--wifi); } .sens.lorawan { color: var(--lorawan); } .sens.zigbee { color: var(--zigbee); } .sens.rfx { color: var(--rfx); }
.sens .liaison { display: inline-grid; place-items: center; margin-right: 3px; vertical-align: -2px; }
.sens .liaison svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
tr.SYS td.c { color: var(--ink-3); font-style: italic; font-family: inherit; }
tr.nouveau { animation: flash 1.2s ease-out; }
@keyframes flash { from { background: color-mix(in srgb, var(--accent) 35%, transparent); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { tr.nouveau { animation: none; } }
.vide { color: var(--ink-3); padding: 18px; text-align: center; }
.ligne { display: flex; gap: 8px; margin-bottom: 8px; }
.ligne > input, .ligne > select { flex: 1; }
.rapides { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 4px; }
.rapides button { font-family: var(--mono); font-size: 12.5px; padding: 4px 9px; }
.apercu { font-family: var(--mono); font-size: 12px; color: var(--ink-2); background: var(--bg); border: 1px dashed var(--line); border-radius: 8px; padding: 6px 8px; word-break: break-all; margin: 6px 0; }
.aide { font-size: 12.5px; color: var(--ink-3); margin: 4px 0 0; }
.champ { display: grid; gap: 4px; margin-bottom: 10px; }
.erreur { color: var(--bad); font-size: 13px; min-height: 1.2em; margin-top: 4px; }
details.reglages summary { cursor: pointer; font-weight: 600; font-size: 16px; }
details.reglages[open] summary { margin-bottom: 10px; }
details.reglages summary small { font-weight: 400; font-size: 12px; color: var(--ink-3); margin-left: 6px; }
#f-mqtt .case { display: flex; margin: 4px 0; }
.alerte { border: 1px solid var(--bad); border-left-width: 4px; border-radius: 8px; padding: 8px 10px; margin: 0 0 12px;
  background: color-mix(in srgb, var(--bad) 7%, var(--surface)); }
.alerte b { color: var(--bad); display: block; font-size: 14px; }
.alerte p { margin: 4px 0 0; font-size: 13px; color: var(--ink); }
.alerte p:empty { display: none; }
.alerte small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--ink-3); font-family: var(--mono); overflow-wrap: anywhere; }
#etat, #etat-mqtt, #etat-lo, #etat-sms, #etat-zb { cursor: pointer; }
details.sujets { margin-top: 12px; }
details.sujets summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
#mqtt-sujets { margin-top: 6px; display: grid; gap: 6px; font-size: 12.5px; }
#mqtt-sujets div { border-bottom: 1px solid var(--line); padding-bottom: 5px; }
#mqtt-sujets code { font-family: var(--mono); color: var(--ink); overflow-wrap: anywhere; }
#mqtt-sujets em { font-style: normal; font-size: 11px; color: var(--ink-3); margin-left: 6px; }
#mqtt-sujets span { display: block; color: var(--ink-2); }
footer { color: var(--ink-3); font-size: 12px; }
.ligne.scan { align-items: center; margin-bottom: 4px; gap: 6px; }
.ligne.scan > select { flex: 0 1 auto; padding: 5px 6px; font-size: 13px; }
.ligne.scan #b-scan { padding: 5px 12px; font-size: 13px; min-width: 76px; }
.ligne.scan #b-oublier { margin-left: auto; }
.scan-etat { font-size: 12px; margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* panneau « Outils et réglages » */
dialog.tiroir { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(420px, 100vw); max-width: 100vw; border: 0; border-left: 1px solid var(--line);
  background: var(--bg); color: var(--ink); padding: 14px 16px; overflow: auto; }
dialog.tiroir::backdrop { background: rgb(0 0 0 / .35); }
dialog.tiroir .h-tete { margin-bottom: 12px; }
dialog.tiroir .h-tete h2 { font-family: inherit; }
dialog.tiroir .carte { margin-bottom: 10px; }
header button.icone { position: relative; width: 34px; height: 34px; border-color: var(--line); }
header button.icone svg { width: 18px; height: 18px; }
#b-outils.alerte::after { content: ""; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
/* historique d'un nœud */
dialog#histo { width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); padding: 14px 16px; }
dialog#histo::backdrop { background: rgb(0 0 0 / .45); }
/* variables d'un nœud : bulle au survol de l'icône, fenêtre au clic */
dialog#variables { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); padding: 14px 16px; }
dialog#variables::backdrop { background: rgb(0 0 0 / .45); }
dialog#variables h3 { font-size: 14px; margin: 14px 0 6px; }
.va-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.va-table th, .va-table td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.va-table th { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.va-table .n { text-align: right; }
.va-table td small { color: var(--ink-3); font-family: var(--mono); font-size: 11px; }
.va-table td.n:nth-child(2) { font-weight: 650; }
.va-ligne { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 12em) auto; gap: 4px 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.va-ligne label { font-size: 13.5px; }
.va-ligne input[type=checkbox] { justify-self: start; width: 20px; height: 20px; }
.va-ligne .aide { grid-column: 1 / -1; margin: 0; }
@media (max-width: 480px) { .va-ligne { grid-template-columns: 1fr auto; } .va-ligne label { grid-column: 1 / -1; } }
.noeud .mesures button.vars { width: auto; height: 22px; gap: 4px; padding: 0 6px 0 4px; grid-auto-flow: column; font: inherit; font-size: 12px; color: var(--ink-2); }
.noeud .mesures button.vars svg { width: 15px; height: 15px; }
.bulle-vars { position: fixed; z-index: 50; max-width: min(340px, calc(100vw - 16px)); background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgb(0 0 0 / .18); padding: 6px 10px; font-size: 12.5px; pointer-events: none;
  display: grid; gap: 1px; font-variant-numeric: tabular-nums; }
.bulle-vars[hidden] { display: none; }
.bulle-vars > b { font-family: var(--mono); font-size: 13px; margin-bottom: 2px; }
.bulle-vars div { display: flex; gap: 12px; align-items: baseline; }
.bulle-vars div span { color: var(--ink-2); }
.bulle-vars div b { margin-left: auto; font-weight: 650; white-space: nowrap; }
.bulle-vars div small, .bulle-vars .pied { color: var(--ink-3); font-size: 11px; }
.bulle-vars .pied { margin-top: 3px; }
.h-tete { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.h-tete h2 { margin: 0 auto 0 0; font-size: 17px; font-family: var(--mono); }
.graphe { margin: 10px 0 0; }
.graphe figcaption { font-size: 13px; color: var(--ink-2); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.graphe figcaption b { color: var(--ink); }
.graphe figcaption small { color: var(--ink-3); font-size: 12px; margin-left: auto; font-variant-numeric: tabular-nums; }
.graphe .zone { position: relative; }
.graphe svg { display: block; width: 100%; height: 170px; overflow: visible; touch-action: pan-y; }
.graphe svg:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.graphe .grille line { stroke: var(--line); stroke-width: 1; }
.graphe .axe text { fill: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.graphe .courbe { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.graphe .point { stroke: var(--surface); stroke-width: 2; }
.graphe .fin { fill: var(--ink-2); font-size: 12px; font-weight: 600; }
.graphe .viseur { stroke: var(--ink-3); stroke-width: 1; }
.graphe .vide { font-size: 13px; }
.bulle { position: absolute; top: 0; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 4px 8px; font-size: 12px; color: var(--ink-2); white-space: nowrap; box-shadow: 0 2px 8px rgb(0 0 0 / .12); }
.bulle b { color: var(--ink); font-size: 13px; display: block; }
.h-table { margin-top: 12px; }
.h-table summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.h-defile { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; }
.progression { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.progression i { display: block; height: 100%; width: 0; background: var(--lora); }
.noeuds { display: grid; gap: 4px; margin-top: 6px; }
.onglets { display: flex; flex-wrap: wrap; gap: 0 2px; margin-top: 10px; border-bottom: 1px solid var(--line); }
.onglets button { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 6px 7px; border: 0; border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0; background: transparent; color: var(--ink-2); margin-bottom: -1px; }
.onglets button:hover { background: var(--surface-2); color: var(--ink); }
.onglets button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand-2); font-weight: 600; }
.onglets button small { color: var(--ink-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.onglets .liaison { display: inline-grid; place-items: center; }
.onglets .liaison svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.onglets .liaison.radio { color: var(--lora); } .onglets .liaison.wifi { color: var(--wifi); }
.onglets .liaison.zigbee { color: var(--zigbee); } .onglets .liaison.rfx { color: var(--rfx); }
.noeud { border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px 4px 8px; display: grid; gap: 1px; background: var(--bg); }
.noeud.absent { opacity: .6; }
.noeud .nom { display: flex; align-items: center; gap: 6px; min-width: 0; }
.noeud .libelle { font-weight: 700; font-family: var(--mono); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pastille { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.pastille.oui { background: var(--good); } .pastille.non { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.pastille.attente { background: var(--accent); animation: clignote 1s ease-in-out infinite alternate; }
@keyframes clignote { to { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .pastille.attente { animation: none; } }
.noeud .sig { flex: none; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.noeud .mesures { font-size: 12px; color: var(--ink-3); display: flex; gap: 0 10px; flex-wrap: wrap; align-items: baseline; font-variant-numeric: tabular-nums; padding-left: 14px; }
.noeud .mesures b { color: var(--ink); font-weight: 650; font-size: 13.5px; }
.noeud .mesures .vu { margin-left: auto; }
.noeud .actions { display: flex; gap: 1px; margin-left: auto; flex: none; }
button.icone { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border-color: transparent; background: transparent; color: var(--ink-2); border-radius: 6px; }
button.icone:hover:not(:disabled) { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
button.icone:disabled { opacity: .35; cursor: default; }
button.icone.danger { color: var(--bad); border-color: transparent; }
button.icone svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ligne.scan button.icone { width: 30px; height: 30px; }
.noeud .maj { font-size: 12.5px; color: var(--ink-2); display: grid; gap: 3px; padding-left: 14px; }
.noeud .maj.ok { color: var(--good); } .noeud .maj.echec { color: var(--bad); }
.noeud .maj button.lien { border: 0; background: none; padding: 0; color: var(--ink-3); text-decoration: underline; cursor: pointer; font: inherit; justify-self: start; }
.noeud .sig .liaison { display: inline-grid; place-items: center; margin-right: 4px; vertical-align: -2px; }
.noeud .sig .liaison svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.noeud .sig .liaison.radio { color: var(--lora); }
.noeud .sig .liaison.wifi { color: var(--wifi); }
.noeud .sig .liaison.lorawan { color: var(--lorawan); } .noeud .sig .liaison.zigbee { color: var(--zigbee); } .noeud .sig .liaison.rfx { color: var(--rfx); }
.reglages .aide { font-size: 12.5px; color: var(--ink-3); margin: 4px 0 8px; }
.lo-mode { border: 0; padding: 0; margin: 8px 0 4px; display: grid; gap: 2px; }
.lo-mode legend { font-size: 12.5px; color: var(--ink-3); padding: 0; margin-bottom: 2px; }
#lo-http .ligne { gap: 6px; flex-wrap: wrap; } #lo-url { flex: 1 1 100%; min-width: 0; font-family: var(--mono); font-size: 12.5px; }
#lo-capteurs { width: 100%; font-family: var(--mono); font-size: 13px; resize: vertical; }
.signal { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; vertical-align: -1px; margin-right: 4px; }
.signal i { width: 3px; background: var(--line); border-radius: 1px; }
.signal i.on { background: var(--lora); }
@media (max-width: 980px) {
  .grille { grid-template-columns: 1fr; }
  .journal { height: 60vh; }
  .marque { font-size: 24px; }
  .droite { margin-left: 0; width: 100%; }
}

/* passerelle SMS : fiche de la carte 4G */
.sms-carte { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 12.5px; margin: 0 0 10px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; }
.sms-carte dt { color: var(--ink-3); } .sms-carte dd { margin: 0; overflow-wrap: anywhere; }
.sms-carte .ko { color: var(--bad); font-weight: 600; } .sms-carte .ok { color: var(--good); font-weight: 600; }

/* Zigbee : appareils du 2e réseau */
.zb-appareils { display: grid; gap: 4px; margin: 10px 0 0; font-size: 12.5px; }
.zb-appareils div { display: flex; gap: 8px; align-items: baseline; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; }
.zb-appareils div span { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zb-appareils div.absent { opacity: .55; }

/* RF 433 MHz : protocoles et journal d'écoute */
.rfx-protocoles { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 2px 10px; }
.rfx-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 6px; }
.rfx-tete small { color: var(--ink-3); margin-right: auto; }
.rfx-tete button { padding: 3px 9px; font-size: 12.5px; }
.rfx-log { max-height: 50vh; min-height: 120px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  font-family: var(--mono); font-size: 11.5px; }
.rfx-log .r { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.rfx-log .r .h { color: var(--ink-3); }
.rfx-log .r b { color: var(--rfx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rfx-log .r span:nth-of-type(2), .rfx-log .r code { grid-column: 1 / -1; overflow-wrap: anywhere; }
.rfx-log .r code { color: var(--ink-3); }
.rfx-log .r.repet { opacity: .55; } .rfx-log .r.brut b { color: var(--ink-2); }
.rfx-log.sans-repet .r.repet { display: none; }
.rfx-log .vide { margin: 10px; }

/* Scénarios (panneau latéral) */
.scenario { padding: 10px 12px; }
.scenario .sc-l1 { display: flex; align-items: center; gap: 4px; }
.scenario .sc-l1 .case { margin-right: auto; min-width: 0; color: var(--ink); font-size: 14px; }
.scenario .sc-l1 .case b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scenario .aide { overflow-wrap: anywhere; }
.scenario.inactif { opacity: .6; }
#sc-nouveau { margin-bottom: 10px; }

/* Assistant vocal */
.v-micro { display: grid; justify-items: center; gap: 8px; margin: 14px 0; }
#v-micro { width: 84px; height: 84px; border-radius: 50%; padding: 0; display: grid; place-items: center; background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
#v-micro svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#v-micro[aria-pressed="true"] { background: var(--bad); border-color: var(--bad); animation: v-pulse 1.2s ease-in-out infinite; }
#v-micro:disabled { opacity: .5; animation: none; }
@keyframes v-pulse { 50% { box-shadow: 0 0 0 10px rgb(220 38 38 / .15); } }
@media (prefers-reduced-motion: reduce) { #v-micro[aria-pressed="true"] { animation: none; } }
.v-niveau { width: 160px; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.v-niveau i { display: block; height: 100%; width: 0; background: var(--good); transition: width .08s linear; }
#v-etat { margin: 0; color: var(--ink-2); font-size: 14px; text-align: center; }
.v-dialogue p { margin: 0 0 6px; display: grid; gap: 1px; }
.v-dialogue small { color: var(--ink-3); font-size: 12px; }
.v-h { font-size: 14px; margin: 14px 0 6px; }
.v-histo { display: grid; gap: 4px; font-size: 13px; }
.v-histo div { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); overflow-wrap: anywhere; }
.v-histo time { color: var(--ink-3); font-variant-numeric: tabular-nums; margin-right: 6px; }
