/* Style volontairement sobre : surfaces neutres, couleur réservée aux statuts,
   un seul accent (bleu) pour l'étape en cours, animations limitées aux déplacements. */
:root {
  color-scheme: dark;
  --bg: #111213;
  --surface: #18191b;
  --surface-2: #1f2023;
  --surface-3: #2a2b2f;
  --border: #2c2e32;
  --text: #e8e8ea;
  --text-2: #a3a6ab;
  --text-3: #6f7379;
  --accent: #6b9eea;
  --good: #3fa55b;
  --warning: #fbb315;
  --serious: #f18a59;
  --critical: #d9534f;
  --low: #7d8590;
  --radius: 10px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Progression de l'anneau des nœuds (0–100). Déclarée comme nombre pour que le
   navigateur sache l'interpoler : sans ça, une variable CSS change d'un coup. */
@property --p {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* l'attribut hidden l'emporte toujours sur display */
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
}
code, .mono { font-family: var(--mono); font-size: 0.92em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin: 0; }
.hint { color: var(--text-3); margin: 0; font-size: 13px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- bandeau ---------- */
.banner {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 32px; align-items: center;
  padding: 12px 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.brand-mark { width: 12px; height: 12px; border-radius: 3px; background: var(--text-2); }
.banner-prod { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.prod-tag { font: 600 18px/1 var(--mono); }
.prod-digest { color: var(--text-3); }
.banner-meta { display: flex; align-items: center; gap: 10px; }
.env-badge {
  font: 600 12.5px var(--mono); padding: 2px 9px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface-2);
}
.source-badge {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-3); border: 1px dashed var(--border); padding: 2px 8px; border-radius: 6px;
}
.live { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.live[data-state="open"] .live-dot { background: var(--good); }
.live[data-state="error"] .live-dot { background: var(--critical); }

main { max-width: 1440px; margin: 0 auto; padding: 28px; display: grid; gap: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }

/* ---------- chaîne ---------- */
.chain { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px 24px; }
.run-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.run-id { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.run-tag { font: 600 22px/1 var(--mono); }
.run-number { color: var(--text-3); font: 12.5px var(--mono); }
.run-step { color: var(--text-2); font: 12.5px var(--mono); }
.chain-controls { display: flex; align-items: center; gap: 6px; }
.chain-mode { color: var(--text-3); font-size: 12.5px; margin-right: 8px; }

.run-progress { position: relative; height: 2px; margin: 14px 0 28px; background: var(--surface-3); }
.run-progress-bar { height: 100%; background: var(--text-2); transition: width 0.6s var(--ease); }
.run-progress-bar[data-status="failed"] { background: var(--critical); }
.run-count { position: absolute; right: 0; top: 7px; font: 11px var(--mono); color: var(--text-3); }

.groups { display: grid; grid-template-columns: 3fr 4fr; gap: 0 18px; margin-bottom: 4px; }
.group {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3);
  padding-bottom: 6px; border-bottom: 1px solid var(--border); text-align: center;
}

/* piste : la ligne va du centre du 1er nœud au centre du dernier (1/14 de chaque côté) */
.track { position: relative; padding-top: 50px; }
.track-line {
  position: absolute; top: calc(50px + 28px); left: calc(100% / 14); right: calc(100% / 14);
  height: 2px; background: var(--surface-3); transform: translateY(-50%);
}
.track-fill { height: 100%; width: 0; background: var(--text-3); transition: width 0.8s var(--ease); }

/* paquet : l'image qui avance de nœud en nœud */
.packet {
  position: absolute; top: 4px; transform: translateX(-50%); z-index: 2;
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 3px 9px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: left 0.8s var(--ease);
}
.packet::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%);
  border: 5px solid transparent; border-bottom: 0; border-top-color: var(--border);
}
.packet-box { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.packet[data-status="success"] .packet-box { background: var(--good); }
.packet[data-status="failed"] .packet-box { background: var(--critical); }
.packet-tag { font: 600 12px var(--mono); }
.packet-note { font-size: 11px; color: var(--text-3); }
.packet-note:empty { display: none; }

/* nœuds */
.nodes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); position: relative; z-index: 1; }
.node {
  --p: 0; --ring: var(--text-3);
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; padding: 0 4px 6px;
}
.node[data-status="success"] { --ring: var(--good); }
.node[data-status="running"] { --ring: var(--accent); }
.node[data-status="failed"] { --ring: var(--critical); }
.node-ring {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  /* anneau de progression : part des steps de l'étape terminés */
  background: conic-gradient(var(--ring) calc(var(--p) * 1%), var(--surface-3) 0);
  outline: 1px solid transparent; outline-offset: 4px;
  transition: outline-color 0.3s var(--ease);
}
.node-core {
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--text-3);
}
.node[data-status="running"] .node-core { color: var(--accent); }
.node[data-status="failed"] .node-core { color: var(--critical); }
.node[data-status="success"] .node-core { color: var(--text-2); }
.node .stage-icon { width: 22px; height: 22px; }
.node[data-focus="true"] .node-ring { outline-color: var(--text-3); }
.node-index { font: 10.5px var(--mono); color: var(--text-3); margin-top: 6px; }
.node-label { font-weight: 500; font-size: 13px; text-align: center; color: var(--text-2); transition: color 0.3s var(--ease); }
.node:hover .node-label, .node[data-focus="true"] .node-label { color: var(--text); }
.node[data-focus="true"] .node-label { font-weight: 600; }
.node-status .status { font-size: 11px; color: var(--text-3); }

