/*
 * JARVIS — gabarit HUD. Tokens, fond, panneaux et points de rupture repris du
 * prototype (docs/reference/artifact-jarvis.html), réécrits mobile d'abord :
 * styles de base pour le téléphone, puis élargissements à 761 et 1181 px
 * (les points de rupture 760 et 1180 px du prototype).
 */

/* ---------- Polices auto-hébergées (OFL, voir fonts/OFL-*.txt) ---------- */
@font-face {
  font-family: "Chakra Petch";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/chakra-petch-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Chakra Petch";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/chakra-petch-latin-500.woff2") format("woff2");
}
@font-face {
  font-family: "Chakra Petch";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/chakra-petch-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Share Tech Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/share-tech-mono-latin-400.woff2") format("woff2");
}

/* ---------- Tokens (identiques au prototype) ---------- */
:root {
  --void: #03070c;
  --deck: rgba(10, 34, 52, .42);
  --deck-solid: #071520;
  --line: rgba(80, 200, 255, .20);
  --line-strong: rgba(110, 220, 255, .55);
  --cyan: #45d6ff;
  --cyan-hot: #c9f5ff;
  --ice: #cfe6f0;
  --mute: #6f8ea2;
  --amber: #ffb24d;
  --red: #ff6b5a;
  --green: #6cf2b0;
  --glow: rgba(69, 214, 255, .45);
  --f-display: "Chakra Petch", "Rajdhani", system-ui, sans-serif;
  --f-data: "Share Tech Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 42%, rgba(18, 80, 130, .35), transparent 70%),
    repeating-linear-gradient(0deg, rgba(69, 214, 255, .035) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(69, 214, 255, .035) 0 1px, transparent 1px 44px),
    var(--void);
  background-attachment: fixed;
  color: var(--ice);
  font-family: var(--f-display);
  font-size: 15px;
  line-height: 1.5;
}

/* Lignes de balayage. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid var(--cyan); outline-offset: 2px; }
a { color: var(--cyan); }

/* ---------- En-tête ---------- */
.head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.mark {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: .42em;
  color: var(--cyan-hot);
  text-shadow: 0 0 14px var(--glow);
  margin: 0;
}
.mark small {
  display: block;
  font-family: var(--f-data);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--mute);
  text-shadow: none;
}
.links {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--f-data);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--mute);
  text-transform: uppercase;
}
.link { display: flex; align-items: center; gap: 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mute); }
.link[data-s="on"] .dot { background: var(--green); box-shadow: 0 0 8px var(--green); }
.link[data-s="wait"] .dot { background: var(--amber); animation: blink 1s steps(2) infinite; }
.link[data-s="off"] .dot { background: var(--red); }
.link[data-s="idle"] .dot { background: var(--mute); }
@keyframes blink { 50% { opacity: .2; } }
.inline-form { display: inline; margin: 0; }

/* ---------- Panneaux ---------- */
.panel {
  position: relative;
  background: var(--deck);
  border: 1px solid var(--line);
  padding: 14px 16px;
  min-width: 0;
}
.panel::before, .panel::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid var(--cyan);
  pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.panel h2 {
  margin: 0 0 12px;
  font-family: var(--f-data);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--cyan);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.panel h2 span { color: var(--mute); }
.note { font-family: var(--f-data); font-size: 11px; color: var(--mute); letter-spacing: .04em; margin: 8px 0 0; }
.standby { margin: 0; font-family: var(--f-data); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }

/* ---------- Contrôles ---------- */
.btn {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--cyan);
  font-family: var(--f-data);
  font-size: 12px;
  letter-spacing: .1em;
  padding: 6px 10px;
  cursor: pointer;
  text-transform: uppercase;
}
.btn:hover:not(:disabled) { background: rgba(69, 214, 255, .12); }
.btn:disabled { opacity: .4; cursor: default; }
.btn--primary { color: var(--void); background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 14px var(--glow); }
.btn--primary:hover:not(:disabled) { background: var(--cyan-hot); }

