/* Encore un site de sur Gérard — polices système uniquement (aucune requête vers des tiers). */
:root {
  --paper: #f4ecdc;
  --paper-2: #ebe0c8;
  --ink: #1d1a16;
  --muted: #6b6254;
  --accent: #b8301c;
  --accent-ink: #fff7ea;
  --gold: #d99a1e;
  --line: #cfc2a6;
  --radius: 10px;
  --serif: Rockwell, "Roboto Slab", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17130f; --paper-2: #221c15; --ink: #f1e8d6; --muted: #a89c86;
    --accent: #e2573f; --accent-ink: #1a0d08; --gold: #e8b23c; --line: #3a3126;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 1.0625rem/1.6 var(--sans);
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; padding-block: 2rem 3rem; }
.wrap { width: min(100% - 2rem, 62rem); margin-inline: auto; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
mark { background: var(--gold); color: #1d1a16; padding: 0 .3em; border-radius: 3px; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; background: var(--paper-2); padding: .05em .35em; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* En-tête */
.site-header { border-bottom: 4px double var(--ink); background: var(--paper-2); }
.header-in { display: flex; flex-wrap: wrap; gap: .75rem 2rem; align-items: center; justify-content: space-between; padding-block: .9rem; }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1; }
.brand-top { font: 600 .8rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.brand-main { font: 800 1.9rem/1.05 var(--serif); }
.brand-main em, .hero h1 em { font-style: italic; color: var(--accent); }
.nav { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
.nav a { display: block; padding: .45rem .8rem; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; }
.nav a:hover { background: var(--paper); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* Accueil */
.hero { padding-block: 1rem 2rem; }
.hero h1 { font: 800 clamp(2.1rem, 6vw, 3.6rem)/1.05 var(--serif); margin: 0 0 1rem; letter-spacing: -.01em; }
.lead { font-size: 1.2rem; max-width: 48rem; }
.hint { max-width: 48rem; color: var(--muted); font-size: .95rem; }
.stats { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1.25rem 0; }
.stats li { border: 2px solid var(--ink); border-radius: 999px; padding: .25rem .9rem; font-size: .95rem; }
.stats strong { font-family: var(--serif); font-size: 1.15rem; margin-right: .15em; }

.list-section { margin-top: 2.5rem; }
h2 { font: 800 1.6rem/1.2 var(--serif); margin: 0 0 .25rem; }
.count { font: 600 .9rem var(--sans); background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: .1rem .6rem; vertical-align: middle; margin-left: .35rem; }
.eps { list-style: none; margin: 1rem 0 0; padding: 0; border-top: 2px solid var(--ink); }
.ep { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .8rem .25rem; border-bottom: 1px solid var(--line); }
.ep-main { flex: 1 1 18rem; min-width: 0; display: flex; flex-direction: column; }
.ep-title { font: 700 1.1rem/1.3 var(--serif); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.ep-title:hover { color: var(--accent); text-decoration: underline; }
.ep-meta { color: var(--muted); font-size: .9rem; }
.badge { font-size: .78rem; border: 1px solid var(--line); border-radius: 999px; padding: .1rem .6rem; color: var(--muted); white-space: nowrap; }
.badge-ok { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.empty { padding: 1rem; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* Boutons */
.btn {
  display: inline-block; font: 700 1rem/1.2 var(--sans); cursor: pointer; text-decoration: none; text-align: center;
  background: var(--accent); color: var(--accent-ink); border: 2px solid var(--accent); border-radius: var(--radius); padding: .7rem 1.2rem;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn-small { padding: .35rem .8rem; font-size: .9rem; }
.btn-choice { min-width: 9rem; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; text-underline-offset: .18em; }

/* Épisode */
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-weight: 700; font-size: .8rem; color: var(--accent); margin: 0 0 .25rem; }
.episode h1 { font: 800 clamp(1.7rem, 4.5vw, 2.6rem)/1.15 var(--serif); margin: 0 0 .4rem; overflow-wrap: anywhere; }
.player-box { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: 1.5rem 0 2rem; padding: 1rem; background: var(--paper-2); border: 2px solid var(--ink); border-radius: var(--radius); }
.player-box audio { flex: 1 1 18rem; min-width: 0; width: 100%; }
.transcript h2 { border-bottom: 2px solid var(--ink); padding-bottom: .4rem; margin-bottom: .75rem; }
.tr-body { max-width: 44rem; font: 1.1rem/1.75 Georgia, "Iowan Old Style", serif; }
.tr-body p { margin: 0 0 1.1em; overflow-wrap: anywhere; }
.ts {
  font: 600 .78rem/1 ui-monospace, Menlo, Consolas, monospace; background: var(--paper-2); color: var(--accent);
  border: 1px solid var(--line); border-radius: 6px; padding: .22rem .45rem; margin-right: .4rem; cursor: pointer; vertical-align: .08em;
}
.ts:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.25rem; border-top: 2px solid var(--ink); }
.pager a { display: flex; flex-direction: column; max-width: 48%; text-decoration: none; font: 700 1rem/1.3 var(--serif); color: var(--ink); }
.pager a span { font: 600 .8rem var(--sans); color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.pager-next { text-align: right; margin-left: auto; }

/* Pages de texte */
.page h1 { font: 800 clamp(2rem, 5vw, 3rem)/1.1 var(--serif); margin: 0 0 1rem; }
.page h2 { margin-top: 2rem; }
.prose { max-width: 46rem; }
.prose ul { padding-left: 1.25rem; }
.sources { padding-left: 1.2rem; }
.sources li { margin-bottom: .5rem; }
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { border-bottom: 2px solid var(--ink); }

/* Time line */
.timeline { list-style: none; margin: 2rem 0 0; padding: 0 0 0 1.5rem; border-left: 4px solid var(--accent); max-width: 46rem; }
.timeline li { position: relative; padding-bottom: 2rem; }
.timeline li::before { content: ""; position: absolute; left: calc(-1.5rem - 10px); top: .55rem; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 4px solid var(--accent); }
.timeline h2 { color: var(--accent); margin: 0 0 .4rem; }
.timeline p { margin: 0 0 .8rem; }

/* Pied de page */
.site-footer { background: var(--ink); color: var(--paper); padding-block: 1.75rem; font-size: .92rem; }
.site-footer a, .site-footer .linklike { color: var(--paper); }
.foot-links { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; padding: 0; margin: 1rem 0; }
.foot-small { opacity: .75; margin: 0; }

/* Bandeau cookies */
.cc { position: fixed; inset: auto 0 0 0; z-index: 50; background: var(--paper); border-top: 4px solid var(--accent); box-shadow: 0 -8px 30px rgba(0, 0, 0, .25); }
.cc-in { width: min(100% - 2rem, 62rem); margin-inline: auto; padding: 1.1rem 0 1.25rem; }
.cc h2 { font-size: 1.2rem; margin: 0 0 .3rem; }
.cc p { margin: 0 0 .9rem; max-width: 46rem; font-size: .98rem; }
.cc-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

@media (max-width: 40rem) {
  .pager { flex-direction: column; }
  .pager a { max-width: 100%; }
  .pager-next { text-align: left; margin-left: 0; }
  .cc-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
