/* ════════════════════════════════════════════════════════
   VideoDevis — Article design system v2
   Style : PostHog inspired — coloré, expressif, dark mode
   Police : Geist Sans + Geist Mono (variable, self-hosted)
   ════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-Variable.woff2') format('woff2-variations'),
       url('/fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/GeistMono-Variable.woff2') format('woff2-variations'),
       url('/fonts/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── LIGHT THEME (par défaut) ── */
:root {
  --font-sans: 'Geist', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', 'Fira Code', ui-monospace, monospace;

  /* Couleurs neutres */
  --bg:          #ffffff;
  --bg-alt:      #fafafa;
  --bg-elevated: #ffffff;
  --bg-section:  #f7f7f5;
  --bg-card:     #ffffff;
  --bg-code:     #f5f5f4;

  --text:        #0a0a0a;
  --text-2:      #404040;
  --text-3:      #6b7280;
  --text-muted:  #9ca3af;

  --border:      #e5e5e5;
  --border-soft: #f0f0f0;
  --border-hover:#d4d4d4;

  /* Accent orange VideoDevis */
  --accent:        #ea580c;
  --accent-dark:   #c2410c;
  --accent-light:  #fff7ed;
  --accent-tint:   rgba(234, 88, 12, 0.10);
  --accent-glow:   rgba(234, 88, 12, 0.18);

  /* Couleurs scénarios (style PostHog) */
  --green:         #16a34a;
  --green-bg:      #f0fdf4;
  --green-border:  #bbf7d0;
  --green-text:    #15803d;

  --blue:          #2563eb;
  --blue-bg:       #eff6ff;
  --blue-border:   #bfdbfe;
  --blue-text:     #1d4ed8;

  --violet:        #7c3aed;
  --violet-bg:     #f5f3ff;
  --violet-border: #ddd6fe;
  --violet-text:   #6d28d9;

  --yellow-bg:     #fefce8;
  --red-bg:        #fef2f2;

  /* Ombres */
  --shadow-xs:   0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md:   0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-lg:   0 12px 32px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
  --shadow-accent: 0 8px 24px rgba(234, 88, 12, 0.18);

  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   14px;
  --radius-xl:   18px;
  --radius-2xl:  24px;

  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.32, 0.72, 0, 1); /* Apple-style soft */

  --header-bg-blur: rgba(255, 255, 255, 0.85);
}

/* ── DARK THEME ── */
[data-theme="dark"] {
  --bg:          #0a0a0a;
  --bg-alt:      #111111;
  --bg-elevated: #161616;
  --bg-section:  #0f0f0f;
  --bg-card:     #161616;
  --bg-code:     #1a1a1a;

  --text:        #fafafa;
  --text-2:      #d4d4d4;
  --text-3:      #a3a3a3;
  --text-muted:  #737373;

  --border:      #262626;
  --border-soft: #1f1f1f;
  --border-hover:#404040;

  --accent:        #fb923c;
  --accent-dark:   #ea580c;
  --accent-light:  #1c1410;
  --accent-tint:   rgba(251, 146, 60, 0.12);
  --accent-glow:   rgba(251, 146, 60, 0.25);

  --green-bg:      #0a2014;
  --green-border:  #14532d;
  --green-text:    #4ade80;

  --blue-bg:       #0a1428;
  --blue-border:   #1e3a8a;
  --blue-text:     #60a5fa;

  --violet-bg:     #1a0e2e;
  --violet-border: #4c1d95;
  --violet-text:   #a78bfa;

  --shadow-xs:   0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.6), 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md:   0 4px 12px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-lg:   0 12px 32px rgba(0, 0, 0, 0.6), 0 4px 8px rgba(0, 0, 0, 0.4);
  --shadow-accent: 0 8px 24px rgba(251, 146, 60, 0.30);

  --header-bg-blur: rgba(10, 10, 10, 0.80);
}

/* ── RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
  background: var(--bg);
  transition: background-color 250ms var(--ease);
}

body {
  font-family: var(--font-sans);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 250ms var(--ease), color 250ms var(--ease);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 150ms var(--ease);
}
a:hover { color: var(--accent-dark); }

main a:not(.btn-cta):not(.logo):not(.related-card):not(.theme-toggle) {
  background-image: linear-gradient(var(--accent) 0 0);
  background-size: 0% 1px;
  background-position-y: calc(100% - 1px);
  background-repeat: no-repeat;
  transition: background-size 250ms var(--ease-out);
}
main a:not(.btn-cta):not(.logo):not(.related-card):not(.theme-toggle):hover {
  background-size: 100% 1px;
}

strong { font-weight: 600; color: var(--text); }
::selection { background: var(--accent); color: #fff; }

/* ── READING PROGRESS BAR ── */
.reading-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  z-index: 100;
  pointer-events: none;
}
.reading-progress::after {
  content: '';
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width 80ms linear;
}

/* ── HEADER ── */
header {
  background: var(--header-bg-blur);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
}
.header-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.logo {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  line-height: 1.2;
}
.logo:hover { opacity: 0.85; }
nav.breadcrumb {
  font-size: 0.74rem;
  color: var(--text-3);
  line-height: 1.2;
}
nav.breadcrumb a { color: var(--text-3); }
nav.breadcrumb a:hover { color: var(--accent); }
nav.breadcrumb span { margin: 0 0.35rem; color: var(--text-muted); }

/* ── THEME TOGGLE (injected by JS) ── */
.theme-toggle {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 200ms var(--ease);
  color: var(--text-2);
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(15deg);
}
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ── HERO ── */
.hero {
  position: relative;
  background: var(--bg);
  padding: 4.5rem 1.5rem 3rem;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -40%; left: 50%;
  transform: translateX(-50%);
  width: 80vw; max-width: 900px;
  height: 600px;
  background:
    radial-gradient(ellipse at 30% 50%, var(--accent-tint) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 30%, var(--violet-bg) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 80%, var(--blue-bg) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}
[data-theme="dark"] .hero::before { opacity: 0.4; }
.hero > * { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  margin-bottom: 1.5rem;
}
.hero-eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent);
}
.hero-eyebrow::after {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-3);
  max-width: 560px;
  margin: 0 auto 1.8rem;
  line-height: 1.55;
  text-wrap: balance;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-mono);
  box-shadow: var(--shadow-sm);
  letter-spacing: -0.02em;
}
.badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-tint);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--accent-tint); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

/* Hero stats trio */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 2.5rem auto 0;
  max-width: 640px;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}
.hero-stat {
  flex: 1;
  text-align: center;
  padding: 0 1rem;
  border-right: 1px solid var(--border);
}
.hero-stat:last-child { border-right: none; }
.hero-stat-num {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.5rem;
  display: block;
}
.hero-stat-label {
  font-size: 0.78rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* ── LAYOUT MAIN + TOC ── */
.article-wrapper {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 1100px) {
  .article-wrapper {
    grid-template-columns: 220px 1fr;
    gap: 60px;
    align-items: start;
  }
}

main {
  max-width: 740px;
  margin: 0;
  padding: 2.5rem 0 3rem;
  width: 100%;
}
@media (min-width: 1100px) {
  main { padding: 3rem 0 4rem; }
}

/* ── STICKY TOC ── */
.toc {
  display: none;
  position: sticky;
  top: 75px;
  padding: 3rem 0 0;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  font-size: 0.85rem;
}
@media (min-width: 1100px) {
  .toc { display: block; }
}
.toc-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
  padding-left: 14px;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--border-soft);
}
.toc-list li { margin: 0; padding: 0; }
.toc-list a {
  display: block;
  padding: 7px 0 7px 14px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--text-3);
  text-decoration: none;
  transition: all 150ms var(--ease);
  line-height: 1.4;
  font-size: 0.83rem;
}
.toc-list a:hover {
  color: var(--text);
  border-left-color: var(--border-hover);
}
.toc-list a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}

/* ── HEADINGS ── */
h2 {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.8rem 0 1.2rem;
  letter-spacing: -0.025em;
  line-height: 1.2;
  scroll-margin-top: 70px;
  text-wrap: balance;
}
h2:first-of-type { margin-top: 0.5rem; }
h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.5rem 0 0.6rem;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
p, li { color: var(--text-2); font-size: 1rem; line-height: 1.72; }
p { margin-bottom: 1.05rem; }
main > section > p:last-child { margin-bottom: 0; }

main section {
  margin-bottom: 4rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
main section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Section icon (illustration SVG inline) */
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent);
  margin-bottom: 0.8rem;
}
.section-icon svg { width: 22px; height: 22px; }

