/* ================================================================
   ShellStation Design System — Composants partagés
   Requiert tokens.css (chargé avant). Tout au même endroit :
   primitives + composants composés (CC + Client).
   Convention : classes CSS + custom properties. Pas d'inline pour
   ce que les tokens couvrent.
   ================================================================ */

/* ── Reset & base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, select, input, textarea { font: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }
::selection { background: var(--accent); color: #fff; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── Boutons ──────────────────────────────────────────────────── */
.btn {
  font-family: inherit; font-weight: var(--weight-semibold); font-size: var(--text-sm);
  padding: 9px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; gap: var(--space-2); white-space: nowrap;
  transition: border-color .12s, color .12s, background .12s, filter .12s;
}
.btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { border-color: var(--border); color: var(--text); }
.btn-primary { background: var(--accent); color: var(--accent-contrast); border-color: transparent; }
.btn-primary:hover { color: var(--accent-contrast); filter: brightness(1.06); }
.btn-danger { color: var(--danger); border-color: var(--danger-soft); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }
.btn-sm { padding: 6px 10px; font-size: var(--text-xs); }
.btn-icon { width: 38px; padding: 0; justify-content: center; }
.btn .k { font-family: var(--font-mono); }

/* ── Champs de saisie ─────────────────────────────────────────── */
.input, .textarea, select.input {
  font: inherit; font-size: var(--text-base); width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text);
}
.input:focus, .textarea:focus, select.input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.input.mono, .textarea.mono { font-family: var(--font-mono); font-size: var(--text-sm); }
.textarea { resize: vertical; line-height: var(--leading-relaxed); }
.field-label { font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--faint); font-weight: var(--weight-semibold); }

/* Interrupteur (switch) */
.switch { width: 44px; height: 26px; border-radius: var(--radius-sm); background: var(--surface-3); border: 1px solid var(--border); position: relative; cursor: pointer; flex-shrink: 0; }
.switch.on { background: var(--accent); border-color: transparent; }
.switch i { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: var(--radius-sm); background: #fff; transition: left .14s; }
.switch.on i { left: 20px; }

/* ── Tags / chips / pills / labels ────────────────────────────── */
.tag { font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-semibold); padding: 5px 10px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-ink); border: 1px solid transparent; display: inline-flex; align-items: center; gap: 6px; }
:root[data-theme="dark"] .tag { border-color: rgba(248,72,94,0.28); }
.tag-neutral { background: var(--surface-2); color: var(--muted); border-color: var(--border); }
.tag-ok { background: var(--success-soft); color: var(--success); border-color: transparent; }
.tag-err { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.tag-blue { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.chip { font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-semibold); padding: 6px 11px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent-ink); }
.chip-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.pill { font-family: var(--font-mono); font-size: var(--text-3xs); font-weight: var(--weight-semibold); padding: 4px 8px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); display: inline-flex; align-items: center; gap: 5px; }
.pill-ok { background: var(--success-soft); color: var(--success); border-color: transparent; }
.pill-ko { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.lab { font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--faint); }
.section-label { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: var(--space-2); }
.section-label::before { content: "//"; color: var(--accent); }

/* ── Badges & status dots ─────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-semibold); padding: 4px 10px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-ink); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-error { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warn-soft); color: var(--warn); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; background: var(--muted); }
.dot-active { background: var(--success); }
.dot-provisioning { background: var(--warn); }
.dot-stale { background: var(--muted); }
.dot-failed { background: var(--danger); }
.dot-ready { background: var(--blue); }
.dot-live { background: var(--success); animation: ss-pulse 1.7s infinite; }
@keyframes ss-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* état LIVE (badge animé) — composant OPTIONNEL (feature Live) */
.live-tag { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-semibold); letter-spacing: 0.06em; padding: 4px 9px; border-radius: var(--radius-sm); background: var(--success-soft); color: var(--success); }
.live-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: ss-pulse 1.6s infinite; }
.live-tag.locked { background: var(--warn-soft); color: var(--warn); } .live-tag.locked i { background: var(--warn); animation: none; }
.live-tag.closed { background: var(--surface-2); color: var(--muted); } .live-tag.closed i { background: var(--muted); animation: none; }

/* ── Cards & progression ──────────────────────────────────────── */
.card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 18px 20px; }
.progress { height: 7px; border-radius: var(--radius-sm); background: var(--surface-3); overflow: hidden; border: 1px solid var(--border); }
.progress-fill, .progress > i { display: block; height: 100%; background: var(--accent); }
.meter { height: 6px; border-radius: var(--radius-sm); background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); }

