/* Lebrutennet.fr — single-page calculator + pillar
   Design v3 : marketing storytelling */

:root {
  --bg: #f7f9ff;
  --surface: #ffffff;
  --text: #111831;
  --muted: #68708a;
  --line: rgba(31, 42, 75, .10);
  --line-strong: rgba(31, 42, 75, .18);
  --primary: #635bff;
  --primary-2: #3d45ff;
  --primary-soft: #eef0ff;
  --primary-softer: #f5f5ff;
  --green: #10b981;
  --green-soft: #e8fbf4;
  --orange: #ff7849;
  --orange-soft: #fff1eb;
  --red: #ef4444;
  --shadow: 0 20px 60px rgba(40, 52, 100, .12);
  --shadow-soft: 0 10px 30px rgba(40, 52, 100, .08);
  --radius: 24px;
  --radius-sm: 14px;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 88% 4%, rgba(99,91,255,.16), transparent 28%),
    radial-gradient(circle at 8% 12%, rgba(125, 151, 255, .14), transparent 30%),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 50%, #fff 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
button { font-family: inherit; cursor: pointer; }
img, svg { max-width: 100%; height: auto; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.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;
}

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 16px; top: 12px; z-index: 999;
  padding: 10px 16px; background: var(--primary); color: white;
  border-radius: 8px; font-weight: 700;
}

/* ==================== HEADER ==================== */
.nav {
  height: 76px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
@supports (backdrop-filter: blur(20px)) {
  .nav { background: rgba(255,255,255,.78); backdrop-filter: blur(20px); }
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

/* ==================== LOGO — wordmark seul, accents violets ==================== */
.brand-logo {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  color: #1a2244;
  line-height: 1;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.brand-logo:hover { color: #1a2244; }

.brand-word {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -.04em;
}

/* Accents violets sur "brut" et "net" — même dégradé que le H1 */
.brand-accent {
  background: linear-gradient(135deg, #6f67ff 0%, #2e37ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

.brand-tld {
  color: var(--muted);
  font-weight: 600;
  font-size: .82em;
  margin-left: 1px;
  letter-spacing: -.02em;
}

/* Variante petite (footer) */
.brand-logo--sm .brand-word { font-size: 19px; }

/* Conserve un fallback pour les anciens .brand génériques */
.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
}
.brand:hover { color: var(--text); }

.menu {
  display: flex;
  gap: 36px;
  margin: 0 auto;
  font-size: 14px;
  color: #2c344f;
  font-weight: 500;
}
.menu a { padding: 6px 0; position: relative; }
.menu a:hover { color: var(--primary); }

.nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}
.nav-badge svg {
  width: 14px; height: 14px;
}

/* ==================== HERO ==================== */
.hero {
  padding: 56px 0 36px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 480px;
  gap: 64px;
  align-items: start;
}

.hero-text {
  padding-top: 8px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 26px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}
.kicker svg { width: 14px; height: 14px; }

h1 {
  margin: 0;
  font-size: clamp(42px, 6.1vw, 72px);
  line-height: 1.04;
  letter-spacing: -.045em;
  font-weight: 680;
}
h1 span {
  background: linear-gradient(135deg, #6f67ff 0%, #2e37ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 760;
}

.updated {
  margin: 18px 0 0;
  font-size: 13px;
  color: #6b7390;
  letter-spacing: -0.005em;
}
.updated time {
  font-weight: 600;
  color: #2a3050;
}
.updated a {
  color: #4f47e6;
  text-decoration: none;
  border-bottom: 1px solid rgba(79, 71, 230, 0.25);
  transition: border-color .15s ease;
}
.updated a:hover {
  border-bottom-color: #4f47e6;
}

.subtitle {
  margin: 20px 0 36px;
  color: #4e5875;
  font-size: 16px;
  line-height: 1.7;
  max-width: 520px;
}

.trust-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}
.trust-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: center;
}
.trust-icon-wrap {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}
.trust-icon-wrap svg { width: 20px; height: 20px; }
.trust-list strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}
.trust-list small {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 2px;
}

/* ==================== CALC CARD ==================== */
.hero-calc-wrap {
  position: relative;
}
.hero-deco {
  position: absolute;
  top: 30px; left: -40px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,91,255,.08), transparent 65%);
  z-index: 0;
  pointer-events: none;
}

.calc-card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.calc-title {
  margin: 0 0 22px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.012em;
}

.label {
  display: block;
  font-size: 13px;
  color: #454e6a;
  margin: 0 0 8px;
  font-weight: 600;
}

.input, .select {
  width: 100%;
  height: 54px;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  background: white;
  padding: 0 16px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  outline: none;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  margin-bottom: 18px;
}
.input:focus, .select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99,91,255,.15);
}

.input-large {
  height: 64px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2368708a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
}

.input-row { position: relative; margin-bottom: 18px; }
.input-row .input { margin-bottom: 0; }
.currency {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 700;
  font-size: 18px;
  pointer-events: none;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 60px;
  border: 0;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  font-family: inherit;
  transition: transform .12s, box-shadow .15s;
  letter-spacing: -.005em;
  text-decoration: none;
}
.btn-primary {
  color: white;
  background: linear-gradient(135deg, #6e63ff, #3943ff);
  box-shadow: 0 18px 40px rgba(72, 76, 255, .30);
  margin-top: 10px;
}
.btn-primary:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 22px 48px rgba(72, 76, 255, .38);
}
.btn-icon { width: 18px; height: 18px; }