/* ── CARDS GRID ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 1.2rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  transition: all 200ms var(--ease);
  box-shadow: var(--shadow-xs);
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-icon {
  font-size: 1.6rem;
  margin-bottom: 0.7rem;
  display: inline-block;
}
.card h3 {
  font-size: 0.96rem;
  font-weight: 600;
  margin: 0 0 0.45rem;
  color: var(--text);
}
.card p {
  font-size: 0.875rem;
  color: var(--text-3);
  margin: 0;
  line-height: 1.6;
}

/* ── STAT CARDS XXL (remplacent les tableaux tarifs niveau) ── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 1.5rem 0;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.3rem;
  position: relative;
  overflow: hidden;
  transition: all 200ms var(--ease);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--stat-color, var(--accent));
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.stat-card-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 0.6rem;
}
.stat-card-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}
.stat-card-desc {
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.5;
}
.stat-card--debutant { --stat-color: #94a3b8; }
.stat-card--intermediaire { --stat-color: #38bdf8; }
.stat-card--confirme { --stat-color: var(--accent); }
.stat-card--expert { --stat-color: #7c3aed; }

/* ── TABLES (gardées pour "Prix selon le type") ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1rem 0;
  box-shadow: var(--shadow-xs);
  background: var(--bg-card);
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  font-size: 0.92rem;
}
thead tr {
  background: var(--bg-alt);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
thead th {
  padding: 0.9rem 1.1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--text-3);
}
tbody tr {
  border-bottom: 1px solid var(--border-soft);
  transition: background 150ms var(--ease);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-alt); }
tbody td {
  padding: 0.9rem 1.1rem;
  color: var(--text);
  vertical-align: middle;
}
tbody td:first-child { font-weight: 500; }
.price {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* ── SCÉNARIOS COLORÉS (vert / bleu / violet) ── */
.scenario {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
  transition: all 200ms var(--ease);
  box-shadow: var(--shadow-xs);
}
.scenario:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.scenario-header {
  padding: 1.5rem 1.6rem 1.2rem;
  background: var(--scenario-bg, var(--bg-alt));
  border-bottom: 1px solid var(--scenario-border, var(--border));
}
.scenario-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  letter-spacing: -0.02em;
}
.scenario-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--scenario-icon-bg, var(--bg-card));
  color: var(--scenario-color, var(--accent));
  font-size: 1.1rem;
  margin-right: 0.6rem;
  flex-shrink: 0;
}
.scenario-title-left {
  display: inline-flex;
  align-items: center;
}
.scenario-price {
  color: var(--scenario-color, var(--accent));
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--font-mono);
  white-space: nowrap;
  letter-spacing: -0.02em;
  padding: 0.3rem 0.7rem;
  background: var(--bg-card);
  border-radius: 999px;
  border: 1px solid var(--scenario-border, var(--border));
}
.scenario-tagline {
  font-size: 0.88rem;
  color: var(--text-3);
  font-style: italic;
  margin-top: 0.2rem;
}
.scenario-body { padding: 1.3rem 1.6rem 1.5rem; }
.scenario-list { list-style: none; padding: 0; margin: 0 0 0.8rem; }
.scenario-list li {
  font-size: 0.93rem;
  color: var(--text-2);
  padding: 0.45rem 0 0.45rem 1.7rem;
  position: relative;
  line-height: 1.55;
}
.scenario-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.75rem;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--scenario-icon-bg, var(--accent-tint));
  background-image: var(--scenario-check, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23ea580c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 6.5l2 2L9 4'/%3E%3C/svg%3E"));
  background-size: 11px;
  background-position: center;
  background-repeat: no-repeat;
}
.scenario-note {
  font-size: 0.85rem;
  color: var(--text-3);
  background: var(--bg-alt);
  border-left: 3px solid var(--scenario-color, var(--accent));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 1rem;
  margin-top: 0.8rem;
  line-height: 1.6;
}
.scenario-note strong { color: var(--text); }