/* ── Stats ────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.stat { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 15px 17px; }
.stat .k { font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--faint); }
.stat .v { font-size: var(--text-2xl); font-weight: var(--weight-bold); margin-top: 6px; letter-spacing: var(--tracking-tight); font-variant-numeric: tabular-nums; }
.stat .v small { font-size: var(--text-md); color: var(--muted); font-weight: var(--weight-medium); }
.stat.hi .v { color: var(--accent); }
.stat .spark { margin-top: 8px; height: 5px; border-radius: var(--radius-sm); background: var(--surface-3); overflow: hidden; }
.stat .spark i { display: block; height: 100%; background: var(--accent); }

/* ── Toast ────────────────────────────────────────────────────── */
.toast { display: flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: var(--radius); font-size: var(--text-sm); font-weight: var(--weight-semibold); color: #fff; box-shadow: var(--shadow-md); animation: ss-toast .22s ease-out; }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
@keyframes ss-toast { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ── Modales ──────────────────────────────────────────────────── */
.backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; margin: 0; width: auto; max-width: none; max-height: none; border: 0; padding: 28px; background: rgba(8,10,14,0.6); color: inherit; backdrop-filter: blur(3px); }
.backdrop[hidden] { display: none; }
.modal { width: 100%; max-width: 460px; max-height: calc(100vh - 56px); overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-lg); }
.modal-wide { max-width: 620px; } .modal-lib { max-width: 980px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 16px; border-bottom: 1px solid var(--border); }
.modal-head h2, .modal-head h3 { margin: 0; font-size: var(--text-lg); font-weight: var(--weight-semibold); }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: var(--text-sm); }
.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: var(--space-4); }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); display: flex; justify-content: flex-end; gap: var(--space-2); }
.modal-close { width: 34px; height: 34px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); cursor: pointer; font-size: 16px; }
.modal-close:hover { border-color: var(--accent); color: var(--accent-ink); }

/* ── Sidebar (CC) ─────────────────────────────────────────────── */
.side { background: var(--surface); border-right: 1px solid var(--border); padding: 24px 16px; display: flex; flex-direction: column; gap: var(--space-6); overflow: hidden; }
.wordmark { display: flex; flex-direction: column; gap: 3px; padding: 0 8px; }
.wordmark .word { font-size: 21px; font-weight: var(--weight-semibold); letter-spacing: var(--tracking-tight); }
.wordmark .word em { font-style: normal; color: var(--accent); }
.wordmark .sub { font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--faint); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: var(--space-3); padding: 10px 12px; border-radius: var(--radius); color: var(--muted); font-weight: var(--weight-medium); cursor: pointer; }
.nav a .ic { width: 18px; text-align: center; font-size: 15px; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: var(--weight-semibold); }
.side .spacer { flex: 1; }
.who { display: flex; align-items: center; gap: 11px; padding: 10px 8px; border-top: 1px solid var(--border); }
.who .av { width: 34px; height: 34px; border-radius: var(--radius); background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: var(--weight-bold); font-family: var(--font-mono); font-size: var(--text-sm); }
.who b { font-size: var(--text-sm); }
.who small { display: block; color: var(--faint); font-size: var(--text-2xs); font-family: var(--font-mono); }
.ver { font-family: var(--font-mono); font-size: var(--text-3xs); color: var(--faint); padding: 0 8px; }

/* Theme toggle (l'utilisateur décide, toujours disponible) */
.theme-toggle { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.theme-toggle button { flex: 1; font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-semibold); padding: 7px 0; border: none; border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer; }
.theme-toggle button.on { background: var(--text); color: var(--bg); }

/* ── App shell (grille sidebar + contenu) ─────────────────────── */
.app { display: grid; grid-template-columns: var(--sidebar-width) 1fr; height: 100vh; overflow: hidden; }
.app.no-side { grid-template-columns: 1fr; }
.content { overflow: hidden; display: flex; flex-direction: column; }
.scroll { flex: 1; overflow: auto; padding: 24px 28px 40px; display: flex; flex-direction: column; gap: 18px; }

