/* ==========================================================================
   FOURNET — Quatre siècles au cœur du Livradois
   Feuille unique. Aucune dépendance, aucune police web, aucun appel réseau.
   1. Jetons et remise à zéro        7. Chronologie
   2. Typographie et utilitaires     8. Carte
   3. Grain et texture               9. Enquête
   4. En-tête et progression        10. Sources
   5. Hero et motif d'arbre         11. Pied de page
   6. La lignée / l'inventaire      12. Panneau, animations, responsive
   ========================================================================== */

/* 1. Jetons ---------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --paper: #f5f0e6;
  --paper-2: #efe8da;
  --paper-3: #e9dfcc;
  --card: #faf6ee;
  --card-hi: #fffdf7;
  --ink: #1c1b18;
  --ink-2: #3b3831;
  --muted: #6c665a;
  --faint: #8d8677;
  --brown: #8a5a2b;
  --forest: #2e4638;
  --gold: #b08d57;
  --gold-2: #cbaa79;
  --gold-ink: #7d5f2c;
  --rule: rgba(28, 27, 24, 0.13);
  --rule-2: rgba(28, 27, 24, 0.25);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --head-h: 64px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 22px);
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 480px),
    repeating-linear-gradient(90deg, rgba(138, 90, 43, 0.018) 0 1px, transparent 1px 4px);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.lock,
html.lock body { overflow: hidden; }

[hidden] { display: none !important; }

main { display: block; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.008em;
  text-wrap: balance;
}

p { margin: 0; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
sup { font-size: 0.62em; vertical-align: super; line-height: 0; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
}

:where(a, button, input, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: rgba(176, 141, 87, 0.28); }

/* 2. Typographie et utilitaires -------------------------------------------- */
.wrap {
  width: min(var(--wrap), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.eyebrow {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
  color: var(--brown);
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow .num {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

.lede {
  max-width: 46ch;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  line-height: 1.58;
}

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

.skip {
  position: fixed;
  top: -70px;
  left: 16px;
  z-index: 200;
  padding: 11px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 0.22s var(--ease);
}
.skip:focus { top: 12px; }

.noscript {
  width: min(var(--wrap), calc(100% - 2 * var(--gutter)));
  margin: 24px auto;
  padding: 16px 20px;
  border-left: 2px solid var(--gold);
  background: rgba(176, 141, 87, 0.07);
  font-size: 0.9rem;
  color: var(--ink-2);
}

/* 3. Grain et texture ------------------------------------------------------ */
.grain {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 4. En-tête --------------------------------------------------------------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(245, 240, 230, 0.93);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
  backdrop-filter: blur(12px) saturate(1.08);
  border-bottom: 1px solid var(--rule);
}

.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--head-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark { width: 25px; height: 25px; flex: none; color: var(--forest); }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }

.brand-text strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 0.98rem;
  letter-spacing: 0.26em;
}

.brand-text span {
  color: var(--muted);
  font-size: 0.56rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.head-nav {
  display: flex;
  gap: clamp(14px, 2vw, 30px);
  max-width: 72%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.head-nav::-webkit-scrollbar { display: none; }

.head-nav a {
  position: relative;
  padding: 7px 0;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.22s var(--ease);
}

.head-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s var(--ease);
}

.head-nav a:hover { color: var(--ink); }
.head-nav a:hover::after,
.head-nav a[aria-current="true"]::after { transform: scaleX(1); }
.head-nav a[aria-current="true"] { color: var(--ink); }

.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brown), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
}

/* 5. Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  padding-block: clamp(22px, 3vw, 30px) clamp(32px, 4.5vw, 52px);
  overflow: hidden;
}

.hero .wrap { position: relative; }

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule-2);
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.hero-kicker span:first-child { color: var(--brown); }

.hero-title {
  margin: clamp(16px, 2.4vw, 30px) 0 0 -0.045em;
  color: var(--ink);
  font-size: clamp(3.3rem, 15.2vw, 10.6rem);
  line-height: 0.9;
  letter-spacing: 0.135em;
}

.hero-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(16px, 2.4vw, 24px);
}

.hero-copy { position: relative; z-index: 1; }

.hero-sub {
  max-width: 24ch;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.5vw, 1.95rem);
  font-style: italic;
  line-height: 1.24;
  letter-spacing: -0.012em;
}

.hero-lede { margin-top: 18px; max-width: 52ch; color: var(--muted); font-size: 0.97rem; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.hero-meta span + span::before {
  content: "·";
  margin: 0 11px;
  color: var(--gold);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(22px, 3vw, 32px);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 13px 20px;
  border: 1px solid var(--rule-2);
  color: var(--ink);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.cta svg { width: 13px; height: 13px; transition: transform 0.25s var(--ease); }
.cta:hover { border-color: var(--ink); background: rgba(28, 27, 24, 0.045); }
.cta:hover svg { transform: translateY(2px); }

.cta--solid { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.cta--solid:hover { background: var(--forest); border-color: var(--forest); color: var(--paper); }

.hero-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding-top: 2px;
}

.tree { width: 100%; max-width: 300px; height: auto; color: var(--ink); }
.tree .plate { fill: none; stroke: var(--rule); stroke-width: 1; }
.tree .trunk { fill: none; stroke: currentColor; stroke-width: 2.1; opacity: 0.72; }
.tree .tb { fill: none; stroke: currentColor; stroke-width: 1; opacity: 0.3; }
.tree .root { fill: none; stroke: currentColor; stroke-width: 1.1; opacity: 0.26; }
.tree .leaf { fill: var(--gold); opacity: 0.55; }
.tree .node { fill: var(--paper); stroke: var(--gold); stroke-width: 1.3; }
.tree text {
  fill: var(--muted);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.tree text.year { fill: var(--brown); font-family: var(--serif); font-size: 11px; letter-spacing: 0.12em; }

.tree-cap {
  margin-top: 8px;
  color: var(--faint);
  font-size: 0.57rem;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(30px, 4vw, 42px);
  padding: clamp(18px, 2.4vw, 26px) 0;
  border-top: 1px solid var(--rule-2);
  border-bottom: 1px solid var(--rule);
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  gap: 7px;
  padding-inline: clamp(10px, 2vw, 26px);
  border-left: 1px solid var(--rule);
}
.stat:first-child { padding-left: 0; border-left: 0; }

.stat dd {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3.4vw, 2.95rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
  line-height: 1;
}
.stat dd .unit {
  margin-left: 0.3em;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.46em;
  letter-spacing: 0.08em;
}

.stat dt {
  color: var(--muted);
  font-size: 0.61rem;
  letter-spacing: 0.16em;
  line-height: 1.45;
  text-transform: uppercase;
}
.stat .dt-min { display: block; margin-top: 2px; color: var(--faint); letter-spacing: 0.1em; }

/* 6. Sections, lignée, inventaire ------------------------------------------ */
.section {
  padding-block: clamp(54px, 8vw, 100px);
  border-top: 1px solid var(--rule);
}

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: end;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.sec-head h2 { max-width: 22ch; font-size: clamp(1.8rem, 3.5vw, 2.85rem); line-height: 1.05; }
.sec-head .lede { justify-self: end; }

/* Lignée */
.pre-line { margin: 0 0 clamp(24px, 3vw, 36px); padding: clamp(16px, 2vw, 22px); border: 1px dashed var(--gold); background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(0,0,0,.018) 10px 11px), var(--paper-2); }
.pre-line__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.pre-line__lbl { font-size: 0.55rem; letter-spacing: 0.17em; text-transform: uppercase; color: var(--brown); }
.pre-line__badge { border: 1px solid var(--gold); padding: 3px 8px; font-size: 0.52rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--brown); background: var(--paper); }
.pre-line h3 { margin: 0 0 8px; font-family: var(--serif); font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.25; }
.pre-line h3 span { display: inline-block; margin-left: 10px; font-family: var(--sans); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); vertical-align: middle; }
.pre-line p { margin: 0 0 8px; max-width: 84ch; color: var(--muted); font-size: 0.86rem; line-height: 1.62; }
.pre-line p:last-child { margin-bottom: 0; }
.pre-line strong { color: var(--ink); font-weight: 600; }
.pre-line__body { display: grid; grid-template-columns: 1fr auto; gap: clamp(16px, 3vw, 28px); align-items: start; }
.pre-line__actions { display: flex; flex-direction: column; gap: 10px; min-width: 168px; }
.pre-line__btn { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); padding: 10px 14px; font-family: var(--sans); font-size: 0.58rem; letter-spacing: 0.13em; text-transform: uppercase; cursor: pointer; }
.pre-line__btn:hover { background: var(--brown); border-color: var(--brown); }
.pre-line__link { color: var(--brown); border-bottom: 1px solid var(--gold); font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; align-self: flex-start; padding-bottom: 2px; }
.pre-line__link:hover { color: var(--ink); }
@media (max-width: 760px) {
  .pre-line__body { grid-template-columns: 1fr; }
  .pre-line__actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
}

