/* ═══════════════════════════════════════════════════════════════
   Chaleur océanique — charte Observatoire des Polycrises
   Aligné sur : index, bibliographie, trafficjam, regulateur
   Bleu #1e40af / #2563eb · Ambre labo · Inter · cartes slate
   ═══════════════════════════════════════════════════════════════ */

:root {
  --obs-blue-900: #1e3a8a;
  --obs-blue-800: #1e40af;
  --obs-blue-600: #2563eb;
  --obs-blue-500: #3b82f6;
  --obs-blue-400: #60a5fa;
  --obs-blue-200: #bfdbfe;
  --obs-blue-100: #dbeafe;
  --obs-blue-50: #eff6ff;

  --obs-slate-900: #0f172a;
  --obs-slate-700: #334155;
  --obs-slate-500: #64748b;
  --obs-slate-400: #94a3b8;
  --obs-slate-200: #e2e8f0;
  --obs-slate-100: #f1f5f9;
  --obs-slate-50: #f8fafc;

  --obs-amber-800: #92400e;
  --obs-amber-700: #b45309;
  --obs-amber-600: #d97706;
  --obs-amber-500: #f59e0b;
  --obs-amber-100: #fef3c7;
  --obs-amber-50: #fffbeb;

  --obs-orange-600: #ea580c;
  --obs-red-600: #dc2626;
  --obs-cyan-400: #22d3ee;
  --obs-teal-500: #14b8a6;

  /* Tokens interface — mode clair (défaut, comme le site éditorial) */
  --bg: var(--obs-slate-50);
  --bg-hero: linear-gradient(135deg, var(--obs-blue-50) 0%, #ffffff 55%, var(--obs-slate-50) 100%);
  --surface: #ffffff;
  --surface-raised: var(--obs-slate-100);
  --border: var(--obs-slate-200);
  --text: var(--obs-slate-900);
  --text-secondary: var(--obs-slate-500);
  --accent: var(--obs-blue-600);
  --accent-strong: var(--obs-blue-800);
  --accent-soft: var(--obs-blue-100);
  --ocean: var(--obs-blue-800);
  --ocean-surface: var(--obs-blue-500);
  --heat: var(--obs-amber-600);
  --heat-strong: var(--obs-orange-600);
  --heat-critical: var(--obs-red-600);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 8px 24px rgba(37, 99, 235, 0.08);
  --radius: 0.75rem;
  --font-mono: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --slider-pct: 87%;
  --chart-fill-top: rgba(37, 99, 235, 0.28);
  --chart-fill-bot: rgba(37, 99, 235, 0.02);
  --chart-line: #2563eb;
  --chart-grid: rgba(148, 163, 184, 0.35);
  --chart-co2-fill-top: rgba(5, 150, 105, 0.28);
  --chart-co2-fill-bot: rgba(5, 150, 105, 0.02);
  --chart-co2-line: #059669;
  --flow-in-top: #dbeafe;
  --flow-in-bot: #93c5fd;
  --flow-ocean-top: #3b82f6;
  --flow-ocean-bot: #1d4ed8;
  --border-subtle: rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] {
  --bg: #0b0f17;
  --bg-hero: linear-gradient(135deg, #0f172a 0%, #111827 50%, #0b0f17 100%);
  --surface: #1e293b;
  --surface-raised: #334155;
  --border: #475569;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --accent: var(--obs-blue-500);
  --accent-strong: var(--obs-blue-400);
  --accent-soft: rgba(59, 130, 246, 0.15);
  --ocean: #1e4d7b;
  --ocean-surface: var(--obs-blue-500);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
  --chart-fill-top: rgba(96, 165, 250, 0.35);
  --chart-fill-bot: rgba(96, 165, 250, 0.02);
  --chart-line: #60a5fa;
  --chart-grid: rgba(71, 85, 105, 0.5);
  --chart-co2-fill-top: rgba(52, 211, 153, 0.32);
  --chart-co2-fill-bot: rgba(52, 211, 153, 0.02);
  --chart-co2-line: #34d399;
  --flow-in-top: #1e3a8a;
  --flow-in-bot: #1e40af;
  --flow-ocean-top: #2563eb;
  --flow-ocean-bot: #1e3a8a;
  --border-subtle: rgba(255, 255, 255, 0.1);
}

*, *::before, *::after { box-sizing: border-box; }

/* L'attribut hidden doit primer sur display:flex des bandeaux */
[hidden] {
  display: none !important;
}

.onboard[hidden],
[data-dismissible][hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── En-tête page (style bibliographie / labo) ── */
/*
 * Override /partials/z-index-fixes.css :
 * ce fichier applique position:sticky + z-index:9999 à tout <header>,
 * puis z-index:1 à <main> — le hero labo (header.page-hero) se retrouve
 * sous les cartes au scroll. Seul #header-container doit rester sticky.
 */
body[data-page] > header.page-hero {
  position: relative !important;
  top: auto !important;
  z-index: 2 !important;
  isolation: auto !important;
}

body[data-page] > nav.page-nav {
  position: relative !important;
  z-index: 2 !important;
}

body[data-page] > main.app {
  position: relative !important;
  z-index: 1 !important;
}

.page-hero {
  background: var(--bg-hero);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1rem 1.5rem;
  padding-top: max(1.25rem, env(safe-area-inset-top));
}

.page-hero-inner {
  max-width: 40rem;
  margin: 0 auto;
}

.page-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.badge-beta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--obs-amber-100);
  color: var(--obs-amber-800);
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="dark"] .badge-beta {
  background: rgba(245, 158, 11, 0.15);
  color: var(--obs-amber-500);
}

.theme-toggle {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: border-color 0.15s, color 0.15s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.page-hero h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--accent-strong);
  line-height: 1.2;
}

.page-hero .lead {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 36rem;
}

/* ── Layout ── */
.app {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1rem 1rem calc(1.5rem + var(--safe-bottom));
}

.app--wide {
  max-width: 52rem;
}

body[data-page="dashboard"] .page-nav,
body[data-page="dashboard"] .page-hero-inner {
  max-width: 52rem;
}

body[data-page="chronologie"][data-chrono-layout="compact"] .page-nav,
body[data-page="chronologie"][data-chrono-layout="compact"] .page-hero-inner {
  max-width: 40rem;
}

body[data-page="chronologie"][data-chrono-layout="cinema"] .page-nav,
body[data-page="chronologie"][data-chrono-layout="cinema"] .page-hero-inner,
body[data-page="chronologie"][data-chrono-layout="tv"] .page-nav,
body[data-page="chronologie"][data-chrono-layout="tv"] .page-hero-inner {
  max-width: min(96rem, 100%);
}

/* ── Navigation multi-pages ── */
.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0.65rem 1rem 0;
}

/* Filet de sécurité : header site sans Tailwind (ne doit pas arriver en prod) */
@media (max-width: 767px) {
  #header-container header nav[aria-label="Menu principal"] {
    display: none !important;
  }
  #header-container #mobile-menu.hidden {
    display: none !important;
  }
}

.page-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.38rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.page-nav__link:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.page-nav__link--active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.page-nav__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  flex-shrink: 0;
}

.page-nav__label {
  line-height: 1.2;
}

.page-nav__link:not(.page-nav__link--active) .page-nav__step {
  background: var(--surface-raised);
  color: var(--text-secondary);
}

.page-flow {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
}

.page-flow__link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-strong);
  text-decoration: none;
}

.page-flow__link:hover { text-decoration: underline; }
.page-flow__link--next { margin-left: auto; text-align: right; }

/* ── Page introduction ── */
.section-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.section-title--spaced {
  margin: 0 0 0.75rem;
  padding: 0 0.15rem;
}

.content-prose p {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.content-prose p:last-child { margin-bottom: 0; }

.intro-snapshot-card { text-align: center; }

.intro-snapshot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0.5rem 0;
  font: 700 1.1rem/1.2 var(--font-mono);
  color: var(--accent-strong);
}

.intro-snap-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 1rem;
}

.intro-snap-row--sub {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.intro-chain-note {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.intro-chain-note a {
  color: var(--accent-strong);
  font-weight: 600;
}

.intro-snapshot__arrow {
  color: var(--heat);
  font-weight: 700;
}

.intro-snapshot-note {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.intro-cards {
  display: grid;
  gap: 0.65rem;
}

.intro-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.65rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.intro-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.intro-card--primary {
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, var(--surface) 0%, var(--accent-soft) 140%);
}

.intro-card__step {
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.intro-card__title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.intro-card__desc {
  grid-column: 2;
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.intro-cta {
  margin: 1rem 0 0;
  text-align: center;
}

.btn-primary {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-secondary {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.12));
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--obs-teal-400);
  color: var(--text-primary);
}

.info-panel--open {
  margin-bottom: 0.85rem;
}

.sys-bps-banner {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.75rem;
  background: var(--accent-soft);
  border: 1px solid var(--obs-blue-200);
  border-radius: var(--radius);
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-align: center;
}

.sys-bps-banner strong {
  font: 700 0.95rem/1 var(--font-mono);
  color: var(--heat-strong);
}

/* ── Parcours guidé (legacy) ── */
.guided-path {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.guide-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.guide-step.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.guide-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
}

.guide-step:not(.active) .guide-num {
  background: var(--surface-raised);
  color: var(--text-secondary);
}

/* ── Avertissement analogie ── */
.analogy-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.75rem;
  background: var(--obs-blue-50);
  border: 1px solid var(--obs-blue-200);
  border-radius: var(--radius);
  font-size: 0.76rem;
  color: var(--obs-blue-900);
  line-height: 1.5;
}

.analogy-warning__body {
  flex: 1;
  min-width: 0;
}

.analogy-warning__body p {
  margin: 0 0 0.55rem;
}

.analogy-warning__body p:last-child {
  margin-bottom: 0;
}

[data-theme="dark"] .analogy-warning {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--text);
}

.analogy-dismiss {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* ── Infobulles ── */
.tip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  min-height: 1.15rem;
  margin-left: 0.2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.62rem;
  font-weight: 700;
  cursor: pointer;
  vertical-align: middle;
  position: relative;
  z-index: 2;
  touch-action: manipulation;
}

.tip-btn--sm {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  min-height: 1rem;
  font-size: 0.55rem;
}

.tip-popover {
  position: fixed;
  z-index: 100001;
  max-width: min(16rem, calc(100vw - 24px));
  padding: 0.55rem 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.45;
  pointer-events: none;
}

.kpi-uncertainty {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.62rem;
  color: var(--obs-amber-700);
  font-weight: 600;
}

.data-quality {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-style: italic;
}

.counter-uncertainty {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: var(--obs-amber-700);
  font-weight: 500;
}

[data-theme="dark"] .counter-uncertainty,
[data-theme="dark"] .kpi-uncertainty {
  color: var(--obs-amber-500);
}

.sim-tick {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-align: center;
}

.sim-tick[data-match="ok"] strong { color: var(--obs-teal-500); }
.sim-tick[data-match="off"] strong { color: var(--obs-amber-600); }

/* ── Mode switch ── */
.mode-switch {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  background: var(--surface-raised);
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--border);
}

.mode-btn {
  flex: 1;
  padding: 0.5rem 0.4rem;
  font-size: 0.76rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.mode-btn.active {
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: var(--shadow);
}

[data-theme="dark"] .mode-btn.active {
  background: var(--surface-raised);
}

.mode-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ── Cartes ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-title {
  margin: 0 0 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
}

/* Carte compteur mise en avant */
.card--featured {
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, var(--surface) 0%, var(--accent-soft) 120%);
}

[data-theme="dark"] .card--featured {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(59, 130, 246, 0.08) 100%);
}

/* ── EEI ── */
.eei-display {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.eei-value {
  font: 700 2.6rem/1 var(--font-mono);
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
}

.eei-unit {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.eei-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ── Onboarding ── */
.onboard {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  background: var(--obs-amber-50);
  border-bottom: 1px solid var(--obs-amber-100);
  font-size: 0.78rem;
  color: var(--obs-amber-800);
  line-height: 1.45;
}

.onboard p { margin: 0; flex: 1; }

.onboard-dismiss {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--obs-amber-700);
  cursor: pointer;
  font-size: 0.9rem;
}

[data-theme="dark"] .onboard {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--obs-amber-500);
}

/* ── KPI dashboard ── */
.card--dashboard { padding-bottom: 1rem; }

.dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.75rem;
}

.dash-head .card-title { margin-bottom: 0; }

.dash-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-strong);
  text-decoration: none;
  white-space: nowrap;
}

.dash-link:hover { text-decoration: underline; }

.card--dashboard-wide .chart-wrap--wide {
  padding-bottom: 1.85rem;
}

.timeline-chart--wide {
  min-height: 10rem;
}

.kpi-grid--co2 {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 0.85rem;
}

.kpi--co2 {
  background: rgba(5, 150, 105, 0.08);
  border-color: rgba(5, 150, 105, 0.25);
}