/* ---------- caméra : cadre fixe, scène zoomable, panneau de détails ---------- */
.viewport { position: relative; height: 540px; overflow: hidden; border-radius: 10px; }
.world {
  position: relative; transform-origin: 0 0;
  /* zoom avant : 0,55 s ; doit rester cohérent avec OUT_MS / HOLD_MS dans chain.ts */
  transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1);
}
.viewport[data-zoom="out"] .world { transition-duration: 0.45s; }
.world.no-anim { transition: none; }
.groups, .packet { transition: opacity 0.3s var(--ease), left 0.5s var(--ease); }
/* --p (progression de l'anneau) est typée via @property : elle s'anime au lieu de sauter */
.node { transition: opacity 0.3s var(--ease), --p 0.9s var(--ease); }
/* pendant le zoom, seule l'étape cadrée reste visible */
.viewport[data-zoom="in"] .groups,
.viewport[data-zoom="in"] .node[data-focus="false"],
.viewport[data-zoom="in"] .packet[data-away="true"] { opacity: 0; }

.zoom-panel {
  position: absolute; top: 14px; right: 14px; bottom: 14px; width: 54%; z-index: 3;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 18px 20px; overflow-y: auto;
  opacity: 0; transform: translateX(32px); pointer-events: none;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}
/* le panneau arrive pendant la fin du zoom avant */
.viewport[data-zoom="in"] .zoom-panel {
  opacity: 1; transform: none; pointer-events: auto;
  transition: opacity 0.3s var(--ease) 0.22s, transform 0.3s var(--ease) 0.22s;
}
.zp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.zp-head h3 { margin: 2px 0 4px; font-size: 21px; font-weight: 600; }
.zp-sub { display: flex; gap: 12px; align-items: center; color: var(--text-2); flex-wrap: wrap; font-size: 13px; }
.zp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 20px; }
.zp-col { min-width: 0; }
.zp-term { grid-column: 1 / -1; }
.zp-col h4 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); font-weight: 500; }
.zp-term .terminal { height: 140px; }

.tour-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; overflow: hidden; z-index: 4; }
.tour-bar::after { content: ""; display: block; height: 100%; width: 0; background: var(--text-3); }
.tour-bar.run::after { animation: tour 7s linear forwards; }
@keyframes tour { to { width: 100%; } }
.spot-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.spot-steps li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 6px;
}
.spot-steps li .status { color: var(--text-2); font-size: 13px; }
.spot-steps li[data-status="pending"] .status { color: var(--text-3); }
.spot-steps li[data-status="running"] { background: var(--surface-3); }
.spot-steps li[data-status="running"] .status { color: var(--text); }
.spot-steps li[data-status="failed"] .status { color: var(--text); }
.step-dur.live { color: var(--text-2); }

.terminal {
  height: 230px; overflow-y: auto; padding: 10px 12px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border); font: 12px/1.6 var(--mono); color: var(--text-2);
}
.t-cmd { color: var(--text); margin-top: 4px; }
.t-cmd:first-child { margin-top: 0; }
.t-prompt { color: var(--text-3); }
.t-cmd[data-status="failed"] .t-prompt { color: var(--critical); }
.t-out { padding-left: 14px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-3); }
.t-out.muted { padding-left: 0; }
.t-cursor { display: inline-block; width: 7px; height: 13px; background: var(--text-3); vertical-align: -2px; animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.zp-col .fields { grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; font-size: 13px; }
.clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-scan { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); display: grid; gap: 6px; }
.spot-scan-head { display: flex; justify-content: space-between; align-items: center; }