.field { display: grid; gap: 6px; font-size: 12px; color: var(--mute); font-family: var(--f-data); letter-spacing: .06em; }
.field input {
  width: 100%;
  background: var(--deck-solid);
  border: 1px solid var(--line-strong);
  padding: 10px 12px;
  font-family: var(--f-data);
  font-size: 16px; /* 16 px : évite le zoom automatique de Chrome Android. */
  color: var(--cyan-hot);
  outline: 0;
}
.field input:focus { border-color: var(--cyan); box-shadow: 0 0 12px var(--glow); }
.field--code input { letter-spacing: .5em; text-align: center; font-size: 22px; }

.alert { margin: 0; font-family: var(--f-data); font-size: 12px; letter-spacing: .06em; color: var(--red); }
.flashes { display: grid; gap: 8px; }
.flash { font-family: var(--f-data); font-size: 12px; border: 1px solid var(--line-strong); padding: 8px 12px; }
.flash--error { color: var(--red); border-color: var(--red); }
.flash--success { color: var(--green); border-color: var(--green); }

/* ---------- Horloge ---------- */
.clock { font-family: var(--f-data); font-size: 34px; line-height: 1; color: var(--cyan-hot); text-shadow: 0 0 18px var(--glow); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.clock .sec { font-size: 20px; color: var(--cyan); }
.date { margin-top: 8px; font-family: var(--f-data); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ice); }

/* ---------- Orbe ---------- */
.core { display: flex; flex-direction: column; min-height: 0; min-width: 0; gap: 10px; }
.orb-wrap { position: relative; flex: none; height: 220px; min-height: 0; }
.orb { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.state {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  text-align: center;
  font-family: var(--f-data);
  font-size: 11px;
  letter-spacing: .4em;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--glow);
  text-transform: uppercase;
}

/* ---------- Console (accueil) — téléphone d'abord ---------- */
/* Téléphone (plan C2 D2) : en-tête, orbe, puis Sessions · Suites à donner ·
   Missions, puis l'horloge. Les colonnes s'effacent (display: contents) pour
   que l'ordre des panneaux ne dépende que de `order`. */