.form-error {
  margin: 14px 0 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
}

.form-stale-msg {
  margin: 14px 0 0;
  padding: 10px 14px;
  background: var(--orange-soft);
  border: 1px solid #ffd9c5;
  border-radius: 10px;
  color: #b03d12;
  font-size: 13px;
  display: none;
}
body.has-result.is-stale .form-stale-msg { display: block; }

.secure {
  margin: 14px 0 0;
  text-align: center;
  color: #8a92a8;
  font-size: 12px;
}
.secure::before {
  content: "•";
  color: var(--green);
  margin-right: 6px;
  font-size: 16px;
  vertical-align: middle;
}

/* ==================== RESULTS (révélés via body.has-result) ==================== */
.results {
  display: none;
  padding: 32px 0;
}
body.has-result .results {
  display: block;
  animation: revealUp .5s cubic-bezier(.4,.2,.2,1);
}
@keyframes revealUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-headline {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
  margin-bottom: 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.card-eyebrow {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.net-card { padding: 32px 36px; }
.cout-card {
  padding: 32px 36px;
  background: linear-gradient(135deg, #fff8f3, #fff);
  border-color: #ffd5be;
  position: relative;
  overflow: hidden;
}
.cout-card::before {
  content: "";
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,120,73,.15), transparent 70%);
  top: -60px; right: -60px;
}

.big-number {
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 850;
  letter-spacing: -.05em;
  line-height: 1;
  color: var(--text);
}
.big-number.cout { color: var(--orange); }
.big-sub {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
}
.big-sub strong { color: var(--text); font-weight: 700; }
.cout-note {
  margin: 6px 0 0;
  color: #b03d12;
  font-size: 13px;
  font-weight: 700;
}

.compare-block { margin-bottom: 32px; }
.block-head { margin-bottom: 22px; }
.block-head h2 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -.022em; }
.block-head p { margin: 0; color: var(--muted); font-size: 15px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 22px 20px;
  cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(99, 91, 255, .14);
}
.stat-card small { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat-card strong { font-size: 26px; font-weight: 850; letter-spacing: -.03em; margin-top: 2px; }
.stat-pct, .stat-cout { font-size: 12px; color: var(--muted); }
.stat-cout { margin-top: 6px; }
.stat-card.is-current {
  background: linear-gradient(135deg, var(--primary-soft), #f5f3ff);
  border-color: var(--primary);
  box-shadow: 0 14px 30px rgba(99, 91, 255, .16);
}
.stat-card.is-current::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 2px solid var(--primary);
  pointer-events: none;
}
.stat-card.is-current strong { color: var(--primary); }

.split-block {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 22px;
  margin-bottom: 32px;
}
.split-card { padding: 30px 32px; }
.split-card h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; letter-spacing: -.012em; }
.split-sub { margin: 0 0 22px; color: var(--muted); font-size: 14px; }

.donut-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: center;
  margin-top: 14px;
}
.donut-svg { width: 220px; height: 220px; display: block; }
.donut-svg .donut-track { stroke: #eceffb; }
.donut-svg .seg-net { stroke: var(--primary); transition: stroke-dasharray .6s ease; }
.donut-svg .seg-cot { stroke: #c5cdf0; transition: stroke-dasharray .6s ease, stroke-dashoffset .6s ease; }
.donut-label { font-size: 8px; font-weight: 800; fill: var(--text); }
.donut-sub { font-size: 3px; fill: var(--muted); font-weight: 600; }

.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.donut-legend li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #2c344f; }
.donut-legend strong { font-weight: 700; }
.donut-legend small { color: var(--muted); margin-left: 4px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-net { background: var(--primary); }
.dot-cot { background: #c5cdf0; }

.money-flow { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 14px; }
.flow-row {
  display: grid;
  grid-template-columns: 14px 110px 1fr 70px 50px;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}
.flow-dot { width: 10px; height: 10px; border-radius: 50%; }
.flow-label { font-weight: 600; color: #2c344f; }
.flow-bar { height: 10px; background: #f0f2fa; border-radius: 999px; overflow: hidden; }
.flow-bar > span { display: block; height: 100%; border-radius: inherit; transition: width .5s ease; }
.flow-amount { text-align: right; font-weight: 700; color: var(--text); }
.flow-pct { text-align: right; color: var(--muted); font-size: 12px; }

.detail-toggle { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 14px; }
.detail-toggle summary {
  cursor: pointer; font-size: 13px; font-weight: 700; color: var(--primary); list-style: none;
}
.detail-toggle summary::-webkit-details-marker { display: none; }
.detail-toggle summary::before { content: "▸ "; transition: transform .2s; display: inline-block; }
.detail-toggle[open] summary::before { transform: rotate(90deg); }
.detail-list { margin-top: 12px; }
.detail-list .line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  align-items: center;
}
.detail-list .line:last-child { border-bottom: 0; }
.detail-list .line strong { color: var(--text); font-weight: 700; min-width: 70px; text-align: right; }
.detail-list .line span:last-child { color: var(--muted); min-width: 50px; text-align: right; }

.sim-card { padding: 30px 32px; }
.sim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.sim-controls { display: flex; flex-direction: column; gap: 20px; }
.sim-line { display: flex; align-items: center; gap: 14px; }
.round-btn {
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: white;
  font-size: 22px;
  font-weight: 700;
  color: #263052;
  flex-shrink: 0;
  transition: border-color .15s, color .15s;
}
.round-btn:hover { border-color: var(--primary); color: var(--primary); }

.sim-track { flex: 1; position: relative; height: 60px; }
input[type="range"][data-sim="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--primary) 0%, var(--primary) 33%, #dfe3f4 33%, #dfe3f4 100%);
  outline: none;
  margin: 18px 0 0;
}
input[type="range"][data-sim="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary);
  border: 4px solid white;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(99,91,255,.40);
}
input[type="range"][data-sim="range"]::-moz-range-thumb {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--primary);
  border: 4px solid white;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(99,91,255,.40);
}

.sim-bubble {
  position: absolute;
  bottom: 32px;
  left: 33%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(99,91,255,.35);
  pointer-events: none;
  transition: left .12s;
}
.sim-bubble::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px; height: 8px;
  background: var(--primary);
}

.sim-scale { display: flex; justify-content: space-between; margin-top: 10px; font-size: 11px; color: var(--muted); }
.sim-gain { text-align: center; font-size: 14px; color: var(--muted); }
.sim-gain strong {
  display: block; font-size: 32px; font-weight: 850;
  letter-spacing: -.04em; margin-top: 4px;
}
.cmp-pos { color: var(--green); }
.cmp-neg { color: var(--red); }

.sim-table {
  background: rgba(255,255,255,.65);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
}
.cmp-row {
  display: grid;
  grid-template-columns: 1fr 100px 100px 80px;
  gap: 8px;
  padding: 9px 0;
  align-items: center;
  font-size: 14px;
}
.cmp-row.cmp-head {
  color: var(--muted); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em;
  padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.cmp-row strong { font-weight: 700; }
.cmp-delta { font-weight: 700; text-align: right; color: var(--muted); }

/* ==================== TOC CARD ==================== */
.toc-section {
  padding: 28px 0 24px;
}
.toc-card {
  background: linear-gradient(135deg, var(--primary-softer), #f7f8ff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 40px;
}
.toc-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
}
.toc-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: white;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--primary);
}
.toc-icon svg { width: 20px; height: 20px; }
.toc-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.018em; }
.toc-intro { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.toc-grid {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 28px;
}
.toc-grid li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: center;
  font-size: 14px;
  line-height: 1.4;
}
.toc-grid .num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 13px;
}
.toc-grid a {
  color: #2c344f;
  font-weight: 600;
}
.toc-grid a:hover { color: var(--primary); }