/* statut : icône + libellé, jamais la couleur seule */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.status-icon {
  width: 14px; height: 14px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 9px; font-weight: 700; color: #fff; flex: none;
}
.status[data-status="success"] .status-icon { background: var(--good); }
.status[data-status="failed"] .status-icon { background: var(--critical); }
.status[data-status="pending"] .status-icon,
.status[data-status="unknown"] .status-icon { background: transparent; border: 1.5px solid var(--text-3); }
.status[data-status="running"] .status-icon {
  background: transparent; border: 1.5px solid var(--surface-3); border-top-color: var(--accent); animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat-value { font: 600 24px/1.15 var(--sans); font-variant-numeric: tabular-nums; margin-top: 4px; }
.stat-sub { color: var(--text-3); font-size: 12px; }

/* ---------- graphique ---------- */
.chart-card { margin: 0 0 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 8px; }
.chart-card figcaption { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 6px; }
.chart-title { font-weight: 600; }
.legend { display: flex; gap: 14px; color: var(--text-2); font-size: 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .grid { stroke: var(--surface-3); stroke-width: 1; }
.chart .axis-label { fill: var(--text-3); font: 11px var(--sans); }
.chart .tag-label { fill: var(--text-2); font: 10.5px var(--mono); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit:hover, .chart .hit.selected { fill: rgba(255, 255, 255, 0.04); }
.chart .fail-mark { fill: var(--critical); font: 700 11px var(--sans); }

.tooltip {
  position: fixed; z-index: 30; pointer-events: none;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; font-size: 12px; min-width: 160px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.tooltip .tt-title { font: 600 12px var(--mono); margin-bottom: 4px; }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 16px; color: var(--text-2); }
.tooltip .tt-row span:last-child { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- comparaison ---------- */
.compare { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.compare-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.compare-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.delta-card { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; }
.delta-values { font: 600 17px var(--mono); margin-top: 4px; }
.delta { font-size: 12px; margin-top: 2px; color: var(--text-2); }
.delta[data-trend="better"]::before { content: "▼ "; color: var(--good); }
.delta[data-trend="worse"]::before { content: "▲ "; color: var(--critical); }
.delta[data-trend="same"]::before { content: "= "; color: var(--text-3); }
.compare-steps { margin-top: 14px; width: 100%; border-collapse: collapse; font-size: 12.5px; }
.compare-steps th, .compare-steps td { padding: 5px 8px; border-bottom: 1px solid var(--border); text-align: left; }

/* ---------- timeline ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.timeline { width: 100%; border-collapse: collapse; font-size: 13px; }
.timeline th {
  text-align: left; font-weight: 500; font-size: 11px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.05em; padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.timeline td { padding: 9px 12px; border-bottom: 1px solid var(--surface-2); white-space: nowrap; }
.timeline tbody tr { cursor: pointer; }
.timeline tbody tr:hover, .timeline tbody tr.selected { background: var(--surface-2); }
.timeline tbody tr:last-child td { border-bottom: none; }
.num, .timeline th.num, .compare-steps th.num { text-align: right; font-variant-numeric: tabular-nums; }
.timeline .tag { font: 600 13px var(--mono); }
.sev { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.sev.zero { color: var(--text-3); }
.pill { font-size: 11.5px; padding: 1px 8px; border-radius: 6px; border: 1px solid var(--border); color: var(--text-2); }
.timeline input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }

/* ---------- panneau de détails ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 19; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 20;
  width: min(560px, 100vw); overflow-y: auto;
  background: var(--surface); border-left: 1px solid var(--border);
}
.drawer-head {
  position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start;
  padding: 18px 22px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.drawer-head h2 { font-size: 18px; margin-top: 2px; }
.drawer-body { padding: 18px 22px 40px; display: grid; gap: 22px; }
.drawer-section h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); margin: 0 0 10px; font-weight: 500; }
.icon-btn, .btn {
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
  border-radius: 6px; cursor: pointer; font: inherit; font-size: 13px;
}
.icon-btn { width: 30px; height: 30px; font-size: 11px; }
.btn { padding: 5px 12px; }
.icon-btn:hover, .btn:hover { background: var(--surface-3); color: var(--text); }
.btn[aria-pressed="true"] { color: var(--text); }

.fields { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.fields dt { color: var(--text-3); font-size: 13px; }
.fields dd { margin: 0; overflow-wrap: anywhere; }

.scan { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.scan + .scan { margin-top: 10px; }
.scan-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.scan-tool { font-weight: 600; }
.scan-summary { color: var(--text-2); font-size: 12.5px; margin: 0 0 8px; }
.counts { display: flex; gap: 6px; flex-wrap: wrap; }
.count { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-3); border-radius: 5px; padding: 2px 7px; font-size: 12px; }
.count b { font-variant-numeric: tabular-nums; }
.findings { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px; }
.findings td { padding: 5px 6px; border-top: 1px solid var(--border); vertical-align: top; }

.steps { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.steps li { border-bottom: 1px solid var(--border); }
.steps li:last-child { border-bottom: none; }
.step-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; }
.step-row .status { color: var(--text); font-size: 13px; }
.step-dur { color: var(--text-3); font: 12px var(--mono); }
.steps details summary { list-style: none; cursor: pointer; }
.steps details summary::-webkit-details-marker { display: none; }
.steps details[open] summary { background: var(--surface-2); }
.steps pre {
  margin: 0; padding: 10px 12px; background: var(--bg); color: var(--text-2);
  font: 11.5px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
}

/* ---------- statut « ignoré » ---------- */
.status[data-status="skipped"] .status-icon { background: transparent; border: 1.5px dashed var(--text-3); color: var(--text-3); }
.spot-steps li[data-status="skipped"] .status { color: var(--text-3); text-decoration: line-through; }

/* ---------- mode démo ---------- */
.demo-bar { margin: -12px 0 22px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); display: grid; gap: 8px; }
.demo-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.demo-scenarios, .demo-controls { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.scenario { display: inline-flex; align-items: center; gap: 7px; }
.scenario[aria-pressed="true"] { color: var(--text); border-color: var(--text-3); }
kbd {
  font: 10.5px var(--mono); color: var(--text-3); padding: 0 4px; border-radius: 3px;
  border: 1px solid var(--border); background: var(--surface);
}
.demo-msg { margin: 0; font-size: 12.5px; color: var(--text-2); min-height: 1em; }
.demo-keys { margin: 0; font-size: 11.5px; color: var(--text-3); }
.demo-auth { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--text-2); }
.demo-auth input {
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 8px; font: 12.5px var(--mono); width: 280px;
}
.replay-banner {
  display: flex; align-items: center; gap: 12px; margin: -12px 0 18px; padding: 6px 12px;
  border-left: 2px solid var(--warning); background: var(--surface-2); font-size: 13px; color: var(--text-2);
}

/* ---------- mode scène : la chaîne occupe toute la fenêtre ----------
   Actif dès que le zoom l'est (suivi en direct, visite, sélection) ;
   « Vue d'ensemble » revient à la page classique avec l'historique. */
body.stage { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
body.stage .banner { flex: none; }
body.stage main { flex: 1; min-height: 0; width: 100%; max-width: none; margin: 0; padding: 0; display: flex; }
body.stage .history-section { display: none; }
body.stage .chain {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  border: 0; border-radius: 0; padding: 16px 28px 0;
}
body.stage .viewport { flex: 1; min-height: 0; height: auto; margin: 0 -28px; border-radius: 0; }
body.stage .demo-bar, body.stage .replay-banner { margin-top: -10px; }
body.stage .run-tag { font-size: 26px; }
body.stage .node-label { font-size: 15px; }
body.stage .zoom-panel { top: 18px; right: 28px; bottom: 24px; display: flex; flex-direction: column; }
body.stage .zp-head h3 { font-size: 28px; }
body.stage .zp-sub { font-size: 15px; }
body.stage .spot-steps li .status { font-size: 15px; }
body.stage .zp-col .fields { font-size: 14.5px; }
body.stage .zp-grid { flex: 1; min-height: 0; grid-template-rows: auto minmax(0, 1fr); }
body.stage .zp-term { display: flex; flex-direction: column; min-height: 0; }
body.stage .zp-term .terminal { flex: 1; height: auto; min-height: 120px; font-size: 13px; }
/* en plein écran du navigateur, on ne garde que l'essentiel */
:fullscreen .demo-keys { display: none; }

/* page classique (sans zoom) : le cadre s'ajuste à la chaîne */
body:not(.stage) .viewport { height: auto; }

@media (max-width: 1100px) {
  .banner { grid-template-columns: 1fr auto; gap: 10px 20px; }
  .node-ring { width: 44px; height: 44px; }
  .node-core { width: 39px; height: 39px; }
  .node .stage-icon { width: 18px; height: 18px; }
  .track-line { top: calc(50px + 22px); }
  .node-label { font-size: 12px; }
  .node-status { display: none; }
  .zoom-panel { width: 62%; }
  .zp-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .status-icon, .swatch, .live-dot { forced-color-adjust: none; }
}
