/* Explorateur : vue grand écran (SVG). Couleurs : Matthieu = bleu, Luc = orange ; les jetons viennent de base.css. */

#app { padding: 0; }
/* Clé des symboles (js/views/status-key.js) : losange = même nom, rond = pas ce nom ; plein = l'autre liste en parle ainsi. */
.status-key { display: flex; flex-wrap: wrap; justify-content: center; gap: .1rem .9rem; margin: 0; padding: 0; list-style: none; font-size: .75rem; color: var(--ink-soft); }
.status-key li { display: inline-flex; align-items: center; gap: .35rem; }
.status-mark { flex: none; box-sizing: border-box; width: 9px; height: 9px; border: 1.5px solid var(--ink); border-radius: 50%; }
.status-mark.st-differs { background: var(--ink); }
/* Même personne : le losange bicolore, Matthieu à gauche, Luc à droite une fois tourné. */
.status-mark.st-both { border: 0; background: linear-gradient(45deg, var(--mt) 50%, var(--lk) 50%); }
.status-mark.st-both, .status-mark.st-debated { border-radius: 1px; transform: rotate(45deg); }
.status-key[data-gen="matthew"] .status-mark.st-both { background: var(--mt); }
.status-key[data-gen="luke"] .status-mark.st-both { background: var(--lk); }
.col-heads > .status-key { position: absolute; bottom: .35rem; }
/* Conseil d'un grand écran : écrit dans la page, sa place est prise dès le premier rendu (CLS). */
.screen-advice { display: none; }
@media (max-width: 1199px) {
  :root[data-js]:not([data-screen-ok]) .screen-advice { display: block; flex: none; padding: .6rem max(16px, env(safe-area-inset-left)); background: var(--accent-wash); border-bottom: 1px solid var(--rule-strong); }
}
.screen-advice h2 { margin: 0 0 .15rem; font-size: 1rem; }
.screen-advice p { margin: 0; max-width: 60rem; font-size: .9375rem; line-height: 1.35; }
.screen-advice-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .45rem; }
.screen-advice button { min-height: 44px; padding: .25rem .8rem; font: inherit; font-size: .9375rem; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius); cursor: pointer; }
.screen-advice button:hover { border-color: var(--accent); }
.screen-advice button:focus-visible, .tour button:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.screen-advice button[hidden] { display: none; }

/* Visite guidée (js/tour.js) : une carte fixe qui ne déplace rien ; la commande expliquée reste utilisable. */
/* Boutons de la barre d'outils : même gabarit, même hauteur que les bascules (.radio-group). */
.chips-menu-button, .settings-button, .rail-toggle, .legend-toggle { display: inline-flex; align-items: center; gap: .3rem; box-sizing: border-box; min-height: 36px; padding: .3rem .8rem; font: inherit; font-size: .9rem; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius); cursor: pointer; }
.chips-menu-button:hover, .settings-button:hover, .rail-toggle:hover, .legend-toggle:hover { background: var(--accent-wash); }
/* Gabarit de l'aide : celui des commandes de l'en-tête (css/base.css). */
.site .help-link { padding: 0; text-decoration: none; }
.site .help-link:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
:root[data-intro] .help-link { visibility: hidden; }
.intro label.intro-never { display: flex; min-height: 44px; margin: 0; padding: .25rem 0; align-items: center; background: none; border: 0; box-shadow: none; }
.intro .intro-never input { margin: 0; }
.intro-again { margin: 0 0 1rem; font-size: .9375rem; color: var(--ink-soft); }
.tour { position: fixed; z-index: 900; left: 50%; bottom: 1.25rem; transform: translateX(-50%); box-sizing: border-box; width: min(26rem, calc(100vw - 2rem)); max-height: min(80dvh, 36rem); overflow-y: auto; padding: .9rem 1.1rem 1rem; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius); box-shadow: var(--shadow-float); }
.tour h2 { margin: 0 2rem .4rem 0; font-size: 1.1rem; line-height: 1.2; }
.tour h2:focus { outline: none; }
.tour p { margin: 0 0 .5rem; line-height: 1.4; }
.tour .tour-count { margin-bottom: .15rem; font-size: .8125rem; color: var(--ink-soft); }
.tour-kinds { margin: 0 0 .5rem; padding: 0; list-style: none; line-height: 1.35; }
.tour-kinds li { margin-top: .25rem; }
.tour-actions { position: sticky; bottom: -1rem; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .5rem; margin: .6rem 0 -1rem; padding: .25rem 0 1rem; background: var(--paper); }
/* Précédent et Suivant restent ensemble ; si la place manque, c'est la case qui prend sa propre ligne. */
.tour-nav { display: flex; flex: none; gap: .5rem; margin-left: auto; }
.tour-never { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; margin-right: auto; font-size: .875rem; color: var(--ink-soft); cursor: pointer; }
.tour-never input { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--accent); }
.tour-actions button { min-height: 44px; padding: .25rem .9rem; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius); cursor: pointer; }
.tour-actions .tour-next { font-weight: 600; color: var(--paper); background: var(--ink); border-color: var(--ink); }
.tour-close { position: absolute; top: .5rem; right: .5rem; display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; color: var(--ink-soft); background: none; border: 0; cursor: pointer; }
/* Le projecteur : un anneau vif autour de la commande, tout le reste assombri, sans rien bloquer (elle reste utilisable).
   Élément à part, au-dessus de tout sauf de la carte : une ombre posée sur la commande serait coupée par ce qui la contient. */
.tour-spot { position: fixed; z-index: 850; box-sizing: border-box; outline: 4px solid #ffd400; border-radius: var(--radius); box-shadow: 0 0 0 100vmax rgb(4 12 9 / .62); pointer-events: none; }
.tour-spot[hidden] { display: none; }

.intro { display: none; }
:root[data-js][data-intro] .intro { display: block; flex: 1 1 auto; min-height: 0; overflow-y: auto; box-sizing: border-box; padding: 1.5rem max(20px, calc((100% - 42rem) / 2)) 3rem; }
:root[data-intro] .explorer-page .boot { display: none; }
:root[data-intro] .name-search-slot { visibility: hidden; }
.intro h1 { margin: 0 0 .75rem; font-size: clamp(1.9rem, 4vw, 2.75rem); line-height: 1.1; }
.intro h2 { margin: 2rem 0 .5rem; font-size: 1.15rem; }
.intro h1:focus { outline: none; }
.intro-lead { margin: 0 0 1.25rem; font-family: var(--font-read); font-size: 1.1875rem; line-height: 1.45; }
.intro fieldset { margin: 0 0 1.1rem; padding: 0; border: 0; }
.intro legend { padding: 0; margin-bottom: .5rem; font-weight: 700; }
.intro label { display: flex; gap: .6rem; align-items: flex-start; min-height: 44px; margin-top: .4rem; padding: .6rem .75rem; line-height: 1.35; background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius); cursor: pointer; }
.intro fieldset label:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-wash); }
.intro input { flex: none; margin: .2rem 0 0; accent-color: var(--ink); }
.intro input:focus-visible, .intro-go:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.intro-go { min-height: 44px; padding: .5rem 1.25rem; font: inherit; font-weight: 600; color: var(--paper); background: var(--ink); border: 1px solid var(--ink); border-radius: var(--radius); cursor: pointer; }
.intro ul { margin: 0; padding-left: 1.2rem; line-height: 1.45; }
.intro li + li { margin-top: .4rem; }
.abbr { text-decoration: underline dotted; text-underline-offset: .15em; cursor: help; }
abbr.abbr:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 1px; }
.explorer-status { padding: 2rem 1rem; color: var(--ink-soft); }
/* Place du champ de recherche, réservée dans la page : l'en-tête ne bouge pas à son arrivée (js/app.js). */
.name-search-slot { display: none; box-sizing: border-box; min-height: 2.5rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }
:root[data-js] .name-search-slot { display: block; }

.explorer { display: flex; flex-direction: column; height: calc(100vh - 9.5rem); height: calc(100dvh - 9.5rem); min-height: 28rem; }
.explorer-toolbar { position: relative; z-index: 40; container-type: inline-size; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .5rem 1rem; background: var(--sheet); border-bottom: 1px solid var(--rule); }