.outline-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.outline-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(99,91,255,.18);
}
.outline-btn svg { width: 16px; height: 16px; }
.outline-btn--small { padding: 8px 16px; font-size: 13px; }

.toc-cta {
  display: flex;
  margin: 0 auto;
  width: max-content;
}

/* ==================== PILLAR ==================== */
.pillar {
  padding: 32px 0;
}

.pillar-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 92px;
}
.pillar-section:last-of-type { border-bottom: 0; }

.section-header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
}
.section-num {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -.02em;
}
.section-header h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -.026em;
  line-height: 1.18;
  padding-top: 4px;
}

.section-body p,
.section-body li {
  font-size: 16px;
  line-height: 1.75;
  color: #2c344f;
  margin: 0 0 14px;
}
.section-body h3 {
  margin: 28px 0 10px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -.01em;
  color: var(--primary);
}
.section-body ul, .section-body ol { padding-left: 22px; margin: 0 0 14px; }
.section-body a { color: var(--primary); text-decoration: underline; }
.section-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 22px;
  font-size: 14px;
}
.section-body th, .section-body td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
}
.section-body th { background: var(--primary-soft); color: var(--primary); font-weight: 700; }

.section-body .callout {
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: 8px;
  margin: 22px 0;
  color: #2c344f;
}
.section-body .callout strong {
  color: var(--primary);
  display: block;
  margin-bottom: 6px;
}

/* Layout zigzag : image alterne gauche/droite avec le texte */
.section-body--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 56px;
  align-items: center;
}
.section-body--image-left {
  grid-template-columns: 440px minmax(0, 1fr);
}
.section-body--image-left .section-image { order: 1; }
.section-body--image-left .section-text { order: 2; }
.section-body--image-right .section-image { order: 2; }
.section-body--image-right .section-text { order: 1; }

.section-side {
  position: relative;
}

.section-image {
  position: relative;
}
.section-image figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #fff, #f7f8ff);
  box-shadow: 0 24px 56px rgba(40, 52, 100, .14);
}
.section-image img {
  display: block;
  width: 100%;
  aspect-ratio: 1586 / 992;
  object-fit: cover;
}
.section-image figcaption {
  margin: 0;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  background: rgba(255,255,255,.82);
}
.section-image > img {
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 56px rgba(40, 52, 100, .14);
}

/* Sections text-only : alignement avec H2 (après section-num), full width */
.section-body--text {
  margin-left: 72px;
}
@media (max-width: 980px) {
  .section-body--text { margin-left: 0; }
}

.pillar-visual {
  margin: 28px 0 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #f7f8ff);
  box-shadow: 0 18px 44px rgba(40, 52, 100, .10);
}

.pillar-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 1586 / 992;
  object-fit: cover;
}

.pillar-visual figcaption {
  margin: 0;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  background: rgba(255,255,255,.82);
}

.section-cta {
  margin-top: 20px;
  margin-left: 72px;  /* aligné avec le texte (after section-num) */
}