/* Scénario STARTER (vert) */
.scenario--starter {
  --scenario-color: var(--green-text);
  --scenario-bg: var(--green-bg);
  --scenario-border: var(--green-border);
  --scenario-icon-bg: var(--green-border);
  --scenario-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%2315803d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 6.5l2 2L9 4'/%3E%3C/svg%3E");
}
/* Scénario STANDARD (bleu) */
.scenario--standard {
  --scenario-color: var(--blue-text);
  --scenario-bg: var(--blue-bg);
  --scenario-border: var(--blue-border);
  --scenario-icon-bg: var(--blue-border);
  --scenario-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%231d4ed8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 6.5l2 2L9 4'/%3E%3C/svg%3E");
}
/* Scénario PREMIUM (violet) */
.scenario--premium {
  --scenario-color: var(--violet-text);
  --scenario-bg: var(--violet-bg);
  --scenario-border: var(--violet-border);
  --scenario-icon-bg: var(--violet-border);
  --scenario-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%236d28d9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 6.5l2 2L9 4'/%3E%3C/svg%3E");
}

/* ── LEVIERS (liste numérotée) ── */
.leviers {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: lev;
}
.leviers li {
  font-size: 0.95rem;
  color: var(--text-2);
  padding: 1.1rem 0 1.1rem 3.2rem;
  position: relative;
  border-bottom: 1px solid var(--border-soft);
  line-height: 1.65;
}
.leviers li:last-child { border-bottom: none; }
.leviers li::before {
  counter-increment: lev;
  content: counter(lev);
  position: absolute;
  left: 0; top: 1rem;
  width: 30px; height: 30px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.88rem;
  font-family: var(--font-mono);
  border: 1px solid var(--accent-tint);
}
.leviers strong {
  color: var(--text);
  font-weight: 600;
}

/* ── CHECKLIST ── */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}
.checklist li {
  font-size: 0.95rem;
  color: var(--text-2);
  padding: 0.75rem 0 0.75rem 2.1rem;
  position: relative;
  border-bottom: 1px dashed var(--border);
  line-height: 1.6;
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: '';
  position: absolute;
  left: 0; top: 1rem;
  width: 16px; height: 16px;
  border: 1.5px solid var(--accent);
  border-radius: 4px;
  background: var(--bg);
  transition: all 150ms var(--ease);
}
.checklist li:hover::before {
  background: var(--accent-light);
}
.checklist strong { color: var(--text); }

/* ── FAQ ── */
details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
  transition: all 200ms var(--ease);
}
details:hover { border-color: var(--border-hover); }
details[open] {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
summary {
  padding: 1.15rem 1.25rem;
  font-weight: 500;
  font-size: 0.97rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--text);
  letter-spacing: -0.005em;
  user-select: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '';
  flex-shrink: 0;
  width: 18px; height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ea580c' stroke-width='2' stroke-linecap='round' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 200ms var(--ease);
}
details[open] summary::after { transform: rotate(180deg); }
details p {
  padding: 0 1.25rem 1.15rem;
  font-size: 0.93rem;
  color: var(--text-3);
  line-height: 1.7;
  margin: 0;
}

/* ── CALLOUT ── */
.callout {
  background: linear-gradient(135deg, var(--accent-light) 0%, transparent 100%);
  border: 1px solid var(--accent-tint);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.2rem 0;
  font-size: 0.93rem;
  color: var(--text-2);
}
.callout strong { color: var(--accent); }

/* ── CTA BLOCK ── */
.cta-section {
  text-align: center;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg-card) 100%);
  border: 1px solid var(--accent-tint);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  margin: 3rem 0;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -50%; left: 50%;
  transform: translateX(-50%);
  width: 80%; height: 100%;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.cta-section > * { position: relative; z-index: 1; }
.cta-section p {
  font-size: 1.05rem;
  color: var(--text-2);
  margin-bottom: 1.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.9rem 1.9rem;
  border-radius: 999px;
  transition: all 200ms var(--ease);
  box-shadow: var(--shadow-md);
  letter-spacing: -0.005em;
  text-decoration: none;
}
.btn-cta:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

/* ── "VOIR AUSSI" ── */
section[aria-label="Voir aussi"] {
  background: var(--bg-section);
  border-top: 1px solid var(--border);
  padding: 3.5rem 1.5rem;
}
.related-grid {
  max-width: 1180px;
  margin: 0 auto;
}
.related-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}
.related-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.related-card {
  display: block;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 200ms var(--ease);
  box-shadow: var(--shadow-xs);
}
.related-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.related-card span {
  display: block;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 400;
  font-family: var(--font-mono);
  margin-top: 5px;
  letter-spacing: -0.02em;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 1.8rem 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-3);
}
footer a {
  color: var(--text-3);
  margin: 0 0.65rem;
  transition: color 150ms var(--ease);
}
footer a:hover { color: var(--accent); }