/* En-tête de page (CC — dans le contenu) */
.page-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 28px; border-bottom: 1px solid var(--border); flex-shrink: 0; gap: 16px; }
.page-header h1 { font-size: var(--text-xl); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-tight); margin: 0; display: flex; align-items: center; gap: var(--space-3); }
.page-header .subtitle { color: var(--muted); font-size: var(--text-sm); margin-top: 4px; }
.crumbs { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--faint); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.page-actions { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* ── Appbar (Client — barre produit, accent) ──────────────────── */
/* Rendu translucide = décision design verrouillée (prototype Client).
   La règle de contraste SonarQube (css:S7924) est désactivée dans le
   profil qualité : Sonar n'arbitre pas la DA. */
.appbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 22px; background: var(--accent); flex-shrink: 0; }
.appbar .brand { display: flex; align-items: center; font-size: 21px; font-weight: var(--weight-semibold); letter-spacing: var(--tracking-tight); color: #fff; }
.appbar .brand em { font-style: normal; color: rgba(255,255,255,0.82); }
.appbar .toolbar { display: flex; align-items: center; gap: var(--space-2); }
.appbar .btn { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.42); color: #fff; }
.appbar .btn:hover:not(:disabled) { background: rgba(255,255,255,0.24); border-color: rgba(255,255,255,0.7); color: #fff; }
.appbar .btn-danger { color: #fff; }
.appbar .live-badge { margin-left: 11px; font-family: var(--font-mono); font-size: var(--text-3xs); font-weight: var(--weight-semibold); letter-spacing: 0.1em; padding: 4px 9px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.2); color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.appbar .live-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: ss-pulse 1.6s infinite; }
.appbar .guest-chip { font-family: var(--font-mono); font-size: var(--text-xs); color: rgba(255,255,255,0.85); padding: 7px 11px; border: 1px solid rgba(255,255,255,0.4); border-radius: var(--radius-sm); }
.appbar .guest-chip b { color: #fff; }
.appbar .cartridge-btn { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 14px; max-width: 320px; }
.appbar .cartridge-btn .l { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.72); font-weight: var(--weight-semibold); }
.appbar .cartridge-btn strong { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: #fff; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Terminal (toujours sombre) ───────────────────────────────── */
.terminal { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--term-border); background: var(--term-bg); }
.terminal-head { display: flex; align-items: center; gap: var(--space-3); padding: 0 18px; min-height: 46px; border-bottom: 1px solid var(--term-border); color: var(--term-dim); font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: 0.12em; text-transform: uppercase; }
.terminal-head::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.terminal-body { padding: 18px 20px; font-family: var(--font-mono); font-size: var(--text-sm); line-height: var(--leading-relaxed); color: var(--term-text); overflow: auto; }
.terminal-body .pr { color: var(--term-accent); }
.terminal-body .dim { color: var(--term-dim); }
.terminal-body .ok { color: var(--term-ok); }
.terminal-body .cursor { display: inline-block; width: 8px; height: 15px; background: var(--term-text); vertical-align: middle; animation: ss-blink 1.1s step-end infinite; }
@keyframes ss-blink { 50% { opacity: 0; } }

/* ── Split-pane (Client Hosted + Live) ────────────────────────── */
.split-layout { flex: 1; display: grid; grid-template-columns: minmax(430px, 43%) 12px minmax(480px, 1fr); min-height: 0; overflow: hidden; }
.split-left { padding: 22px; overflow: auto; background: var(--bg); min-width: 0; }
.split-right { min-width: 0; min-height: 0; display: grid; grid-template-rows: 46px 1fr; background: var(--term-bg); }
.splitter { position: relative; cursor: col-resize; }
.splitter::before { content: ""; position: absolute; top: 24px; bottom: 24px; left: 5px; width: 2px; background: var(--border); }

/* ── Cartes de question (Client) ──────────────────────────────── */
.question-flow { display: flex; flex-direction: column; gap: var(--space-4); }
.question-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 24px; display: flex; flex-direction: column; gap: var(--space-4); }
.question-eyebrow, .cover-kicker { align-self: flex-start; white-space: nowrap; font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-semibold); letter-spacing: 0.08em; padding: 5px 10px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-ink); border: 1px solid transparent; }
:root[data-theme="dark"] .question-eyebrow, :root[data-theme="dark"] .cover-kicker { border-color: rgba(248,72,94,0.28); }
.question-card h2 { font-size: var(--text-xl); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-tight); line-height: var(--leading-snug); margin: 0; }
.question-support-text, .cover-text, .completion-text { color: var(--muted); line-height: var(--leading-relaxed); margin: 0; }