/* ==================== BULLETIN MOCK (§1) ==================== */
.bulletin-mock {
  position: relative;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 28px;
  box-shadow: 0 24px 50px rgba(40, 52, 100, .12);
  z-index: 1;
}
.bulletin-deco {
  position: absolute;
  inset: 24px -24px -16px 24px;
  background: radial-gradient(circle at 30% 30%, rgba(99,91,255,.10), transparent 60%);
  border-radius: 20px;
  z-index: -1;
}

.bulletin-title {
  margin: 0 0 22px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
}
.bulletin-rows { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bulletin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.bulletin-row:last-of-type { border-bottom: 0; }
.bulletin-row dt { margin: 0; color: #2c344f; font-weight: 500; }
.bulletin-row dd { margin: 0; font-weight: 700; color: var(--text); font-size: 15px; }
.bulletin-row dd.negative { color: #b94747; }

.bulletin-row--highlight {
  background: var(--primary-soft);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 4px -4px;
  border-bottom: 0 !important;
}
.bulletin-row--highlight dt { color: var(--primary); font-weight: 700; }
.bulletin-row--highlight dd { color: var(--primary); font-size: 17px; }

.bulletin-skeleton {
  height: 12px;
  background: linear-gradient(90deg, #eef0fa, #f6f7fc);
  border-radius: 999px;
  margin-top: 14px;
}
.bulletin-skeleton--short { width: 60%; }

/* ==================== STATS BAND ==================== */
.stats-band {
  padding: 56px 0;
  background: linear-gradient(180deg, transparent, var(--primary-softer));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.stat-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: white;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--primary);
}
.stat-icon svg { width: 26px; height: 26px; }
.stat-num {
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 850;
  color: var(--primary);
  letter-spacing: -.04em;
  line-height: 1;
  margin: 6px 0;
}
.stat-label {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

/* ==================== FAQ BAND COMPACT ==================== */
.faq-band {
  padding: 56px 0;
}
.faq-band-head {
  margin-bottom: 32px;
}
.faq-band-head h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.024em;
}
.faq-band-sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.faq-group {
  margin: 28px 0 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--primary);
}
.faq-group:first-of-type { margin-top: 0; }
.faq-pills {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.faq-pill {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  transition: border-color .15s, box-shadow .15s;
}
.faq-pill[open], .faq-pill:hover { border-color: var(--primary); }
.faq-pill[open] { box-shadow: 0 8px 22px rgba(99,91,255,.10); }
.faq-pill summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-size: 14px;
  font-weight: 700;
  color: #2c344f;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-pill summary::-webkit-details-marker { display: none; }
.faq-pill summary::after {
  content: "";
  width: 14px; height: 14px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2368708a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") center/contain no-repeat;
  transition: transform .2s;
  flex-shrink: 0;
}
.faq-pill[open] summary::after { transform: rotate(180deg); }
.faq-pill p {
  margin: 0;
  padding: 0 22px 18px;
  color: #4e5875;
  font-size: 14px;
  line-height: 1.65;
}

/* FAQ longue (in pillar §12) — réutilise les styles compacts */
.pillar-section .faq-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 10px;
  padding: 0;
}
.pillar-section .faq-card summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-size: 14px;
  font-weight: 700;
  color: #2c344f;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.pillar-section .faq-card summary::-webkit-details-marker { display: none; }
.pillar-section .faq-card summary::after {
  content: "";
  width: 14px; height: 14px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2368708a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") center/contain no-repeat;
  transition: transform .2s;
  flex-shrink: 0;
}
.pillar-section .faq-card[open] summary::after { transform: rotate(180deg); }
.pillar-section .faq-card p {
  margin: 0;
  padding: 0 22px 18px;
  color: #4e5875;
  font-size: 14px;
  line-height: 1.65;
}

/* ==================== CTA BAND ==================== */
.cta-band {
  padding: 30px 0 60px;
}
.cta-band-grid {
  background: linear-gradient(135deg, var(--primary-softer), #f6f5ff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 36px;
  align-items: center;
}
.cta-band-grid h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: -.022em;
  line-height: 1.25;
}
.cta-band-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.cta-band-action { text-align: right; }
.cta-band-action .btn {
  display: inline-flex;
  width: auto;
  padding: 0 32px;
}
.cta-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.cta-note::before {
  content: "✓";
  color: var(--green);
  margin-right: 6px;
  font-weight: 800;
}

/* ==================== FOOTER ==================== */
.footer {
  position: relative;
  margin-top: 32px;
  padding: 60px 0 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(244,245,255,.85));
  border-top: 1px solid var(--line);
}
.footer::before {
  content: "";
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: min(140px, 30%);
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  border-radius: 999px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-col--brand { padding-right: 12px; }

.footer-tagline {
  margin: 18px 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  max-width: 320px;
}

.footer-social {
  display: flex;
  gap: 10px;
}
.footer-social a {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: white;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: border-color .15s, color .15s, transform .15s, background .15s;
}
.footer-social a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}
.footer-social svg { width: 16px; height: 16px; }

.footer h4 {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #38425e;
}

.footer-col a {
  display: block;
  color: #4e5875;
  font-size: 14px;
  line-height: 2.1;
  transition: color .12s, transform .12s;
}
.footer-col a:hover {
  color: var(--primary);
  transform: translateX(2px);
}

.footer-bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  color: #8b93aa;
  font-size: 12px;
}
.footer-copy { text-align: left; }

.footer-sources {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: center;
  text-align: center;
}
.footer-sources svg { width: 13px; height: 13px; color: var(--primary); }