.lineage {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.8vw, 18px);
  max-width: 920px;
  margin-inline: auto;
}

.lineage::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 27px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--rule-2) 7%, var(--rule-2) 93%, transparent);
}

.gen {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: clamp(12px, 2vw, 22px);
}

.gen-mark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--rule-2);
  border-radius: 50%;
  background: var(--paper);
  color: var(--brown);
  font-family: var(--serif);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.gen:hover .gen-mark { border-color: var(--gold); background: var(--card); color: var(--ink); }

.gen-card {
  position: relative;
  display: block;
  width: 100%;
  padding: clamp(16px, 2.2vw, 23px) clamp(17px, 2.5vw, 27px);
  border: 1px solid var(--rule);
  background: var(--card);
  transition: border-color 0.28s var(--ease), background 0.28s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.gen-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.38s var(--ease);
}

.gen-card:hover,
.gen-card:focus-visible {
  border-color: var(--rule-2);
  background: var(--card-hi);
  box-shadow: 0 18px 40px -32px rgba(28, 27, 24, 0.6);
  transform: translateX(2px);
}
.gen-card:hover::before,
.gen-card:focus-visible::before { transform: scaleY(1); }

.gen-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 18px;
  flex-wrap: wrap;
}

.gen-name {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.12rem, 1.9vw, 1.45rem);
  line-height: 1.16;
}