/* ════════════════════════════════════════════════════════
   VERTICAL TABS — Scénarios budgétaires
   ════════════════════════════════════════════════════════ */
.scenarios-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 1.5rem 0;
}
@media (min-width: 900px) {
  .scenarios-tabs {
    grid-template-columns: 200px 1fr;
    gap: 0;
    align-items: start;
  }
}

/* ── Rail des tabs (desktop : col gauche / mobile : caché) ── */
.tabs-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (max-width: 899px) {
  .tabs-rail { display: none; }
}

.tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  width: 100%;
  transition:
    background-color 500ms var(--ease-smooth),
    border-color 500ms var(--ease-smooth),
    border-radius 400ms var(--ease-smooth),
    box-shadow 500ms var(--ease-smooth),
    transform 350ms var(--ease-smooth),
    margin 400ms var(--ease-smooth),
    padding 400ms var(--ease-smooth);
  position: relative;
  color: var(--text);
}
.tab:hover {
  border-color: var(--border-hover);
  transform: translateX(2px);
}
.tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-alt);
  font-size: 0.95rem;
  flex-shrink: 0;
  transition:
    background-color 500ms var(--ease-smooth),
    color 500ms var(--ease-smooth),
    box-shadow 500ms var(--ease-smooth),
    transform 550ms var(--ease-smooth);
}
.tab-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.tab-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.tab-price {
  font-size: 0.76rem;
  color: var(--text-3);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.tab-chevron {
  display: none;
  width: 14px; height: 14px;
  color: var(--scenario-color, var(--accent));
  flex-shrink: 0;
}
.tab.is-active .tab-chevron { display: block; }

/* Tab active : fond coloré matching le panel, jointure parfaite avec le panel */
.tab.is-active {
  background: var(--scenario-bg, var(--accent-light));
  border-color: var(--scenario-border, var(--accent-tint));
  box-shadow: var(--shadow-sm);
}
@media (min-width: 900px) {
  .tab.is-active {
    border-right-color: var(--scenario-bg, var(--accent-light));
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    margin-right: -1px;
    padding-right: calc(1rem + 4px);
    transform: translateX(0);
    z-index: 3;
  }
}
.tab.is-active .tab-icon {
  background: var(--bg-card);
  color: var(--scenario-color, var(--accent));
  box-shadow: var(--shadow-xs);
  transform: scale(1.08) rotate(-4deg);
}
.tab.is-active .tab-label { color: var(--scenario-color, var(--text)); }
.tab.is-active .tab-price { color: var(--scenario-color, var(--text-3)); opacity: 0.85; }

/* ── Panels (desktop : empilés en grid pour cross-fade fluide / mobile : tous visibles) ── */
.tab-panels {
  position: relative;
}

.tab-panel {
  background: var(--scenario-bg, var(--accent-light));
  border: 1px solid var(--scenario-border, var(--accent-tint));
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.8rem;
}

/* Desktop : grid 1×1, tous les panels empilés dans la même cellule = cross-fade naturel */
@media (min-width: 900px) {
  .tab-panels {
    display: grid;
    grid-template-areas: "stack";
  }
  .tab-panel {
    grid-area: stack;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.99);
    filter: blur(3px);
    transition:
      opacity 550ms var(--ease-smooth),
      transform 700ms var(--ease-smooth),
      filter 550ms var(--ease-smooth);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    z-index: 1;
  }
  .tab-panel.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    filter: blur(0);
    z-index: 2;
    transition:
      opacity 600ms var(--ease-smooth) 180ms,
      transform 750ms var(--ease-smooth) 180ms,
      filter 600ms var(--ease-smooth) 180ms;
  }
  /* La rail tabs s'aligne en haut, indépendante de la hauteur du panel */
  .tabs-rail {
    align-self: start;
  }
}

/* Mobile : tous visibles empilés (chacun avec son header de couleur) */
@media (max-width: 899px) {
  .tab-panel {
    margin-bottom: 12px;
  }
}