.footer-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}
.footer-flag svg {
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* ==================== HOWTO BAND (entre results et TOC) ==================== */
.howto-band {
  padding: 32px 0 12px;
}
.howto-grid {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  box-shadow: var(--shadow-soft);
}
.howto-grid h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.035em;
}
.howto-grid h3 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
}
.howto-grid p {
  margin: 0;
  color: #2c344f;
  font-size: 15px;
  line-height: 1.7;
}
.howto-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: howto;
}
.howto-list li {
  counter-increment: howto;
  position: relative;
  padding-left: 38px;
  margin-bottom: 14px;
  font-size: 14px;
  color: #2c344f;
  line-height: 1.6;
}
.howto-list li::before {
  content: counter(howto);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 13px;
}
.howto-grid a { color: var(--primary); text-decoration: underline; }

@media (max-width: 980px) {
  .howto-grid { grid-template-columns: 1fr; padding: 28px 24px; gap: 24px; }
}

/* ==================== POPULAR AMOUNTS (home → derived pages) ==================== */
.popular-band {
  padding: 36px 0;
}
.popular-band .container {
  background: linear-gradient(135deg, #fff, #f9faff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 40px;
  box-shadow: var(--shadow-soft);
}
.popular-head {
  margin-bottom: 28px;
}
.popular-head h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.035em;
}
.popular-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  max-width: 700px;
}
.popular-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}
@media (max-width: 1080px) {
  .popular-cols { grid-template-columns: 1fr 1fr; }
}
.popular-col h3 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--primary);
}
.popular-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}
.popular-list a {
  display: block;
  padding: 8px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #2c344f;
  font-weight: 600;
  font-size: 13px;
  transition: border-color .12s, color .12s;
}
.popular-list a:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.popular-footer {
  margin: 24px 0 0;
  text-align: center;
}
.popular-footer a {
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
}

@media (max-width: 980px) {
  .popular-band .container { padding: 28px 24px; }
  .popular-cols { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 560px) {
  .popular-list { grid-template-columns: 1fr; }
}

/* ==================== AMOUNT PAGES (programmatic SEO) ==================== */
.amount-page {
  padding: 32px 0 64px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-top: 28px;
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }

.amount-hero {
  margin-bottom: 48px;
}
.amount-hero h1 {
  font-size: clamp(32px, 4.5vw, 52px);
  margin: 16px 0 18px;
  letter-spacing: -.05em;
  font-weight: 800;
  line-height: 1.05;
}
.amount-sub {
  font-size: 17px;
  color: #4e5875;
  margin: 0 0 28px;
  max-width: 700px;
}
.amount-headline {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}
.amount-result-card,
.amount-cout-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 36px;
  box-shadow: var(--shadow-soft);
}
.amount-cout-card {
  background: linear-gradient(135deg, #fff8f3, #fff);
  border-color: #ffd5be;
  position: relative;
  overflow: hidden;
}
.amount-cout-card::before {
  content: "";
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,120,73,.15), transparent 70%);
  top: -60px; right: -60px;
}
.amount-result-card .big-number,
.amount-cout-card .big-number {
  font-size: clamp(40px, 5vw, 60px);
}
.amount-note {
  margin: 0;
  padding: 14px 18px;
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  color: #2c344f;
  font-size: 14px;
}

.amount-statuts {
  margin-bottom: 48px;
}
.amount-statuts h2,
.amount-narrative h2,
.amount-breakdown h2,
.amount-related h2,
.amount-context h2 {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 800;
  letter-spacing: -.035em;
  margin: 0 0 12px;
}
.amount-statuts-sub {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 20px;
}
.amount-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.amount-stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 22px 20px;
  text-decoration: none;
  color: var(--text);
  transition: transform .15s, border-color .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.amount-stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(99, 91, 255, .14);
}
.amount-stat-card small {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.amount-stat-card strong {
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -.03em;
  margin-top: 2px;
}
.amount-stat-card .stat-pct,
.amount-stat-card .stat-cout {
  font-size: 12px;
  color: var(--muted);
}
.amount-stat-card .stat-cout { margin-top: 6px; }

.amount-narrative,
.amount-breakdown,
.amount-context {
  margin-bottom: 40px;
  max-width: 880px;
}
.amount-narrative p,
.amount-breakdown p,
.amount-context p {
  font-size: 16px;
  line-height: 1.75;
  color: #2c344f;
  margin: 0 0 14px;
}
.amount-context a { color: var(--primary); text-decoration: underline; }

.amount-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14px;
}
.amount-table th,
.amount-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
}
.amount-table th {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}
.amount-table tr.total td {
  background: #fafbff;
  border-top: 2px solid var(--primary);
}
.amount-table tr.net-row td {
  background: var(--green-soft);
  color: #08772d;
  font-weight: 700;
}

.amount-cta-band {
  background: linear-gradient(135deg, var(--primary-softer), #f6f5ff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 48px;
}
.amount-cta-band h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.03em;
}
.amount-cta-band p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.amount-cta-band .btn {
  display: inline-flex;
  width: auto;
  padding: 0 28px;
  margin: 0;
  justify-self: end;
}

.amount-related {
  margin-bottom: 48px;
}
.amount-related-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 22px;
}
.amount-related-grid a {
  display: block;
  padding: 12px 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #2c344f;
  font-weight: 600;
  font-size: 14px;
  transition: border-color .15s, color .15s;
}
.amount-related-grid a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