.hud {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding-top: max(16px, env(safe-area-inset-top, 0px));
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.col { display: flex; flex-direction: column; gap: 16px; min-height: 0; min-width: 0; }
.hud > .board, .hud > .tele { display: contents; }
.hud > .core { order: 1; }
.p-sessions { order: 2; }
.p-followups { order: 3; }
.p-missions { order: 4; }
.p-clock { order: 5; }

/* ---------- Composants de l'accueil (repris du prototype) ---------- */
.link-meta { font-style: normal; text-transform: none; letter-spacing: .04em; }
.hint { font-family: var(--f-data); font-size: 12px; color: var(--amber); letter-spacing: .04em; min-height: 1.2em; margin: 0; text-align: center; }
.board-note { font-family: var(--f-data); font-size: 12px; color: var(--mute); padding: 8px 0; margin: 0; list-style: none; }
.alert-count { color: var(--red) !important; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn--warn { border-color: var(--red); color: var(--red); }
.btn, .chip, .send, .m-status, .m-open, .fu-x, .fu-toggle { min-height: 40px; }

.scroll { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

/* Sessions */
.sessions { display: grid; gap: 10px; }
.t-item {
  display: grid;
  gap: 6px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid var(--line);
  padding: 10px 12px;
  cursor: pointer;
  color: var(--ice);
}
.t-item:hover { border-color: var(--line-strong); background: rgba(69, 214, 255, .05); }
.t-item > span { display: block; }
.t-item > .t-top { display: flex; }
.t-top { justify-content: space-between; gap: 8px; align-items: baseline; }
.t-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.t-chip { flex: none; font-family: var(--f-data); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; border: 1px solid currentColor; padding: 1px 6px; color: var(--mute); }
.t-chip.ok { color: var(--green); }
.t-chip.ko { color: var(--red); }
.t-chip.run { color: var(--amber); }
.t-chip.off { color: var(--mute); opacity: .7; }
.t-meta { font-family: var(--f-data); font-size: 11px; color: var(--mute); }
.t-item.dim { opacity: .55; }
.s-text { font-size: 13px; color: var(--ice); opacity: .85; overflow-wrap: anywhere; }

/* Suites à donner */
.fu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.fu-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: start; }
.fu-item input { margin: 3px 0 0; accent-color: var(--amber); width: 20px; height: 20px; }
.fu-body { min-width: 0; cursor: pointer; }
.fu-text { display: block; font-size: 14px; line-height: 1.45; color: var(--ice); overflow-wrap: anywhere; }
.fu-text code { font-family: var(--f-data); font-size: 12px; color: var(--cyan-hot); background: rgba(69, 214, 255, .1); padding: 0 4px; word-break: break-all; }
.fu-text strong { color: var(--cyan-hot); font-weight: 600; }
.fu-meta { display: block; margin-top: 2px; font-family: var(--f-data); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.fu-meta b { font-weight: 400; color: var(--amber); }
.fu-item.done .fu-text { color: var(--mute); text-decoration: line-through; }
.fu-x { background: none; border: 0; color: var(--mute); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 10px; min-width: 40px; }
.fu-x:hover { color: var(--red); }
.fu-toggle { margin-top: 10px; background: none; border: 0; padding: 0; font-family: var(--f-data); font-size: 11px; color: var(--mute); cursor: pointer; text-decoration: underline; }

/* Ajout (suites, missions) */
.add { display: flex; gap: 8px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.add input { flex: 1; min-width: 0; background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); outline: 0; padding: 6px 0; font-family: var(--f-data); font-size: 16px; color: var(--ice); }
.add input::placeholder { color: var(--mute); }

/* Missions */
.mission { border-left: 2px solid var(--mute); padding: 6px 0 8px 12px; display: grid; gap: 4px; min-width: 0; }
.mission[data-status="actif"] { border-left-color: var(--cyan); }
.mission[data-status="bloqué"] { border-left-color: var(--red); }
.mission[data-status="livré"] { border-left-color: var(--green); }
.mission[data-status="en pause"] { border-left-color: var(--amber); }
.m-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.m-name { font-weight: 600; font-size: 16px; letter-spacing: .02em; color: var(--ice); min-width: 0; min-height: 40px; overflow-wrap: anywhere; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.m-name:hover { color: var(--cyan-hot); }
.m-name::after { content: " ✎"; font-size: 11px; color: var(--mute); }
.m-status { flex: none; background: transparent; border: 1px solid currentColor; padding: 2px 9px; font-family: var(--f-data); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); cursor: pointer; }
.mission[data-status="actif"] .m-status { color: var(--cyan); }
.mission[data-status="bloqué"] .m-status { color: var(--red); }
.mission[data-status="livré"] .m-status { color: var(--green); }
.mission[data-status="en pause"] .m-status { color: var(--amber); }
.m-tags { font-family: var(--f-data); font-size: 11px; color: var(--mute); letter-spacing: .06em; overflow-wrap: anywhere; }
.m-bar { display: grid; grid-template-columns: 1fr 38px; align-items: center; gap: 8px; }
.m-bar b { height: 3px; background: rgba(69, 214, 255, .14); position: relative; display: block; }
.m-bar b i { position: absolute; inset: 0 auto 0 0; background: var(--cyan); box-shadow: 0 0 8px var(--glow); }
.m-bar span { font-family: var(--f-data); font-size: 11px; color: var(--cyan); text-align: right; font-variant-numeric: tabular-nums; }
.m-next { font-size: 13px; color: var(--ice); opacity: .85; overflow-wrap: anywhere; }
.m-next::before { content: "→ "; color: var(--cyan); }
.m-sess-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.m-open { background: transparent; border: 0; padding: 0; font-family: var(--f-data); font-size: 12px; color: var(--cyan); cursor: pointer; text-decoration: underline; }
.editor { margin-top: 6px; padding: 12px; border: 1px solid var(--line-strong); background: rgba(4, 16, 26, .8); display: grid; gap: 10px; }
.editor .row { margin-top: 4px; }
.field select, .field input[type="text"] {
  width: 100%;
  background: var(--deck-solid);
  border: 1px solid var(--line-strong);
  padding: 8px 10px;
  font-family: var(--f-data);
  font-size: 16px;
  color: var(--ice);
  outline: 0;
}
.field input[type="range"] { width: 100%; accent-color: var(--cyan); min-height: 32px; }

/* ---------- Vue session (plan C2 D1, D6) ---------- */
html.sm-open, html.sm-open body { overflow: hidden !important; overscroll-behavior: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: rgba(2, 6, 10, 0);
  transition: background .22s, backdrop-filter .22s;
}
.modal.open { background: rgba(2, 6, 10, .74); backdrop-filter: blur(6px); }
.sm-box {
  position: relative;
  width: min(820px, 100%);
  height: min(86vh, 900px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, rgba(8, 28, 44, .97), rgba(4, 14, 22, .99));
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 1px rgba(69, 214, 255, .08), 0 0 60px rgba(69, 214, 255, .18);
  padding: 18px 20px;
  transform: scale(.6);
  opacity: 0;
  transition: transform .24s cubic-bezier(.2, .9, .3, 1.15), opacity .18s;
}
.modal.open .sm-box { transform: scale(1); opacity: 1; }
.sm-box::before, .sm-box::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--cyan); pointer-events: none; }
.sm-box::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.sm-box::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.sm-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.sm-id { min-width: 0; }
.sm-kicker { font-family: var(--f-data); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--mute); overflow-wrap: anywhere; }
.sm-head h2 { margin: 2px 0 6px; font-size: 22px; font-weight: 600; letter-spacing: .06em; color: var(--cyan-hot); text-shadow: 0 0 14px var(--glow); overflow-wrap: anywhere; }
.sm-sub { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sm-feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.bubble { max-width: 86%; padding: 10px 12px; border: 1px solid var(--line); display: grid; gap: 4px; min-width: 0; }
.bubble.me { align-self: flex-end; background: rgba(69, 214, 255, .08); border-color: rgba(69, 214, 255, .35); }
.bubble.cc { align-self: flex-start; background: rgba(255, 178, 77, .05); border-color: rgba(255, 178, 77, .3); }
.b-meta { font-family: var(--f-data); font-size: 10px; letter-spacing: .16em; color: var(--mute); }
.bubble.cc .b-meta { color: var(--amber); }
.bubble.me .b-meta { color: var(--cyan); }
.b-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; color: var(--ice); min-width: 0; }
.b-text.md { white-space: normal; }
.b-text.md p { margin: 0 0 8px; }
.b-text.md > :last-child { margin-bottom: 0; }
.b-text.md ul, .b-text.md ol { margin: 2px 0 8px; padding-left: 20px; display: grid; gap: 4px; }
.b-text.md li::marker { color: var(--amber); }
.b-text.md li.sub { margin-left: 18px; list-style-type: circle; }
.b-text.md li.sub::marker { color: var(--mute); }
.b-text.md strong { color: var(--cyan-hot); font-weight: 600; }
.b-text.md code { font-family: var(--f-data); font-size: 12.5px; color: var(--cyan-hot); background: rgba(69, 214, 255, .1); padding: 1px 5px; overflow-wrap: anywhere; }
.b-text.md pre { margin: 0 0 8px; padding: 8px 10px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); overflow-x: auto; }
.b-text.md pre code { background: none; padding: 0; white-space: pre; overflow-wrap: normal; }
.b-text.md .b-h { font-weight: 600; color: var(--cyan-hot); letter-spacing: .02em; }
.b-state { font-family: var(--f-data); font-size: 11px; color: var(--amber); }
.b-state.ok { color: var(--green); }
.sm-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { text-align: left; background: transparent; border: 1px solid var(--line); padding: 6px 12px; cursor: pointer; font-family: var(--f-data); font-size: 12px; color: var(--ice); }
.chip:hover { border-color: var(--cyan); background: rgba(69, 214, 255, .08); }
.ask { display: flex; align-items: flex-end; gap: 10px; border: 1px solid var(--line-strong); background: rgba(4, 16, 26, .75); padding: 6px 6px 6px 14px; box-shadow: inset 0 0 18px rgba(69, 214, 255, .06); }
.ask label { font-family: var(--f-data); color: var(--cyan); font-size: 13px; padding-bottom: 10px; }
.ask textarea { flex: 1; min-width: 0; resize: none; max-height: 30vh; background: transparent; border: 0; outline: 0; font-family: var(--f-data); font-size: 16px; color: var(--cyan-hot); padding: 8px 0; }
.ask textarea::placeholder { color: var(--mute); }
.send { border: 1px solid var(--cyan); background: rgba(69, 214, 255, .12); color: var(--cyan-hot); font-family: var(--f-data); font-size: 12px; letter-spacing: .2em; padding: 9px 14px; cursor: pointer; text-transform: uppercase; }
.send:hover:not(:disabled) { background: var(--cyan); color: var(--void); }
.modal .note:empty { display: none; }
.modal .note { margin: 0; color: var(--amber); }

