/* ==========================================================================
   Trickle-Down Economics — feuille de style unique
   ========================================================================== */
:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f2efe8;
  --ink: #14213d;
  --text: #1f2733;
  --muted: #5a6472;
  --line: #e3dfd6;
  --accent: #b23a2e;        /* promesse non tenue */
  --accent-soft: #f6e3e0;
  --gold: #a86b12;          /* chiffres clés */
  --gold-soft: #f7ecd8;
  --link: #1d4ed8;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20,33,61,.06), 0 4px 16px rgba(20,33,61,.06);
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --read: 46rem;
  --wide: 72rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151c;
    --surface: #171c25;
    --surface-2: #1e2430;
    --ink: #e8ecf3;
    --text: #d9dee7;
    --muted: #9aa4b2;
    --line: #2b3240;
    --accent: #f08a7e;
    --accent-soft: #3a2220;
    --gold: #e7b25c;
    --gold-soft: #33291a;
    --link: #8ab4ff;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 1.0625rem/1.7 var(--sans);
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.22; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); margin: 0 0 1rem; letter-spacing: -.01em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.05rem); margin: 0 0 1.1rem; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.4rem); margin: 2.2rem 0 .7rem; }
h4 { font-size: 1.05rem; margin: 1.6rem 0 .5rem; font-family: var(--sans); }
p { margin: 0 0 1.05rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: var(--bg); padding: .5rem .8rem; border-radius: 6px; z-index: 100; }
.skip:focus { left: .5rem; }
.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 720px) { .wrap { padding: 0 1.5rem; } }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 3.6rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 700; font-size: 1.08rem; }
.brand-mark { width: 1.6rem; height: 1.6rem; fill: var(--accent); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .2rem; }
.site-nav a { display: block; padding: .45rem .65rem; border-radius: 6px; color: var(--text); text-decoration: none; font-size: .95rem; }
.site-nav a:hover { background: var(--surface-2); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .55rem; cursor: pointer; }
.nav-toggle .bar { display: block; width: 1.25rem; height: 2px; background: var(--ink); margin: 3px 0; border-radius: 2px; }
@media (max-width: 899px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); display: none; box-shadow: var(--shadow); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: .5rem 1rem 1rem; }
  .site-nav a { padding: .7rem .5rem; border-bottom: 1px solid var(--line); border-radius: 0; }
}

/* ---------- Héro ---------- */
.hero { padding: 2.6rem 0 2rem; border-bottom: 1px solid var(--line); background:
  linear-gradient(180deg, var(--surface-2), transparent 70%); }