@media (max-width: 980px) {
  .amount-headline { grid-template-columns: 1fr; }
  .amount-stat-grid { grid-template-columns: 1fr 1fr; }
  .amount-cta-band { grid-template-columns: 1fr; padding: 28px 24px; gap: 18px; }
  .amount-cta-band .btn { justify-self: start; }
  .amount-related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .amount-stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .amount-stat-card strong { font-size: 20px; }
  .amount-related-grid { grid-template-columns: 1fr; }
}

/* ==================== ARTICLE PAGES (legal/about) ==================== */
.article-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 22px 60px;
}
.article-wrap h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 12px; }
.article-meta { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.article-wrap h2 { font-size: 22px; margin: 32px 0 12px; font-weight: 700; letter-spacing: -.015em; }
.article-wrap h3 { font-size: 17px; margin: 22px 0 10px; font-weight: 650; letter-spacing: -.006em; }
.article-wrap p, .article-wrap li {
  font-size: 16px; line-height: 1.7; color: #2c344f; margin: 0 0 14px;
}
.article-wrap ul, .article-wrap ol { padding-left: 22px; }
.article-wrap a { color: var(--primary); text-decoration: underline; }
.callout {
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  padding: 14px 18px;
  border-radius: 8px;
  margin: 20px 0;
}
.callout strong { color: var(--primary); display: block; margin-bottom: 4px; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-deco { display: none; }
  .toc-grid { grid-template-columns: repeat(2, 1fr); }
  .section-body--split,
  .section-body--image-left,
  .section-body--image-right { grid-template-columns: 1fr; gap: 36px; }
  .section-body--split .section-image,
  .section-body--split .section-text { order: 0; }
  .section-side, .section-image { max-width: 480px; margin: 0 auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .menu, .nav-badge { display: none; }
  .nav-inner { justify-content: space-between; }
  .result-headline { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .split-block { grid-template-columns: 1fr; }
  .donut-wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .sim-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-bottom {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 10px;
  }
  .footer-copy, .footer-sources, .footer-flag {
    justify-self: center;
    text-align: center;
  }
  .flow-row { grid-template-columns: 14px 1fr 70px; }
  .flow-bar, .flow-pct { display: none; }
  .toc-grid { grid-template-columns: 1fr; gap: 10px 0; }
  .toc-card { padding: 28px 24px; }
  .cta-band-grid { grid-template-columns: 1fr; padding: 32px 24px; gap: 22px; }
  .cta-band-action { text-align: center; }
  .section-cta { margin-left: 0; }
  .section-header { gap: 16px; }
  .section-num { width: 40px; height: 40px; font-size: 16px; }
  .faq-pills { grid-template-columns: 1fr; }
  .faq-band-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .container { width: min(calc(100% - 24px), var(--max)); }
  h1 { font-size: 38px; }
  .input-large { font-size: 22px; height: 58px; }
  .calc-card { padding: 22px; }
  .net-card, .cout-card { padding: 24px; }
  .big-number { font-size: 44px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 18px 16px; }
  .stat-card strong { font-size: 22px; }
  .split-card, .sim-card { padding: 22px; }
  .cmp-row { grid-template-columns: 1fr 1fr; font-size: 13px; }
  .cmp-row.cmp-head { display: none; }
  .stats-grid { gap: 24px 12px; }
  .footer-grid { grid-template-columns: 1fr; }
  .pillar-section { padding: 36px 0; }
  .section-body--split { gap: 24px; }
}

/* ==================== RESPONSIVE REFINEMENTS ==================== */

/* Évite les débordements grid : forcer min-width:0 sur les enfants des grilles */
.hero-grid > *,
.result-headline > *,
.split-block > *,
.sim-grid > *,
.stat-grid > *,
.cta-band-grid > *,
.howto-grid > *,
.amount-headline > *,
.amount-cta-band > *,
.amount-stat-grid > *,
.footer-grid > *,
.toc-grid > *,
.popular-cols > *,
.section-body--split > * { min-width: 0; }

/* Le kicker doit pouvoir wrapper sur mobile sans casser */
.kicker { flex-wrap: wrap; max-width: 100%; }

/* Logo de la nav : on ne fixe plus une width (wordmark texte) */
header.nav .brand-logo { width: auto; }

/* Titres internes (block-head) : éviter les débordements */
.block-head h2 { word-wrap: break-word; }

/* ===== Tablette (≤1080px) ===== */
@media (max-width: 1080px) {
  .calc-card { max-width: 560px; margin: 0 auto; }
  .hero-calc-wrap { display: flex; justify-content: center; }
}

/* ===== Tablette/grand mobile (≤980px) ===== */
@media (max-width: 980px) {
  .nav { height: 68px; }
  .brand-word { font-size: 21px; }
  .hero { padding: 40px 0 28px; }
  .pillar-section { padding: 40px 0; scroll-margin-top: 84px; }
  .toc-section { padding: 24px 0 18px; }
  .calc-card { padding: 28px; }
  .stats-band { padding: 44px 0; }
  .faq-band { padding: 44px 0; }
  .cta-band { padding: 22px 0 50px; }
  .cmp-row { grid-template-columns: 1fr 90px 90px 70px; gap: 6px; font-size: 13px; }
}

/* ===== Tables : scroll horizontal sur petit écran ===== */
@media (max-width: 720px) {
  .section-body table,
  .amount-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
  }
  .section-body table th,
  .section-body table td,
  .amount-table th,
  .amount-table td {
    border-left: 0;
    border-right: 0;
    padding: 9px 11px;
    white-space: nowrap;
  }
  .section-body table th:first-child,
  .section-body table td:first-child,
  .amount-table th:first-child,
  .amount-table td:first-child {
    white-space: normal;
    min-width: 140px;
  }
}

/* ===== Mobile (≤560px) : ergonomie & lisibilité ===== */
@media (max-width: 560px) {
  /* Nav */
  .nav { height: 60px; }
  .brand-word { font-size: 19px; }

  /* Hero */
  .hero { padding: 26px 0 18px; }
  .kicker { padding: 6px 12px; font-size: 12px; margin-bottom: 18px; }
  h1 { font-size: 34px; line-height: 1.08; letter-spacing: -.04em; }
  .updated { font-size: 12px; margin-top: 14px; }
  .subtitle { font-size: 15px; line-height: 1.65; margin: 16px 0 26px; }
  .trust-list { gap: 14px; }
  .trust-list li { grid-template-columns: 38px 1fr; gap: 12px; }
  .trust-icon-wrap { width: 38px; height: 38px; border-radius: 10px; }
  .trust-list strong { font-size: 13px; }
  .trust-list small { font-size: 12px; }

  /* Calc card */
  .calc-card { padding: 20px; border-radius: 18px; }
  .calc-title { font-size: 17px; margin-bottom: 18px; }
  .label { font-size: 12px; }
  .input, .select { height: 50px; font-size: 14px; margin-bottom: 14px; padding: 0 14px; }
  .select { padding-right: 38px; }
  .input-large { font-size: 22px; height: 58px; padding: 0 14px; padding-right: 38px; }
  .input-row { margin-bottom: 14px; }
  .input-row .currency { right: 14px; font-size: 16px; }
  .btn { height: 56px; font-size: 15px; border-radius: 12px; }
  .secure { font-size: 11px; }
  .form-error, .form-stale-msg { font-size: 12px; }

  /* Result headline cards */
  .net-card, .cout-card { padding: 22px; border-radius: 18px; }
  .big-number { font-size: 40px; }
  .big-sub { font-size: 14px; margin-top: 10px; }
  .card-eyebrow { font-size: 12px; margin-bottom: 12px; letter-spacing: .015em; }
  .cout-card::before { width: 140px; height: 140px; top: -40px; right: -40px; }

  /* Stats grid (comparateur) */
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 16px 14px; }
  .stat-card small { font-size: 12px; }
  .stat-card strong { font-size: 20px; }
  .stat-pct, .stat-cout { font-size: 11px; }

  /* Split / sim cards */
  .split-card, .sim-card { padding: 22px; border-radius: 18px; }
  .split-card h2, .sim-card h2, .block-head h2 { font-size: 19px; }
  .split-sub, .block-head p { font-size: 13px; }
  .compare-block, .split-block { margin-bottom: 22px; }

  /* Donut */
  .donut-wrap { grid-template-columns: 1fr; gap: 18px; }
  .donut-svg { width: 180px; height: 180px; }
  .donut-legend li { font-size: 13px; }

  /* Money flow */
  .flow-row { grid-template-columns: 12px 1fr auto; gap: 10px; font-size: 13px; }
  .flow-amount { font-size: 13px; }

  /* Detail list */
  .detail-list .line { grid-template-columns: 1fr auto auto; font-size: 12px; gap: 8px; padding: 8px 0; }
  .detail-list .line strong { min-width: 60px; }
  .detail-list .line span:last-child { min-width: 40px; }
  .detail-toggle summary { font-size: 12px; }

  /* Simulateur */
  .sim-grid { gap: 18px; }
  .sim-line { gap: 8px; }
  .round-btn { width: 36px; height: 36px; font-size: 18px; border-radius: 10px; }
  .sim-bubble { font-size: 12px; padding: 6px 9px; }
  .sim-scale { font-size: 10px; }
  .sim-gain { font-size: 12px; }
  .sim-gain strong { font-size: 26px; }
  .sim-table { padding: 14px 14px; }
  .cmp-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    font-size: 12px;
    padding: 7px 0;
  }
  .cmp-row strong { font-size: 13px; }
  .cmp-row.cmp-head { display: grid; font-size: 10px; }
  .cmp-row > :nth-child(2) { display: none; }

  /* Howto / Popular / TOC */
  .howto-band { padding: 24px 0 8px; }
  .howto-grid { padding: 22px 18px; gap: 22px; }
  .howto-grid h2 { font-size: 20px; }
  .howto-grid h3 { font-size: 14px; }
  .howto-grid p { font-size: 14px; }
  .howto-list li { padding-left: 32px; font-size: 13px; margin-bottom: 12px; }
  .howto-list li::before { width: 22px; height: 22px; font-size: 12px; }

  .popular-band { padding: 24px 0; }
  .popular-band .container { padding: 22px 18px; }
  .popular-head h2 { font-size: 19px; }
  .popular-head p { font-size: 13px; }
  .popular-list a { padding: 9px 12px; font-size: 13px; }
  .popular-footer { font-size: 13px; }

  .toc-card { padding: 24px 18px; }
  .toc-head { gap: 14px; margin-bottom: 22px; }
  .toc-head h2 { font-size: 19px; }
  .toc-icon { width: 38px; height: 38px; }
  .toc-grid li { font-size: 13px; }

  /* Pillar */
  .pillar-section { padding: 32px 0; scroll-margin-top: 76px; }
  .section-header { gap: 14px; margin-bottom: 22px; }
  .section-num { width: 36px; height: 36px; font-size: 15px; }
  .section-header h2 { font-size: 22px; padding-top: 4px; line-height: 1.2; }
  .section-body p, .section-body li { font-size: 15px; line-height: 1.7; }
  .section-body h3 { font-size: 16px; margin: 22px 0 8px; }
  .section-body .callout { padding: 14px 16px; font-size: 14px; }
  .section-body--split { gap: 22px; }
  .section-image figure { border-radius: 18px; }
  .section-image figcaption { font-size: 12px; padding: 12px 14px 14px; }
  .pillar-visual { border-radius: 16px; }
  .pillar-visual figcaption { font-size: 12px; padding: 12px 14px 14px; }

  /* Bulletin mock */
  .bulletin-mock { padding: 20px 18px; border-radius: 16px; }
  .bulletin-title { font-size: 14px; margin-bottom: 16px; }
  .bulletin-row dt, .bulletin-row { font-size: 13px; }
  .bulletin-row dd { font-size: 14px; }
  .bulletin-row--highlight dd { font-size: 15px; }

  /* Stats band */
  .stats-band { padding: 36px 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 24px 12px; }
  .stat { gap: 10px; }
  .stat-icon { width: 48px; height: 48px; border-radius: 14px; }
  .stat-icon svg { width: 22px; height: 22px; }
  .stat-label { font-size: 12px; }

  /* FAQ */
  .faq-band { padding: 36px 0; }
  .faq-band-head { margin-bottom: 24px; }
  .faq-band-head h2 { font-size: 22px; }
  .faq-band-sub { font-size: 13px; }
  .faq-group { font-size: 12px; margin: 22px 0 10px; }
  .faq-pill summary { padding: 14px 16px; font-size: 13px; }
  .faq-pill p { padding: 0 16px 14px; font-size: 13px; }
  .pillar-section .faq-card summary { padding: 14px 16px; font-size: 13px; }
  .pillar-section .faq-card p { padding: 0 16px 14px; font-size: 13px; }

  /* CTA band */
  .cta-band { padding: 18px 0 44px; }
  .cta-band-grid { padding: 24px 20px; gap: 18px; }
  .cta-band-grid h2 { font-size: 19px; line-height: 1.3; }
  .cta-band-grid p { font-size: 13px; }
  .cta-band-action .btn { width: 100%; padding: 0 18px; }
  .cta-note { font-size: 12px; }

  /* Footer */
  .footer { padding: 40px 0 18px; }
  .footer-grid { gap: 28px; }
  .footer-tagline { font-size: 12px; margin: 14px 0 18px; }
  .footer-col a { font-size: 13px; line-height: 2; }
  .footer h4 { margin-bottom: 14px; font-size: 11px; }
  .footer-social a { width: 36px; height: 36px; }
  .footer-bottom { margin-top: 32px; font-size: 11px; }

  /* Outline btn */
  .outline-btn { padding: 11px 18px; font-size: 13px; }

  /* Article wrap (legal pages, méthodologie) */
  .article-wrap { padding: 28px 18px 48px; }
  .article-wrap p, .article-wrap li { font-size: 15px; line-height: 1.65; }
  .article-wrap h2 { font-size: 19px; margin: 26px 0 10px; }
  .article-wrap h3 { font-size: 16px; margin: 20px 0 8px; }

  /* Amount pages */
  .amount-page { padding: 24px 0 48px; }
  .breadcrumb { font-size: 12px; margin-top: 18px; margin-bottom: 18px; }
  .amount-hero { margin-bottom: 36px; }
  .amount-result-card, .amount-cout-card { padding: 22px; border-radius: 18px; }
  .amount-cout-card::before { width: 140px; height: 140px; top: -40px; right: -40px; }
  .amount-sub { font-size: 15px; margin-bottom: 22px; }
  .amount-stat-card { padding: 16px 14px; }
  .amount-stat-card strong { font-size: 18px; }
  .amount-cta-band { padding: 22px 20px; gap: 14px; }
  .amount-cta-band h2 { font-size: 19px; }
  .amount-cta-band .btn { width: 100%; padding: 0 18px; }
  .amount-narrative p, .amount-breakdown p, .amount-context p { font-size: 15px; }
}

/* ===== Très petit mobile (≤400px) ===== */
@media (max-width: 400px) {
  .container { width: min(calc(100% - 16px), var(--max)); }
  h1 { font-size: 30px; }
  .calc-card { padding: 18px; }
  .input-large { font-size: 20px; padding-right: 34px; }
  .input-row .currency { font-size: 15px; }
  .big-number { font-size: 34px; }
  .net-card, .cout-card,
  .amount-result-card, .amount-cout-card { padding: 18px; }
  .stat-card { padding: 14px 12px; }
  .stat-card strong { font-size: 18px; }
  .donut-svg { width: 160px; height: 160px; }
  .stat-grid { gap: 8px; }
  .cmp-row { font-size: 11px; gap: 6px; }
  .cmp-row strong { font-size: 12px; }
  .section-header h2 { font-size: 20px; }
  .section-num { width: 32px; height: 32px; font-size: 14px; }
  .toc-card, .popular-band .container, .howto-grid { padding: 20px 14px; }
  .cta-band-grid { padding: 20px 16px; }
  .footer { padding: 32px 0 16px; }
  .article-wrap { padding: 22px 14px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