/* Téléphone : la console s'efface, la vue session devient la page. */
@media (max-width: 760px) {
  .modal { padding: 0; }
  html.sm-open .hud { display: none; }
  html.sm-open .modal { position: relative; inset: auto; display: block; height: 100vh; height: 100dvh; min-height: 420px; }
  .sm-box { width: 100%; height: 100%; padding: max(14px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(14px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .bubble { max-width: 94%; }
}

/* ---------- Connexion ---------- */
.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.gate__box { width: min(380px, 100%); display: grid; gap: 14px; }
.gate .head { justify-content: center; text-align: center; border-bottom: 0; padding-bottom: 0; }
.gate .orb-wrap { height: 180px; }
.gate form { display: grid; gap: 14px; }
.gate .btn { padding: 10px 12px; font-size: 13px; }

/* ---------- Pages d'erreur et hors ligne ---------- */
.error-page__content { text-align: center; }
.error-page__code { margin: 0; font-family: var(--f-data); font-size: 48px; color: var(--cyan-hot); text-shadow: 0 0 18px var(--glow); }
.error-page__title { margin: 0; font-size: 18px; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); }
.error-page__message { margin: 12px 0 18px; }

/* ---------- Tablette et PC étroit (≥ 761 px) ---------- */
@media (min-width: 761px) {
  .hud {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    grid-template-areas: "head head" "core board" "tele tele";
    gap: 16px 20px;
  }
  /* Grands écrans : les colonnes reprennent leurs zones (parité avec
     l'artefact en C6). */
  .hud > .head { grid-area: head; }
  .hud > .core { grid-area: core; }
  .hud > .board { grid-area: board; display: flex; }
  .hud > .tele { grid-area: tele; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; align-items: start; }
  .p-sessions, .p-followups, .p-missions, .p-clock { order: 0; }
  .board .panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
  .board .scroll { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
  .head { gap: 18px; }
  .mark { font-size: 20px; }
  .links { margin-left: auto; gap: 14px; }
  .core { height: 640px; }
  .orb-wrap { flex: 1 1 auto; height: auto; min-height: 240px; }
  .board { height: 640px; }
  .clock { font-size: 40px; }
}

/* ---------- Grand écran (≥ 1181 px) : console plein écran ---------- */
@media (min-width: 1181px) {
  html, body { height: 100%; }
  body { overflow: hidden; }
  .hud {
    height: 100%;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(300px, 360px);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "head head head" "tele core board";
  }
  .core, .board { height: auto; }
  .hud > .tele { display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
  .hud > .tele > .panel { flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  .link[data-s="wait"] .dot { animation: none; }
  .sm-box, .modal { transition: none; }
}