.gen-dates {
  display: block;
  margin-top: 3px;
  color: var(--brown);
  font-family: var(--serif);
  font-size: 0.95rem;
  font-style: italic;
}

.gen-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 22px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--rule);
}
.gen-facts > span { display: block; min-width: 0; }
.gen-facts .k {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.gen-facts .v { display: block; color: var(--ink-2); font-size: 0.85rem; line-height: 1.45; }

.gen-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  color: var(--brown);
  font-size: 0.56rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.gen-more svg { width: 12px; height: 12px; transition: transform 0.3s var(--ease); }
.gen-card:hover .gen-more svg { transform: translateX(3px); }

/* Badges */
.badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 4px;
  border: 1px solid var(--rule-2);
  background: var(--paper);
  color: var(--ink-2);
  font-size: 0.56rem;
  letter-spacing: 0.13em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge--confirmed, .badge--resolved { color: var(--forest); border-color: rgba(46, 70, 56, 0.38); }
.badge--probable, .badge--partial, .badge--family { color: var(--brown); border-color: rgba(138, 90, 43, 0.36); }
.badge--hypothetical, .badge--mixed, .badge--open { color: var(--gold-ink); border-color: rgba(176, 141, 87, 0.5); }
.badge--unproven, .badge--unknown { color: var(--muted); border-style: dashed; }

/* Inventaire */
.explorer-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 24px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.search { width: min(460px, 100%); }
.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.59rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--rule-2);
  transition: border-color 0.25s var(--ease);
}
.search-box:focus-within { border-color: var(--ink); }
.search-box > svg { width: 15px; height: 15px; flex: none; color: var(--muted); }

#q {
  flex: 1;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
}
#q:focus { outline: none; }
#q::placeholder { color: #9c9484; font-family: var(--serif); font-style: italic; }
#q::-webkit-search-cancel-button { display: none; }

.search-clear {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.search-clear:hover { background: rgba(28, 27, 24, 0.06); color: var(--ink); }

.result-count {
  padding-bottom: 5px;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 0.98rem;
  font-style: italic;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(22px, 3vw, 32px);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px 6px;
  border: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: background 0.22s var(--ease), border-color 0.22s var(--ease), color 0.22s var(--ease);
}
.chip .n { color: var(--faint); font-family: var(--serif); font-size: 0.72rem; letter-spacing: 0; }
.chip:hover { border-color: var(--rule-2); background: rgba(255, 255, 255, 0.45); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--forest); background: var(--forest); color: var(--paper); }
.chip[aria-pressed="true"] .n { color: var(--gold-2); }

.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  border-top: 1px solid var(--rule);
}

.person {
  display: block;
  width: 100%;
  padding: 12px 12px 11px;
  border-bottom: 1px solid var(--rule);
  transition: background 0.2s var(--ease);
}
.person:hover { background: rgba(255, 255, 255, 0.55); }
.person:hover .p-name { color: var(--brown); }

.p-name {
  display: block;
  font-family: var(--serif);
  font-size: 1.01rem;
  line-height: 1.28;
  overflow-wrap: break-word;
}
.p-meta {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.015em;
}
.p-meta .dot { margin: 0 6px; color: var(--gold); }

.empty {
  grid-column: 1 / -1;
  padding: 40px 0 36px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
}
.empty strong { color: var(--ink-2); font-weight: 400; }

.more { margin-top: 26px; text-align: center; }
.more-btn {
  padding: 12px 24px;
  border: 1px solid var(--rule-2);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 0.24s var(--ease), border-color 0.24s var(--ease), color 0.24s var(--ease);
}
.more-btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.explorer-note {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  color: var(--faint);
  font-size: 0.72rem;
  line-height: 1.6;
}

/* 7. Chronologie ----------------------------------------------------------- */
.tl-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(24px, 3.5vw, 38px); }

.tl { position: relative; max-width: 880px; }

.tl-era {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 34px 0 10px;
  color: var(--brown);
  font-family: var(--serif);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
}
.tl-era:first-child { margin-top: 4px; }
.tl-era::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 74px 22px minmax(0, 1fr);
  column-gap: 14px;
  padding: 13px 0 15px;
}
.tl-item::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: -1px;
  left: 99px;
  width: 1px;
  background: var(--rule);
}
.tl-era + .tl-item::before { top: 12px; }