.tab-panel-header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--scenario-border);
}
.tab-panel-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--scenario-color, var(--text));
  margin: 0 0 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  letter-spacing: -0.02em;
}
.tab-panel-title-icon {
  font-size: 1.4rem;
}
.tab-panel-tagline {
  font-size: 0.93rem;
  color: var(--text-3);
  font-style: italic;
  margin: 0;
}
.tab-panel ul.tab-panel-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.tab-panel ul.tab-panel-list li {
  font-size: 0.93rem;
  color: var(--text-2);
  padding: 0.5rem 0 0.5rem 1.8rem;
  position: relative;
  line-height: 1.55;
}
.tab-panel ul.tab-panel-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.85rem;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg-card);
  background-image: var(--scenario-check, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23ea580c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 6.5l2 2L9 4'/%3E%3C/svg%3E"));
  background-size: 11px;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--scenario-border);
}
.tab-panel-note {
  font-size: 0.88rem;
  color: var(--text-2);
  background: var(--bg-card);
  border-left: 3px solid var(--scenario-color, var(--accent));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.8rem 1rem;
  margin-top: 1rem;
  line-height: 1.6;
}
.tab-panel-note strong { color: var(--scenario-color, var(--text)); }

@media (max-width: 480px) {
  .tab-panel { padding: 1.3rem 1.3rem; }
  .tab-panel-title { font-size: 1.1rem; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  main section { opacity: 1; transform: none; }
  .reading-progress::after { transition: none; }
  html { scroll-behavior: auto; }
  .badge::before { animation: none; }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero { padding: 3.5rem 1.25rem 2.5rem; }
  main { padding: 2rem 0 2.5rem; }
  h2 { font-size: 1.45rem; margin: 2.3rem 0 1.1rem; }
  h3 { font-size: 1.02rem; }
  .scenario-header { padding: 1.3rem 1.4rem 1rem; }
  .scenario-body { padding: 1.1rem 1.4rem 1.3rem; }
  .scenario-title { font-size: 1.1rem; }
  .cta-section { padding: 2.3rem 1.5rem; }
  .hero-stats { padding-top: 1.5rem; margin-top: 2rem; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  header { padding: 0 1rem; }
  .header-inner { padding: 0.75rem 0; }
  .hero { padding: 2.5rem 1rem 2rem; }
  .hero-eyebrow { font-size: 0.72rem; margin-bottom: 1.2rem; }
  .hero h1 { font-size: 1.65rem; letter-spacing: -0.025em; }
  .hero-subtitle { font-size: 0.95rem; }
  .badge { font-size: 0.88rem; padding: 0.5rem 1.1rem; }
  .hero-stats { flex-direction: column; gap: 1rem; padding-top: 1.5rem; }
  .hero-stat { border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
  .hero-stat:last-child { border-bottom: none; padding-bottom: 0; }
  .article-wrapper { padding: 0 1rem; }
  main { padding: 1.8rem 0 2.2rem; }
  h2 { font-size: 1.3rem; margin: 2.2rem 0 1rem; }
  .cards { grid-template-columns: 1fr; gap: 10px; }
  .card { padding: 1.2rem 1.1rem; }
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 1.2rem 1rem; }
  .stat-card-value { font-size: 1.3rem; }
  .scenario-header { padding: 1.2rem 1.2rem 0.9rem; }
  .scenario-body { padding: 1rem 1.2rem 1.2rem; }
  .scenario-title { font-size: 1rem; gap: 0.5rem; }
  .scenario-icon { width: 32px; height: 32px; }
  .scenario-price { font-size: 0.9rem; padding: 0.25rem 0.6rem; }
  .leviers li { padding: 1rem 0 1rem 2.7rem; font-size: 0.92rem; }
  .leviers li::before { width: 26px; height: 26px; font-size: 0.82rem; top: 0.95rem; }
  .cta-section { padding: 2.2rem 1.3rem; border-radius: var(--radius); }
  .btn-cta { padding: 0.8rem 1.6rem; font-size: 0.95rem; }
  thead th, tbody td { padding: 0.7rem 0.9rem; font-size: 0.85rem; }
  .table-wrap { position: relative; }
  .table-wrap::after {
    content: '→';
    position: absolute;
    top: 50%; right: 8px;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 1.1rem;
    pointer-events: none;
    opacity: 0.5;
  }
}