.kpi--co2 .kpi-value { color: var(--chart-co2-line); }

[data-theme="dark"] .kpi--co2 {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.28);
}

.co2-lead {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 0.85rem;
}

.co2-source {
  font-size: 0.66rem;
  color: var(--text-secondary);
  margin: 0.5rem 0 0;
  line-height: 1.4;
}

.insight-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.legend-swatch--co2 { background: var(--chart-co2-line); }
.legend-swatch--co2-trend {
  background: repeating-linear-gradient(90deg, var(--chart-co2-line) 0 3px, transparent 3px 6px);
  height: 2px;
  align-self: center;
  opacity: 0.75;
}
.legend-swatch--co2-ref {
  background: transparent;
  border: 1.5px dashed var(--chart-co2-line);
  opacity: 0.7;
  height: 0;
  align-self: center;
}

.chart-co2-area { fill: url(#co2Grad); }
.chart-co2-line {
  fill: none;
  stroke: var(--chart-co2-line);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-co2-trend {
  fill: none;
  stroke: var(--chart-co2-line);
  stroke-width: 1.75;
  stroke-dasharray: 5 4;
  stroke-linecap: round;
  opacity: 0.65;
}
.chart-co2-anchor-dot { fill: var(--chart-co2-line); opacity: 0.4; }
.chart-co2-annot { fill: var(--chart-co2-line); font-size: 7px; font-weight: 700; }
.chart-co2-ref {
  stroke: var(--chart-co2-line);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: 0.45;
}
.chart-co2-ref-label { fill: var(--chart-co2-line); font-size: 6.5px; font-weight: 600; opacity: 0.8; }
.chart-co2-marker-dot { fill: var(--chart-co2-line); }
.chart-co2-marker-ring { fill: none; stroke: var(--chart-co2-line); stroke-width: 2; opacity: 0.4; }
.chart-co2-unit { fill: var(--chart-co2-line); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.kpi {
  padding: 0.6rem 0.5rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  text-align: center;
}

.kpi--accent {
  background: var(--accent-soft);
  border-color: var(--obs-blue-200);
}

[data-theme="dark"] .kpi--accent {
  border-color: rgba(59, 130, 246, 0.3);
}

.kpi-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.kpi-value {
  font: 700 1rem/1.1 var(--font-mono);
  color: var(--accent-strong);
}

.kpi-value small {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.kpi--accent .kpi-value { color: var(--heat); }

/* ── Courbe SVG ── */
.chart-shell { margin-bottom: 0.5rem; }

.chart-unit-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  margin-bottom: 0.55rem;
}

.chart-unit-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 0.15rem;
}

.chart-unit-btn {
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.chart-unit-btn.active,
.chart-unit-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.chart-wrap {
  position: relative;
  margin-bottom: 0.35rem;
  padding-bottom: 1.65rem;
  border-bottom: 2px solid var(--border);
  background: var(--surface);
}

.chart-axis-fixed {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.25rem;
  display: flex;
  justify-content: space-between;
  padding: 0 2.8rem 0 2.6rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-strong);
  pointer-events: none;
}

.timeline-chart {
  width: 100%;
  height: auto;
  display: block;
  display: block;
}

.chart-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.66rem;
  color: var(--text-secondary);
}

.chart-legend li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  line-height: 1.35;
}

.legend-swatch {
  flex-shrink: 0;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
}

.legend-swatch--line { background: var(--chart-line); }
.legend-swatch--band { background: rgba(245, 158, 11, 0.25); border: 1px solid var(--obs-amber-500); }
.legend-swatch--trend {
  background: repeating-linear-gradient(90deg, var(--obs-amber-600) 0 3px, transparent 3px 6px);
  height: 2px;
  align-self: center;
}
.legend-swatch--ssp {
  background: repeating-linear-gradient(90deg, #2563eb 0 4px, transparent 4px 7px);
  height: 2px;
  align-self: center;
}
.legend-swatch--ref {
  background: transparent;
  border: 1.5px dashed var(--text-secondary);
  height: 0;
  align-self: center;
  opacity: 0.7;
}
.legend-swatch--envelope {
  background: rgba(37, 99, 235, 0.22);
  border: 1px solid rgba(37, 99, 235, 0.45);
  height: 10px;
  align-self: center;
}
.legend-swatch--unc {
  width: 0.35rem;
  height: 0.85rem;
  border-radius: 1px;
  background: var(--obs-amber-600);
}

.chart-label-bg {
  fill: var(--surface);
  stroke: var(--border);
  stroke-width: 0.5;
  opacity: 0.92;
}

.chart-grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart-area { fill: url(#chartGrad); }
.chart-line { fill: none; stroke: var(--chart-line); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-trend {
  fill: none;
  stroke: var(--obs-amber-600);
  stroke-width: 1.75;
  stroke-dasharray: 5 4;
  stroke-linecap: round;
  opacity: 0.85;
}
.chart-anchor-dot { fill: var(--chart-line); opacity: 0.45; }
.chart-annot { fill: var(--heat-strong); font-size: 7px; font-weight: 700; }
.chart-covid-band { fill: rgba(245, 158, 11, 0.1); stroke: none; }
.chart-covid-label { fill: var(--obs-amber-700); font-size: 6.5px; font-weight: 600; }
.chart-uncertainty { stroke: var(--obs-amber-600); stroke-width: 2; opacity: 0.85; }
.chart-uncertainty-cap { stroke: var(--obs-amber-600); stroke-width: 1.5; opacity: 0.85; }
[data-theme="dark"] .chart-trend { stroke: var(--obs-amber-500); }
[data-theme="dark"] .chart-covid-label { fill: var(--obs-amber-500); }
[data-theme="dark"] .chart-uncertainty,
[data-theme="dark"] .chart-uncertainty-cap { stroke: var(--obs-amber-500); }
.chart-marker-line { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 3; opacity: 0.7; }
.chart-marker-dot { fill: var(--accent-strong); }
.chart-marker-ring { fill: none; stroke: var(--accent); stroke-width: 2; opacity: 0.45; }
.chart-axis { fill: var(--text-secondary); font-size: 9px; font-family: var(--font-mono); }
.chart-y-label { fill: var(--text-secondary); font-size: 8.5px; font-family: var(--font-mono); font-weight: 600; }
.chart-unit-tag { fill: var(--accent-strong); font-size: 8px; font-family: var(--font-mono); font-weight: 700; }

.alerts-lead {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.alert-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.alert-desc {
  margin: 0;
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.methode-sub {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.ohm-table-wrap {
  overflow-x: auto;
  margin: 0.5rem 0;
}

.ohm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}

.ohm-table th,
.ohm-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: right;
  vertical-align: middle;
}

.ohm-table th:first-child,
.ohm-table td:first-child {
  text-align: left;
}

.ohm-table th {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.ohm-table td {
  font-family: var(--font-mono);
  font-weight: 600;
}

.ohm-table tr.row--projected td:first-child {
  font-style: italic;
  color: var(--text-secondary);
}

.card--bridge {
  border-left: 4px solid var(--obs-blue-600);
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface) 55%);
}

[data-theme="dark"] .card--bridge {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, var(--surface) 55%);
  border-left-color: #3b82f6;
}

.bridge-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0.75rem 0 0.5rem;
}

.bridge-link-wrap {
  margin: 0.35rem 0 0;
}

.bridge-link-wrap a {
  font-weight: 600;
  color: var(--accent-strong);
}

@media (max-width: 640px) {
  .bridge-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.chain-diagram {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0.5rem auto 0.65rem;
}

.chain-node__box { stroke-width: 1; }
.chain-node--sun .chain-node__box { fill: rgba(251, 191, 36, 0.15); stroke: #d97706; }
.chain-node--eei .chain-node__box { fill: rgba(234, 88, 12, 0.12); stroke: #ea580c; }
.chain-node--ocean .chain-node__box { fill: var(--accent-soft); stroke: var(--obs-blue-600); }
.chain-node--bombs .chain-node__box { fill: rgba(239, 68, 68, 0.1); stroke: #dc2626; }
.chain-node__title { font-size: 7px; font-weight: 700; fill: var(--text-secondary); }
.chain-node__val { font-size: 11px; font-weight: 800; fill: var(--accent-strong); font-family: var(--font-mono); }
.chain-node__unit { font-size: 7px; fill: var(--text-secondary); }
.chain-arrow { stroke: var(--border); stroke-width: 1.5; }
.chain-marker { fill: var(--text-secondary); }

.scale-compare {
  margin: 0.65rem 0;
  display: grid;
  gap: 0.55rem;
}

.scale-compare__row {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) 1fr auto;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.72rem;
}

.scale-compare__label {
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.3;
}

.scale-compare__track {
  height: 14px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.scale-compare__bar {
  height: 100%;
  border-radius: 3px;
  min-width: 4px;
}

.scale-compare__bar--ocean { background: linear-gradient(90deg, #1d4ed8, #3b82f6); }
.scale-compare__bar--human { background: linear-gradient(90deg, #64748b, #94a3b8); }

.scale-compare__val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.68rem;
  color: var(--accent-strong);
  white-space: nowrap;
}

.scale-compare__ratio {
  margin: 0.15rem 0 0;
  text-align: center;
  font: 800 1.35rem/1 var(--font-mono);
  color: var(--heat);
}

.scale-links {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
}

.scale-links a {
  color: var(--accent-strong);
  font-weight: 600;
}

@media (max-width: 520px) {
  .scale-compare__row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
  .scale-compare__val { justify-self: start; }
}

.rb-flow-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin: 0 0 0.65rem;
  padding: 0;
  list-style: none;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.rb-flow-key li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.rb-flow-key__swatch {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
}

.rb-flow-key__swatch--gray { background: #64748b; }
.rb-flow-key__swatch--blue { background: #2563eb; }
.rb-flow-key__swatch--red { background: #dc2626; }
.rb-flow-key__swatch--sun { background: #f59e0b; }

.rb-diagram-foot {
  margin: 0.55rem 0 0;
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.5;
  text-align: center;
}

.rb-layer-lead {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.rb-read-steps {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem 0.65rem 1.85rem;
  background: var(--accent-soft);
  border-radius: 0.5rem;
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.rb-read-steps li { margin-bottom: 0.35rem; }
.rb-read-steps li:last-child { margin-bottom: 0; }

.rb-read-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  margin-left: -1.35rem;
  margin-right: 0.25rem;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  vertical-align: middle;
}

.rb-step-dot { fill: var(--accent-strong); opacity: 0.15; stroke: var(--accent-strong); stroke-width: 0.5; }
.rb-step-num { fill: var(--accent-strong); font-size: 9px; font-weight: 800; }

.rb-lane-tag { font-size: 8px; font-weight: 700; }
.rb-lane-tag--gray { fill: #64748b; }
.rb-lane-tag--blue { fill: #2563eb; }
.rb-lane-tag--ir { fill: #dc2626; }

.rb-lane-node { stroke: none; }
.rb-lane-node--gray { fill: #64748b; }
.rb-lane-node--blue { fill: #2563eb; }
.rb-lane-node--ir { fill: #dc2626; }

.rb-lane-track--gray { fill: rgba(241, 245, 249, 0.9); stroke: #cbd5e1; }
.rb-lane-track--blue { fill: rgba(239, 246, 255, 0.9); stroke: #bfdbfe; }

.rb-co2-ppm { fill: var(--accent-strong); font-size: 10px; font-family: var(--font-mono); font-weight: 700; }
.rb-co2-effect { font-size: 8.5px; font-weight: 700; }
.rb-co2-effect--cold { fill: #0284c7; }
.rb-co2-effect--hot { fill: #ea580c; }

.rb-co2-bar { fill: #f8fafc; stroke: #cbd5e1; stroke-width: 0.75; }
.rb-co2-bar-label { fill: var(--text-secondary); font-size: 9px; font-weight: 600; }
.rb-co2-bar-line { stroke: #94a3b8; stroke-width: 1.5; stroke-linecap: round; }

/* ── Slider ── */
.slider-wrap {
  position: relative;
  margin: 0.75rem 0 0;
}

.slider-track-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: 13px;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-raised);
  overflow: hidden;
  pointer-events: none;
}

.slider-track-bg::after {
  content: '';
  display: block;
  height: 100%;
  width: var(--slider-pct);
  background: linear-gradient(90deg, var(--obs-blue-400), var(--obs-blue-600));
  border-radius: 999px;
  transition: width 0.15s ease;
}

.year-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  background: transparent;
  cursor: pointer;
}

.year-slider::-webkit-slider-runnable-track {
  height: 6px;
  background: transparent;
  border-radius: 999px;
}

.year-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.year-slider::-moz-range-track {
  height: 6px;
  background: transparent;
  border-radius: 999px;
  border: none;
}

.year-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent);
}

.year-slider:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.slider-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.slider-labels {
  display: flex;
  gap: 0.5rem;
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.year-badge {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.3rem 0.85rem;
  background: var(--accent-soft);
  border: 1px solid var(--obs-blue-200);
  border-radius: 999px;
  font: 700 1.05rem/1 var(--font-mono);
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
}

[data-theme="dark"] .year-badge {
  border-color: var(--border);
}

.year-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.year-chip {
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.year-chip:hover,
.year-chip:focus-visible {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.year-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 600;
}

/* ── Barres de répartition ── */
.split-bars {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.split-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr 3.2rem;
  align-items: center;
  gap: 0.5rem;
}

.split-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.split-track {
  height: 1.35rem;
  background: var(--surface-raised);
  border-radius: 6px;
  overflow: hidden;
}

.split-fill {
  height: 100%;
  min-width: 3px;
  border-radius: 6px;
  transition: width 0.35s ease, background 0.35s ease;
}

#bar-atmo { min-width: 8px; }

.split-pct {
  font: 600 0.72rem/1 var(--font-mono);
  text-align: right;
  color: var(--text);
}

.split-note {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: var(--accent-soft);
  border-radius: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.split-note strong {
  color: var(--accent-strong);
  font-weight: 700;
}

/* ── Compteur ── */
.counter-hero { text-align: center; padding: 0.25rem 0; }

.counter-main {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.counter-main > span:first-child {
  display: block;
  font: 700 clamp(2.2rem, 9vw, 3.2rem)/1 var(--font-mono);
  color: var(--accent-strong);
  letter-spacing: -0.03em;
}

.counter-main .unit {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--heat);
  margin-top: 0.35rem;
}

.counter-sub {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  margin-top: 0.85rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.counter-sub .label { display: block; margin-bottom: 0.15rem; }

.counter-sub > div > span:not(.label) {
  font: 600 0.9rem/1 var(--font-mono);
  color: var(--text);
}

.counter-sub small {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.multiplier {
  display: inline-block;
  margin-top: 0.65rem;
  padding: 0.25rem 0.7rem;
  background: var(--obs-amber-50);
  border: 1px solid var(--obs-amber-500);
  border-radius: 999px;
  font: 700 0.82rem/1 var(--font-mono);
  color: var(--obs-amber-700);
}

[data-theme="dark"] .multiplier {
  background: rgba(245, 158, 11, 0.12);
  color: var(--obs-amber-500);
}

.ohc-badge {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.ohc-badge strong {
  font: 700 1rem/1 var(--font-mono);
  color: var(--accent);
}

/* ── Strates océaniques ── */
.strata-container {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.06);
}

.stratum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  min-height: 2.6rem;
  transition: background 0.5s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.stratum:last-child { border-bottom: none; }

.stratum-depth {
  font: 600 0.8rem/1.2 var(--font-mono);
}

.stratum-name {
  font-size: 0.68rem;
  opacity: 0.75;
}

.stratum-therm {
  flex: 1;
  max-width: 4.5rem;
  height: 4px;
  margin: 0 0.5rem;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  overflow: hidden;
}

.stratum-therm-fill {
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  transition: width 0.5s ease;
}

.stratum[data-heat="cold"] .stratum-therm {
  background: rgba(30, 64, 175, 0.15);
}

.stratum[data-heat="cold"] .stratum-therm-fill {
  background: var(--obs-blue-600);
}

.stratum-share {
  font: 600 0.72rem/1 var(--font-mono);
  opacity: 0.8;
  flex-shrink: 0;
}

.stratum[data-heat="cold"] .stratum-depth { color: var(--obs-blue-900); }
.stratum[data-heat="cold"] .stratum-name { color: var(--obs-slate-500); }
.stratum[data-heat="cold"] .stratum-share { color: var(--obs-blue-800); }

.stratum[data-heat="warm"] .stratum-depth,
.stratum[data-heat="warm"] .stratum-share { color: #ffffff; }
.stratum[data-heat="warm"] .stratum-name { color: rgba(255, 255, 255, 0.8); }

.stratum[data-heat="hot"] .stratum-depth,
.stratum[data-heat="hot"] .stratum-share { color: #ffffff; }
.stratum[data-heat="hot"] .stratum-name { color: rgba(255, 255, 255, 0.85); }

.ocean-horizon {
  position: relative;
  height: 24px;
  margin-top: -1px;
  overflow: hidden;
}

.ocean-horizon::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: -8%;
  width: 116%;
  height: 36px;
  background: var(--ocean);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  box-shadow: 0 -3px 16px rgba(37, 99, 235, 0.2);
}

/* ── Alertes ── */
.alerts-panel[data-level="warning"] {
  border-color: var(--obs-amber-500);
  background: var(--obs-amber-50);
}

.alerts-panel[data-level="critical"] {
  border-color: var(--obs-orange-600);
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
}

[data-theme="dark"] .alerts-panel[data-level="warning"] {
  background: rgba(245, 158, 11, 0.08);
}

[data-theme="dark"] .alerts-panel[data-level="critical"] {
  background: rgba(234, 88, 12, 0.08);
}

.alert-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 0.15rem 0;
}

.alert-label { color: var(--text-secondary); }
.alert-value { font-weight: 700; color: var(--heat-strong); }

/* ── Contexte ── */
.context-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.context-detail {
  margin: 0.65rem 0 0;
  padding: 0.6rem 0.7rem;
  background: var(--surface-raised);
  border-left: 3px solid var(--obs-amber-500);
  border-radius: 0 0.4rem 0.4rem 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.context-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.context-stats strong {
  display: block;
  font: 700 0.95rem/1 var(--font-mono);
  color: var(--accent-strong);
  margin-top: 0.2rem;
}

/* ── Info ── */
.info-toggle {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 0.85rem;
  transition: border-color 0.15s, color 0.15s;
}

.info-toggle:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.info-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.info-panel code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--surface-raised);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: var(--accent-strong);
}

.info-panel p { margin: 0 0 0.55rem; font-size: 0.8rem; color: var(--text-secondary); line-height: 1.55; }

/* ── Mode comparatif ── */
.cmp-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.cmp-preset {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.cmp-preset:hover,
.cmp-preset:focus-visible {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.compare-bars {
  margin-bottom: 0.75rem;
  padding: 0.85rem 1rem !important;
}

.compare-bar-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr 4.5rem;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.compare-bar-row:last-child { margin-bottom: 0; }

.compare-bar-year {
  font: 700 0.8rem/1 var(--font-mono);
  color: var(--accent-strong);
}

.compare-bar-track {
  height: 1.1rem;
  background: var(--surface-raised);
  border-radius: 6px;
  overflow: hidden;
}

.compare-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--obs-blue-400), var(--obs-blue-600));
  transition: width 0.45s ease;
}

.compare-bar-row:last-child .compare-bar-fill {
  background: linear-gradient(90deg, var(--obs-amber-500), var(--obs-orange-600));
}

.compare-bar-val {
  font: 600 0.72rem/1 var(--font-mono);
  text-align: right;
  color: var(--text);
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.compare-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.compare-select {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 600;
}

.compare-canvas {
  position: relative;
  height: 190px;
  background: linear-gradient(180deg, var(--obs-blue-50) 0%, var(--obs-blue-100) 65%, transparent 65%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

[data-theme="dark"] .compare-canvas {
  background: linear-gradient(180deg, #0f172a 0%, #1e3a5f 65%, transparent 65%);
}

.compare-canvas .ocean-curve {
  position: absolute;
  bottom: 0;
  left: -5%;
  width: 110%;
  height: 32px;
  background: var(--ocean);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  box-shadow: 0 -2px 12px rgba(37, 99, 235, 0.2);
  transition: box-shadow 0.4s ease;
}

.compare-stat {
  text-align: center;
  padding: 0.55rem;
  background: var(--surface-raised);
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.compare-stat .value {
  font: 700 1rem/1 var(--font-mono);
  color: var(--accent-strong);
}

.compare-stat .label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.compare-ratio {
  text-align: center;
  padding: 0.85rem 0.75rem 0.25rem;
  font: 700 1.35rem/1 var(--font-mono);
  color: var(--obs-amber-700);
}

[data-theme="dark"] .compare-ratio { color: var(--obs-amber-500); }

.compare-hint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
  line-height: 1.45;
}

/* ── Simulation bombes-énergie ── */
.card--sim { border-left: 4px solid var(--obs-orange-600); }

.card--sim .sim-cta {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--border-subtle, rgba(0, 0, 0, 0.1));
  text-align: center;
}

.sim-lead {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.sim-rate {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.sim-rate strong {
  font: 700 1.05rem/1 var(--font-mono);
  color: var(--heat-strong);
}

.sim-rate-sep {
  display: inline-block;
  margin: 0 0.2rem;
  opacity: 0.6;
}

.sim-compare {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.sim-caption {
  margin: 0.55rem 0 0;
  font-size: 0.68rem;
  color: var(--text-secondary);
  text-align: center;
}

.bomb-stage {
  position: relative;
  height: 168px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--obs-blue-50) 0%, var(--obs-blue-100) 72%, transparent 72%);
}

[data-theme="dark"] .bomb-stage {
  background: linear-gradient(180deg, #0f172a 0%, #1e3a5f 72%, transparent 72%);
}

.bomb-stage__label {
  position: absolute;
  top: 0.4rem;
  left: 0.5rem;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  z-index: 2;
}

.bomb-zone {
  position: absolute;
  inset: 0 0 36px 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.bomb-zone--cmp { inset: 0 0 32px 0; }

.bomb-impacts {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 36px;
  height: 12px;
  pointer-events: none;
  z-index: 3;
}

.bomb-impacts--cmp { bottom: 32px; }

.bomb-stage__ocean {
  position: absolute;
  bottom: 0;
  left: -6%;
  width: 112%;
  height: 38px;
  background: var(--ocean);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  box-shadow: 0 -3px 14px rgba(37, 99, 235, 0.25);
  z-index: 2;
}

.bomb-drop {
  position: absolute;
  top: -18px;
  width: 12px;
  height: 18px;
  transform: translateX(-50%);
  animation: bomb-fall var(--fall-duration, 0.9s) linear var(--fall-delay, 0s) forwards;
}

.bomb-drop__body {
  display: block;
  width: 10px;
  height: 10px;
  margin: 0 auto;
  border-radius: 50% 50% 45% 45%;
  background: radial-gradient(circle at 35% 30%, #fde68a, #f59e0b 55%, #ea580c);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.65);
}

.bomb-drop__tail {
  display: block;
  width: 2px;
  height: 8px;
  margin: 0 auto;
  background: linear-gradient(#fbbf24, transparent);
  border-radius: 999px;
}

.bomb-impact {
  position: absolute;
  bottom: 0;
  width: 14px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.95), rgba(37, 99, 235, 0.2));
  animation: bomb-splash 0.45s ease-out forwards;
}

@keyframes bomb-fall {
  0%   { top: -18px; opacity: 0; }
  6%   { opacity: 1; }
  92%  { opacity: 0.95; }
  100% { top: calc(100% - 4px); opacity: 0.85; }
}

@keyframes bomb-splash {
  0%   { transform: translateX(-50%) scale(0.3); opacity: 1; }
  100% { transform: translateX(-50%) scale(2.2); opacity: 0; }
}

.cmp-bps {
  margin: 0.35rem 0 0.5rem;
  text-align: center;
  font: 700 0.82rem/1 var(--font-mono);
  color: var(--accent-strong);
}

.cmp-bps--accent { color: var(--heat-strong); }

.compare-canvas[data-intensity="high"] {
  box-shadow: inset 0 -8px 24px rgba(37, 99, 235, 0.12);
}

/* ── Pied de page ── */
.site-footer {
  max-width: 40rem;
  margin: 0.5rem auto 0;
  padding: 1rem 1rem calc(1.25rem + var(--safe-bottom));
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.55;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

/* ── Accessibilité ── */
@media (prefers-reduced-motion: reduce) {
  .bomb-drop, .bomb-impact { animation: none; display: none; }
  .stratum, .split-fill, .card { transition: none; }
  .flow-ribbon, .flow-arrow--inner { animation: none; }
}

/* ── Chronologie partagée ── */
.card--timeline {
  padding: 0.85rem 1rem 1rem;
  margin-bottom: 0.85rem;
}

.timeline-slot--below-chart,
.timeline-slot--inline {
  margin-top: 0.65rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.slider-wrap--compact {
  margin-top: 0.15rem;
}

.slider-wrap--compact .year-slider {
  margin-top: 0.35rem;
}

.sim-sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.35rem 0 0.65rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.sim-sound-toggle input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--obs-orange-600);
  cursor: pointer;
}

.sim-cta {
  margin: 0.85rem 0 0.25rem;
}

.sim-cta .btn-primary {
  display: inline-block;
  font-size: 0.88rem;
  padding: 0.55rem 1rem;
  text-decoration: none;
}

/* ── Chronologie (compact | cinéma/TV | plein écran 16:9) ── */
.chrono-experience {
  width: 100%;
}

.chrono-fs-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.65rem;
}

.chrono-fs-toolbar .chrono-controls {
  margin-bottom: 0;
  flex: 1 1 auto;
}

.chrono-fs-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.chrono-theme-btn {
  flex: 0 0 auto;
}

.chrono-mode-badge {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--obs-violet-600, #6d28d9);
  flex: 1 1 100%;
  text-align: center;
}

@media (min-width: 36rem) {
  .chrono-mode-badge {
    flex: 0 1 auto;
    text-align: left;
  }
}

body[data-page="chronologie"][data-chrono-layout="compact"] main.app {
  max-width: 40rem;
}

body[data-page="chronologie"][data-chrono-layout="cinema"] main.app,
body[data-page="chronologie"][data-chrono-layout="tv"] main.app {
  max-width: min(96rem, 100%);
  padding-left: clamp(1rem, 2.5vw, 2.5rem);
  padding-right: clamp(1rem, 2.5vw, 2.5rem);
}

.chrono-main {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

body[data-chrono-layout="compact"] .chrono-main {
  grid-template-columns: 1fr;
}

body[data-chrono-layout="cinema"] .chrono-main,
body[data-chrono-layout="tv"] .chrono-main {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: stretch;
  gap: clamp(1rem, 2vw, 1.5rem);
  min-height: calc(100vh - 13.5rem);
}

.chrono-theater {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

body[data-chrono-layout="cinema"] .card--chrono,
body[data-chrono-layout="tv"] .card--chrono {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body[data-chrono-layout="cinema"] .chrono-theater,
body[data-chrono-layout="tv"] .chrono-theater {
  flex: 1;
  min-height: 0;
  gap: 0;
}

body[data-chrono-layout="cinema"] .chrono-theater .chrono-rate,
body[data-chrono-layout="tv"] .chrono-theater .chrono-rate {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 5;
  margin: 0;
  max-width: min(22rem, 90%);
  background: rgba(15, 23, 42, 0.82);
  color: #e2e8f0;
  padding: 0.65rem 1rem;
  border-radius: 0.6rem;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
}

body[data-chrono-layout="cinema"] .chrono-theater .chrono-rate strong,
body[data-chrono-layout="tv"] .chrono-theater .chrono-rate strong {
  color: #fb923c;
}

body[data-chrono-layout="cinema"] .chrono-theater .chrono-tick,
body[data-chrono-layout="tv"] .chrono-theater .chrono-tick {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 5;
  margin: 0;
  font-size: 0.72rem;
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  padding: 0.35rem 0.65rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body[data-chrono-layout="cinema"].chrono-is-playing .chrono-controls,
body[data-chrono-layout="tv"].chrono-is-playing .chrono-controls {
  opacity: 0.4;
  transition: opacity 0.25s ease;
}

body[data-chrono-layout="cinema"].chrono-is-playing .chrono-controls:hover,
body[data-chrono-layout="cinema"].chrono-is-playing .chrono-controls:focus-within,
body[data-chrono-layout="tv"].chrono-is-playing .chrono-controls:hover,
body[data-chrono-layout="tv"].chrono-is-playing .chrono-controls:focus-within {
  opacity: 1;
}

.card--chrono {
  border-left: 4px solid var(--obs-violet-500, #7c3aed);
}

.card--chrono-narrative {
  border-left: 4px solid var(--obs-teal-500);
}

.chrono-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.chrono-back {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.chrono-back:hover {
  color: var(--obs-teal-600);
  text-decoration: underline;
}

.chrono-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
}

.chrono-btn {
  font-size: 0.82rem;
  padding: 0.45rem 0.85rem;
}

.chrono-sound {
  margin: 0;
}

.chrono-rate {
  margin: 0 0 0.65rem;
  color: var(--text-secondary);
}

.chrono-rate__primary {
  font-size: 0.95rem;
  margin: 0 0 0.2rem;
}

.chrono-rate__sub {
  font-size: 0.82rem;
  margin: 0;
  opacity: 0.9;
}

.chrono-rate strong {
  font-size: 1.35rem;
  color: var(--obs-orange-600);
  font-variant-numeric: tabular-nums;
}

.chrono-rate__sub strong {
  font-size: 1rem;
}

.chrono-rate-sep {
  margin: 0 0.35rem;
  opacity: 0.5;
}

.chrono-rate-label {
  font-size: 0.78rem;
  opacity: 0.85;
}

.chrono-tick {
  margin: 0 0 0.65rem;
}

.bomb-stage--chrono {
  min-height: 11rem;
  margin-bottom: 0.85rem;
}

body[data-chrono-layout="cinema"] .bomb-stage--chrono,
body[data-chrono-layout="tv"] .bomb-stage--chrono {
  flex: 1;
  height: auto;
  min-height: clamp(20rem, 52vh, 38rem);
  margin-bottom: 0;
}

body[data-chrono-layout="tv"] .bomb-stage--chrono {
  min-height: clamp(24rem, 62vh, 48rem);
}

body[data-chrono-layout="cinema"] .bomb-stage--chrono .bomb-zone,
body[data-chrono-layout="tv"] .bomb-stage--chrono .bomb-zone {
  inset: 0 0 clamp(40px, 10%, 64px) 0;
}

body[data-chrono-layout="cinema"] .bomb-stage--chrono .bomb-impacts,
body[data-chrono-layout="tv"] .bomb-stage--chrono .bomb-impacts {
  bottom: clamp(40px, 10%, 64px);
}

body[data-chrono-layout="cinema"] .bomb-stage--chrono .bomb-stage__ocean,
body[data-chrono-layout="tv"] .bomb-stage--chrono .bomb-stage__ocean {
  height: clamp(40px, 10%, 68px);
}

body[data-chrono-layout="cinema"] .bomb-stage--chrono .bomb-stage__label,
body[data-chrono-layout="tv"] .bomb-stage--chrono .bomb-stage__label {
  font-size: 0.72rem;
}

.chrono-progress {
  position: relative;
  margin: 0.5rem 0 0.35rem;
  padding-top: 1.6rem;
}

.chrono-progress__track {
  height: 0.35rem;
  background: var(--border-subtle, rgba(0, 0, 0, 0.08));
  border-radius: 999px;
  overflow: hidden;
}

.chrono-progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--obs-violet-500, #7c3aed), var(--obs-orange-600));
  border-radius: 999px;
  transition: width 0.6s ease;
}

.chrono-progress__markers {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1.5rem;
}

.chrono-marker {
  position: absolute;
  transform: translateX(-50%);
  top: 0.15rem;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font-size: 0.62rem;
  color: var(--text-secondary);
  opacity: 0.45;
  line-height: 1;
}

.chrono-marker::before {
  content: '';
  display: block;
  width: 0.45rem;
  height: 0.45rem;
  margin: 0 auto 0.2rem;
  border-radius: 50%;
  background: var(--border-subtle, rgba(0, 0, 0, 0.2));
}

.chrono-marker span {
  display: none;
  white-space: nowrap;
}

.chrono-marker--labeled span,
.chrono-marker--active span {
  display: block;
}

body[data-chrono-layout="cinema"] .chrono-marker span,
body[data-chrono-layout="tv"] .chrono-marker span {
  display: block;
  font-size: 0.58rem;
}

body[data-chrono-layout="cinema"] .chrono-progress__track,
body[data-chrono-layout="tv"] .chrono-progress__track {
  height: 0.5rem;
}

body[data-chrono-layout="tv"] .chrono-progress {
  padding-top: 2rem;
}

.chrono-marker--active {
  opacity: 1;
  color: var(--obs-orange-600);
  font-weight: 700;
}

.chrono-marker--active::before {
  background: var(--obs-orange-600);
  transform: scale(1.25);
}

.chrono-marker--past {
  opacity: 0.75;
  color: var(--obs-teal-600);
}

.chrono-marker--past::before {
  background: var(--obs-teal-500);
}

.chrono-marker:hover {
  opacity: 1;
}

.chrono-step-indicator {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0;
}

.chrono-narrative__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.chrono-era {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--obs-violet-600, #6d28d9);
  background: rgba(124, 58, 237, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

[data-theme="dark"] .chrono-era {
  background: rgba(124, 58, 237, 0.22);
  color: #c4b5fd;
}

[data-theme="dark"] .chrono-mode-badge {
  color: #c4b5fd;
}

[data-theme="dark"] .chrono-progress__track {
  background: var(--border-subtle);
}

[data-theme="dark"] .chrono-marker::before {
  background: rgba(255, 255, 255, 0.22);
}

[data-theme="dark"] .chrono-marker--active {
  color: var(--obs-orange-500);
}

[data-theme="dark"] .chrono-marker--past {
  color: var(--obs-teal-400);
}

[data-theme="dark"] .chrono-rate strong,
[data-theme="dark"] .chrono-year-badge {
  color: var(--obs-orange-500);
}

[data-theme="dark"] .chrono-step-list__btn {
  background: var(--surface);
  border-color: var(--border);
}

[data-theme="dark"] .chrono-step-list__item--active .chrono-step-list__btn {
  background: rgba(234, 88, 12, 0.14);
  border-color: var(--obs-orange-500);
}

[data-theme="dark"] .chrono-step-list__era {
  color: #c4b5fd;
}

[data-theme="dark"] .chrono-end {
  border-color: rgba(59, 130, 246, 0.35);
}

[data-theme="dark"] .chrono-climate__item {
  background: var(--surface-raised);
}

[data-theme="dark"] .sim-tick[data-match="ok"] strong {
  color: var(--obs-teal-400);
}

[data-theme="dark"] .sim-tick[data-match="off"] strong {
  color: var(--obs-amber-500);
}

.card--chrono-narrative.chrono-narrative--pulse {
  animation: chrono-pulse 0.55s ease;
}

@keyframes chrono-pulse {
  0% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.25); }
  100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0); }
}

.chrono-end {
  margin: 0.85rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid var(--obs-blue-200);
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.chrono-replay {
  margin-left: auto;
}

.chrono-timeline-list {
  max-height: 22rem;
  overflow: auto;
}

body[data-chrono-layout="cinema"] .chrono-strip,
body[data-chrono-layout="tv"] .chrono-strip {
  max-height: none;
  overflow: visible;
}

body[data-chrono-layout="cinema"] .chrono-strip .card-title,
body[data-chrono-layout="tv"] .chrono-strip .card-title {
  font-size: 0.9rem;
  margin-bottom: 0.55rem;
}

body[data-chrono-layout="cinema"] .chrono-step-list,
body[data-chrono-layout="tv"] .chrono-step-list {
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.55rem;
  padding-bottom: 0.4rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

body[data-chrono-layout="cinema"] .chrono-step-list__item,
body[data-chrono-layout="tv"] .chrono-step-list__item {
  flex: 0 0 min(16.5rem, 42vw);
  scroll-snap-align: center;
}

body[data-chrono-layout="tv"] .chrono-step-list__item {
  flex-basis: min(18rem, 24vw);
}

body[data-chrono-layout="cinema"] .chrono-step-list__btn,
body[data-chrono-layout="tv"] .chrono-step-list__btn {
  min-height: 5.25rem;
  height: 100%;
}

.chrono-year-badge {
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--obs-orange-600);
}

body[data-chrono-layout="cinema"] .card--chrono-narrative,
body[data-chrono-layout="tv"] .card--chrono-narrative {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1rem, 2vw, 1.75rem);
}

body[data-chrono-layout="cinema"] .chrono-year-badge,
body[data-chrono-layout="tv"] .chrono-year-badge {
  font-size: clamp(1.35rem, 2.5vw, 2.25rem);
}

.chrono-narrative__title {
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 0 0 0.65rem;
}

body[data-chrono-layout="cinema"] .chrono-narrative__title {
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  line-height: 1.3;
}

body[data-chrono-layout="tv"] .chrono-narrative__title {
  font-size: clamp(1.45rem, 2.6vw, 2.35rem);
}

.chrono-narrative__body {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

body[data-chrono-layout="cinema"] .chrono-narrative__body {
  font-size: clamp(0.92rem, 1.25vw, 1.08rem);
  line-height: 1.6;
}

body[data-chrono-layout="tv"] .chrono-narrative__body {
  font-size: clamp(1rem, 1.45vw, 1.2rem);
  line-height: 1.65;
}

body[data-chrono-layout="cinema"] .chrono-rate strong,
body[data-chrono-layout="tv"] .chrono-rate strong {
  font-size: clamp(1.45rem, 2.8vw, 2.35rem);
}

body[data-chrono-layout="tv"] .page-hero .lead {
  max-width: 52rem;
  margin-inline: auto;
}

body[data-chrono-layout="tv"] .chrono-btn {
  font-size: 0.92rem;
  padding: 0.55rem 1.05rem;
}

.chrono-climate {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.chrono-climate__title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
}

.chrono-climate__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.65rem;
  margin: 0;
}

.chrono-climate__item {
  margin: 0;
  padding: 0.45rem 0.5rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 0.45rem;
}

.chrono-climate__item dt {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin: 0 0 0.15rem;
}

.chrono-climate__item dd {
  font: 600 0.82rem/1.25 var(--font-mono);
  color: var(--accent-strong);
  margin: 0;
}

.chrono-climate__note {
  font-size: 0.68rem;
  color: var(--text-secondary);
  opacity: 0.85;
  margin: 0.45rem 0 0;
  font-style: italic;
}

body[data-chrono-layout="cinema"] .chrono-climate__item dd,
body[data-chrono-layout="tv"] .chrono-climate__item dd {
  font-size: clamp(0.82rem, 1.1vw, 0.95rem);
}

body[data-chrono-layout="fullscreen"] .chrono-climate {
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  flex-shrink: 0;
}

body[data-chrono-layout="fullscreen"] .chrono-climate__grid {
  gap: 0.3rem 0.4rem;
}

body[data-chrono-layout="fullscreen"] .chrono-climate__item {
  padding: 0.3rem 0.35rem;
}

body[data-chrono-layout="fullscreen"] .chrono-climate__item dd {
  font-size: clamp(0.68rem, 1.2vh, 0.78rem);
}

body[data-chrono-layout="fullscreen"] .chrono-climate__note {
  display: none;
}

.chrono-note {
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.85;
  margin: 1rem 0 0;
  font-style: italic;
}

.chrono-step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.chrono-step-list__btn {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  grid-template-rows: auto auto;
  gap: 0.1rem 0.65rem;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
  border-radius: 0.5rem;
  padding: 0.55rem 0.65rem;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.chrono-step-list__btn:hover {
  border-color: var(--obs-teal-400);
}

.chrono-step-list__item--active .chrono-step-list__btn {
  border-color: var(--obs-orange-500);
  background: rgba(234, 88, 12, 0.06);
}

.chrono-step-list__item--past .chrono-step-list__btn {
  opacity: 0.72;
}

.chrono-step-list__year {
  grid-row: 1 / 3;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--obs-teal-600);
  align-self: center;
}

.chrono-step-list__era {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--obs-violet-600, #6d28d9);
}

.chrono-step-list__title {
  font-size: 0.82rem;
  line-height: 1.35;
}

/* ── Plein écran 16:9 ── */
body.chrono-fs-active #header-container,
body.chrono-fs-active #pageHero,
body.chrono-fs-active #pageNav,
body.chrono-fs-active #onboard,
body.chrono-fs-active #footer-container,
body.chrono-fs-active #pageFlow {
  display: none !important;
}

body.chrono-fs-active main.app,
.chrono-experience:fullscreen {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body.chrono-fs-active main.app {
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #f1f5f9);
}

body.chrono-immersive .chrono-experience {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #f1f5f9);
}

.chrono-experience:fullscreen {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #f1f5f9);
}

body.chrono-fs-active .chrono-fs-fit,
.chrono-experience:fullscreen .chrono-fs-fit {
  aspect-ratio: 16 / 9;
  width: min(100vw, calc(100dvh * 16 / 9));
  height: min(calc(100vw * 9 / 16), 100dvh);
  max-width: 100vw;
  max-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(0.25rem, 0.6vh, 0.5rem);
  padding: clamp(0.35rem, 0.9vh, 0.65rem) clamp(0.45rem, 1.2vw, 0.85rem);
  overflow: hidden;
  box-sizing: border-box;
}

body[data-chrono-layout="fullscreen"] .chrono-fs-toolbar {
  grid-row: 1;
  margin: 0;
  gap: 0.3rem 0.5rem;
}

body[data-chrono-layout="fullscreen"] .chrono-mode-badge {
  font-size: clamp(0.62rem, 1.1vh, 0.72rem);
}

body[data-chrono-layout="fullscreen"] .chrono-btn {
  font-size: clamp(0.72rem, 1.3vh, 0.82rem);
  padding: 0.35rem 0.65rem;
}

body[data-chrono-layout="fullscreen"] .chrono-main {
  grid-row: 2;
  min-height: 0;
  margin: 0;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(0.35rem, 0.8vw, 0.65rem);
  align-items: stretch;
}

body[data-chrono-layout="fullscreen"] .chrono-head,
body[data-chrono-layout="fullscreen"] .chrono-note,
body[data-chrono-layout="fullscreen"] .chrono-strip .card-title,
body[data-chrono-layout="fullscreen"] .chrono-step-indicator,
body[data-chrono-layout="fullscreen"] .chrono-duration-hint {
  display: none;
}

body[data-chrono-layout="fullscreen"] .card--chrono {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  padding: clamp(0.4rem, 0.8vh, 0.55rem);
}

/* Barre de jalons redondante avec la bande d'étapes horizontale */
body[data-chrono-layout="fullscreen"] .chrono-progress,
body[data-chrono-layout="tv"] .chrono-progress,
body[data-chrono-layout="cinema"] .chrono-progress {
  display: none;
}

body[data-chrono-layout="cinema"] .card--chrono,
body[data-chrono-layout="tv"] .card--chrono {
  grid-template-rows: minmax(0, 1fr) auto;
}

body[data-chrono-layout="cinema"] .chrono-end,
body[data-chrono-layout="tv"] .chrono-end {
  grid-row: 2;
}

body[data-chrono-layout="fullscreen"] .card--chrono-narrative {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(0.4rem, 0.8vh, 0.65rem) clamp(0.5rem, 1vw, 0.75rem);
}

body[data-chrono-layout="fullscreen"] .chrono-theater {
  grid-row: 1;
  min-height: 0;
  flex: 1;
}

body[data-chrono-layout="fullscreen"] .bomb-stage--chrono {
  flex: 1;
  min-height: 0;
  height: 100%;
  margin: 0;
}

body[data-chrono-layout="fullscreen"] .chrono-theater .chrono-rate {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  z-index: 5;
  margin: 0;
  max-width: 48%;
  padding: 0.4rem 0.6rem;
  font-size: clamp(0.68rem, 1.2vh, 0.78rem);
  background: rgba(15, 23, 42, 0.84);
  color: #e2e8f0;
  border-radius: 0.45rem;
  backdrop-filter: blur(6px);
}

body[data-chrono-layout="fullscreen"] .chrono-theater .chrono-rate strong {
  font-size: clamp(1rem, 2.2vh, 1.45rem);
  color: #fb923c;
}

body[data-chrono-layout="fullscreen"] .chrono-theater .chrono-tick {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  z-index: 5;
  margin: 0;
  font-size: clamp(0.62rem, 1.1vh, 0.72rem);
  background: rgba(15, 23, 42, 0.75);
  color: #cbd5e1;
  padding: 0.25rem 0.45rem;
  border-radius: 0.35rem;
}

body[data-chrono-layout="fullscreen"] .card--chrono {
  position: relative;
}

body[data-chrono-layout="fullscreen"] .chrono-end {
  position: absolute;
  left: clamp(0.4rem, 0.8vh, 0.55rem);
  right: clamp(0.4rem, 0.8vh, 0.55rem);
  bottom: 0.35rem;
  z-index: 8;
  grid-row: auto;
  margin: 0;
  padding: 0.4rem 0.55rem;
  font-size: clamp(0.68rem, 1.2vh, 0.78rem);
  box-shadow: var(--shadow);
}

.chrono-duration-hint {
  display: inline-block;
  margin-left: 0.45rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-secondary);
  vertical-align: middle;
}

.chrono-climate__item dt {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.intro-card--chrono {
  border-left: 3px solid var(--obs-violet-500, #7c3aed);
}

.intro-card__step--alt {
  background: rgba(124, 58, 237, 0.12);
  color: var(--obs-violet-600, #6d28d9);
}

[data-theme="dark"] .intro-card__step--alt {
  background: rgba(124, 58, 237, 0.28);
  color: #c4b5fd;
}

body[data-chrono-layout="fullscreen"] .chrono-year-badge {
  font-size: clamp(1.1rem, 2.4vh, 1.65rem);
}

body[data-chrono-layout="fullscreen"] .chrono-narrative__title {
  font-size: clamp(0.95rem, 2vh, 1.25rem);
  line-height: 1.25;
  margin: 0 0 0.3rem;
}

body[data-chrono-layout="fullscreen"] .chrono-narrative__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  font-size: clamp(0.72rem, 1.35vh, 0.88rem);
  line-height: 1.42;
  scrollbar-width: thin;
}

body[data-chrono-layout="fullscreen"] .chrono-era {
  font-size: clamp(0.58rem, 1vh, 0.68rem);
}

body[data-chrono-layout="fullscreen"] .chrono-strip {
  grid-row: 3;
  position: relative;
  z-index: 2;
  min-height: 0;
  max-height: clamp(4rem, 13vh, 5.5rem);
  margin: 0;
  padding: 0.4rem 0.5rem;
  overflow: hidden;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

body[data-chrono-layout="fullscreen"] .chrono-step-list {
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 0.4rem;
  max-height: 100%;
  scroll-snap-type: x proximity;
}

body[data-chrono-layout="fullscreen"] .chrono-step-list__item {
  flex: 0 0 min(11rem, 22vw);
  scroll-snap-align: center;
}

body[data-chrono-layout="fullscreen"] .chrono-step-list__btn {
  min-height: 0;
  padding: 0.35rem 0.45rem;
  grid-template-columns: 2.75rem 1fr;
}

body[data-chrono-layout="fullscreen"] .chrono-step-list__title {
  font-size: clamp(0.65rem, 1.15vh, 0.75rem);
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body[data-chrono-layout="fullscreen"] .chrono-is-playing .chrono-fs-toolbar {
  opacity: 0.45;
  transition: opacity 0.25s ease;
}

body[data-chrono-layout="fullscreen"].chrono-is-playing .chrono-fs-toolbar:hover,
body[data-chrono-layout="fullscreen"].chrono-is-playing .chrono-fs-toolbar:focus-within {
  opacity: 1;
}

[data-theme="dark"] body.chrono-fs-active main.app,
[data-theme="dark"] .chrono-experience:fullscreen,
[data-theme="dark"] body.chrono-immersive .chrono-experience {
  background: var(--bg, #0f172a);
}

.timeline-inline .slider-wrap {
  margin-top: 0;
}

/* ── Tendances SSP (tableau de bord) ── */
.proj-method-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin-bottom: 0.45rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.06));
}

.proj-method-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 0.15rem;
}

.proj-method-opt {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.proj-method-opt input {
  accent-color: var(--accent-strong);
  margin: 0;
}

.proj-method-opt:has(input:checked) {
  color: var(--text);
  font-weight: 600;
}

.trend-toggle-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0 0 0.35rem;
}

.trend-ref-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  color: var(--text-secondary);
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.trend-ref-toggle input {
  accent-color: var(--accent-strong);
  margin: 0;
}

.trend-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  margin-bottom: 0.4rem;
}

.trend-bar-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 0.15rem;
}

.trend-chip {
  padding: 0.28rem 0.55rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.66rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  border-left-width: 3px;
}

.trend-chip--low { border-left-color: #16a34a; }
.trend-chip--mid { border-left-color: #2563eb; }
.trend-chip--high { border-left-color: #ea580c; }
.trend-chip--extreme { border-left-color: #dc2626; }
.trend-chip--magic { border-left-color: #7c3aed; }

.trend-chip.active {
  background: var(--surface-raised);
  color: var(--text-primary);
  box-shadow: 0 0 0 1px var(--border);
}

.trend-note {
  font-size: 0.66rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0 0 0.55rem;
}

.trend-note a {
  color: var(--accent-strong);
  font-weight: 600;
}

.trend-note--envelope {
  margin-top: 0;
  padding: 0.4rem 0.5rem;
  background: rgba(37, 99, 235, 0.06);
  border-radius: var(--radius-sm, 4px);
  border-left: 3px solid rgba(37, 99, 235, 0.35);
}

.slider-scope-note {
  margin: 0.45rem 0 0;
  font-size: 0.66rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.co2-scope-note {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.insight-text--future {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.tip-btn--inline {
  width: 1.1rem;
  height: 1.1rem;
  min-width: 1.1rem;
  font-size: 0.62rem;
  padding: 0;
  margin-left: 0.1rem;
  vertical-align: middle;
}

.proj-method-opt .tip-btn--inline {
  flex-shrink: 0;
}

.chart-axis-fixed--to2050 {
  padding-right: 1.8rem;
}

.chart-axis--future {
  color: var(--text-secondary);
  font-weight: 600;
}

.chart-proj-zone {
  fill: rgba(124, 58, 237, 0.06);
  stroke: none;
}

.chart-proj-zone-label {
  fill: #7c3aed;
  font-size: 6.5px;
  font-weight: 600;
  opacity: 0.85;
}

.chart-hist-end {
  stroke: var(--text-secondary);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  opacity: 0.35;
}

.chart-ssp-trend {
  fill: none;
  stroke-width: 1.75;
  stroke-dasharray: 6 4;
  stroke-linecap: round;
  opacity: 0.88;
}

.chart-ssp-trend--low { stroke: #16a34a; }
.chart-ssp-trend--mid { stroke: #2563eb; }
.chart-ssp-trend--high { stroke: #ea580c; }
.chart-ssp-trend--extreme { stroke: #dc2626; }
.chart-ssp-trend--magic { stroke: #7c3aed; }
.chart-ssp-trend--recent { stroke: #b45309; stroke-width: 2; opacity: 0.95; }
.chart-ssp-trend--ref {
  stroke: var(--text-secondary);
  stroke-width: 1.25;
  stroke-dasharray: 3 5;
  opacity: 0.55;
}

.chart-uncert-envelope {
  fill: rgba(37, 99, 235, 0.14);
  stroke: rgba(37, 99, 235, 0.28);
  stroke-width: 0.75;
  pointer-events: none;
}

[data-theme="dark"] .chart-uncert-envelope {
  fill: rgba(96, 165, 250, 0.12);
  stroke: rgba(96, 165, 250, 0.25);
}

.chart-ssp-trend-dot {
  fill: currentColor;
  stroke: var(--surface);
  stroke-width: 1;
}

.chart-ssp-trend-dot.chart-ssp-trend--low { fill: #16a34a; }
.chart-ssp-trend-dot.chart-ssp-trend--mid { fill: #2563eb; }
.chart-ssp-trend-dot.chart-ssp-trend--high { fill: #ea580c; }
.chart-ssp-trend-dot.chart-ssp-trend--extreme { fill: #dc2626; }
.chart-ssp-trend-dot.chart-ssp-trend--magic { fill: #7c3aed; }

.chart-axis-end {
  fill: var(--text-secondary);
  font-size: 8px;
  font-family: var(--font-mono);
  font-weight: 700;
}

[data-theme="dark"] .chart-proj-zone-label { fill: #a78bfa; }

/* ── Diagramme de flux ── */
.flow-diagram {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.flow-diagram--ocean {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border);
}

/* Marqueurs de flèche */
.flow-marker { stroke: none; }
.flow-marker--blue { fill: var(--obs-blue-600); }
.flow-marker--cyan { fill: var(--obs-teal-500); }
.flow-marker--amber { fill: var(--obs-amber-500); }
.flow-marker--orange { fill: var(--obs-orange-600); }

/* Lignes et flèches de flux */
.flow-arrow {
  fill: none;
  stroke: var(--obs-blue-600);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flow-arrow--main { stroke-width: 2.5; }
.flow-arrow--drop { stroke-width: 2.25; }
.flow-arrow--link { stroke-width: 1.85; opacity: 0.92; }
.flow-arrow--out { stroke-width: 1.65; opacity: 0.8; stroke-dasharray: 4 3; }
.flow-arrow--branch { stroke-width: 2; opacity: 0.9; }
.flow-arrow--inner { stroke-width: 1.75; opacity: 0.85; }
.flow-arrow--thick { stroke-width: 3; }
.flow-arrow--blue { stroke: var(--obs-blue-600); }
.flow-arrow--cyan { stroke: var(--obs-teal-500); }
.flow-arrow--amber { stroke: var(--obs-amber-500); }
.flow-arrow--orange { stroke: var(--obs-orange-600); }

.flow-ribbon {
  transition: opacity 0.35s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .flow-ribbon {
    animation: flow-ribbon-pulse 3.5s ease-in-out infinite;
  }
  .flow-arrow--inner {
    animation: flow-arrow-drift 2.8s ease-in-out infinite;
  }
}

@keyframes flow-ribbon-pulse {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 0.95; }
}

@keyframes flow-arrow-drift {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Source solaire */
.flow-sun-core { fill: #fbbf24; stroke: #f59e0b; stroke-width: 1; }
.flow-sun-ray { stroke: #f59e0b; stroke-width: 1.5; stroke-linecap: round; }
.flow-source-label { fill: var(--text-secondary); font-size: 9px; font-weight: 600; }

.flow-split { stroke: rgba(255,255,255,0.35); stroke-width: 0.5; }
.flow-split--cryo { fill: #22d3ee; }
.flow-split--ocean { fill: #2563eb; }
.flow-split--atmo { fill: #fbbf24; }
.flow-split-hint { fill: var(--text-secondary); font-size: 8px; font-weight: 600; }

.flow-comp-title { font-size: 9px; font-weight: 700; }
.flow-comp-title--cryo { fill: #155e75; }
.flow-comp-title--atmo { fill: #92400e; }
.flow-comp-val { font-size: 10px; font-family: var(--font-mono); font-weight: 700; }
.flow-comp-val--cryo { fill: #0e7490; }
.flow-comp-val--atmo { fill: #b45309; }
.flow-comp-pct { fill: var(--text-secondary); font-size: 8px; font-family: var(--font-mono); font-weight: 600; }

.flow-cons-bg { stroke-width: 0.75; }
.flow-cons-bg--cyan { fill: #ecfeff; stroke: #06b6d4; }
.flow-cons-bg--main { fill: #eff6ff; stroke: var(--obs-blue-500); }
.flow-cons-bg--amber { fill: #fffbeb; stroke: #f59e0b; }
.flow-cons-text { font-size: 8px; font-weight: 700; }
.flow-cons-text--cyan { fill: #0e7490; }
.flow-cons-text--main { fill: var(--accent-strong); }
.flow-cons-text--amber { fill: #b45309; }

.flow-title { fill: var(--text-secondary); font-size: 9px; font-weight: 700; letter-spacing: 0.02em; }
.flow-in { fill: url(#flowIn); stroke: var(--obs-blue-400); stroke-width: 1; }
.flow-in-title { fill: var(--accent-strong); font-size: 9px; font-weight: 700; }
.flow-in-label { fill: var(--accent-strong); font-size: 9px; font-family: var(--font-mono); font-weight: 600; }
.flow-node { fill: var(--accent); stroke: #fff; stroke-width: 1.5; }

.flow-ocean { fill: url(#flowOcean); stroke: var(--obs-blue-800); stroke-width: 0.75; }
.flow-ocean-label { fill: #fff; font-size: 10px; font-weight: 700; }
.flow-ocean-val { fill: #fff; font-size: 11px; font-family: var(--font-mono); font-weight: 700; }
.flow-ocean-pct { fill: rgba(255,255,255,0.9); font-size: 9px; font-family: var(--font-mono); }
.flow-cryo { fill: #a5f3fc; stroke: #06b6d4; stroke-width: 0.75; }
.flow-atmo { fill: #fde68a; stroke: #f59e0b; stroke-width: 0.75; }
.flow-branch-label { font-size: 7px; font-weight: 600; }
.flow-branch-label--cryo { fill: #155e75; }
.flow-branch-label--atmo { fill: #92400e; }
.flow-val { fill: var(--accent-strong); font-size: 8px; font-family: var(--font-mono); font-weight: 600; }
.flow-pct { fill: var(--text-secondary); font-size: 7px; font-family: var(--font-mono); }
.flow-footnote { fill: var(--text-secondary); font-size: 7px; }

.flow-out-line {
  fill: none;
  stroke: var(--text-secondary);
  stroke-width: 1.5;
  opacity: 0.75;
}
.flow-out-line--main { stroke: var(--accent); stroke-width: 2; opacity: 0.9; }
.flow-out-line--cyan { stroke: var(--obs-teal-500); }
.flow-out-line--amber { stroke: var(--obs-amber-500); }

.flow-out { fill: var(--text-secondary); font-size: 7px; font-weight: 600; }
.flow-out--main { fill: var(--accent-strong); font-size: 8px; font-weight: 700; }
.flow-out--cyan { fill: #0e7490; }
.flow-out--amber { fill: var(--obs-amber-700); }

/* Colonne océanique */
.ocean-surface { fill: var(--obs-blue-400); }
.ocean-surface-label { fill: var(--text-secondary); font-size: 8px; font-weight: 600; }
.ocean-stratum-label { fill: #fff; font-size: 8px; font-weight: 600; }
.ocean-stratum-pct { fill: rgba(255,255,255,0.9); font-size: 7px; font-family: var(--font-mono); }
.ocean-heat-front {
  stroke: var(--obs-orange-600);
  stroke-width: 2;
  stroke-dasharray: 6 4;
}
.ocean-front-label { fill: var(--heat-strong); font-size: 7px; font-weight: 700; }
.ocean-flow-label { fill: var(--accent-strong); font-size: 7px; font-weight: 600; }
.ocean-eddy {
  fill: none;
  stroke: var(--obs-cyan-400);
  stroke-width: 1.5;
  stroke-dasharray: 5 3;
  opacity: 0.8;
}
.ocean-eddy-label { fill: var(--obs-teal-500); font-size: 7px; font-weight: 600; font-style: italic; }

[data-theme="dark"] .flow-cryo { fill: #164e63; stroke: #22d3ee; }
[data-theme="dark"] .flow-atmo { fill: #78350f; stroke: #f59e0b; }
[data-theme="dark"] .flow-branch-label { fill: rgba(255,255,255,0.9); }
[data-theme="dark"] .flow-comp-title--cryo,
[data-theme="dark"] .flow-comp-title--atmo { fill: rgba(255,255,255,0.92); }
[data-theme="dark"] .flow-comp-val--cryo { fill: #67e8f9; }
[data-theme="dark"] .flow-comp-val--atmo { fill: #fcd34d; }
[data-theme="dark"] .flow-split--cryo { fill: #0891b2; }
[data-theme="dark"] .flow-split--ocean { fill: #1d4ed8; }
[data-theme="dark"] .flow-split--atmo { fill: #d97706; }
[data-theme="dark"] .flow-cons-bg--cyan { fill: #164e63; stroke: #22d3ee; }
[data-theme="dark"] .flow-cons-bg--main { fill: #1e3a8a; stroke: #60a5fa; }
[data-theme="dark"] .flow-cons-bg--amber { fill: #78350f; stroke: #fbbf24; }
[data-theme="dark"] .flow-cons-text--cyan { fill: #67e8f9; }
[data-theme="dark"] .flow-cons-text--main { fill: #bfdbfe; }
[data-theme="dark"] .flow-cons-text--amber { fill: #fde68a; }
[data-theme="dark"] .flow-val,
[data-theme="dark"] .flow-out--main { fill: var(--text); }
[data-theme="dark"] .flow-out--cyan { fill: #22d3ee; }
[data-theme="dark"] .flow-out--amber { fill: var(--obs-amber-500); }

/* ── Bilan radiatif ── */
.kpi-grid--radiative {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 520px) {
  .kpi-grid--radiative {
    grid-template-columns: repeat(3, 1fr);
  }
}

.rb-equilibrium-card {
  margin-bottom: 0.85rem;
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, var(--surface) 0%, var(--accent-soft) 160%);
}

.rb-equilibrium-lead {
  margin: 0 0 0.75rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.rb-equation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 0.55rem;
  margin: 0.5rem 0 0.75rem;
  padding: 0.75rem 0.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
}

.rb-eq-part {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 5.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.45rem;
  text-align: center;
}

.rb-eq-part--in { background: #fffbeb; border: 1px solid #fcd34d; }
.rb-eq-part--sw { background: #f8fafc; border: 1px solid #cbd5e1; }
.rb-eq-part--lw { background: #fff1f2; border: 1px solid #fda4af; }

.rb-eq-label {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.rb-eq-val {
  font: 700 1.15rem/1.1 var(--font-mono);
  color: var(--accent-strong);
}

.rb-eq-unit {
  font-size: 0.62rem;
  color: var(--text-secondary);
}

.rb-eq-op {
  font: 700 1.1rem/1 var(--font-mono);
  color: var(--accent);
}

.rb-equilibrium-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

[data-theme="dark"] .rb-eq-part--in { background: #78350f; border-color: #fbbf24; }
[data-theme="dark"] .rb-eq-part--sw { background: #1e293b; border-color: #64748b; }
[data-theme="dark"] .rb-eq-part--lw { background: #450a0a; border-color: #fb7185; }

.rb-diagram {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
}

.rb-diagram--layers {
  margin-bottom: 0.5rem;
}

.rb-connectors,
.rb-chevrons {
  pointer-events: none;
}

.rb-lead {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.rb-note {
  margin: 0.65rem 0 0;
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-style: italic;
}

.rb-prose-after {
  margin-top: 0.65rem;
}

.rb-label { fill: var(--text-secondary); font-size: 11px; font-weight: 600; }
.rb-sublabel { fill: var(--text-secondary); font-size: 9.5px; }
.rb-toa { fill: #e0f2fe; stroke: #38bdf8; stroke-width: 0.75; }
.rb-toa-label { fill: #0369a1; font-size: 10px; font-weight: 700; }

.rb-box { stroke-width: 0.75; }
.rb-box--reflect { fill: #f1f5f9; stroke: #94a3b8; }
.rb-box--absorb { fill: #dbeafe; stroke: #2563eb; }
.rb-box--atm { fill: #e0f2fe; stroke: #38bdf8; }
.rb-box--surf { fill: #dcfce7; stroke: #22c55e; }
.rb-box-title { fill: var(--accent-strong); font-size: 10px; font-weight: 700; }
.rb-box-val { fill: var(--accent-strong); font-size: 12px; font-family: var(--font-mono); font-weight: 700; }
.rb-box-pct { fill: var(--text-secondary); font-size: 9px; }

.rb-surface { stroke-width: 0.75; }
.rb-surface--ocean { fill: url(#rb-ocean); stroke: #1e40af; }
.rb-surface--land { fill: url(#rb-land); stroke: #15803d; }
.rb-surface--built { fill: #fef3c7; stroke: #d97706; }
.rb-surface--ice { fill: #e0f2fe; stroke: #38bdf8; }
.rb-surface-label { fill: #fff; font-size: 10px; font-weight: 700; }
.rb-surface-label--dark { fill: #0369a1; }
.rb-surface-val--dark { fill: #0c4a6e; font-size: 9px; font-weight: 600; }
.rb-surface-group--ice .rb-surface-label { fill: #0369a1; }
.rb-surface-group--ice .rb-surface-val { fill: #0c4a6e; font-size: 9.5px; font-weight: 600; }
.rb-surface--built .rb-surface-label { fill: #92400e; }
.rb-surface--built .rb-surface-val { fill: #78350f; font-size: 9px; font-weight: 600; }
.rb-surface-val { fill: rgba(255,255,255,0.95); font-size: 10px; font-family: var(--font-mono); font-weight: 600; }

.rb-arrow--up { stroke-dasharray: 4 3; opacity: 0.75; }
.rb-flow-hint { fill: var(--heat-strong); font-size: 7px; font-weight: 700; }

.rb-absorption-bar {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
}

.rb-bar-title {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.rb-bar {
  display: flex;
  height: 2.25rem;
  border-radius: 0.4rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.rb-bar-seg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  color: #fff;
  font-family: var(--font-mono);
  line-height: 1.15;
}

.rb-bar-seg-val { font-size: 0.72rem; font-weight: 700; }
.rb-bar-seg-pct { font-size: 0.58rem; opacity: 0.9; }
.rb-bar-seg--sky { background: #38bdf8; }
.rb-bar-seg--ocean { background: #1d4ed8; }
.rb-bar-seg--land { background: #16a34a; }

.rb-bar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.rb-bar-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.rb-bar-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
}

.rb-bar-dot--sky { background: #38bdf8; }
.rb-bar-dot--ocean { background: #1d4ed8; }
.rb-bar-dot--land { background: #16a34a; }

.rb-ir-band { fill: #fee2e2; stroke: #f87171; stroke-width: 0.75; }
.rb-ir-title { fill: #991b1b; font-size: 10px; font-weight: 700; }
.rb-ir-sub { fill: #b91c1c; font-size: 9px; }

.rb-out { stroke-width: 0.75; }
.rb-out--sw { fill: #f8fafc; stroke: #94a3b8; }
.rb-out--lw { fill: #fff1f2; stroke: #fb7185; }
.rb-out-label { fill: var(--text-secondary); font-size: 9px; font-weight: 600; }
.rb-out-val { fill: var(--accent-strong); font-size: 11px; font-family: var(--font-mono); font-weight: 700; }

.rb-foot { fill: var(--text-secondary); font-size: 9px; }

.rb-arrow { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.rb-arrow--lane { opacity: 0.88; }
.rb-arrow--sun { stroke: #f59e0b; stroke-width: 2.25; }
.rb-arrow--blue { stroke: #2563eb; stroke-width: 2; }
.rb-arrow--gray { stroke: #64748b; stroke-width: 1.75; stroke-dasharray: 5 4; }
.rb-arrow--ir { stroke: #dc2626; stroke-width: 2; }
.rb-arrow--out { stroke-width: 1.6; opacity: 0.85; }
.rb-arrow--thin { stroke-width: 1.5; opacity: 0.8; }

.rb-chevron {
  fill: var(--text-secondary);
  font-size: 9px;
  opacity: 0.55;
}

.rb-lane-track {
  fill: rgba(248, 250, 252, 0.85);
  stroke: #e2e8f0;
  stroke-width: 0.75;
}

.rb-lane-label {
  fill: #b91c1c;
  font-size: 9px;
  font-weight: 700;
}

.rb-lane-label--sub {
  fill: var(--text-secondary);
  font-size: 8px;
  font-weight: 600;
}

.rb-layer-title { fill: var(--accent-strong); font-size: 11px; font-weight: 700; }
.rb-layer { stroke-width: 0.75; }
.rb-layer--strato { fill: #e0f2fe; stroke: #0ea5e9; }
.rb-layer--tropo { fill: #fef3c7; stroke: #f59e0b; }
.rb-layer--ground { fill: #dcfce7; stroke: #16a34a; }
.rb-layer-name { fill: var(--accent-strong); font-size: 10.5px; font-weight: 700; }
.rb-layer-alt { fill: var(--text-secondary); font-size: 8.5px; font-weight: 600; }
.rb-layer-desc { fill: var(--text-secondary); font-size: 9.5px; }
.rb-layer-divider { stroke: rgba(100, 116, 139, 0.22); stroke-width: 0.75; stroke-dasharray: 3 3; }

.rb-co2-pill { fill: #f1f5f9; stroke: #94a3b8; stroke-width: 0.6; }
.rb-co2-pill-text { fill: #334155; font-size: 8px; font-family: var(--font-mono); font-weight: 700; }
.rb-layer-desc-html {
  margin: 0;
  font-size: 9.5px;
  line-height: 1.45;
  color: var(--text-secondary);
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
}

.rb-temp-pill { stroke-width: 0.6; }
.rb-temp-pill--cold { fill: #e0f2fe; stroke: #38bdf8; }
.rb-temp-pill--hot { fill: #ffedd5; stroke: #fb923c; }
.rb-temp-pill-text {
  font-size: 8px;
  font-weight: 700;
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
}
.rb-temp-pill-text--cold { fill: #0369a1; }
.rb-temp-pill-text--hot { fill: #c2410c; }

.rb-layer-badge {
  font-size: 13px;
  font-weight: 800;
  text-anchor: middle;
}
.rb-layer-badge--cold { fill: #0284c7; }
.rb-layer-badge--hot { fill: #ea580c; }
.rb-layer-temp { font-size: 12px; font-weight: 800; }
.rb-layer-temp--cold { fill: #0284c7; }
.rb-layer-temp--hot { fill: #ea580c; }

.rb-albedo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}

.rb-albedo-table th,
.rb-albedo-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.rb-albedo-table th {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.rb-albedo-val {
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
}

[data-theme="dark"] .rb-toa { fill: #0c4a6e; stroke: #38bdf8; }
[data-theme="dark"] .rb-toa-label { fill: #bae6fd; }
[data-theme="dark"] .rb-box--reflect { fill: #1e293b; stroke: #64748b; }
[data-theme="dark"] .rb-box--absorb { fill: #1e3a8a; stroke: #60a5fa; }
[data-theme="dark"] .rb-box--atm { fill: #0c4a6e; stroke: #38bdf8; }
[data-theme="dark"] .rb-surface--ice { fill: #0c4a6e; stroke: #7dd3fc; }
[data-theme="dark"] .rb-surface-group--ice .rb-surface-label { fill: #bae6fd; }
[data-theme="dark"] .rb-surface-group--ice .rb-surface-val { fill: #e0f2fe; }
[data-theme="dark"] .rb-surface-label--dark { fill: #bae6fd; }
[data-theme="dark"] .rb-surface-val--dark { fill: #e0f2fe; }
[data-theme="dark"] .rb-lane-track { fill: rgba(15, 23, 42, 0.6); stroke: #334155; }
[data-theme="dark"] .rb-lane-label { fill: #fca5a5; }
[data-theme="dark"] .rb-box--surf { fill: #14532d; stroke: #4ade80; }
[data-theme="dark"] .rb-box-title,
[data-theme="dark"] .rb-box-val { fill: var(--text); }
[data-theme="dark"] .rb-ir-band { fill: #450a0a; stroke: #f87171; }
[data-theme="dark"] .rb-ir-title { fill: #fecaca; }
[data-theme="dark"] .rb-ir-sub { fill: #fca5a5; }
[data-theme="dark"] .rb-layer--strato { fill: #0c4a6e; stroke: #38bdf8; }
[data-theme="dark"] .rb-layer--tropo { fill: #78350f; stroke: #fbbf24; }
[data-theme="dark"] .rb-layer--ground { fill: #14532d; stroke: #4ade80; }
[data-theme="dark"] .rb-layer-name { fill: var(--text); }
[data-theme="dark"] .rb-layer-desc { fill: rgba(255,255,255,0.75); }
[data-theme="dark"] .rb-layer-alt { fill: rgba(255,255,255,0.6); }
[data-theme="dark"] .rb-layer-divider { stroke: rgba(255, 255, 255, 0.15); }
[data-theme="dark"] .rb-co2-pill { fill: #1e293b; stroke: #475569; }
[data-theme="dark"] .rb-co2-pill-text { fill: #e2e8f0; }
[data-theme="dark"] .rb-layer-desc-html { color: rgba(255, 255, 255, 0.75); }
[data-theme="dark"] .rb-temp-pill--cold { fill: #0c4a6e; stroke: #38bdf8; }
[data-theme="dark"] .rb-temp-pill--hot { fill: #78350f; stroke: #fbbf24; }
[data-theme="dark"] .rb-temp-pill-text { fill: #f8fafc; }
[data-theme="dark"] .rb-lane-track--gray { fill: rgba(30, 41, 59, 0.7); stroke: #475569; }
[data-theme="dark"] .rb-lane-track--blue { fill: rgba(30, 58, 138, 0.35); stroke: #3b82f6; }

.flow-caption {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 0.55rem 0.65rem;
  background: var(--accent-soft);
  border-radius: 0.5rem;
}

.schem-svg {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
}

/* ── Mécanismes ── */
.mech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.mech-pill {
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.mech-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.mech-panel {
  display: grid;
  gap: 0.85rem;
}

.mech-demo {
  min-height: 140px;
  padding: 0.75rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mech-summary {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-strong);
  line-height: 1.4;
}

.mech-detail {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.schem-legend {
  margin: 0.35rem 0 0;
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Schéma routage */
.schem--routing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}

.schem-sun { font-size: 1.25rem; }
.schem-ray {
  width: 3px;
  height: 20px;
  background: linear-gradient(var(--obs-amber-500), var(--accent));
  border-radius: 2px;
}

.schem-planet {
  width: 100%;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.schem-slice {
  height: var(--h);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 600;
}

.schem-slice--atmo { background: #fde68a; color: #92400e; }
.schem-slice--cryo { background: #a5f3fc; color: #155e75; }
.schem-slice--ocean { background: linear-gradient(#3b82f6, #1d4ed8); color: #fff; }

/* Schéma stratification */
.schem--strat { width: 100%; }
.schem-col {
  position: relative;
  height: 110px;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.schem-layer--warm {
  height: 35%;
  background: linear-gradient(#fbbf24, #f97316);
}

.schem-pycno {
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--obs-slate-500) 0 4px, transparent 4px 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  color: var(--text);
  opacity: calc(0.5 + var(--block) * 0.005);
}

.schem-pycno span { background: var(--surface); padding: 0 0.25rem; }

.schem-layer--cold {
  height: calc(65% - 8px);
  background: linear-gradient(#1e40af, #0f172a);
}

.schem-arrow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  color: var(--accent);
  opacity: calc(1 - var(--block) * 0.01);
}

.schem-arrow--down { top: 28%; }
.schem-arrow--up { bottom: 18%; }

/* Schéma expansion */
.schem--expansion {
  position: relative;
  width: 100%;
  height: 100px;
}

.schem-shore {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 45%;
  height: 55px;
  background: #d6d3d1;
  border-radius: 0 8px 0 0;
}

.schem-sea {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 55%;
  height: 45px;
  background: var(--obs-blue-400);
  border-radius: 8px 0 0 0;
}

.schem-sea-level {
  position: absolute;
  top: calc(-1 * var(--rise));
  left: 0;
  right: 0;
  height: 3px;
  background: var(--obs-blue-600);
  transition: top 0.5s ease;
}

.schem-gauge {
  position: absolute;
  top: 0;
  right: 0;
  font: 700 0.72rem/1 var(--font-mono);
  color: var(--heat-strong);
}

/* Schéma brassage */
.schem--mixing {
  position: relative;
  width: 120px;
  height: 100px;
  margin: 0 auto;
}

.schem-eddy {
  position: absolute;
  width: 36px;
  height: 36px;
  border: 2px dashed var(--accent);
  border-radius: 50%;
  opacity: calc(1 - var(--slow) * 0.007);
}

.schem-eddy--1 { top: 10px; left: 8px; animation: eddy-spin 4s linear infinite; }
.schem-eddy--2 { bottom: 8px; right: 8px; animation: eddy-spin 5s linear infinite reverse; }

.schem-mix-arrow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  color: var(--accent);
  opacity: calc(1 - var(--slow) * 0.008);
}

@keyframes eddy-spin {
  to { transform: rotate(360deg); }
}

/* Schéma inertie */
.schem--inertia {
  position: relative;
  width: 100%;
  height: 110px;
  background: linear-gradient(180deg, #93c5fd 0%, #1e3a8a 55%, #0f172a 100%);
  border-radius: 0.5rem;
  overflow: hidden;
}

.schem-heat-front {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--pen);
  background: linear-gradient(180deg, rgba(249,115,22,0.5), rgba(234,88,12,0.2));
  transition: height 0.5s ease;
}

.schem-depth {
  position: absolute;
  left: 0.5rem;
  font-size: 0.6rem;
  color: rgba(255,255,255,0.8);
  font-family: var(--font-mono);
}

.schem-depth--0 { top: 4px; }
.schem-depth--700 { top: 42%; }
.schem-depth--2000 { bottom: 4px; }

@media (max-width: 640px) {
  .page-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.3rem;
    padding-bottom: 0.4rem;
    margin-bottom: 0.15rem;
    mask-image: linear-gradient(90deg, #000 92%, transparent);
  }

  .page-nav::-webkit-scrollbar {
    display: none;
  }

  .page-nav__link {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.68rem;
    padding: 0.35rem 0.55rem;
  }

  .page-hero {
    padding-top: 0.85rem;
  }

  .page-hero h1 {
    font-size: 1.2rem;
  }

  .page-hero .lead {
    font-size: 0.82rem;
  }

  .page-hero-top {
    margin-bottom: 0.5rem;
  }
}

/* ── Projections ── */
.proj-disclaimer {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--text-secondary);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.proj-disclaimer a {
  color: var(--accent-strong);
  white-space: nowrap;
}

.proj-kpi-note {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.5;
  font-style: italic;
}

.tip-btn--inline {
  display: inline-flex;
  vertical-align: middle;
  margin: 0 0.1rem;
  width: 1.1rem;
  height: 1.1rem;
  font-size: 0.62rem;
  padding: 0;
}

.card-title .tip-btn {
  vertical-align: middle;
  margin-left: 0.25rem;
}

.proj-zec-lead {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.proj-zec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.proj-zec-stat {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.proj-zec-stat--accent {
  border-color: #7c3aed;
  background: rgba(124, 58, 237, 0.06);
}

.proj-zec-stat__label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.proj-zec-stat__val {
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text);
}

.proj-zec-stat__val--ref {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.proj-zec-note {
  margin: 0.65rem 0 0;
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
}

.proj-lead {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.proj-scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.5rem;
}

.proj-scenario-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.proj-scenario-card:hover { border-color: var(--accent); }
.proj-scenario-card--active {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 1px var(--accent-strong);
}

.proj-scenario-card--magic.proj-scenario-card--active {
  border-color: #7c3aed;
  box-shadow: 0 0 0 1px #7c3aed;
}

.proj-scenario-card__tag {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.proj-scenario-card__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.proj-scenario-card__warm {
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.proj-scenario-note {
  margin: 0.65rem 0 0;
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
}

.proj-slider-wrap { margin: 0.5rem 0 0.85rem; }

.proj-metric-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0 0.65rem;
}

.proj-metric-btn {
  font-size: 0.72rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
}

.proj-metric-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
  font-weight: 600;
}

.proj-chart-wrap { margin-top: 0.25rem; }

.proj-chart {
  width: 100%;
  height: auto;
  display: block;
}

.proj-grid { stroke: var(--chart-grid); stroke-width: 0.5; }
.proj-line { fill: none; stroke-width: 2; stroke-linecap: round; }
.proj-line--ghost { stroke-width: 1.25; opacity: 0.45; }
.proj-line--active { stroke-width: 2.5; }
.proj-line--low { stroke: #16a34a; }
.proj-line--mid { stroke: #2563eb; }
.proj-line--high { stroke: #ea580c; }
.proj-line--extreme { stroke: #dc2626; }
.proj-line--magic { stroke: #7c3aed; }
.proj-line--ref { stroke-width: 1.5; stroke-dasharray: 5 4; opacity: 0.55; pointer-events: none; }
.proj-ref-dot { fill: currentColor; opacity: 0.65; pointer-events: none; }
.proj-ref-label {
  font-size: 7px;
  fill: var(--text-muted, #64748b);
  opacity: 0.85;
  pointer-events: none;
}
.proj-legend-item--ref { font-size: 0.78rem; opacity: 0.85; }
.proj-legend-swatch--ref {
  background: transparent !important;
  border: 1.5px dashed currentColor;
  opacity: 0.7;
}

.proj-now-line { stroke: var(--text-secondary); stroke-width: 1; stroke-dasharray: 4 3; opacity: 0.5; }
.proj-now-label { fill: var(--text-secondary); font-size: 8px; }
.proj-marker-line { stroke: var(--accent); stroke-width: 1; opacity: 0.35; }
.proj-marker-dot { fill: var(--accent-strong); }
.proj-marker-ring { fill: none; stroke: var(--accent); stroke-width: 1; opacity: 0.35; }
.proj-axis-x, .proj-axis-y { fill: var(--text-secondary); font-size: 8.5px; }
.proj-unit-tag { fill: var(--text-secondary); font-size: 8px; font-weight: 600; }
.proj-tip-label { fill: var(--accent-strong); font-size: 9px; font-weight: 700; }

.proj-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.proj-legend-item { display: flex; align-items: center; gap: 0.35rem; }
.proj-legend-swatch {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
}
.proj-legend-item--low { color: #16a34a; }
.proj-legend-item--mid { color: #2563eb; }
.proj-legend-item--high { color: #ea580c; }
.proj-legend-item--extreme { color: #dc2626; }
.proj-legend-item--magic { color: #7c3aed; }
.proj-legend-item--active { font-weight: 700; }

.proj-stop-panel {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  background: var(--accent-soft);
  border: 1px solid var(--obs-blue-200);
  border-radius: var(--radius);
}

.proj-stop-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.proj-stop-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.proj-stop-lead {
  margin: 0.4rem 0 0;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.proj-stop-btn {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.proj-stop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.proj-stop-btn:hover,
.proj-stop-btn[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

.proj-stop-btn--alt {
  border-color: #7c3aed;
  color: #7c3aed;
}

.proj-stop-btn--alt:hover,
.proj-stop-btn--alt[aria-pressed="true"] {
  background: #7c3aed;
  color: #fff;
}

.proj-compare-panel { margin-top: 0.65rem; }
.proj-compare-lead {
  margin: 0 0 0.45rem;
  font-size: 0.76rem;
  color: var(--text-secondary);
}
.proj-compare-hint { font-size: 0.7rem; opacity: 0.85; }

.proj-compare-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.proj-compare-chip {
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.proj-compare-chip--on {
  border-color: currentColor;
  background: color-mix(in srgb, currentColor 12%, var(--surface));
  font-weight: 700;
}

.proj-compare-chip--low { color: #16a34a; }
.proj-compare-chip--mid { color: #2563eb; }
.proj-compare-chip--high { color: #ea580c; }
.proj-compare-chip--extreme { color: #dc2626; }

.proj-compare-chip:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.proj-zec-grid--wide {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 520px) {
  .proj-zec-grid--wide {
    grid-template-columns: 1fr 1fr;
  }
}

.proj-zec-source {
  margin: 0.5rem 0 0;
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.45;
  font-style: italic;
}

.proj-zec-band {
  stroke: none;
}

.proj-zec-band--ar6 {
  fill: #7c3aed;
  opacity: 0.1;
}

.proj-zec-band--zecmip {
  fill: #0d9488;
  opacity: 0.16;
}

.proj-zecmip-median {
  fill: none;
  stroke: #0d9488;
  stroke-width: 1.25;
  stroke-dasharray: 4 3;
  opacity: 0.85;
}

.proj-zec-band-label {
  font-size: 7.5px;
  font-weight: 600;
  opacity: 0.75;
}

.proj-zec-band-label {
  fill: #7c3aed;
}

.proj-zec-band-label--zecmip {
  fill: #0d9488;
}

.proj-legend-item--zecmip,
.proj-legend-item--zecmip-med {
  color: #0d9488;
  font-size: 0.72rem;
}

.proj-legend-swatch--zecmip {
  background: #0d9488;
  opacity: 0.35;
}

.proj-legend-swatch--zecmip-med {
  background: transparent;
  border: 1.5px dashed #0d9488;
}

.proj-milestone-line {
  stroke: #7c3aed;
  stroke-width: 0.75;
  stroke-dasharray: 3 3;
  opacity: 0.35;
}

.proj-milestone-line--active { opacity: 0.7; stroke-width: 1; }

.proj-milestone-label {
  fill: #7c3aed;
  font-size: 7px;
  font-weight: 600;
}

.proj-milestone-dot {
  fill: #7c3aed;
  stroke: var(--surface);
  stroke-width: 1;
}

.proj-line--combo-gmst { stroke-width: 2.25; }
.proj-line--combo-eei { stroke-width: 1.5; opacity: 0.7; }

.proj-axis-y--right { fill: var(--text-secondary); font-size: 8px; }
.proj-combo-legend { fill: var(--text-secondary); font-size: 7.5px; }

.proj-bridge-card {
  border-left: 3px solid var(--accent);
}

.proj-bridge-lead {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text);
}

[data-theme="dark"] .proj-stop-panel {
  border-color: var(--obs-blue-800, #1e3a5f);
}

[data-theme="dark"] .proj-zec-band--ar6 { fill: #a78bfa; }
[data-theme="dark"] .proj-zec-band--zecmip { fill: #2dd4bf; }
[data-theme="dark"] .proj-zecmip-median { stroke: #2dd4bf; }
[data-theme="dark"] .proj-zec-band-label { fill: #c4b5fd; }
[data-theme="dark"] .proj-zec-band-label--zecmip { fill: #5eead4; }
[data-theme="dark"] .proj-milestone-label { fill: #c4b5fd; }
[data-theme="dark"] .proj-milestone-line { stroke: #a78bfa; }
[data-theme="dark"] .proj-milestone-dot { fill: #a78bfa; }
[data-theme="dark"] .proj-legend-item--zecmip,
[data-theme="dark"] .proj-legend-item--zecmip-med { color: #5eead4; }

.proj-insight-text {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text);
}

.proj-insight-foot {
  margin: 0.65rem 0 0;
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
}

.proj-mini-chart {
  width: 100%;
  height: auto;
  display: block;
}

.proj-mini-title { fill: var(--text-secondary); font-size: 9px; font-weight: 600; }
.proj-mini-label { fill: var(--text-secondary); font-size: 8.5px; }
.proj-mini-val { fill: var(--text); font-size: 8.5px; font-weight: 700; font-family: var(--font-mono); }
.proj-mini-foot { fill: var(--text-secondary); font-size: 8px; }
.proj-mini-bar { stroke-width: 0; }
.proj-mini-bar--surf { fill: #f59e0b; opacity: 0.85; }
.proj-mini-bar--ocean { fill: #2563eb; opacity: 0.8; }

[data-theme="dark"] .proj-mini-bar--surf { fill: #fbbf24; }
[data-theme="dark"] .proj-mini-bar--ocean { fill: #60a5fa; }

@media (max-width: 420px) {
  .guided-path {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .guide-step {
    justify-content: flex-start;
    padding: 0.5rem 0.65rem;
    font-size: 0.78rem;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }

  .kpi-grid .kpi--accent {
    grid-column: 1 / -1;
  }

  .chart-legend {
    grid-template-columns: 1fr;
  }

  .context-stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .context-stats strong {
    display: inline;
    margin-left: 0.35rem;
  }

  .compare-grid {
    grid-template-columns: 1fr;
  }

  .compare-bar-row {
    grid-template-columns: 2.25rem 1fr 3.75rem;
    gap: 0.35rem;
  }

  .counter-sub {
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
  }

  .analogy-warning,
  .onboard {
    font-size: 0.72rem;
  }
}

@media (min-width: 480px) {
  .app { padding-left: 1.25rem; padding-right: 1.25rem; }
  .mode-btn { font-size: 0.82rem; padding: 0.55rem 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .schem-eddy { animation: none; }
}