.tl-year {
  padding-top: 1px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.04rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.tl-dot {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  margin: 6px auto 0;
  border: 1px solid var(--brown);
  border-radius: 50%;
  background: var(--paper);
}
.tl-dot--contexte { border-color: var(--forest); background: var(--forest); }
.tl-dot--document { border-color: var(--gold); background: var(--gold-2); }

.tl-body { grid-column: 3; padding-bottom: 4px; }

.tl-kind {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.55rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.tl-title { margin-bottom: 5px; font-size: 1.09rem; line-height: 1.28; }
.tl-text { max-width: 64ch; color: var(--muted); font-size: 0.89rem; line-height: 1.62; }

.tl-link {
  margin-top: 8px;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--gold);
  color: var(--brown);
  font-size: 0.57rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tl-link:hover { color: var(--ink); border-color: var(--ink); }

/* 8. Carte ----------------------------------------------------------------- */
.map-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(272px, 0.85fr);
  gap: clamp(20px, 3vw, 38px);
  align-items: start;
}

.map-figure {
  margin: 0;
  border: 1px solid var(--rule-2);
  background: var(--paper-2);
  overflow: hidden;
}

.map { width: 100%; height: auto; }

.map .frame { fill: none; stroke: var(--rule); stroke-width: 1; }
.map .bg { fill: #efe8da; }
.map .commune {
  fill: #e5dac3;
  stroke: #cdbfa4;
  stroke-width: 0.6;
  vector-effect: non-scaling-stroke;
}
.map .commune--lineage { fill: #dbc9a6; }
.map .grid line { stroke: rgba(28, 27, 24, 0.085); stroke-width: 1; stroke-dasharray: 2 8; }
.map .route-halo { fill: none; stroke: var(--paper); stroke-width: 4; stroke-linecap: round; opacity: 0.85; }
.map .route {
  fill: none;
  stroke: var(--brown);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-dasharray: 2 9;
}
.map .mplace { cursor: pointer; outline: none; }
.map .dot { fill: rgba(46, 70, 56, 0.15); stroke: var(--forest); stroke-width: 1.4; transition: fill 0.25s var(--ease), stroke 0.25s var(--ease); }
.map .mplace:hover .dot { fill: rgba(46, 70, 56, 0.3); }
.map .mplace.is-on .dot { fill: rgba(176, 141, 87, 0.52); stroke: var(--brown); stroke-width: 2; }
.map .dot--out { fill: var(--paper); stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 2 2; }
.map .halo { fill: transparent; }
.map .ring { fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-dasharray: 3 4; opacity: 0; }
.map .mplace:focus-visible .ring,
.map .mplace.is-on .ring { opacity: 1; }
.map .lbl {
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.03em;
  fill: var(--ink-2);
  paint-order: stroke;
  stroke: var(--paper-2);
  stroke-width: 3.6px;
  stroke-linejoin: round;
}
.map .lbl--out { fill: var(--faint); font-style: italic; }
.map .lbl--minor { opacity: 0; transition: opacity 0.22s var(--ease); }
.map .mplace:hover .lbl--minor,
.map .mplace:focus-visible .lbl--minor,
.map .mplace.is-on .lbl--minor { opacity: 1; }
.map .north line, .map .north path { stroke: var(--muted); fill: none; stroke-width: 1; }
.map .north text { fill: var(--muted); font-family: var(--sans); font-size: 10px; letter-spacing: 0.2em; }
.map .scale line { stroke: var(--ink-2); stroke-width: 1.2; }
.map .scale text { fill: var(--muted); font-family: var(--sans); font-size: 10px; letter-spacing: 0.08em; }

.map-cap {
  padding: 11px 16px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.55;
}
.map-cap .dim { display: block; color: var(--faint); }

/* Légende de la carte */
.map-legend {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
}
.ml-title {
  margin-bottom: 8px;
  color: var(--brown);
  font-size: 0.58rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}
.ml-scale {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.ml-svg { width: 230px; height: 74px; flex: none; overflow: visible; }
.ml-ref { fill: rgba(46, 70, 56, 0.12); stroke: var(--forest); stroke-width: 1.2; }
.ml-ref-n { fill: var(--muted); font-family: var(--sans); font-size: 10px; letter-spacing: 0.06em; }
.ml-scale p { margin: 0; max-width: 46ch; color: var(--ink-2); font-size: 0.8rem; line-height: 1.55; }
.ml-scale strong { font-weight: 600; color: var(--ink); }
.ml-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.7rem;
}
.ml-items span { display: inline-flex; align-items: center; gap: 7px; }
.ml-swatch { width: 16px; height: 10px; flex: none; }
.ml-swatch--line { border-top: 1.5px dashed var(--brown); }
.ml-swatch--dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(46, 70, 56, 0.15); border: 1.2px solid var(--forest);
}
.ml-swatch--out { width: 9px; height: 9px; border-radius: 50%; border: 1.2px dashed var(--muted); }
.ml-swatch--sel {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(176, 141, 87, 0.52); border: 1.5px solid var(--brown);
}

.map-info {
  position: sticky;
  top: calc(var(--head-h) + 20px);
  padding: clamp(18px, 2.3vw, 26px);
  border: 1px solid var(--rule-2);
  background: var(--card);
}

.mi-kicker {
  margin-bottom: 10px;
  color: var(--brown);
  font-size: 0.58rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}
.map-info h3 { margin-bottom: 4px; font-size: clamp(1.4rem, 2.2vw, 1.75rem); }
.mi-coord { margin-bottom: 14px; color: var(--faint); font-family: var(--serif); font-size: 0.84rem; font-style: italic; }
.mi-note { margin-bottom: 16px; color: var(--ink-2); font-size: 0.9rem; line-height: 1.6; }
.mi-empty { color: var(--muted); font-family: var(--serif); font-size: 1rem; font-style: italic; line-height: 1.55; }
.mi-empty .hint { display: block; margin-top: 10px; color: var(--faint); font-family: var(--sans); font-size: 0.72rem; font-style: normal; line-height: 1.5; }

.mi-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.mi-stat b { color: var(--ink); font-family: var(--serif); font-size: 1.25rem; font-weight: 400; letter-spacing: 0; }
.mi-stat small { margin-left: 4px; color: var(--faint); font-size: 0.5rem; letter-spacing: 0.08em; text-transform: none; }

.mi-people { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--rule); }
.mi-people .lbl {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.mi-people .links { display: flex; flex-wrap: wrap; gap: 6px; }

.mi-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 16px;
  border: 1px solid var(--rule-2);
  color: var(--ink);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: background 0.22s var(--ease), color 0.22s var(--ease), border-color 0.22s var(--ease);
}
.mi-btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* 9. Enquête --------------------------------------------------------------- */
.enq { display: flex; flex-direction: column; gap: clamp(38px, 5.5vw, 62px); }

.sub {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  color: var(--brown);
  font-family: var(--sans);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.sub::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.findings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 4vw, 56px);
  border-top: 1px solid var(--rule);
}