/* cover + completion */
.cover-visual { width: 100%; aspect-ratio: 16/7; border: 1px solid var(--border); border-radius: var(--radius); background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 10px, var(--surface-3) 10px, var(--surface-3) 20px); display: grid; place-items: center; color: var(--faint); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.1em; }
.stat-grid { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.mini-stat { display: flex; flex-direction: column; gap: 3px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); min-width: 110px; }
.mini-stat .k { font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--faint); }
.mini-stat .v { font-size: var(--text-xl); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.mini-stat.hi .v { color: var(--accent); }

/* options (QCM) */
.options { display: flex; flex-direction: column; gap: var(--space-3); }
.opt { display: flex; align-items: center; gap: 13px; padding: 14px 15px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; transition: border-color .1s, background .1s; }
.opt:hover { border-color: var(--accent); }
.opt.selected { border-color: var(--accent); background: var(--accent-soft); }
.opt .mk { width: 20px; height: 20px; border: 1.5px solid var(--faint); flex-shrink: 0; display: grid; place-items: center; border-radius: 3px; }
.opt.single .mk { border-radius: 50%; }
.opt.selected .mk { border-color: var(--accent); }
.opt.selected .mk::after { content: ""; width: 10px; height: 10px; background: var(--accent); border-radius: 2px; }
.opt.single.selected .mk::after { border-radius: 50%; }
.opt .txt { flex: 1; }
.opt .sys-tag { font-family: var(--font-mono); font-size: var(--text-3xs); color: var(--faint); }
.opt.correct { border-color: var(--success); background: var(--success-soft); }
.opt.correct .mk { border-color: var(--success); } .opt.correct .mk::after { background: var(--success); }
.opt.wrong { border-color: var(--danger); background: var(--danger-soft); }
.opt.wrong .mk { border-color: var(--danger); } .opt.wrong .mk::after { background: var(--danger); }

/* tâches (action_system) */
.task-list { display: flex; flex-direction: column; gap: var(--space-3); list-style: none; padding: 0; margin: 0; }
.task-item { display: grid; grid-template-columns: 22px 1fr; gap: var(--space-3); align-items: start; padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.task-badge { width: 18px; height: 18px; border-radius: var(--radius-sm); background: var(--surface-3); border: 1px solid var(--border); margin-top: 1px; display: grid; place-items: center; font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--faint); }
.task-badge.ok { background: var(--success-soft); border-color: var(--success); color: var(--success); }
.task-badge.ko { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.task-item .t-cmd { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); margin-top: 4px; }

/* expectation, result, explanation, prepare-gate */
.expectation, .result { padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font-size: var(--text-sm); line-height: 1.55; }
.expectation { border-left: 3px solid var(--accent); }
.result { display: flex; align-items: flex-start; gap: var(--space-3); font-weight: var(--weight-medium); }
.result::before { font-family: var(--font-mono); font-weight: var(--weight-bold); }
.result.ok { color: var(--success-ink); border-color: var(--success); background: var(--success-soft); } .result.ok::before { content: "✓"; }
.result.ko { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); } .result.ko::before { content: "✗"; }
.explanation { padding: 13px 15px; border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--muted); font-size: var(--text-sm); line-height: var(--leading-relaxed); }
.explanation b { color: var(--text); font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: var(--tracking-label); text-transform: uppercase; display: block; margin-bottom: 6px; }
.prepare-gate { display: grid; gap: var(--space-2); padding: 15px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.prepare-gate.loading { grid-template-columns: 20px 1fr; align-items: center; border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.prepare-gate.warn { border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); background: var(--warn-soft); }
.prepare-spinner { width: 18px; height: 18px; border: 2px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: ss-spin .8s linear infinite; }
@keyframes ss-spin { to { transform: rotate(360deg); } }
.prepare-gate .pg-title { font-weight: var(--weight-semibold); font-size: var(--text-sm); }
.prepare-gate .pg-text { color: var(--muted); font-size: var(--text-sm); }

/* actions, dots, nav */
.question-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.question-dots { display: flex; gap: 7px; flex-wrap: wrap; }
.qdot { width: 26px; height: 26px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--faint); font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-semibold); display: grid; place-items: center; cursor: pointer; }
.qdot.active { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.qdot.ok { border-color: var(--success); color: var(--success); background: var(--success-soft); }
.qdot.ko { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.question-nav { display: flex; gap: var(--space-2); }
.question-nav .btn { flex: 1; justify-content: center; }
.setup-status { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); }
.setup-status.ok { color: var(--success-ink); } .setup-status.ko { color: var(--danger); }

/* version badge (Client) */
.version-badge { flex-shrink: 0; padding: 8px 22px; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--faint); }