.radio-group { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.radio-group button { border: 0; background: transparent; padding: .3rem .85rem; cursor: pointer; font-size: .9rem; }
.radio-group button + button { border-left: 1px solid var(--rule-strong); }
.radio-group button[aria-checked="true"] { background: var(--ink); color: var(--paper); font-weight: 600; }
.radio-group button:focus-visible { outline-offset: -3px; }
.explorer-toolbar .radio-group button { min-height: 34px; padding-inline: .4rem; }
.explorer-toolbar .chip { min-height: 26px; padding: .05rem .45rem .05rem .3rem; gap: .2rem; font-size: .78rem; }
.explorer-toolbar :is(.rail-toggle, .legend-toggle, .chips-menu-button, .settings-button) { padding-inline: .55rem; }

.col-heads { position: relative; height: 1.9rem; flex: none; border-bottom: 1px solid var(--rule); background: var(--sheet); }
.col-head { position: absolute; top: .25rem; font-weight: 700; font-size: .95rem; text-decoration: none; white-space: nowrap; }
/* Les en-têtes sont des liens : « .site .col-heads » l'emporte sur « .site a » et « .site a:hover » (css/site.css). */
.site .col-heads .col-head-matthew { color: var(--mt); }
.site .col-heads .col-head-luke { color: var(--lk); }
.col-head:hover { text-decoration: underline; }
.col-head-note { position: absolute; top: .4rem; left: 1rem; font-size: .8rem; font-style: italic; color: var(--ink-soft); white-space: nowrap; }

.explorer-scroll { position: relative; flex: 1; overflow-y: auto; overflow-x: hidden; background: var(--paper); }
/* Frise de l'Antiquité (page en trois panneaux, ≥ 1200 px) : à gauche des généalogies, dans le même défilement. */
.frise-svg { display: none; }
.frise-head { position: absolute; top: 0; left: 0; bottom: 0; box-sizing: border-box; overflow: hidden; background: var(--paper); box-shadow: inset -1px 0 var(--rule-strong); }
.frise-head-row { display: flex; align-items: baseline; gap: .4rem .9rem; padding: .2rem .75rem 0; white-space: nowrap; overflow: hidden; }
.frise-title { min-width: 0; overflow: hidden; font-weight: 700; font-size: .95rem; text-overflow: ellipsis; white-space: nowrap; }
.frise-head .col-head-note { position: static; display: inline; }
/* Titres des bandes : verticaux (de bas en haut), alignés sur leur colonne de la frise. */
.band-title-box { position: absolute; bottom: .3rem; display: flex; justify-content: center; }
.band-title { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12px; line-height: 1; font-weight: 600; white-space: nowrap; color: var(--tint-ink, var(--ink-soft)); }
.site .frise-unplaced-link { position: absolute; bottom: .35rem; padding: 0; border: 0; background: none; font: inherit; font-size: .8rem; color: var(--accent-strong); text-decoration: underline; text-underline-offset: .18em; text-align: left; line-height: 1.25; cursor: pointer; }
.frise-foot h3:focus { outline: none; }
.frise-foot h3:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.site .frise-head-row .frise-unplaced-link { position: static; white-space: nowrap; }
.scale-break { stroke: var(--ink-soft); stroke-width: 1.5; stroke-dasharray: 6 3; }
.scale-break-label { fill: var(--ink); font-size: 10.5px; font-weight: 600; font-style: italic; paint-order: stroke; stroke: var(--paper); stroke-width: 3px; }
@media (min-width: 1200px) {
  /* En-tête de la frise, grand en haut de la scène. Il ne compte que pour --head-mini dans le flux : la marge négative
     lui fait passer au-dessus de .head-space, qui défile. Réduit ou rouvert, la scène ne bouge donc jamais. */
  .col-heads.has-frise { --head-full: 5.4rem; --head-mini: 1.9rem; z-index: 6; height: var(--head-full); margin-bottom: calc(var(--head-mini) - var(--head-full)); transition: height .16s ease .12s, margin-bottom .16s ease .12s, box-shadow .16s ease .12s; }
  .col-heads.has-frise.head-tall { --head-full: 6.9rem; }
  .head-space.has-frise { height: 3.5rem; }
  .head-space.has-frise.head-tall { height: 5rem; }
  .col-heads.has-frise.is-mini:not(:hover, :focus-within) { height: var(--head-mini); margin-bottom: 0; transition-delay: 0s; }
  .col-heads.has-frise.is-mini:is(:hover, :focus-within) { box-shadow: var(--shadow-float); }
  .col-heads.has-frise .band-title-box, .col-heads.has-frise .frise-head-row .col-head-note, .col-heads.has-frise .frise-unplaced-link, .col-heads.has-frise .status-key { transition: opacity .12s ease .12s; }
  .col-heads.has-frise.is-mini:not(:hover, :focus-within) :is(.band-title-box, .frise-head-row .col-head-note, .frise-unplaced-link, .status-key) { opacity: 0; transition-delay: 0s; }
  .col-heads.has-frise.is-mini:not(:hover, :focus-within) .frise-title { white-space: nowrap; }
  /* Réduit, les bandes s'effacent : le titre prend toute la frise, au lieu de la colonne des libellés. */
  .col-heads.has-frise.is-mini:not(:hover, :focus-within) .frise-head-row.is-beside { left: .75rem !important; width: auto !important; }
  .frise-head-row.is-beside { position: absolute; top: .2rem; box-sizing: border-box; padding: 0 .4rem 0 0; flex-wrap: wrap; white-space: normal; line-height: 1.2; }
  .frise-head-row.is-beside .frise-title, .frise-head-row.is-beside .col-head-note { white-space: normal; }
  .frise-head-row.is-beside .col-head-note { line-height: 1.1; font-size: .75rem; }
  .explorer-body.has-frise { display: grid; grid-template-columns: var(--frise-w) minmax(0, 1fr); align-items: start; }
  .explorer-body.has-frise .frise-svg { display: block; grid-column: 1; grid-row: 1; background: var(--paper); box-shadow: inset -1px 0 var(--rule-strong); }
  .explorer-body.has-frise .explorer-svg { grid-column: 2; grid-row: 1; }
  .explorer-body.has-frise .frise-foot-host { grid-column: 1; grid-row: 2; box-shadow: inset -1px 0 var(--rule-strong); }
}
.frise-foot-host:empty { display: none; }

/* ---------- Frise de l'Antiquité (js/views/frise.js) ---------- */
.frise-svg { font-family: var(--font-ui); font-size: 12px; }
.band-bg { fill: var(--sheet); }
.period-label-v { fill: var(--tint-ink, var(--ink)); font-size: 10.5px; font-style: italic; }
/* Tâche 6.3 : périodes, repères (frise, libellés, bande) ouvrent leur fiche ; sélection marquée par un contour épais. */
.period-g, .event-label-g, .marker-label-g, [data-sel].strip-hit, .strip [data-sel] { cursor: pointer; }
.period-g { outline: none; }
.period-g:hover .period-span { stroke-width: 2.5; }
.period-g:hover .period-label-v { text-decoration: underline; }
.period-g:focus-visible .period-span, .period-g:focus-visible .period-zone { stroke: var(--accent); stroke-width: 3; }
.period-g.is-selected .period-span, .period-g.is-selected .period-zone { stroke: var(--accent); stroke-width: 3; stroke-dasharray: none; }
.strip-hit { fill: transparent; }
.event-label-g, .marker-label-g { outline: none; }
/* Survol d'un libellé ou d'une marque de la frise : l'autre moitié s'allume (js/views/frise.js, linkHover). */
.book.is-hot .book-mark, .period-g.is-hot :is(.period-span, .period-zone) { stroke: var(--accent); stroke-width: 2.5; }
:is(.zone-strip, .extent-strip, .marker-tick).is-hot { stroke: var(--accent); stroke-width: 2.5; }
.marker-leader.is-hot { stroke: var(--accent); stroke-width: 1.5; }
.event-label-g.is-hot .hit, .book-label-g.is-hot .hit { fill: var(--accent-wash); }
.event-label-g .hit { fill: transparent; }
.event-label-g:hover .hit, .event-label-g.is-selected .hit { fill: var(--accent-wash); }
.event-label-g:focus-visible .hit { stroke: var(--accent); stroke-width: 2; }
.event-label-g.is-selected .marker-label { stroke: var(--accent-wash); }
.marker-label-g:hover .marker-label > tspan:first-child, .marker-label-g.is-selected .marker-label > tspan:first-child { text-decoration: underline; }
.marker-label-g:focus-visible .marker-label { outline: 2px solid var(--accent); }
.period-zone { fill: url(#frise-hatch-zone); stroke: var(--tint-ink, var(--ink-soft)); stroke-width: 1; stroke-dasharray: 2 2; }
/* Livres : teinte de leur grand moment (classe moment-<clé>) ; hachures (fill="url(#hatch-moment-…)") pour une
   précision traditionnelle ou une barre courte ; contour en tirets pour une précision hypothétique. */
.book-mark:not([fill]) { fill: var(--tint); }
.book-mark { stroke: var(--tint-ink); stroke-width: 1.2; }
.book-mark.prec-hypothetique, .book-zone { stroke-dasharray: 3 2; }
/* Livre placé par la lecture approximative : zone floue (dégradé par grand moment), sans contour. */
.book-mark.reading-approximate { stroke: none; }
.fuzzy-stop { stop-color: var(--tint); }
.fuzzy-stop-edge { stop-color: var(--tint-ink); }
.book-zone { stroke-width: 1; }
.book-hatch-bg { fill: var(--tint); }
.book-hatch-line { stroke: var(--tint-ink); stroke-width: 1.5; }
.book { cursor: pointer; }
.book.is-selected .book-mark { stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: none; }
.book-label-g { cursor: pointer; outline: none; }
.book-label-g .hit { fill: transparent; }
.book-label-g:hover .hit, .book-label-g.is-selected .hit { fill: var(--accent-wash); }
.book-label-g:focus-visible .hit { stroke: var(--accent); stroke-width: 2; }
.book-label { fill: var(--tint-ink, var(--ink)); font-weight: 600; font-size: 12.5px; paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.book-label-g.is-selected .book-label { stroke: var(--accent-wash); }
/* Repères dans leur bande : trait fin (point), barre claire (durée), hachures (zone). */
.marker-tick { stroke: var(--marker-world); stroke-width: 2; }
.marker-tick.marker-bible { stroke: var(--marker-bible); }
.extent-strip { fill: var(--marker-world); opacity: .35; }
.extent-strip.marker-bible { fill: var(--marker-bible); }
.extent-strip.reading-approximate { fill: url(#fuzzy-marker-bible); opacity: 1; }
.extent-strip.reading-biblical { fill: url(#hatch-marker-bible); opacity: 1; }
.fuzzy-stop-bible { stop-color: var(--marker-bible); }
.marker-hatch-bg { fill: var(--paper); }
.marker-hatch-line { stroke: var(--marker-bible); stroke-width: 1.5; }
.zone-strip, .frise-svg .zone-band { fill: url(#frise-hatch-zone); }
.frise-svg .zone-band { opacity: .15; }
.book-swatch-svg { fill: var(--tint); stroke: var(--tint-ink); stroke-width: 1; }
.frise-svg .marker-label { font-size: 12.5px; fill: var(--marker-world); font-weight: 400; }
.frise-svg .marker-label.marker-bible { fill: var(--marker-bible); }
.label-icon { fill: var(--tint-ink, var(--ink)); }
.label-icon.marker-world { fill: var(--marker-world); }
.label-icon.marker-bible { fill: var(--marker-bible); }
.frise-svg .marker-label .marker-sub { fill: var(--ink-faint-text, var(--ink-soft)); }
.frise-svg .book-label { font-weight: 500; }
.frise-svg .period-span { stroke-width: .75; fill-opacity: .55; }
.frise-svg .zone-band, .frise-svg .extent-band { display: none; }
/* Pied de la frise : livres sans position, liste « Hors frise ». */
.frise-foot { padding: .75rem .75rem 1.5rem; font-size: .85rem; line-height: 1.4; border-top: 1px solid var(--rule); }
.site .frise-foot h3 { margin: 0 0 .3rem; font-family: var(--font-ui); font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.frise-foot-intro { margin: 0 0 .5rem; color: var(--ink-soft); }
.book-chip-readings { display: block; margin-top: .1rem; }
.book-chip-readings strong { color: var(--ink); font-weight: 600; }
.book-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.book-list li { margin: 0 0 .35rem; }
.book-chip { display: grid; grid-template-columns: auto 1fr; gap: 0 .5rem; align-items: baseline; width: 100%; min-height: 36px; padding: .3rem .5rem; text-align: left; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); cursor: pointer; }
.book-chip:hover, .book-chip[aria-current="true"] { background: var(--accent-wash); border-color: var(--accent); }
.book-chip.is-aside { grid-template-columns: 1fr; }
.book-swatch { width: .8rem; height: .8rem; border-radius: 2px; background: var(--tint); border: 1px solid var(--tint-ink); align-self: center; }
.book-chip-name { font-weight: 600; color: var(--tint-ink, var(--ink)); }
.book-chip-sub { grid-column: 2; font-size: .8rem; color: var(--ink-soft); }
.book-chip.is-aside .book-chip-sub { grid-column: 1; }
details.frise-offaxis > summary { padding: .3rem 0; font-weight: 600; font-style: normal; color: var(--ink); }
details.frise-offaxis > summary::before { content: '▸'; display: inline-block; width: 1rem; font-size: .8rem; }
details.frise-offaxis[open] > summary::before { content: '▾'; }
.explorer-svg { display: block; font-family: var(--font-ui); font-size: 13.5px; }

.col-matthew { --c: var(--mt); color: var(--mt); }
.col-luke { --c: var(--lk); color: var(--lk); }

/* Motifs de précision */
.hatch-bg { fill: var(--paper); }
.hatch-line { stroke-width: 2; }
.hatch-line-matthew { stroke: var(--mt); }
.hatch-line-luke { stroke: var(--lk); }
.grad-stop-matthew { stop-color: var(--mt); }
.grad-stop-luke { stop-color: var(--lk); }
.zone-line { stroke: var(--rule-strong); stroke-width: 1.5; }

/* Barres de datation : plein / dégradé / hachures / contour en tirets */
.range { fill: var(--c); stroke: var(--c); stroke-width: 1; }
.range-approximative { stroke: none; }
.range-traditionnelle { stroke-width: 1.2; }
.range-hypothetique { fill: none; stroke-width: 1.6; stroke-dasharray: 3 2.5; }
/* Hachures et dégradé (attribut fill="url(#…)") : la règle « .range { fill } » l'emporterait sur l'attribut. */
.range[fill] { fill: none; }
.range-traditionnelle.col-matthew, .range-short.col-matthew { fill: url(#hatch-matthew); }
.range-traditionnelle.col-luke, .range-short.col-luke { fill: url(#hatch-luke); }
.range-approximative.col-matthew { fill: url(#grad-matthew); }
.range-approximative.col-luke { fill: url(#grad-luke); }
/* Lecture des origines « approximative » (tâche 8.3) : zone floue, sans contour ni bornes nettes (dégradé vertical
   qui s'efface aux deux bouts, js/views/svg.js fuzzy-*). La mention écrite est dans le libellé et le nom accessible. */
.range.reading-approximate { stroke: none; }
.range.reading-approximate.col-matthew { fill: url(#fuzzy-matthew); }
.range.reading-approximate.col-luke { fill: url(#fuzzy-luke); }
/* Barre courte (moins de ~10 ans, traditionnelle ou hypothétique) : hauteur minimale et hachures (Step F). */
.range-short { stroke-dasharray: none; stroke-width: 1.2; }

/* Entrées */
.entry { cursor: pointer; outline: none; }
.entry .hit { fill: transparent; stroke: none; }
.entry:hover .hit { fill: var(--accent-wash); }
.entry:focus-visible .hit { stroke: var(--accent); stroke-width: 2; }
.entry .dot { fill: var(--paper); stroke: var(--c); stroke-width: 2; }
.entry.is-shared .dot { fill: var(--c); stroke: var(--paper); }
/* Noms différents à cet endroit : rond plein ; l'autre liste se tait : rond vide ; même nom discuté : losange vide. */
.entry.st-differs .dot { fill: var(--c); stroke: var(--paper); }
/* Même personne, les deux lignées à l'écran : losange bicolore. */
.dot-both .half-mt { fill: var(--mt); }
.dot-both .half-lk { fill: var(--lk); }
.dot-both .outline { fill: none; stroke: var(--paper); stroke-width: 1.5; }
.entry.is-selected .dot-both .outline { stroke: var(--ink); stroke-width: 2; }
.entry .name { fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.entry.is-shared .name { font-weight: 700; }
/* Lecture des origines : mention après le nom (Abraham, Naassone…), en italique. */
.entry .reading-badge { font-size: 10.5px; font-weight: 400; font-style: italic; fill: var(--ink-soft); }
.entry .second { fill: var(--ink-soft); font-style: italic; font-size: 11.5px; paint-order: stroke; stroke: var(--paper); stroke-width: 3px; }
.entry .leader { stroke: var(--rule-strong); stroke-width: 1; }
.entry.is-selected .hit { fill: var(--accent-wash); stroke: var(--accent); stroke-width: 1.5; }
.entry.is-selected .dot { fill: var(--accent); stroke: var(--ink); stroke-width: 2.5; }
.entry.is-selected .name { font-weight: 700; }

.spine { stroke: var(--rule-strong); stroke-width: 1.5; }
/* Le fil : les deux lignées, chacune dans sa couleur ; sur les noms communs, un seul trait bicolore, le nom de part et d'autre. */
.thread { fill: none; stroke: var(--c); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.entry.on-thread .name { font-size: 16px; font-weight: 600; stroke-width: 5px; }
.entry.on-thread.is-single .name { stroke-width: 9px; }
.entry.on-thread.is-lineage-size .name { font-size: inherit; font-weight: 400; }
.entry.on-thread.is-milestone .name { font-size: 23px; font-weight: 700; letter-spacing: -.02em; }
.entry.on-thread .second { font-size: 12px; stroke-width: 6px; }
.thread-note { font-family: var(--font-read); font-size: 18px; fill: var(--ink-soft); }
.identity-line { stroke: var(--ink-soft); stroke-width: 1.5; stroke-dasharray: 2 4; stroke-linecap: round; }

/* Accolades de générations non datées */
.bracket-path { fill: none; stroke: var(--ink-soft); stroke-width: 1.5; }
/* Noms sans date : l'accolade prend la couleur de sa lignée, en pointillés (le vide est une information). */
.bracket.col-matthew .bracket-path { stroke: var(--mt); }
.bracket.col-luke .bracket-path { stroke: var(--lk); }
.bracket .bracket-path, .time-thread { stroke-width: 1.4; stroke-dasharray: 1.5 5; stroke-linecap: round; }
.time-thread { fill: none; stroke: var(--ink-soft); }
.time-thread.col-matthew { stroke: var(--mt); }
.time-thread.col-luke { stroke: var(--lk); }
.bracket-label { fill: var(--ink-soft); font-style: italic; font-size: 12.5px; paint-order: stroke; stroke: var(--paper); stroke-width: 3px; }
.bracket.is-selected .bracket-path { stroke: var(--accent); stroke-width: 2.5; }
.bracket.is-selected .bracket-label { fill: var(--ink); font-weight: 700; }
.undated-list text { paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.undated-note { fill: var(--ink-soft); font-style: italic; font-size: 11.5px; paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.undated-name text { fill: var(--ink); font-size: 12.5px; }
.undated-name { cursor: pointer; }
.undated-dot { fill: var(--paper); stroke: var(--c, var(--ink-soft)); stroke-width: 1.5; }
/* Rois que Matthieu ne nomme pas (js/views/layers.js drawGhosts) : en pointillé et en italique, hors de la liste. */
.ghost { cursor: pointer; }
.ghost-bar { fill: none; stroke: var(--c); stroke-width: 1.4; stroke-dasharray: 3 2.5; opacity: .8; }
.ghost-label { fill: var(--ink-soft); font-style: italic; font-size: 11.5px; paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.ghost:hover .ghost-label, .ghost:focus-visible .ghost-label { fill: var(--ink); text-decoration: underline; }
.undated-name.col-matthew .undated-dot { stroke: var(--mt); }
.undated-name.col-luke .undated-dot { stroke: var(--lk); }
.undated-name.is-selected .undated-dot { fill: var(--accent); stroke: var(--ink); }
.undated-name .hit { fill: transparent; stroke: none; }
.undated-name:hover .hit { fill: var(--accent-wash); }
.undated-name:focus { outline: none; }
.undated-name:focus-visible .hit { stroke: var(--accent); stroke-width: 2; }
.undated-name.is-selected .hit { fill: var(--accent-wash); stroke: var(--accent); stroke-width: 1.5; }
.undated-name.is-selected text { font-weight: 700; }

/* Axe du temps */
.tick-line { stroke: var(--rule); stroke-width: 1; }
.tick-label { fill: var(--ink-faint); font-size: 10.5px; paint-order: stroke; stroke: var(--paper); stroke-width: 3px; }

/* Repères */
.marker-line { stroke: var(--marker-world); stroke-width: 1; stroke-dasharray: 1 3; }
.marker-line.marker-bible { stroke: var(--marker-bible); }
.marker-label { fill: var(--marker-world); font-weight: 600; font-size: 12.5px; paint-order: stroke; stroke: var(--paper); stroke-width: 3px; }
.marker-label.marker-bible { fill: var(--marker-bible); }
/* Périodes : couleur de leur civilisation (classe civ-<clé>, jetons --tint / --tint-ink de css/base.css). */
.period-label { fill: var(--tint-ink, var(--ink-soft)); font-style: italic; font-size: 12px; paint-order: stroke; stroke: var(--paper); stroke-width: 3px; }
.marker-sub { font-weight: 400; font-style: italic; font-size: 11.5px; fill: var(--ink-soft); }
/* Lien Wikipédia d'un repère ou d'une période (seconde ligne du libellé), nouvel onglet. */
/* Icône « W » (js/links.js, wikiSvgLink) : glyphe de 14 px dans une cible transparente de 24 px. */
.marker-wiki { cursor: pointer; color: var(--accent-strong); }
.marker-wiki .wiki-hit { fill: transparent; pointer-events: all; }
.marker-wiki:hover .wiki-hit, .marker-wiki:focus .wiki-hit { fill: var(--accent-wash); }
.marker-wiki:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 1px; }
.marker-leader { stroke: var(--ink-faint); fill: none; stroke-width: 1; }
.zone-band { fill: url(#hatch-zone); opacity: .3; }
.extent-band { fill: var(--ink-faint); opacity: .06; }
.period-span { fill: var(--tint, var(--rule-strong)); stroke: var(--tint-ink, var(--ink-soft)); stroke-width: 1.5; }
.period-edge { stroke: var(--tint-ink, var(--ink-soft)); stroke-width: 2; }

@media (prefers-reduced-motion: reduce) { .entry .hit { transition: none; } }

/* ---------- Vues téléphone (< 720 px) : js/views/mobile-*.js ---------- */
.m-view { padding-bottom: 3rem; background: var(--paper); }
.m-toolbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .5rem; padding: .5rem 1rem; background: var(--sheet); border-bottom: 1px solid var(--rule); }
.m-toolbar .radio-group { flex: 1 1 100%; }
/* Onglet Généalogies : ligne discrète qui dit ce que les puces de l'onglet Antiquité masquent (tour 1 de 8.2). */
.m-hidden-note { margin: 0; padding: .35rem 1rem; font-size: .8125rem; font-style: italic; color: var(--ink-soft); background: var(--sheet); border-bottom: 1px solid var(--rule); }
.m-toolbar .radio-group button { flex: 1; min-height: 44px; padding: .3rem .5rem; }
.m-view .m-title { margin: 1rem 1rem .25rem; font-size: 1rem; font-weight: 700; color: var(--ink-soft); }
.m-view .m-direction { margin: 0 1rem .5rem; font-size: .875rem; color: var(--ink-soft); }
.m-list, .m-list ol { list-style: none; margin: 0; padding: 0; }
.m-list { padding: 0 1rem; }

.m-entry { display: flex; flex-direction: column; justify-content: center; width: 100%; min-height: 44px; padding: .4rem .75rem; text-align: left; font: inherit; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule); border-left: 4px solid var(--c, var(--rule-strong)); border-radius: var(--radius); cursor: pointer; }
.m-name { font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.m-entry.is-shared .m-name { font-weight: 700; }
.m-second { font-size: .8rem; font-style: italic; color: var(--ink-soft); }
.m-range { font-size: .8rem; color: var(--ink-soft); } /* pas de tabular-nums : la chasse fixe s'appliquait aussi aux points de « av. J.-C. » */
.m-entry.is-selected { background: var(--accent-wash); border-color: var(--accent); border-left-color: var(--c, var(--accent)); box-shadow: inset 0 0 0 1px var(--accent); }
.m-entry.is-selected .m-name { font-weight: 700; }
.m-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.m-entry-item, .m-bracket-item, .m-note, .m-banner-item { margin: 0 0 .4rem; }
.m-bracket-item ol { margin-top: .4rem; padding-left: 1rem; }
.m-bracket-item li { margin-bottom: .4rem; }
.m-bracket-title { margin: 0; font-style: italic; color: var(--ink-soft); }
.m-bracket-note { margin: 0; font-size: .8125rem; font-style: italic; color: var(--ink-soft); }

.m-note { padding: .5rem .75rem; font-size: .85rem; font-style: italic; color: var(--ink-soft); border-left: 2px dashed var(--rule-strong); margin-left: .75rem; }
details summary { display: flex; align-items: center; min-height: 44px; padding: .3rem .75rem; cursor: pointer; font-style: italic; color: var(--ink-soft); }
details[open] > summary { border-bottom: 1px dashed var(--rule-strong); margin-bottom: .5rem; }

.m-banner { display: flex; flex-direction: column; justify-content: center; min-height: 44px; margin: 0 0 .4rem; padding: .4rem .75rem; background: transparent; border-top: 1px dotted var(--ink-faint); border-bottom: 1px dotted var(--ink-faint); }
.m-banner-title { font-weight: 600; font-size: .9rem; color: var(--marker-world); }
/* Titre du bandeau = bouton qui ouvre la fiche (tâche 6.3) : même allure qu'avant, souligné pour dire qu'il agit. */
button.m-banner-title { align-self: flex-start; min-height: 32px; padding: 0; font-family: inherit; line-height: 1.3; text-align: left; background: none; border: 0; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; cursor: pointer; }
button.m-banner-title:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.m-banner-sub { font-size: .8rem; font-style: italic; color: var(--ink-soft); }
.m-banner-wiki { align-self: flex-start; }
/* Sur un fond teinté, --accent n'atteint pas 4,5:1 : « .site .m-banner » l'emporte sur « .site a » et « .site a:hover ». */
.site .m-banner .m-banner-wiki { color: var(--accent-strong); }
.m-banner.is-bible .m-banner-title { color: var(--marker-bible); }
.m-banner.is-period { background: var(--tint, transparent); border-left: 4px solid var(--tint-ink, var(--ink-faint)); }
.m-banner.is-period .m-banner-title { font-weight: 500; font-style: italic; color: var(--tint-ink, var(--ink)); }

.m-during { margin: .3rem 0 0 1rem; padding-left: .6rem; border-left: 2px solid var(--rule); }
.m-during-head { margin: 0 0 .2rem; font-size: .8rem; font-style: italic; color: var(--ink-soft); }
.m-badge.m-badge-reading { font-weight: 400; font-style: italic; border-style: dashed; }
.m-ant-reading { margin: .25rem 1rem .5rem; font-size: .85rem; color: var(--ink-soft); }
.m-badge { --c: var(--ink); align-self: flex-start; margin-top: .15rem; padding: 0 .4rem; font-size: .7rem; font-weight: 600; color: var(--ink); border: 1px solid var(--ink-faint); border-radius: 999px; }
details.m-banners { border-top: 1px dotted var(--ink-faint); border-bottom: 1px dotted var(--ink-faint); }
details.m-banners > summary { font-size: .85rem; }
details.m-banners[open] > summary { border-bottom: 0; margin-bottom: 0; }

/* Le fil du téléphone (js/views/mobile-thread.js) : Matthieu à gauche, Luc à droite, noms communs au centre. Les noms
   sont des boutons posés sur le dessin ; le trait et le côté disent la lignée ; le rond marque un nom propre à une liste, le losange un nom commun. */
.m-view-thread { padding-bottom: 1rem; }
.m-view-thread .m-toolbar { position: static; }
.m-thread-where { position: sticky; top: .5rem; z-index: 3; width: fit-content; margin: .5rem auto -2.2rem; padding: .2rem .8rem; color: var(--ink-soft); background: var(--sheet); border: 1px solid var(--rule); border-radius: 999px; font-size: .875rem; white-space: nowrap; }
.m-thread { position: relative; overflow: hidden; }
.m-thread-lines { position: absolute; inset: 0; }
.m-thread-lines .thr { fill: none; stroke-width: 2.2px; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.m-thread-lines .thr-mt { stroke: var(--mt); }
.m-thread-lines .thr-lk { stroke: var(--lk); }
.m-thread-lines .thr-pair { stroke: var(--ink-soft); stroke-width: 1.4px; stroke-dasharray: 2 4; }
.m-thread-count { position: absolute; left: 50%; display: flex; flex-direction: column; font-size: .9375rem; font-weight: 600; line-height: 1.3; text-align: center; pointer-events: none; transform: translate(-50%, -50%); }
.m-thread-count .col-matthew { color: var(--mt); }
.m-thread-count .col-luke { color: var(--lk); }
.m-thread-list { list-style: none; margin: 0; padding: 0; }
.m-thread-row { position: absolute; display: flex; align-items: center; height: 44px; margin-top: -22px; }
.m-thread-row.is-both { left: 0; right: 0; justify-content: center; }
.m-thread .m-entry { position: relative; width: auto; min-height: 44px; padding: 0 1.1rem; color: var(--ink); background: none; border: 0; border-radius: 4px; box-shadow: none; }
.m-thread .m-name { display: block; padding: .05rem .35rem; border-radius: 4px; font-family: var(--font-display); font-size: 1rem; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.m-thread .m-second { font-size: .75rem; line-height: 1.1; color: var(--ink-soft); }
.m-thread .m-badge { margin-top: 0; font-size: .625rem; line-height: 1.25; }
.m-thread-row.is-matthew { justify-content: flex-end; }
.m-thread-row.is-matthew .m-entry { align-items: flex-end; text-align: right; }
.m-thread-row.is-luke { justify-content: flex-start; }
.m-thread-row.is-luke .m-entry { align-items: flex-start; text-align: left; }
.m-thread-row.is-both .m-entry { align-items: center; padding-inline: .5rem; text-align: center; }
.m-thread-row.is-both .m-name { background: var(--paper); font-size: 1.3125rem; font-weight: 600; letter-spacing: -.01em; }
.m-thread-row.is-both .m-second { padding-inline: .35rem; background: var(--paper); }
.m-thread-row.is-milestone .m-name { font-size: 1.8125rem; font-weight: 700; letter-spacing: -.025em; }
.m-thread-row.is-lineage-size .m-name { font-size: 1rem; font-weight: 500; letter-spacing: 0; }
/* Le repère de la lignée, sur le trait. */
.m-thread-row:not(.is-both) .m-entry::after { content: ""; position: absolute; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; box-sizing: border-box; background: var(--paper); border: 2px solid var(--c); }
.m-thread-row.is-matthew .m-entry::after { right: 0; border-radius: 50%; }
.m-thread-row.is-luke .m-entry::after { left: 0; border-radius: 50%; }
.m-thread-row.st-differs .m-entry::after { background: var(--c); }
.m-thread-row.st-debated .m-entry::after { border-radius: 1px; transform: rotate(45deg) scale(.86); }
.m-thread-row.is-both .m-entry::before { content: ""; position: absolute; left: 50%; top: 0; width: 8px; height: 8px; margin-left: -4px; background: linear-gradient(45deg, var(--mt) 50%, var(--lk) 50%); border: 1px solid var(--paper); border-radius: 1px; transform: rotate(45deg); }
.m-thread .m-entry.is-selected { background: none; box-shadow: none; }
.m-thread .m-entry.is-selected .m-name { color: var(--paper); background: var(--ink); font-weight: 700; }
.m-thread .m-entry.is-selected::after { background: var(--c); }
.m-thread .m-entry:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: -2px; }
.m-thread-foot { margin: 1rem 1rem 0; color: var(--ink-soft); font-size: .875rem; }

/* Onglets du téléphone (js/views/mobile-tabs.js) : l'onglet actif se lit au trait épais et à la graisse, pas à la couleur. */
.m-tabs { display: flex; background: var(--sheet); border-bottom: 1px solid var(--rule-strong); }
.m-tabs[hidden] { display: none; }
.m-tab { flex: 1 1 0; min-height: 48px; padding: .4rem .5rem; font: inherit; font-size: .95rem; color: var(--ink-soft); background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; }
.m-tab[aria-selected="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.m-tab:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: -4px; }
@media (min-width: 720px) { .m-tabs { display: none; } }

/* Onglet « Antiquité et livres » (js/views/mobile-antiquity.js) : liste verticale ; teintes --civ-* et --moment-* en
   renfort d'un nom toujours écrit. */
.m-ant-intro { margin: 0 1rem .5rem; font-size: .85rem; color: var(--ink-soft); }
.m-ant-hyp { margin: .5rem 1rem; padding: .5rem .75rem; font-size: .85rem; color: var(--ink); background: var(--accent-wash); border-left: 4px solid var(--accent); border-radius: var(--radius); }
.m-ant-hyp p { margin: 0 0 .25rem; }
.m-ant-hyp ul { margin: 0; padding-left: 1.1rem; }
.m-ant-nav ul { display: flex; flex-wrap: wrap; gap: 0 1.25rem; list-style: none; margin: 0 1rem .25rem; padding: 0; }
.m-ant-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent-strong); }
.m-ant-section { padding: 0 1rem; }
.site .m-ant-section h3 { margin: 1.25rem 0 .5rem; font-family: var(--font-ui); font-size: .85rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.m-ant-section h4 { margin: .75rem 0 .4rem; font-family: var(--font-ui); font-size: .95rem; }
.m-civ-name, .m-moment-name { padding: .35rem .6rem; color: var(--tint-ink, var(--ink)); background: var(--tint, var(--sheet)); border-left: 6px solid var(--tint-ink, var(--rule-strong)); border-radius: var(--radius); }
.m-ant-list { list-style: none; margin: 0; padding: 0; }
.m-ant-li { margin: 0 0 .4rem; }
.m-ant-item { display: flex; flex-direction: column; justify-content: center; width: 100%; min-height: 44px; padding: .4rem .75rem; text-align: left; font: inherit; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule); border-left: 4px solid var(--tint-ink, var(--rule-strong)); border-radius: var(--radius); cursor: pointer; }
.m-ant-name { font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.m-ant-item.is-bible .m-ant-name { color: var(--marker-bible); }
.m-ant-sub { font-size: .8rem; color: var(--ink-soft); }
.m-ant-item[aria-current="true"] { background: var(--accent-wash); border-color: var(--accent); border-left-color: var(--tint-ink, var(--accent)); box-shadow: inset 0 0 0 1px var(--accent); }
.m-ant-item[aria-current="true"] .m-ant-name { font-weight: 700; }
.m-ant-item:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.m-ant-apart h4 { font-size: .9rem; font-style: italic; color: var(--ink-soft); }
.m-moment-line-name { margin: .4rem 0 .3rem; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.m-view-antiquity .frise-foot { margin-top: 1.25rem; padding: .75rem 1rem 1.5rem; font-size: .9rem; }
.m-view-antiquity .book-chip { min-height: 44px; }

/* ---------- Puces des zones et des couches (js/views/zone-chips.js, tâche 8.2, maquette A) ----------
   Bouton à bascule : nom écrit et teinte de la zone ; éteinte, la puce perd sa coche, son nom est barré et sa
   bordure pointillée (lisible sans la couleur). */
.zone-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .35rem; }
.zone-chips-label { margin-right: .15rem; font-size: .8125rem; font-weight: 600; color: var(--ink-soft); }
.chip { display: inline-flex; align-items: center; gap: .3rem; min-height: 28px; padding: .1rem .6rem .1rem .4rem; font: inherit; font-size: .8125rem; font-weight: 600; line-height: 1.2; color: var(--tint-ink, var(--ink)); background: var(--tint, var(--sheet)); border: 1.5px solid var(--tint-ink, var(--ink)); border-radius: 999px; cursor: pointer; }
.chip-icon { flex: none; width: .8rem; font-size: .8rem; line-height: 1; text-align: center; }
.chip.is-off { color: var(--ink-soft); background: var(--sheet); border-color: var(--rule-strong); border-style: dashed; }
.chip.is-off .chip-name { text-decoration: line-through; }
.chip:hover { box-shadow: 0 0 0 2px var(--accent-wash); }
.chip:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
/* Livres : ton chaud (Bible) ; Repères : encre des repères historiques. */
.chip-books { --tint: var(--moment-exodus); --tint-ink: var(--moment-exodus-ink); }
.chip-history { --tint: var(--sheet); --tint-ink: var(--marker-world); }
.chip-bible { --tint: var(--sheet); --tint-ink: var(--marker-bible); }
/* Grand écran : dans la barre d'outils (js/views/desktop.js). Faute de largeur, les puces passent dans un menu « Afficher » :
   la barre reste sur une ligne. */
.chips-menu { position: relative; }
.chips-menu-button[aria-expanded="true"] { color: var(--paper); background: var(--ink); }
.chips-menu-button:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.chips-menu-button.has-hidden { border-color: var(--accent); background: var(--accent-wash); }
.chips-menu-button[aria-expanded="true"].has-hidden { background: var(--ink); }
.chips-menu-count { font-weight: 700; }
.chips-menu-count:empty { display: none; }
.chips-menu > .zone-chips { display: none; position: absolute; z-index: 30; top: calc(100% + .4rem); left: 0; width: max-content; max-width: min(22rem, calc(100vw - 2rem)); padding: .6rem; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius); box-shadow: var(--shadow-float); }
.chips-menu.is-open > .zone-chips { display: flex; }
.chips-menu > .zone-chips .zone-chips-label { display: none; }
/* Faute de largeur, ces boutons gardent leur icône ; le mot reste pour les lecteurs d'écran, et en infobulle. Marges calculées
   pour la police de secours, plus large (9 %) : sinon la barre passe sur deux lignes le temps du chargement, et la scène saute. */
@container (max-width: 76rem) {
  .rail-toggle, .legend-toggle { gap: 0; font-size: 0; }
  .rail-toggle .icon, .legend-toggle .icon { font-size: .9rem; }
}
@container (max-width: 57.4rem) {
  .reading-switch .icon { display: none; }
}
@container (max-width: 71rem) {
  :is(.chips-menu-button, .settings-button) { gap: 0; font-size: 0; }
  :is(.chips-menu-button, .settings-button) .icon { font-size: .9rem; }
  .chips-menu-count { font-size: .9rem; }
  .settings-caret { display: none; }
}
@container (min-width: 112rem) {
  .chips-menu-button { display: none; }
  .chips-menu > .zone-chips { display: flex; position: static; width: auto; max-width: none; padding: 0; background: none; border: 0; box-shadow: none; }
}

/* ---------- Bouton et panneau « Réglages » (js/controls.js) : non modal, sous le bouton ; feuille sur téléphone ---------- */
.settings { position: relative; margin-left: auto; }
.rail-toggle { display: none; }
.rail-toggle, .legend-toggle { color: var(--ink-soft); }
.rail-toggle[aria-pressed="true"], .legend-toggle[aria-pressed="true"] { color: var(--paper); background: var(--ink); border-color: var(--ink); font-weight: 600; }
.rail-toggle:focus-visible, .legend-toggle:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
@media (min-width: 1200px) { .rail-toggle { display: inline-flex; } }
.settings-button[aria-expanded="true"] { color: var(--paper); background: var(--ink); }
.settings-button:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.settings-panel { position: absolute; z-index: 30; right: 0; top: calc(100% + .4rem); box-sizing: border-box; width: min(27rem, calc(100vw - 2rem)); max-height: min(75dvh, 44rem); overflow-y: auto; padding: 0 1rem 1rem; font-size: .9rem; line-height: 1.45; text-align: left; background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: 8px; box-shadow: var(--shadow-float); }
.settings-panel[hidden] { display: none; }
.settings-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: .5rem 0 .25rem; background: var(--sheet); }
.site .settings-head h2 { margin: 0; font-family: var(--font-ui); font-size: 1.05rem; font-weight: 700; letter-spacing: 0; }
.settings-head h2:focus { outline: none; }
.settings-head h2:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.settings-close { min-width: 36px; min-height: 36px; font-size: 1.4rem; line-height: 1; color: var(--ink); background: transparent; border: 0; border-radius: var(--radius); cursor: pointer; }
.settings-close:hover { background: var(--accent-wash); }
.settings-section { margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--rule); }
.settings-section h3 { margin: 0 0 .4rem; font-size: .95rem; }
/* Lecture des origines (tâche 8.3) : trois boutons, l'aide de chaque lecture, le débat de l'Exode replié. */
.radio-group.reading-group button { min-height: 36px; }
.settings-reading-help { margin: .4rem 0 0; font-size: .85rem; }
.settings-reading-help dt { margin-top: .3rem; font-weight: 600; }
.settings-reading-help dd { margin: 0 0 0 1rem; color: var(--ink-soft); }
.settings-reading-tag { font-weight: 400; font-style: italic; }
.settings-reading-debate { margin-top: .5rem; }
.settings-reading-debate > summary { display: flex; flex-wrap: wrap; align-items: center; min-height: 36px; cursor: pointer; font-weight: 600; list-style: none; }
.settings-reading-debate > summary::-webkit-details-marker { display: none; }
.settings-reading-debate > summary::before { content: '▸'; display: inline-block; width: 1rem; font-size: .8rem; }
.settings-reading-debate[open] > summary::before { content: '▾'; }
.settings-reading-debate .hyp-option { margin-top: .5rem; }
.settings-note { margin: .4rem 0 0; font-size: .85rem; color: var(--ink-soft); }
.lg-all > summary { display: flex; align-items: center; min-height: 36px; list-style: none; cursor: pointer; font-weight: 600; }
.lg-all > summary::-webkit-details-marker { display: none; }
.lg-all > summary::before { content: '▸'; display: inline-block; width: 1rem; font-size: .8rem; }
.lg-all[open] > summary::before { content: '▾'; }
.settings-summary-hint { font-weight: 400; color: var(--ink-soft); }
.settings .lg-list { columns: auto; }

.hyp-debate { max-width: 52rem; margin-bottom: .75rem; }
.hyp-debate h4 { margin: .25rem 0 .4rem; font-size: .9rem; }
.radio-group.hyp-group { display: flex; flex-direction: column; align-items: stretch; max-width: 36rem; }
.hyp-group button { text-align: left; min-height: 36px; }
.hyp-group button + button { border-left: 0; border-top: 1px solid var(--rule-strong); }
.hyp-none { margin: .4rem 0 0; font-size: .85rem; color: var(--ink-soft); }
.hyp-option { margin-top: .4rem; font-size: .88rem; }
.hyp-option[hidden], .hyp-none[hidden] { display: none; }
.hyp-option-title { margin: .5rem 0 .2rem; font-weight: 600; color: var(--ink-soft); }

.lg-list { list-style: none; margin: 0; padding: 0; columns: 22rem auto; font-size: .85rem; }
.lg-list li { display: flex; align-items: flex-start; gap: .6rem; margin: 0 0 .35rem; break-inside: avoid; }
.lg-swatch { flex: none; margin-top: .1rem; }
.lg-hint { color: var(--ink-soft); }
.lg-fill, .lg-diamond { fill: var(--accent); }
.lg-kind { fill: var(--ink); }
.lg-kind.kind-world { fill: var(--marker-world); }
.lg-kind.kind-bible { fill: var(--marker-bible); }
.lg-dot { fill: var(--paper); stroke: var(--accent); stroke-width: 2; }
.lg-warm { fill: var(--moment-exodus-ink); }
.lg-cold { fill: var(--civ-mesopotamia-ink); }
.lg-stop { stop-color: var(--accent); }
.lg-bg { fill: var(--paper); }
.lg-line { stroke: var(--accent); stroke-width: 2; }
.lg-edge { stroke: var(--accent); stroke-width: 1.2; }
.lg-dashed { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 3 2.5; }
.lg-zone { opacity: .6; }
.lg-fuzzy { stroke: none; }

.stage { display: flex; align-items: flex-start; }
.view-host { flex: 1 1 auto; min-width: 0; }
.card { flex: none; box-sizing: border-box; width: var(--card-w, 24rem); max-width: 40%; position: sticky; top: 0; max-height: calc(100dvh - 9.5rem); overflow-y: auto; padding: .75rem 1rem 1.5rem; background: var(--sheet); border-left: 1px solid var(--rule-strong); font-size: .9rem; line-height: 1.45; }
.card[hidden] { display: none; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.card-title { margin: 0; font-size: 1.25rem; line-height: 1.3; }
/* Titre de la fiche : « .site h2 » (pages de contenu) le rendait trop grand pour un titre long (« Sennacherib at
   Jerusalem » repoussait le bouton Fermer hors du panneau) ; il passe à la ligne, au besoin dans un mot. */
.site .card .card-title { flex: 1 1 auto; min-width: 0; font-size: 1.6rem; line-height: 1.2; overflow-wrap: break-word; }
.card-close { flex: none; display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; margin: -.5rem -.6rem 0 auto; padding: 0; font-size: 1.05rem; color: var(--ink-soft); background: none; border: 0; border-radius: 50%; cursor: pointer; transition: background-color .12s, color .12s; }
.card-close:hover { color: var(--ink); background: var(--accent-wash); }
.card-close:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: -2px; }
.card-sec { margin-top: 1rem; }
.card-sec h3 { margin: 0 0 .3rem; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.card ul { margin: 0; padding-left: 1.1rem; }
.card li { margin-bottom: .45rem; }
.card-range { margin: 0 0 .3rem; font-size: 1.05rem; font-weight: 700; }
.card-dl { margin: 0; }
.card-dl dt { margin-top: .4rem; font-weight: 600; font-size: .8rem; color: var(--ink-soft); }
.card-dl dd { margin: 0; }
.card-note { margin: .5rem 0 0; color: var(--ink-soft); }
.card-wiki { margin: .6rem 0 0; }
.card-kind { margin: .2rem 0 0; font-size: .85rem; color: var(--ink-soft); }
.card-kind.civ-egypt, .card-kind.civ-mesopotamia, .card-kind.civ-persia, .card-kind.civ-greece-rome, .card-kind.civ-levant { color: var(--tint-ink); }
.card-civ-swatch { display: inline-block; width: .8rem; height: .8rem; margin-right: .4rem; vertical-align: -.1rem; border-radius: 2px; background: var(--tint); border: 1px solid var(--tint-ink); }
.card-moment { margin: .4rem 0 0; }
.card .book-swatch { display: inline-block; margin-right: .35rem; vertical-align: -.1rem; }
.card-moment strong { color: var(--tint-ink); }
/* Bouton qui ouvre une autre fiche (contemporain, livre, personnage) : a l'air d'un lien, cible de 24 px au moins. */
.card-sel { display: inline; min-height: 24px; padding: 0; font: inherit; font-weight: 600; color: var(--accent-strong); background: none; border: 0; text-align: left; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.card-sel:hover { text-decoration-thickness: 2px; }
.card-sec h3 .icon { margin-right: .3em; font-size: 1.05em; opacity: .8; }
.card-kind > .icon { margin-right: .3em; }
:is(.scale-switch, .reading-switch, .reading-group) .icon { margin-right: .3em; font-size: .9em; }
.settings-reading-help dt .icon { margin-right: .2em; }
.intro label strong .icon { margin-right: .35em; font-size: .9em; }
.settings-caret .icon { font-size: .7em; }
.card-summary-refs { font-size: .8125rem; }
.card-read { display: flex; align-items: center; gap: .35rem; width: fit-content; min-height: 44px; font-size: .875rem; }
.card-summary-refs a { white-space: nowrap; }
.card-sec .card-women { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0; padding: 0; list-style: none; }
.card-sec .card-women li { margin: 0; }
.card-sel:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.card-assert li { margin-bottom: .7rem; }
.card-src { margin: .2rem 0 0; font-size: .85rem; }
.tag.tag-hyp { border-style: dashed; white-space: normal; border-radius: 8px; }
/* Fiche : les trois lectures des origines ; la lecture choisie encadrée et dite par écrit (« lecture choisie »). */
.card-reading-tabs { margin-top: .5rem; }
.card-reading-tablist { display: flex; border-bottom: 1px solid var(--rule-strong); }
.card-reading-tab { display: inline-flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: .3rem; min-height: 44px; margin-bottom: -1px; padding: .25rem .4rem; font: inherit; font-size: .875rem; color: var(--ink-soft); background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; }
.card-reading-tab:hover { color: var(--ink); background: var(--accent-wash); }
.card-reading-tab[aria-selected="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.card-reading-tab:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: -2px; }
.card-reading-tab .icon { font-size: .75em; }
.card-reading { padding: .6rem 0 0; }
.card-reading[hidden] { display: none; }
.card-reading:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.card-reading-head { margin: 0; }
.card-reading-tag { font-style: italic; color: var(--ink-soft); }
.card-reading .card-range { margin: .2rem 0 0; font-size: .95rem; line-height: 1.35; }
.tag.tag-reading-active { color: var(--ink); border-color: var(--accent); font-weight: 600; }
.tag.tag-reading { white-space: normal; border-radius: 8px; }
.card-reading-change { white-space: nowrap; }
.tag { display: inline-block; margin-left: .4rem; padding: 0 .4rem; font-size: .75rem; color: var(--ink-soft); border: 1px solid var(--ink-faint); border-radius: 999px; white-space: nowrap; }
/* Code couleur des badges (js/badge.js) : toujours avec une icône et un texte ; jetons --tag-* de css/base.css. */
.tag, .m-badge { --c: var(--ink-soft); }
.tone-warm { --c: var(--tag-warm); } .tone-amber { --c: var(--tag-amber); } .tone-cold { --c: var(--tag-cold); } .tone-green { --c: var(--tag-green); }
.tone-violet { --c: var(--tag-violet); } .tone-neutral { --c: var(--tag-neutral); } .tone-mt { --c: var(--mt); } .tone-lk { --c: var(--lk); }
.tag[class*="tone-"], .m-badge[class*="tone-"] { color: var(--c); border-color: color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 8%, transparent); }
.tag .icon { margin-right: .1em; font-size: .9em; }
.tag[data-tip] { cursor: help; }
.tag:focus-visible { outline: 2px solid var(--c); outline-offset: 1px; }
.card-dl .tag, dd > .tag { margin-left: 0; }
.tag.tag-icon { padding: 0 .45rem; }
.lg-title { margin: .5rem 0 .3rem; font-size: .875rem; font-weight: 600; }
.lg-badges { margin: 0 0 .75rem; padding: 0; list-style: none; }
.lg-badges li { margin-bottom: .35rem; }
.lg-badges .tag { margin-left: 0; }
/* Recherche de noms (js/views/search-box.js), dans l'en-tête. */
.name-search { position: relative; flex: 0 1 15rem; min-width: 0; margin-left: auto; }
.name-search-icon { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--ink-soft); font-size: .85rem; line-height: 1; pointer-events: none; }
.name-search-input { box-sizing: border-box; width: 100%; min-height: 2.5rem; padding: 0 .75rem 0 2.1rem; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.name-search-input::placeholder { color: var(--ink-soft); opacity: 1; }
.name-search-input:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 1px; }
.name-search-list { position: absolute; top: calc(100% + 4px); left: 0; z-index: 950; box-sizing: border-box; width: max(100%, 20rem); max-width: calc(100vw - 32px); max-height: min(60dvh, 24rem); margin: 0; padding: .25rem; overflow: auto; list-style: none; background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: 8px; box-shadow: var(--shadow-float); }
.name-search-list[hidden] { display: none; }
.name-search-item { display: flex; flex-direction: column; justify-content: center; min-height: 44px; padding: .25rem .6rem; border-radius: 5px; cursor: pointer; }
.name-search-item:hover, .name-search-item[aria-selected="true"] { background: var(--accent-wash); }
.name-search-name { font-weight: 600; color: var(--ink); }
.name-search-sub { font-size: .8125rem; color: var(--ink-soft); }
.name-search-more { font-family: var(--font-ui); font-size: .875rem; color: var(--accent-strong); text-decoration: underline; text-underline-offset: 2px; }
.name-search-item.is-hidden .name-search-sub { font-style: italic; }
.name-search-none { padding: .6rem; color: var(--ink-soft); }
@media (max-width: 719px) {
  /* Chaque élément a sa case : ni l'arrivée d'Affichage (script), ni celle de la police, ne déplacent rien (CLS). */
  .site-header:has(.name-search) { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; }
  .site-header:has(.name-search) .site-brand { grid-column: 1; grid-row: 1; overflow: hidden; }
  .site-header:has(.name-search) .display-menu { grid-column: 2; grid-row: 1; }
  .site-header:has(.name-search) .help-link { grid-column: 3; grid-row: 1; }
  .site-header:has(.name-search) .site-menu { grid-column: 4; grid-row: 1; }
  .site-header:has(.name-search) .name-search { grid-column: 1 / -1; grid-row: 2; }
  /* Pendant l'explication, pas de rangée vide pour un champ qui n'est pas encore là. */
  :root[data-intro] .name-search-slot { display: none; }
  .name-search { flex: 1 0 100%; order: 9; margin-left: 0; }
  .name-search-input { min-height: 44px; }
}
/* Rail (js/views/rail.js) : à droite de la scène, à partir de 1200 px. */
.explorer-scene { flex: 1 1 auto; min-height: 0; display: flex; }
.explorer-scene > .explorer-scroll { flex: 1 1 auto; min-width: 0; }
.rail { display: none; }
@media (min-width: 1200px) {
  .rail { position: relative; display: block; flex: none; width: 5.5rem; background: var(--paper); border-left: 1px solid var(--rule); cursor: pointer; touch-action: none; user-select: none; }
  .rail.is-off { display: none; }
  .rail.is-dragging, .rail.is-dragging * { cursor: grabbing; }
  .rail-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
  .rail-lines .thr { stroke-width: 1.5px; }
  .rail-axis { fill: none; stroke: var(--rule-strong); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
  .rail-window { position: absolute; left: 4px; right: 4px; box-sizing: border-box; border: 1px solid var(--ink-faint); border-radius: 5px; background: color-mix(in srgb, var(--ink) 6%, transparent); cursor: grab; }
  .rail-jump { position: absolute; left: 0; right: 0; height: 28px; margin-top: -14px; padding: 0 0 0 .4rem; color: var(--ink-soft); background: none; border: 0; font-size: .8125rem; text-align: left; cursor: pointer; pointer-events: none; }
  .rail-jump span { pointer-events: auto; }
  .rail-jump span { padding: 1px 5px; background: var(--paper); border-radius: 3px; }
  .rail-jump:hover { color: var(--ink); }
  .rail-jump:hover span { background: var(--accent-wash); }
  .rail-jump:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: -2px; }
}
/* Infobulle (js/tooltip.js). */
.tip { position: fixed; z-index: 1000; max-width: min(20rem, calc(100vw - 16px)); padding: .4rem .6rem; color: var(--paper); background: var(--ink); border-radius: 6px; font: 400 .8125rem/1.35 var(--font-ui); box-shadow: var(--shadow-float); }
.tip[hidden] { display: none; }
/* Poignées des panneaux (js/views/resizer.js) : un filet, une cible de 12 px. */
.panel-grip { display: none; }
@media (min-width: 1200px) {
  .stage { position: relative; }
  .panel-grip { display: block; flex: none; box-sizing: border-box; width: 12px; cursor: col-resize; touch-action: none; background: linear-gradient(transparent, transparent) no-repeat; position: relative; z-index: 3; }
  .panel-grip[hidden] { display: none; }
  .panel-grip::before { content: ''; position: absolute; top: 50%; left: 50%; width: 4px; height: 2.5rem; margin: -1.25rem 0 0 -2px; border-radius: 2px; background: var(--ink-faint); opacity: .45; transition: opacity .12s, background-color .12s; }
  .panel-grip:hover::before, .panel-grip.is-dragging::before { opacity: 1; background: var(--accent); }
  .panel-grip:focus-visible { outline: none; }
  .panel-grip:focus-visible::before { opacity: 1; background: var(--accent); box-shadow: 0 0 0 2px var(--accent-strong); }
  .explorer { position: relative; }
  .frise-grip { position: absolute; bottom: 0; margin-left: -6px; }
  .card-grip { margin: 0 -6px; }
  .stage:not(:has(> .card:not([hidden]))) .card-grip { display: none; }
  .card { max-width: none; }
}
.card a, .hyp-debate a { color: var(--accent-strong); }

/* Page en trois panneaux (≥ 1200 px) : la fiche est un panneau permanent de largeur fixe, qui défile seul ;
   sans sélection, il montre une invite (js/card.js). En dessous, la fiche vide reste masquée. */
@media (min-width: 1200px) {
  .card { width: var(--card-w, 320px); max-width: none; height: calc(100vh - 9.5rem); height: calc(100dvh - 9.5rem); min-height: 28rem; }
}
.card-empty-text { color: var(--ink-soft); }
@media (max-width: 1199px) { .card.is-empty { display: none; } }

/* Téléphone : la fiche devient une feuille montante au bas de l'écran */
@media (max-width: 719px) {
  .card { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; max-height: 46dvh; padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); border-left: 0; border-top: 1px solid var(--rule-strong); border-radius: 10px 10px 0 0; box-shadow: var(--shadow-float); }
  .stage.has-card .view-host { padding-bottom: 46dvh; }
  .stage.has-card :is(.m-entry, .m-ant-item, .book-chip) { scroll-margin-bottom: 42dvh; }
  .card { animation: card-rise .28s cubic-bezier(.2, .8, .2, 1); }
  .m-toolbar { top: 0; }
  /* Réglages : feuille montante, au-dessus de la fiche. */
  .settings-panel { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 80dvh; padding-bottom: calc(1rem + env(safe-area-inset-bottom)); border-width: 2px 0 0; border-color: var(--ink-soft); border-radius: 12px 12px 0 0; }
  .m-toolbar .settings-button { min-height: 44px; }
  /* Vue d'un évangile : Réglages à côté du choix de l'échelle (une rangée de moins dans la barre collante). */
  .m-toolbar .radio-group.scale-switch { flex: 1 1 12rem; }
  .m-toolbar .settings { flex: none; }
  /* Onglet Antiquité : puces et Réglages en tête, sans rester collés (trois rangées sur 390 px). */
  .m-ant-bar { position: static; align-items: center; }
  .m-ant-bar .chip { min-height: 44px; }
}

@keyframes card-rise { from { transform: translateY(40px); opacity: .3; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .card { animation: none; } }

/* Explorateur : pas de largeur maximale (le pied de page suit toute la largeur de la fenêtre, comme l'en-tête). */
.site-footer { max-width: none; }

/* Vue SVG (≥ 720 px) : l'en-tête et la scène remplissent la fenêtre, en colonne flexible ; un seul défileur pour la frise
   et le centre (.explorer-scroll), un pour la fiche. Le pied de page est indépendant : il suit, plus bas dans la page. */
@media (min-width: 720px) {
  .explorer-page { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
  /* En colonne flexible, « margin: 0 auto » (css/site.css) centrerait l’en-tête rétréci à son contenu. */
  .explorer-page > .site-header { flex: none; align-self: stretch; margin: 0; }
  .explorer-page > #app { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .explorer-shell { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .stage { flex: 1 1 auto; min-height: 0; align-items: stretch; }
  .view-host { display: flex; flex-direction: column; min-height: 0; }
  .explorer { flex: 1 1 auto; height: auto; min-height: 0; }
  /* Repère des textes masqués (.sr-only, en absolu) : sans lui, ils échappent au défilement de la fiche et allongent la page. */
  .card { position: relative; align-self: stretch; height: auto; max-height: none; min-height: 0; }
  /* Filet : rien de la scène (l'en-tête des colonnes, large de tout le dessin) ne déborde sur la fiche. */
  .explorer { overflow-x: clip; }
}

/* 720-1199 px avec une fiche : à côté de la scène, la fiche (24rem) ne laissait pas au dessin assez de place (432 px de
   scène à 720 pour un dessin d'au moins 640, MIN_WIDTH de js/layout.js ; jusqu'à ~1100 px, les libellés de Luc
   étaient encore coupés) : l'en-tête des colonnes passait sur la fiche et la colonne de Luc était coupée. Sous le seuil
   des trois panneaux, la fiche s'ouvre donc sous la scène, pleine largeur, et défile seule ; la scène raccourcit et
   garde l'élément choisi à l'écran (DesktopView.onResize). */
@media (min-width: 720px) and (max-width: 1199px) {
  .stage.has-card { flex-direction: column; }
  .stage.has-card .view-host { flex: 1 1 0; }
  .stage.has-card .card { flex: 0 0 45%; width: auto; max-width: none; border-left: 0; border-top: 2px solid var(--rule-strong); box-shadow: var(--shadow-float); }
}

/* Fiche : les noms voisins dans chaque liste, pour continuer l'exploration. */
.card-steps { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin: .45rem 0 .7rem; }
.card-steps .card-sel { display: flex; align-items: center; justify-content: space-between; gap: .45rem; min-width: 0; min-height: 44px; padding: .35rem .6rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); color: var(--ink); cursor: pointer; line-height: 1.25; text-decoration: none; }
.card-steps .card-sel:hover { background: var(--accent-wash); border-color: var(--accent); }
.card-steps .icon { flex: none; font-size: .75em; color: var(--ink-soft); }
.card-steps .card-sel:hover .icon { color: var(--accent-strong); }
.card-step-before { grid-column: 1; }
.card-step-after { grid-column: 2; }
.card-step-text { flex: 1; min-width: 0; text-align: left; }
.card-step-after .card-step-text { text-align: right; }
.card-step-dir { display: block; font-size: .75rem; font-weight: 400; color: var(--ink-soft); }
.card-step-name { display: block; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Règle des contemporains (échelle du temps, ≥ 1200 px ; js/views/ruler.js) ---------- */
.explorer-body { position: relative; }
.year-cursor { --line: color-mix(in srgb, var(--ink) 55%, transparent); position: absolute; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, var(--line) var(--gap-from, 100%), transparent var(--gap-from, 100%), transparent var(--gap-to, 100%), var(--line) var(--gap-to, 100%)); pointer-events: none; z-index: 2; }
.year-cursor[hidden] { display: none; }
.year-cursor span { position: absolute; left: .4rem; top: -.72rem; padding: .05rem .45rem; border-radius: 5px; background: var(--ink); color: var(--paper); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.ruler-year { margin: 0 0 .7rem; font-size: 2.3rem; font-weight: 700; line-height: 1.05; letter-spacing: -.028em; }
.ruler-slider { display: block; }
.ruler-hint { display: block; font-size: .85rem; color: var(--ink-soft); }
.ruler-range { display: block; width: 100%; height: 44px; margin: 0; accent-color: var(--ink); cursor: grab; }
.ruler-sec { margin-top: 1.05rem; }
.site .ruler-sec h3 { margin: 0 0 .25rem; font-family: var(--font-ui); font-size: .88rem; font-weight: 700; letter-spacing: normal; text-transform: none; color: var(--ink-soft); }
.site .ruler-matthew h3 { color: var(--mt); }
.site .ruler-luke h3 { color: var(--lk); }
.site .ruler-world h3 { color: var(--accent-strong); }
.ruler-sec ul { list-style: none; margin: 0; padding: 0; }
.ruler-item { display: block; width: 100%; min-height: 44px; padding: .25rem .4rem; margin-left: -.4rem; text-align: left; font: inherit; color: var(--ink); background: none; border: 0; border-radius: 4px; cursor: pointer; }
.ruler-item:hover { background: var(--accent-wash); }
.ruler-item-name { display: block; font-size: 1.05rem; font-weight: 500; line-height: 1.22; }
.ruler-item-when, .ruler-item-reading { display: block; font-size: .82rem; line-height: 1.3; color: var(--ink-soft); }
.ruler-item-reading { font-style: italic; }
.ruler-empty { margin: 0; font-family: var(--font-read); font-size: 1rem; line-height: 1.3; color: var(--ink-soft); }
.ruler-note { margin: 1.2rem 0 0; font-size: .82rem; line-height: 1.4; color: var(--ink-soft); }
.ruler-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .1rem .6rem; margin: -.75rem -1rem .75rem; padding: .3rem 1rem; border-bottom: 1px solid var(--rule-strong); background: var(--paper); }
.ruler-bar-year { font-weight: 700; white-space: nowrap; }
.ruler-bar-button { min-height: 44px; padding: 0; font: inherit; font-size: .85rem; color: var(--accent-strong); background: none; border: 0; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* Téléphone : la page défile, le pied de page attend la fin du chargement pour ne pas être repoussé (CLS). */
@media (max-width: 719px) {
  :root[data-js] body:has(.boot) > .site-footer { display: none; }
}

/* Légende : bandeau sous la scène, qui reste ouvert pendant la navigation (js/legend.js). */
.legend-dock { position: sticky; bottom: 0; z-index: 15; flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; box-sizing: border-box; max-height: 45dvh; overflow: auto; padding: .35rem .75rem; font-size: .8125rem; background: var(--sheet); border-top: 1px solid var(--rule-strong); }
.legend-dock[hidden] { display: none; }
.site .legend-dock .legend-title { margin: 0; font: inherit; font-weight: 700; color: var(--ink); letter-spacing: 0; }
.lg-now { flex: 1 1 16rem; display: flex; flex-wrap: wrap; align-content: flex-start; gap: .15rem .9rem; min-width: 0; margin: 0; padding: 0; list-style: none;
  /* Hauteur fixe : la liste change au défilement, la scène ne doit pas bouger pour autant. */
  height: 3.2rem; overflow-y: auto; }
.lg-now > li { display: inline-flex; align-items: center; gap: .35rem; }
.lg-now .lg-swatch { margin-top: 0; }
.legend-close { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; color: var(--ink); background: none; border: 0; border-radius: var(--radius); cursor: pointer; }
.legend-close:hover { background: var(--accent-wash); }
.lg-all { flex-basis: 100%; }
@media (max-width: 719px) { .legend-close { width: 44px; height: 44px; } .m-toolbar .legend-toggle { min-height: 44px; gap: 0; font-size: 0; } .m-toolbar .legend-toggle .icon { font-size: .9rem; } }

/* Lien vers une fiche inexistante : message discret au-dessus de la scène, effacé à la première fiche ouverte (js/app.js). */
.url-notice { margin: 0; padding: .5rem 1rem; font-family: var(--font-ui); font-size: .9rem; color: var(--ink-soft); background: var(--paper); border-bottom: 1px solid var(--ink-faint); }

/* Partager (js/share.js) : bouton de la fiche, à gauche de Fermer ; lien vers la date de la règle ; message bref. */
.card-share { flex: none; display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; margin: -.5rem 0 0 auto; padding: 0; font-size: .95rem; color: var(--ink-soft); background: none; border: 0; border-radius: 50%; cursor: pointer; transition: background-color .12s, color .12s; }
.card-share + .card-close { margin-left: 0; }
.card-share:hover { color: var(--ink); background: var(--accent-wash); }
.card-share:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: -2px; }
.ruler-share { min-height: 44px; padding: 0; font: inherit; font-size: .85rem; color: var(--accent-strong); background: none; border: 0; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.share-toast { position: fixed; z-index: 950; left: 50%; bottom: 1.25rem; transform: translateX(-50%); max-width: calc(100vw - 2rem); margin: 0; padding: .6rem 1rem; font-family: var(--font-ui); font-size: .9rem; color: var(--paper); background: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-float); }