.hero-grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; } }
.eyebrow { font: 600 .8rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 .8rem; }
.lead { font-size: 1.16rem; color: var(--text); max-width: 42rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.4rem 0 1.8rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .72rem 1.15rem; border-radius: 8px; font: 600 .98rem/1.1 var(--sans); text-decoration: none; cursor: pointer; border: 2px solid var(--ink); }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { opacity: .9; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.stats { display: grid; gap: .8rem; grid-template-columns: 1fr; margin: 0; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1rem .9rem; box-shadow: var(--shadow); }
.stat-num { display: block; font: 700 1.9rem/1.05 var(--serif); color: var(--gold); margin-bottom: .35rem; }
.stat p { font-size: .9rem; line-height: 1.5; margin: 0; color: var(--muted); }
.updated { font-size: .88rem; color: var(--muted); margin-top: 1.2rem; }

/* ---------- Encart publicitaire ---------- */
.ad-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; min-height: 280px; display: flex; flex-direction: column; }
.ad-label { font: 600 .68rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.ad-box ins { flex: 1; min-height: 250px; }
.ad-placeholder { flex: 1; min-height: 250px; display: flex; flex-direction: column; gap: .2rem; align-items: center; justify-content: center; text-align: center; border: 2px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: .95rem; }
@media (max-width: 959px) { .ad-box { min-height: 130px; } .ad-box ins, .ad-placeholder { min-height: 100px; } }

/* ---------- Sommaire ---------- */
.toc { max-width: var(--read); margin: 2.2rem auto 0; padding: 1.1rem 1.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.toc p { font: 700 .82rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6rem; }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 1; }
@media (min-width: 720px) { .toc ol { columns: 2; column-gap: 2rem; } }
.toc li { margin: 0 0 .3rem; break-inside: avoid; font-size: .97rem; }

/* ---------- Article ---------- */
.article { padding-top: 1rem; padding-bottom: 3rem; }
.section { max-width: var(--read); margin: 0 auto; padding: 3rem 0 .5rem; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section-num { display: inline-block; font: 700 .78rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .7rem; }
.cite { font-size: .72em; vertical-align: super; line-height: 0; text-decoration: none; padding: 0 .1em; font-weight: 600; }
blockquote { margin: 1.4rem 0; padding: .9rem 1.2rem; border-left: 4px solid var(--gold); background: var(--gold-soft); border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--serif); font-size: 1.08rem; }
blockquote p:last-child { margin-bottom: 0; }
blockquote footer { font: .88rem/1.4 var(--sans); color: var(--muted); margin-top: .4rem; }
.keybox { margin: 1.6rem 0; padding: 1.1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.keybox h4, .keybox h3 { margin-top: 0; }
.keybox p:last-child { margin-bottom: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.6rem 0 1rem; }

/* Figures */
figure { margin: 2rem 0; }
figure.wide { margin-left: auto; margin-right: auto; }
@media (min-width: 1000px) { figure.wide { margin-left: -6rem; margin-right: -6rem; } }
.figure-frame { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; box-shadow: var(--shadow); }
.figure-frame img { display: block; width: 100%; height: auto; }
figcaption { font-size: .9rem; line-height: 1.55; color: var(--muted); margin-top: .6rem; }

/* Frise chronologique */
.timeline { list-style: none; margin: 1.6rem 0; padding: 0 0 0 1.4rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; margin: 0 0 1rem; padding-left: .4rem; }
.timeline li::before { content: ""; position: absolute; left: -1.88rem; top: .55rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.timeline .year { font: 700 .95rem/1.3 var(--sans); color: var(--ink); display: block; }

/* Tableau de vérification */
.table-wrap { overflow-x: auto; margin: 1.6rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 34rem; }
th, td { text-align: left; vertical-align: top; padding: .75rem .85rem; border-bottom: 1px solid var(--line); }
thead th { background: var(--surface-2); font-family: var(--sans); font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  .table-wrap table { min-width: 0; }
  .table-wrap thead { display: none; }
  .table-wrap tr { display: block; padding: .5rem 0; border-bottom: 1px solid var(--line); }
  .table-wrap tbody tr:last-child { border-bottom: 0; }
  .table-wrap td { display: block; border: 0; padding: .3rem .9rem; }
  .table-wrap td::before { content: attr(data-label); display: block; font: 600 .72rem/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
}
.verdict { display: inline-block; font: 700 .78rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: .35rem .5rem; border-radius: 5px; white-space: nowrap; }

/* Encadré éditeur */
.publisher-note { margin: 2rem 0; padding: 1.3rem 1.4rem; background: var(--surface-2); border-radius: var(--radius); border: 1px solid var(--line); }
.publisher-note h3 { margin-top: 0; }
.signature { font: 700 .9rem/1.3 var(--sans); letter-spacing: .08em; color: var(--ink); margin: 0; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 .7rem; }
.faq summary { cursor: pointer; padding: 1rem 2.6rem 1rem 1.1rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { display: inline; margin: 0; font-size: 1.08rem; }
.faq summary::after { content: "+"; position: absolute; right: 1.1rem; top: .8rem; font: 400 1.5rem/1 var(--sans); color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 1.1rem .4rem; }

/* Sources */
.sources ol { padding-left: 1.6rem; font-size: .9rem; line-height: 1.55; }
.sources li { margin: 0 0 .55rem; scroll-margin-top: 5rem; }
.sources li:target { background: var(--gold-soft); border-radius: 4px; }
.method { font-size: .95rem; color: var(--muted); }

/* ---------- Pages légales ---------- */
.legal { max-width: var(--read); margin: 0 auto; padding: 2.5rem 0 3rem; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.legal h2 { font-size: 1.35rem; margin-top: 2.2rem; }
.legal dl { display: grid; grid-template-columns: 1fr; gap: .2rem 1.2rem; margin: 0 0 1rem; }
@media (min-width: 640px) { .legal dl { grid-template-columns: 13rem 1fr; } }
.legal dt { font-weight: 600; color: var(--ink); }
.legal dd { margin: 0 0 .5rem; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 2rem 0 5.5rem; font-size: .92rem; color: var(--muted); }
.footer-inner { display: grid; gap: 1.2rem; }
@media (min-width: 800px) { .footer-inner { grid-template-columns: 1fr auto; align-items: start; } }
.footer-brand { font: 700 1.05rem/1.2 var(--serif); color: var(--ink); margin-bottom: .4rem; }
.footer-about p { margin: 0 0 .35rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.footer-nav a { color: var(--text); }

/* ---------- Bannière cookies ---------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; padding: .8rem; }
.cookie-banner[hidden] { display: none; }
.cookie-inner { max-width: 60rem; margin: 0 auto; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.18); padding: 1rem 1.1rem; display: grid; gap: .8rem; }
@media (min-width: 760px) { .cookie-inner { grid-template-columns: 1fr auto; align-items: center; } }
.cookie-inner p { margin: 0; font-size: .9rem; line-height: 1.5; }
.cookie-actions { display: flex; gap: .6rem; }
.cookie-actions .btn { flex: 1; min-width: 7.5rem; }

@media print {
  .site-header, .ad-box, .cookie-banner, .hero-cta, .cta-row { display: none !important; }
  body { background: #fff; color: #000; }
}