/* ── Anneau timer (Quizz) ─────────────────────────────────────── */
.ring { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; position: relative; flex: none; background: conic-gradient(var(--accent) calc(var(--p,0)*1%), var(--surface-3) 0); }
.ring::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.ring b { position: relative; z-index: 1; font-family: var(--font-mono); font-weight: var(--weight-bold); font-size: var(--text-md); }

/* distribution des réponses (Quizz cockpit) */
.dist { display: flex; flex-direction: column; gap: var(--space-3); }
.dist-row { display: grid; grid-template-columns: 26px 1fr auto; gap: var(--space-3); align-items: center; }
.dist-row .opt-id { font-family: var(--font-mono); font-weight: var(--weight-bold); color: var(--faint); }
.dist-row.correct .opt-id { color: var(--success); }
.dist-bar-top { display: flex; justify-content: space-between; font-size: var(--text-sm); margin-bottom: 5px; }
.dist-bar { height: 8px; border-radius: var(--radius-sm); background: var(--surface-3); overflow: hidden; }
.dist-bar i { display: block; height: 100%; background: var(--accent); }
.dist-row.correct .dist-bar i { background: var(--success); }
.dist-row .pct { font-family: var(--font-mono); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.score-list { display: flex; flex-direction: column; gap: 2px; }
.score-row { display: flex; align-items: center; gap: 11px; padding: 9px 6px; border-bottom: 1px solid var(--border-soft); }
.score-row:last-child { border-bottom: none; }
.score-row .rank { font-family: var(--font-mono); font-weight: var(--weight-bold); color: var(--faint); width: 22px; }
.score-row.top .rank { color: var(--accent); }
.score-row .nm { flex: 1; font-size: var(--text-sm); }
.score-row .pts { font-family: var(--font-mono); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
/* score badge — OPTIONNEL (feature score) */
.score-badge { font-family: var(--font-mono); font-weight: var(--weight-bold); font-size: var(--text-md); color: var(--accent); }

/* ── Cockpit : en-tête événement + code join ──────────────────── */
.evhead { display: grid; grid-template-columns: 1.5fr 1fr; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.evhead .L { padding: 22px 24px; }
.cart-name { font-size: var(--text-lg); font-weight: var(--weight-semibold); letter-spacing: -0.01em; margin-top: 8px; }
.tags-row { display: flex; gap: var(--space-2); margin-top: 12px; flex-wrap: wrap; }
.metarow { display: flex; gap: 26px; margin-top: 18px; flex-wrap: wrap; }
.metarow .m .k { font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--faint); }
.metarow .m .v { font-size: var(--text-md); font-weight: var(--weight-semibold); margin-top: 3px; font-variant-numeric: tabular-nums; }
.evhead .R { background: var(--term-surface); color: #cfd6e6; padding: 22px 24px; display: flex; align-items: center; gap: 18px; }
.evhead .R .lab { color: #6b7385; }
.join-code { font-family: var(--font-mono); font-size: var(--text-2xl); font-weight: var(--weight-bold); color: #fff; letter-spacing: 0.04em; margin-top: 6px; }
.join-url { font-family: var(--font-mono); font-size: var(--text-xs); color: #8b93a3; margin-top: 4px; }
.join-actions { display: flex; gap: var(--space-2); margin-top: 14px; }
.join-actions .mini { font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-semibold); padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid #282e3a; background: rgba(255,255,255,0.05); color: #cfd6e6; cursor: pointer; }
.join-actions .mini.accent { background: var(--accent); color: #fff; border-color: transparent; }
.qr { width: 96px; height: 96px; flex-shrink: 0; padding: 7px; background: #fff; border-radius: var(--radius); display: grid; grid-template-columns: repeat(9,1fr); grid-template-rows: repeat(9,1fr); gap: 1px; }
.qr span { background: #10131a; } .qr span.o { background: transparent; }

/* grille d'instances (cockpit) */
.gridhead { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.gridhead h2 { font-size: var(--text-base); font-weight: var(--weight-semibold); margin: 0; display: flex; align-items: baseline; gap: var(--space-2); }
.gridhead h2 .c { font-family: var(--font-mono); color: var(--faint); font-size: var(--text-xs); font-weight: var(--weight-medium); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.inst-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.inst { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 15px 16px; display: flex; flex-direction: column; gap: var(--space-3); }
.inst.prov { border-style: dashed; }
.inst.fail { border-color: var(--danger-soft); }
.inst .ihead { display: flex; align-items: center; justify-content: space-between; }
.gid { display: flex; align-items: center; gap: var(--space-3); }
.gid .av { width: 32px; height: 32px; border-radius: var(--radius); background: var(--surface-3); color: var(--accent-ink); display: grid; place-items: center; font-weight: var(--weight-bold); font-size: var(--text-xs); font-family: var(--font-mono); }
.gid b { font-size: var(--text-base); font-weight: var(--weight-semibold); }
.gid small { display: block; color: var(--faint); font-size: var(--text-2xs); font-family: var(--font-mono); }
.st { font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-semibold); display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: var(--radius-sm); }
.st .dot { width: 7px; height: 7px; }
.st.active { color: var(--success); background: var(--success-soft); } .st.active .dot { background: var(--success); }
.st.ready { color: var(--blue); background: var(--blue-soft); } .st.ready .dot { background: var(--blue); }
.st.prov { color: var(--warn); background: var(--warn-soft); } .st.prov .dot { background: var(--warn); }
.st.stale { color: var(--muted); background: var(--surface-2); } .st.stale .dot { background: var(--muted); }
.st.fail { color: var(--danger); background: var(--danger-soft); } .st.fail .dot { background: var(--danger); }
.inst .meter-top { display: flex; align-items: center; justify-content: space-between; font-size: var(--text-xs); margin-bottom: 6px; color: var(--muted); }
.inst .meter-top b { color: var(--text); font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.inst .qline { font-size: var(--text-sm); color: var(--muted); }
.inst .qline b { color: var(--text); font-weight: var(--weight-semibold); }
.inst .ifoot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 11px; }
.inst .ifoot .meta { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--faint); display: flex; gap: var(--space-3); }
.iacts { display: flex; gap: 6px; }
.iact { width: 30px; height: 30px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; display: grid; place-items: center; font-size: var(--text-sm); font-family: var(--font-mono); }
.iact:hover { border-color: var(--accent); color: var(--accent-ink); }
.iact.kill:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }

/* ── Événements (dashboard) ───────────────────────────────────── */
.ev-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ev-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; cursor: pointer; transition: border-color .12s; }
.ev-card:hover { border-color: var(--accent); }
.ev-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.ev-card h3 { font-size: var(--text-md); font-weight: var(--weight-semibold); margin: 6px 0 0; letter-spacing: -0.01em; }
.ev-card .cart { font-size: var(--text-sm); color: var(--muted); margin-top: 3px; }
.ev-card .code { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: var(--weight-bold); letter-spacing: 0.04em; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.ev-card .row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.ev-card .cap { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); }
.ev-card .cap b { color: var(--text); }

/* ── Cartouches (catalogue + tuiles bibliothèque) ─────────────── */
.git-badge { font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-semibold); padding: 6px 11px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; gap: 7px; }
.git-badge.clean { background: var(--success-soft); color: var(--success); }
.git-badge.dirty { background: var(--warn-soft); color: var(--warn); }
.git-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.group-section { display: flex; flex-direction: column; gap: var(--space-3); }
.group-title { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: var(--space-3); }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.cart-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.cart-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; cursor: pointer; transition: border-color .12s; display: flex; flex-direction: column; }
.cart-card:hover { border-color: var(--accent); }
.cart-card.invalid { border-color: var(--danger-soft); }
.cart-visual { aspect-ratio: 16/9; background: var(--surface-3); display: grid; place-items: center; color: var(--accent-ink); font-family: var(--font-mono); font-weight: var(--weight-bold); font-size: var(--text-xl); border-bottom: 1px solid var(--border); }
.cart-body { padding: 14px 15px; display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.cart-body h3 { font-size: var(--text-base); font-weight: var(--weight-semibold); margin: 0; line-height: 1.25; }
.cart-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cart-meta .cnt { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--muted); }
.cartridge-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-3); }
.cartridge-tile { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.cartridge-tile.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.cartridge-tile.incompatible { opacity: .6; }
.cartridge-tile .visual { aspect-ratio: 16/9; background: var(--surface-3); display: grid; place-items: center; color: var(--accent-ink); font-family: var(--font-mono); font-weight: var(--weight-bold); font-size: var(--text-xl); border-bottom: 1px solid var(--border); }
.cartridge-tile .body { padding: 14px 15px; display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.cartridge-tile .body h3 { margin: 0; font-size: var(--text-base); font-weight: var(--weight-semibold); line-height: 1.25; }
.cartridge-tile .body p { margin: 0; color: var(--muted); font-size: var(--text-xs); line-height: 1.45; flex: 1; }

/* ── Éditeur de cartouche ─────────────────────────────────────── */
.editor-tabs { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.editor-tabs button { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-semibold); padding: 7px 14px; border: none; border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer; }
.editor-tabs button.active { background: var(--surface); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.validation-panel { border: 1px solid var(--success); border-radius: var(--radius); background: var(--success-soft); padding: 12px 16px; display: flex; align-items: center; gap: var(--space-3); font-weight: var(--weight-semibold); color: var(--success); font-size: var(--text-sm); }
.validation-panel::before { content: "✓"; font-family: var(--font-mono); }
.validation-panel.invalid { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.validation-panel.invalid::before { content: "✗"; }
.form-section { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 20px 22px; }
.form-section > h3 { font-size: var(--text-base); font-weight: var(--weight-semibold); margin: 0 0 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row.full { grid-column: 1 / -1; }
.form-row label,
.form-row .form-label { font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--faint); font-weight: var(--weight-semibold); }
.q-editor { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.q-editor-head { display: flex; align-items: center; justify-content: space-between; }
.q-editor-head .l { display: flex; align-items: center; gap: var(--space-3); }
.q-editor-head b { font-family: var(--font-mono); font-size: var(--text-base); }
.opt-edit { display: grid; grid-template-columns: 90px 1fr auto auto; gap: var(--space-2); align-items: center; }
.correct-toggle { width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--faint); cursor: pointer; font-family: var(--font-mono); }
.correct-toggle.on { background: var(--success-soft); color: var(--success); border-color: var(--success); }

/* ── Paramètres ───────────────────────────────────────────────── */
.settings-group { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.settings-group .sg-head { padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.settings-group .sg-head h3 { margin: 0; font-size: var(--text-base); font-weight: var(--weight-semibold); }
.settings-group .sg-head p { margin: 3px 0 0; font-size: var(--text-xs); color: var(--muted); }
.set-row { display: flex; align-items: center; gap: var(--space-4); padding: 15px 20px; border-bottom: 1px solid var(--border-soft); }
.set-row:last-child { border-bottom: none; }
.set-row .info { flex: 1; }
.set-row .info b { font-size: var(--text-base); font-weight: var(--weight-semibold); }
.set-row .info small { display: block; color: var(--muted); font-size: var(--text-xs); margin-top: 2px; }

/* ── Login (CC) ───────────────────────────────────────────────── */
.login { display: grid; place-items: center; height: 100vh; padding: 24px; background: var(--bg); }
.login-card { width: 100%; max-width: 420px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); padding: 40px 36px; text-align: center; box-shadow: var(--shadow-lg); }
.login-card .wordmark { align-items: center; margin-bottom: 24px; }
.login-card .wordmark .word { font-size: 30px; }
.login-card h1 { font-size: var(--text-lg); font-weight: var(--weight-semibold); margin: 0 0 6px; }
.login-card p { color: var(--muted); font-size: var(--text-sm); margin: 0 0 26px; line-height: var(--leading-normal); }
.login-card .btn { width: 100%; justify-content: center; padding: 13px; }
.oidc-note { display: flex; align-items: center; justify-content: center; gap: var(--space-2); margin-top: 18px; font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--faint); }
.oidc-note i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }

/* ── Overlay handoff (Client) ─────────────────────────────────── */
.handoff { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; background: rgba(11,13,18,0.9); color: #fff; text-align: center; padding: 28px; }
.handoff[hidden] { display: none; }
.handoff .sp { width: 40px; height: 40px; margin: 0 auto 16px; border: 4px solid rgba(255,255,255,.18); border-top-color: var(--accent); border-radius: 50%; animation: ss-spin .85s linear infinite; }
.handoff h2 { margin: 0 0 8px; font-size: var(--text-xl); font-weight: var(--weight-semibold); }
.handoff p { margin: 0; color: #b7b3b0; }

/* ── Projection code join (plein écran) ───────────────────────── */
.join-overlay { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 40px; background: #08090d; color: #fff; text-align: center; }
.join-overlay[hidden] { display: none; }
.join-overlay .big-code { font-family: var(--font-mono); font-size: clamp(80px, 14vw, 200px); font-weight: var(--weight-bold); line-height: 1; letter-spacing: 0.02em; margin: 14px 0; }
.join-overlay .big-url { font-family: var(--font-mono); font-size: clamp(18px, 3vw, 34px); color: #8b93a3; }

/* ── État vide ────────────────────────────────────────────────── */
.empty { border: 1px dashed var(--border); border-radius: var(--radius); padding: 48px; text-align: center; color: var(--muted); }
.empty h2 { color: var(--text); font-size: var(--text-lg); margin: 0 0 8px; }

/* ── Patrons d'états transverses ──────────────────────────────── */
/* Bandeau de connexion (connexion perdue / reconnexion) — se place
   en haut de la zone de contenu, pousse le contenu vers le bas. */
.connection-banner { display: flex; align-items: center; gap: var(--space-3); padding: 10px 16px; font-size: var(--text-sm); font-weight: var(--weight-semibold); border-bottom: 1px solid var(--danger); background: var(--danger-soft); color: var(--danger); }
.connection-banner .dot { width: 8px; height: 8px; background: currentColor; }
.connection-banner.reconnecting { border-bottom-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.connection-banner.reconnecting .dot { animation: ss-pulse 1.2s infinite; }
.connection-banner .cb-action { margin-left: auto; font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-semibold); padding: 5px 10px; border-radius: var(--radius-sm); border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer; }

/* Erreur récupérable + retry — s'insère à la place du contenu qui a échoué. */
.retry-panel { border: 1px solid var(--danger-soft); border-radius: var(--radius); background: var(--surface); padding: 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.retry-panel .rp-icon { font-family: var(--font-mono); font-size: var(--text-xl); font-weight: var(--weight-bold); color: var(--danger); }
.retry-panel .rp-title { font-weight: var(--weight-semibold); font-size: var(--text-base); color: var(--text); }
.retry-panel .rp-text { color: var(--muted); font-size: var(--text-sm); max-width: 380px; line-height: var(--leading-relaxed); }

/* Erreur bloquante pleine zone (accès refusé, session expirée…). */
.blocking-error { display: grid; place-items: center; min-height: 320px; padding: 40px; }
.blocking-error .be-card { max-width: 420px; text-align: center; }
.blocking-error .be-code { font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--danger); background: var(--danger-soft); display: inline-block; padding: 5px 10px; border-radius: var(--radius-sm); margin-bottom: 14px; }
.blocking-error h2 { font-size: var(--text-xl); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-tight); margin: 0 0 8px; color: var(--text); }
.blocking-error p { color: var(--muted); font-size: var(--text-sm); line-height: var(--leading-relaxed); margin: 0 0 20px; }

/* Skeleton (chargement long) — appliquer sur des blocs de forme. */
.skeleton { position: relative; overflow: hidden; background: var(--surface-3); border-radius: var(--radius-sm); color: transparent !important; user-select: none; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 60%, transparent), transparent); animation: ss-shimmer 1.4s infinite; }
@keyframes ss-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.skeleton-line { height: 13px; margin: 5px 0; }
.skeleton-line.w60 { width: 60%; } .skeleton-line.w40 { width: 40%; } .skeleton-line.w80 { width: 80%; }

/* Changements non sauvegardés — point accent sur le bouton d'action. */
.unsaved-dot::after { content: "●"; color: currentColor; font-size: 9px; margin-left: 7px; vertical-align: 2px; }

/* Action en cours — spinner inline dans un bouton. */
.btn .btn-spinner { width: 14px; height: 14px; border: 2px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; border-radius: 50%; animation: ss-spin .8s linear infinite; }

/* ── Desktop-only (bloc mobile) ───────────────────────────────── */
.mobile-block { display: none; }
@media (max-width: 860px) {
  .mobile-block { display: grid; place-items: center; position: fixed; inset: 0; z-index: 300; background: var(--bg); padding: 28px; }
  .mobile-card { max-width: 380px; text-align: center; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); padding: 32px; }
  .mobile-card h2 { margin: 0 0 12px; font-size: var(--text-lg); }
  .mobile-card p { margin: 0; color: var(--muted); line-height: var(--leading-relaxed); }
}

/* ── Reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}