.finding {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 10px;
  padding: 17px 0;
  border-bottom: 1px solid var(--rule);
}
.finding .fn { padding-top: 3px; color: var(--gold); font-family: var(--serif); font-size: 0.82rem; }
.finding h4 { margin-bottom: 4px; font-size: 1.02rem; line-height: 1.3; }
.finding p { color: var(--muted); font-size: 0.85rem; line-height: 1.6; }
.finding .src {
  display: block;
  margin-top: 7px;
  color: var(--faint);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.anoms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
}

.anom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(16px, 2vw, 22px);
  border: 1px solid var(--rule);
  background: var(--card);
}

.anom-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.anom h4 { font-size: 1rem; line-height: 1.32; }

.anom details { margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--rule); }

.anom summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--brown);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  list-style: none;
  cursor: pointer;
}
.anom summary::-webkit-details-marker { display: none; }
.anom summary::after { content: "+"; color: var(--gold); font-family: var(--serif); font-size: 1rem; line-height: 1; }
.anom details[open] summary::after { content: "−"; }
.anom summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.anom-body { padding-top: 10px; color: var(--ink-2); font-size: 0.87rem; line-height: 1.62; }
.anom-src { margin-top: 10px; color: var(--faint); font-size: 0.55rem; letter-spacing: 0.12em; text-transform: uppercase; }

.hyps { border-top: 1px solid var(--rule); }

.hyp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 12px 32px;
  align-items: start;
  padding: 17px 0;
  border-bottom: 1px solid var(--rule);
}
.hyp h4 { margin-bottom: 4px; font-size: 1.02rem; }
.hyp p { max-width: 62ch; color: var(--muted); font-size: 0.85rem; line-height: 1.6; }

.gauge { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.bars { display: flex; gap: 3px; }
.bars i { display: block; width: 15px; height: 5px; background: var(--rule-2); }
.bars i.on { background: var(--brown); }
.gauge .lvl { color: var(--muted); font-size: 0.55rem; letter-spacing: 0.13em; text-transform: uppercase; white-space: nowrap; }
.hyp--confirmed .bars i.on { background: var(--forest); }
.hyp--hypothetical .bars i.on { background: var(--gold); }
.hyp--unproven .bars i.on { background: var(--faint); }

/* 10. Sources -------------------------------------------------------------- */
.sources {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.source {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 0 18px;
  border-top: 1px solid var(--ink);
}
.source .stype { color: var(--brown); font-size: 0.55rem; letter-spacing: 0.17em; text-transform: uppercase; }
.source h4 { font-size: 1.01rem; line-height: 1.34; }
.source p { flex: 1; color: var(--muted); font-size: 0.83rem; line-height: 1.58; }

.source a {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--gold);
  color: var(--ink);
  font-size: 0.56rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.source a:hover { color: var(--brown); border-color: var(--brown); }
.source-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 2px; }
.source-links a { font-size: 0.53rem; }
.source .nolink { color: var(--faint); font-size: 0.55rem; letter-spacing: 0.13em; text-transform: uppercase; }

/* 10 bis. Documents ------------------------------------------------------- */
.docs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 26px); }
.doc-card { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 14px 0 18px; border-top: 1px solid var(--ink); }
.doc-card--feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(16px, 2vw, 26px); align-items: start; }
.doc-card--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(16px, 2vw, 26px); align-items: start; }
.doc-img { display: block; background: #0c0c0b; border: 1px solid rgba(28,27,24,.18); }
.doc-img img { display: block; width: 100%; height: auto; }
.doc-card figcaption { display: flex; flex-direction: column; gap: 8px; }
.doc-tag { font-size: 0.55rem; letter-spacing: 0.17em; text-transform: uppercase; }
.doc-tag--ok { color: #2f6b4f; }
.doc-tag--warn { color: #a05a2c; }
.doc-tag--muted { color: var(--faint); }
.doc-card h3 { font-size: 1.12rem; line-height: 1.3; }
.doc-card p { color: var(--muted); font-size: 0.84rem; line-height: 1.6; }
.doc-persons { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; font-size: 0.62rem; color: var(--faint); }
.doc-persons > span { letter-spacing: 0.13em; text-transform: uppercase; }
.doc-persons em { font-style: normal; color: var(--faint); }
.doc-person { border: 0; background: none; padding: 0; color: var(--brown); font: inherit; border-bottom: 1px solid var(--gold); cursor: pointer; }
.doc-person:hover { color: var(--ink); }
.doc-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.doc-links a { border-bottom: 1px solid var(--gold); color: var(--ink); font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }
.doc-links a:hover { color: var(--brown); border-color: var(--brown); }
.doc-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 240px; padding: 20px; border: 1px dashed rgba(28,27,24,.25); background: repeating-linear-gradient(135deg, transparent 0 9px, rgba(0,0,0,.035) 9px 10px), var(--paper-2); color: var(--muted); text-align: center; }
.doc-placeholder span { font-size: 0.55rem; letter-spacing: 0.24em; }
.doc-placeholder strong { font-family: var(--serif); font-size: 1.35rem; letter-spacing: 0.04em; }
.doc-placeholder small { font-size: 0.62rem; letter-spacing: 0.08em; }

.doc-source { font-size: 0.62rem; color: var(--faint); }
.doc-source a { color: var(--brown); border-bottom: 1px solid var(--gold); text-decoration: none; }
.doc-source a:hover { color: var(--ink); }

body.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: clamp(14px, 3vw, 40px); background: rgba(10,10,9,.94); }
.lightbox[hidden] { display: none; }
.lb-fig { margin: 0; display: flex; flex-direction: column; max-width: min(1500px, 96vw); max-height: 94vh; }
.lb-fig img { max-width: 100%; max-height: 74vh; object-fit: contain; background: #000; border: 1px solid rgba(245,240,230,.18); }
.lb-cap { display: flex; flex-direction: column; gap: 5px; max-height: 18vh; overflow: auto; padding: 14px 18px; background: var(--paper); color: var(--ink); }
.lb-cap strong { font-family: var(--serif); font-size: 1.02rem; line-height: 1.3; }
.lb-cap p { margin: 0; font-size: 0.78rem; line-height: 1.5; color: var(--muted); }
.lb-src { font-size: 0.62rem; color: var(--faint); }
.lb-src a { color: var(--brown); border-bottom: 1px solid var(--gold); text-decoration: none; }
.lb-src a:hover { color: var(--ink); }
.lb-close, .lb-prev, .lb-next { position: absolute; border: 1px solid rgba(245,240,230,.35); background: rgba(10,10,9,.55); color: var(--paper); cursor: pointer; line-height: 1; }
.lb-close { top: 16px; right: 16px; width: 42px; height: 42px; font-size: 1.35rem; }
.lb-prev, .lb-next { top: 50%; width: 44px; height: 64px; transform: translateY(-50%); font-size: 1.2rem; }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(245,240,230,.14); }
@media (max-width: 600px) {
  .lb-prev, .lb-next { width: 36px; height: 50px; }
  .lb-close { top: 10px; right: 10px; width: 38px; height: 38px; }
}

.panel-docs { display: flex; flex-direction: column; gap: 12px; }
.panel-doc { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: start; padding-top: 10px; border-top: 1px solid rgba(28,27,24,.18); color: var(--ink); text-decoration: none; }
.panel-doc img, .panel-doc-ph { width: 92px; height: 64px; object-fit: cover; border: 1px solid rgba(28,27,24,.18); background: #111; display: flex; align-items: center; justify-content: center; font-size: 0.5rem; letter-spacing: 0.1em; color: var(--paper); text-transform: uppercase; }
.panel-doc-txt strong { display: block; font-family: var(--serif); font-size: 0.95rem; line-height: 1.25; }
.panel-doc-txt em { display: block; margin-top: 2px; font-style: normal; font-size: 0.68rem; color: var(--muted); }
.panel-doc-txt small { display: block; margin-top: 4px; font-size: 0.7rem; line-height: 1.45; color: var(--muted); }
.panel-doc:hover .panel-doc-txt strong { color: var(--brown); }

@media (max-width: 860px) {
  .docs-grid { grid-template-columns: 1fr; }
  .doc-card--feature, .doc-card--wide { grid-column: auto; grid-template-columns: 1fr; }
}

/* 11. Pied de page --------------------------------------------------------- */
.site-foot {
  padding-block: clamp(40px, 6vw, 70px) 26px;
  border-top: 1px solid var(--rule-2);
  background: var(--paper-2);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
}

.site-foot h3 {
  margin-bottom: 11px;
  color: var(--brown);
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.site-foot p { max-width: 42ch; color: var(--muted); font-size: 0.83rem; line-height: 1.66; }

.foot-brand .fb-name {
  max-width: none;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.55rem;
  letter-spacing: 0.3em;
  line-height: 1;
}
.foot-brand .fb-sub { margin-top: 8px; color: var(--brown); font-family: var(--serif); font-size: 0.9rem; font-style: italic; }
.foot-brand .fb-note { margin-top: 14px; color: var(--faint); font-size: 0.76rem; }

.colophon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(32px, 5vw, 50px);
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--faint);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
}
.colophon p { max-width: none; font-size: inherit; }
.colophon a {
  color: var(--ink-2);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-decoration: none;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.colophon a:hover { color: var(--ink); border-color: var(--gold); }

/* 12. Panneau -------------------------------------------------------------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(28, 27, 24, 0.44);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.36s var(--ease), visibility 0s linear 0.36s;
}
.scrim.is-open { opacity: 1; visibility: visible; transition: opacity 0.36s var(--ease), visibility 0s; }

.panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  border-left: 1px solid var(--rule-2);
  background: var(--paper);
  box-shadow: -40px 0 90px -60px rgba(0, 0, 0, 0.85);
  visibility: hidden;
  transform: translateX(100%);
  transition: transform 0.44s var(--ease), visibility 0s linear 0.44s;
}
.panel.is-open { visibility: visible; transform: none; transition: transform 0.44s var(--ease), visibility 0s; }

.panel-bar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(18px, 4vw, 32px);
  border-bottom: 1px solid var(--rule);
}

.panel-kicker { color: var(--brown); font-size: 0.58rem; letter-spacing: 0.19em; text-transform: uppercase; }

.panel-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--rule-2);
  border-radius: 50%;
  transition: background 0.22s var(--ease), border-color 0.22s var(--ease), color 0.22s var(--ease);
}
.panel-close:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.panel-close svg { width: 13px; height: 13px; }

.panel-body {
  flex: 1;
  padding: clamp(20px, 4vw, 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.panel-eyebrow { color: var(--brown); font-size: 0.58rem; letter-spacing: 0.19em; text-transform: uppercase; }
.panel-name { margin: 7px 0 6px; font-size: clamp(1.55rem, 3.3vw, 2.05rem); line-height: 1.1; }
.panel-name:focus { outline: none; }
.panel-dates { color: var(--brown); font-family: var(--serif); font-size: 1rem; font-style: italic; }

.panel-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  margin: 22px 0;
  padding: 17px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.panel-facts dt { margin-bottom: 2px; color: var(--muted); font-size: 0.55rem; letter-spacing: 0.16em; text-transform: uppercase; }
.panel-facts dd { margin: 0; color: var(--ink-2); font-size: 0.87rem; line-height: 1.45; overflow-wrap: anywhere; }

.panel-note { color: var(--ink-2); font-family: var(--serif); font-size: 1.01rem; line-height: 1.64; }
.panel-note + .panel-note { margin-top: 12px; }

.panel-corr {
  margin-top: 20px;
  padding: 12px 16px;
  border-left: 2px solid var(--gold);
  background: rgba(176, 141, 87, 0.07);
}
.panel-corr .lbl {
  display: block;
  margin-bottom: 5px;
  color: var(--brown);
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.panel-corr p { color: var(--ink-2); font-size: 0.88rem; line-height: 1.6; }

.panel-sec { margin-top: 26px; }
.panel-sec > h3 {
  margin-bottom: 10px;
  color: var(--brown);
  font-family: var(--sans);
  font-size: 0.57rem;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.panel-links { display: flex; flex-wrap: wrap; gap: 7px; }

.rel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--rule-2);
  color: var(--ink-2);
  font-size: 0.72rem;
  line-height: 1.3;
  text-align: left;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.rel:hover { border-color: var(--ink); background: rgba(28, 27, 24, 0.045); color: var(--ink); }
.rel .y { color: var(--faint); font-family: var(--serif); font-size: 0.74rem; }

.panel-srcs { display: flex; flex-direction: column; gap: 6px; }
.panel-srcs a,
.panel-srcs span { color: var(--ink-2); font-size: 0.75rem; line-height: 1.5; }
.panel-srcs a { text-decoration: none; border-bottom: 1px solid var(--gold); align-self: flex-start; }
.panel-srcs a:hover { color: var(--brown); }

.panel-genea {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 11px 16px;
  border: 1px solid var(--rule-2);
  color: var(--ink);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.22s var(--ease), border-color 0.22s var(--ease), color 0.22s var(--ease);
}
.panel-genea:hover { background: var(--forest); border-color: var(--forest); color: var(--paper); }
.panel-genea svg { width: 11px; height: 11px; }

/* Animations --------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--d, 0) * 65ms);
}
.reveal.is-in { opacity: 1; transform: none; }

@keyframes route-crawl {
  to { stroke-dashoffset: -110; }
}
.map .route { animation: route-crawl 26s linear infinite; }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 980px) {
  .hero-cols { grid-template-columns: 1fr; }
  .hero-art {
    position: absolute;
    right: -7%;
    top: -3%;
    z-index: 0;
    width: min(58%, 320px);
    opacity: 0.13;
    pointer-events: none;
  }
  .tree-cap { display: none; }
  .sec-head { grid-template-columns: 1fr; align-items: start; }
  .sec-head .lede { justify-self: start; }
  .map-shell { grid-template-columns: 1fr; }
  .map-info { position: static; }
  .sources { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root { --head-h: 58px; }
  body { font-size: 16px; }
  .brand-text span { display: none; }
  .head-nav { gap: 16px; max-width: 68%; }
  .head-nav a { font-size: 0.62rem; letter-spacing: 0.13em; }
  .hero-stats { grid-template-columns: 1fr 1fr; row-gap: 20px; }
  .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stat:nth-child(even) { padding-right: 0; }
  .gen-facts { grid-template-columns: 1fr; gap: 8px; }
  .findings { grid-template-columns: 1fr; }
  .anoms { grid-template-columns: 1fr; }
  .hyp { grid-template-columns: 1fr; gap: 10px; }
  .gauge { justify-content: flex-start; }
  .tl-item { grid-template-columns: 52px 18px minmax(0, 1fr); column-gap: 12px; }
  .tl-item::before { left: 73px; }
  .tl-year { font-size: 0.94rem; }
  .map-info { padding: 18px; }
}

@media (max-width: 540px) {
  .hero-title { letter-spacing: 0.1em; }
  .hero-lede { font-size: 0.93rem; }
  .hero-meta { font-size: 0.58rem; }
  .hero-meta span + span::before { margin: 0 7px; }
  .cta { flex: 1 1 auto; justify-content: center; padding: 12px 14px; }
  .lineage { gap: 10px; }
  .lineage::before { left: 18px; }
  .gen { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; }
  .gen-mark { width: 38px; height: 38px; font-size: 0.7rem; }
  .gen-card { padding: 14px 15px; }
  .gen-facts { margin-top: 11px; padding-top: 10px; }
  .people { grid-template-columns: 1fr; }
  .source { padding-top: 14px; }
  .sources { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .panel-facts { grid-template-columns: 1fr; }
  .tl-item { grid-template-columns: 44px 14px minmax(0, 1fr); column-gap: 10px; }
  .tl-item::before { left: 61px; }
  .tl-text { font-size: 0.86rem; }
  .tl-title { font-size: 1.01rem; }
  .badge { font-size: 0.52rem; padding: 4px 8px 3px; }
  .map-cap { font-size: 0.64rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .map .route { animation: none; }
}

@media print {
  .site-head, .progress, .grain, .scrim, .panel, .hero-actions,
  .chips, .search, .more, .tl-filters, .map-info, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .section { padding-block: 18px; border-top: 1px solid #ccc; }
  .gen-card { break-inside: avoid; background: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.7em; color: #555; }
  .map, .hero-art { max-width: 70%; }
}

/* En-tête sur deux lignes sur très petits écrans */
@media (max-width: 540px) {
  :root { --head-h: 88px; }
  .head-inner { height: auto; flex-wrap: wrap; padding: 9px 0 6px; row-gap: 2px; }
  .head-nav {
    order: 2; width: 100%; max-width: 100%; gap: 12px; padding-bottom: 2px;
    -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
    mask-image: linear-gradient(90deg, #000 92%, transparent);
  }
  .head-nav a { font-size: 0.58rem; letter-spacing: 0.1em; }
}
