/* ==========================================================
   Pages du monde : Le monde, Peuples, Bestiaire, Chroniques
   Même identité que la section « Le monde » de l’accueil :
   libellés en Cinzel espacé et doré, titres et récit en IM Fell English,
   texte courant en EB Garamond, boutons au trait d’or, fond d’encre.
   Les images ne sont jamais posées comme des cadres : elles se fondent dans la nuit,
   et le texte se pose sur le côté calme que chaque image a prévu pour lui.
   La Chronique garde son papier de lecture (vélin), validé par Loïc.
   ========================================================== */
:root {
  --font-tale: "IM Fell English", "EB Garamond", Georgia, serif;
  --font-tale-sc: "IM Fell English SC", "EB Garamond", Georgia, serif;
  --night: #0d0e0f;
  --night-2: #121314;
  --night-3: #18191b;
  --tale: #f4ecdc;
  --body: #e6ddcb;
  --read: 20px;
  /* papier de la Chronique */
  --vellum: #ebe3d2;
  --vellum-3: #d3c4a8;
  --text: #251f19;
  --text-soft: #5d5143;
  --madder: #8d3b24;
}
.page-monde { background: var(--night); color: var(--cream); }
/* ---------- Socle ---------- */
.page-monde h1, .page-monde h2, .page-monde h3 { font-family: var(--font-tale); font-weight: 400; line-height: 1.04; color: var(--tale); margin: 0; letter-spacing: 0; }
.page-monde .eyebrow { color: var(--gold-light); font-size: 12px; letter-spacing: .34em; margin-bottom: 16px; }
.tale-lede { font-family: var(--font-tale); font-style: italic; font-size: clamp(21px, 1.7vw, 25px); line-height: 1.4; color: #eadfca; }
.lnk { display: inline-flex; align-items: center; gap: .7em; font-family: var(--font-display); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); padding-bottom: 3px; border-bottom: 1px solid var(--line); margin-right: 1.6em; transition: color .2s, border-color .2s; }
.lnk::after { content: "→"; font-family: var(--font-body); letter-spacing: 0; }
.lnk:hover { color: #fff3dc; border-color: var(--gold-light); }
.links { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.links a { font-family: var(--font-display); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-light); }
.links a::before { content: "◆ "; font-size: 8px; vertical-align: 2px; color: var(--gold-dark); }
.links a:hover { color: #fff3dc; }
.page-monde p a:not(.lnk) { color: var(--gold-light); border-bottom: 1px solid var(--line); }
figure { position: relative; margin: 0; }
figure img { width: 100%; height: 100%; object-fit: cover; }
figcaption { font-family: var(--font-tale); font-style: italic; font-size: 16px; line-height: 1.4; color: var(--muted); }
.art-reserve { display: grid; place-items: center; width: 100%; height: 100%; min-height: 200px; background: repeating-linear-gradient(135deg, rgba(196,154,92,.07) 0 12px, transparent 12px 24px), var(--night-3); color: var(--muted); text-align: center; font-family: var(--font-display); font-size: 12px; letter-spacing: .1em; }
.art-reserve code { font-size: 11px; letter-spacing: 0; }
/* Fondu : une image secondaire n’a jamais d’arête ; ses bords se perdent dans le fond. */
.fondu img, .fondu .art-reserve {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent), linear-gradient(180deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent), linear-gradient(180deg, transparent, #000 10%, #000 90%, transparent);
  mask-composite: intersect;
}
.fondu--rond img, .fondu--rond .art-reserve { -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%); mask-image: radial-gradient(closest-side, #000 62%, transparent 100%); }
.fondu figcaption { margin-top: 4px; }
/* À un zoom ou une échelle d’écran non entière, le bord d’une image masquée laissait passer un filet d’un pixel
   (visible au milieu de la page, là où l’image se perd dans le fond) : on rogne ce pixel, que le fondu rend de toute façon invisible. */
.fondu img, .column-art img { clip-path: inset(1px); }
/* =================================================
   EN-TÊTE DE PAGE — même construction que l’ouverture de l’accueil
   ================================================= */
.m-hero { position: relative; min-height: min(100svh, 980px); display: flex; align-items: center; padding: calc(var(--header-h) + 6vh) var(--gutter) 16vh; overflow: hidden; isolation: isolate; }
.m-hero > img, .m-hero > .art-reserve { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 92% 50%; z-index: -2; animation: heroDrift 30s ease-out forwards; }
.m-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(8,8,9,.86) 0%, rgba(8,8,9,.6) 32%, rgba(8,8,9,0) 62%),
  linear-gradient(180deg, rgba(8,8,9,.55) 0%, rgba(8,8,9,0) 22%, rgba(8,8,9,0) 60%, var(--night) 100%); }
.m-hero-copy { max-width: 640px; }
.m-hero h1 { font-size: clamp(52px, min(6.6vw, 10.5vh), 104px); line-height: .98; text-shadow: 0 4px 30px rgba(0,0,0,.6); }
.m-hero .ornament { margin: clamp(16px, 2.6vh, 26px) 0; width: clamp(150px, 16vw, 230px); }
.m-hero .ornament span:first-child { display: none; }
.m-hero-lead { font-size: clamp(18px, 1.45vw, 22px); line-height: 1.6; color: #efe5d2; text-shadow: 0 2px 14px rgba(0,0,0,.9); max-width: 32em; }
.m-hero-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.m-hero-links .btn { padding: 12px 20px; }
/* Boutons de choix (fils, filtres) : la grammaire des boutons de l’accueil */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chips > p { font-family: var(--font-display); font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin-right: 10px; }
.chips button { font-family: var(--font-display); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 9px 16px; border: 1px solid var(--line); border-radius: 2px; color: var(--cream); background: rgba(10,10,11,.4); transition: background .25s, border-color .25s, color .25s; }
.chips button:hover { border-color: var(--gold-light); background: rgba(196,154,92,.12); }
.chips button[aria-pressed="true"] { color: #fbf3e2; background: linear-gradient(180deg, #b58449 0%, #8f6431 100%); border-color: #d3a86a; }
/* Titre de section centré : libellé, titre, ornement */
.sec-head { text-align: center; padding: clamp(64px, 8vw, 120px) var(--gutter) clamp(28px, 3vw, 48px); }
.sec-head h2 { font-size: clamp(40px, 4.4vw, 66px); }
.sec-head .ornament { margin: 20px auto; }
.sec-head p:not(.eyebrow) { max-width: 40em; margin: 0 auto; font-size: 19px; line-height: 1.62; color: var(--cream-2); }
/* =================================================
   PLANCHE — l’image occupe toute la largeur ; le texte se pose sur son côté calme
   ================================================= */
.plate { position: relative; display: grid; isolation: isolate; min-height: min(80vh, 780px); scroll-margin-top: calc(var(--header-h) + 50px); }
.plate > .plate-art { grid-area: 1 / 1; z-index: -1; }
.plate > .plate-art img, .plate > .plate-art .art-reserve { position: absolute; inset: 0; height: 100%;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 84%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 84%, transparent 100%); }
.plate > .plate-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.plate--right > .plate-art::after { background: linear-gradient(270deg, rgba(13,14,15,.95) 0%, rgba(13,14,15,.78) 30%, rgba(13,14,15,0) 58%); }
.plate--left > .plate-art::after { background: linear-gradient(90deg, rgba(13,14,15,.95) 0%, rgba(13,14,15,.78) 30%, rgba(13,14,15,0) 58%); }
.plate--bottom > .plate-art::after { background: linear-gradient(0deg, rgba(13,14,15,.97) 0%, rgba(13,14,15,.84) 28%, rgba(13,14,15,0) 58%); }
.plate--top > .plate-art::after { background: linear-gradient(180deg, rgba(13,14,15,.4) 0%, rgba(13,14,15,0) 40%), linear-gradient(90deg, rgba(13,14,15,.6) 0%, rgba(13,14,15,0) 50%); }
.plate--right > .plate-art img { object-position: var(--pos, 12% 50%); }
.plate--left > .plate-art img { object-position: var(--pos, 88% 50%); }
.plate--flip > .plate-art img { transform: scaleX(-1); }
.plate-art figcaption { position: absolute; bottom: 9%; z-index: 2; max-width: 28em; text-shadow: 0 1px 6px #000; color: #d4c8b2; }
.plate--right .plate-art figcaption { left: var(--gutter); }
.plate--left .plate-art figcaption { right: var(--gutter); text-align: right; }
.plate--bottom .plate-art figcaption { right: var(--gutter); top: 12%; bottom: auto; text-align: right; }
.plate--top .plate-art figcaption { right: var(--gutter); text-align: right; }
/* 39 % de la largeur, plus la gouttière : le texte s’arrête vers 45 % de l’écran, la moitié calme que chaque image a prévue. */
.plate-text { grid-area: 1 / 1; align-self: center; width: min(560px, 39%); padding: 12vh 0; }
.plate--right .plate-text { justify-self: end; margin-right: var(--gutter); }
.plate--left .plate-text { justify-self: start; margin-left: var(--gutter); }
.plate--bottom .plate-text { align-self: end; width: min(1080px, 100% - 2 * var(--gutter)); justify-self: center; padding: 44vh 0 6vh; }
.plate--top .plate-text { align-self: start; justify-self: start; margin-left: var(--gutter); padding: 9vh 0; }
.plate-text p { font-size: 19px; line-height: 1.62; margin-bottom: .9em; color: var(--body); }
.plate-text .tale-lede { margin-bottom: .8em; }
.plate-cols { columns: 2; column-gap: 56px; }
.plate-cols .tale-lede { column-span: all; }
.names { font-family: var(--font-display); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 12px; }
.names i { font-family: var(--font-tale); font-size: 1.55em; letter-spacing: .02em; text-transform: none; color: #f0d6a8; }
.meet { font-size: 17px !important; color: var(--cream-2) !important; border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 6px; }
.meet b { font-family: var(--font-display); font-weight: 400; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-right: 8px; }
/* Colonne : une image haute, collée à l’écran, qui se perd du côté du texte */
.column { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0 64px; align-items: start; padding: 0 var(--gutter) 0 0; scroll-margin-top: var(--header-h); }
.column--reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); padding: 0 0 0 var(--gutter); }
.column-art { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); }
.column-art img, .column-art .art-reserve { height: 100%;
  -webkit-mask-image: linear-gradient(90deg, #000 58%, transparent 100%), linear-gradient(180deg, transparent 0, #000 10%, #000 88%, transparent 100%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, #000 58%, transparent 100%), linear-gradient(180deg, transparent 0, #000 10%, #000 88%, transparent 100%); mask-composite: intersect; }
.column--reverse .column-art { order: 2; }
.column--reverse .column-art img, .column--reverse .column-art .art-reserve {
  -webkit-mask-image: linear-gradient(270deg, #000 58%, transparent 100%), linear-gradient(180deg, transparent 0, #000 10%, #000 88%, transparent 100%);
  mask-image: linear-gradient(270deg, #000 58%, transparent 100%), linear-gradient(180deg, transparent 0, #000 10%, #000 88%, transparent 100%); }
.column-art figcaption { position: absolute; bottom: 8%; left: var(--gutter); right: 34%; text-shadow: 0 1px 6px #000; color: #d4c8b2; }
.column--reverse .column-art figcaption { left: 34%; right: var(--gutter); text-align: right; }
.column-text { padding: 14vh 0 12vh; max-width: 660px; }
.column-text p { font-size: var(--read); line-height: 1.66; margin-bottom: 1em; color: var(--body); }
/* ---------- Apparitions ---------- */
.js .page-monde [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity 1s ease, transform 1s ease; }
.js .page-monde [data-rise].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .page-monde [data-rise] { opacity: 1; transform: none; transition: none; }
  .m-hero > img { animation: none; }
}
/* =================================================
   Écrans moyens et petits
   ================================================= */
@media (max-width: 1180px) {
  /* 40 % et non 48 % : vers 1024 px, le texte des planches passait sur le sujet (chanteurs othéren, mains du Haut, loups gris). */
  .plate-text { width: min(460px, 40%); }
  .plate-cols { columns: 1; }
}
@media (max-width: 900px) {
  .m-hero { min-height: 92svh; align-items: flex-end; padding-bottom: 9vh; }
  .m-hero::before { background: linear-gradient(180deg, rgba(8,8,9,.5) 0%, rgba(8,8,9,.08) 30%, rgba(8,8,9,.74) 62%, var(--night) 100%); }
  .m-hero > img { object-position: var(--m-pos, 72% 50%); }
  /* Le texte de l’en-tête monte plus ou moins haut selon sa longueur et la hauteur de l’écran : un voile le suit,
     sous lui seulement. Titre et chapeau restent lisibles, et l’image garde sa lumière au-dessus du texte. */
  .m-hero-copy { position: relative; }
  .m-hero-copy::before { content: ""; position: absolute; z-index: -1; left: calc(-1 * var(--gutter)); width: 100vw; top: -110px; bottom: -9vh; pointer-events: none;
    background: linear-gradient(180deg, rgba(8,8,9,0) 0, rgba(8,8,9,.46) 110px, rgba(8,8,9,.56) 100%); }
  /* Planche : l’image d’abord, puis le texte dessous */
  .plate { display: block; min-height: 0; }
  .plate > .plate-art { position: relative; }
  .plate > .plate-art img, .plate > .plate-art .art-reserve { position: relative; inset: auto; aspect-ratio: 4/3; height: auto; }
  .plate > .plate-art img { object-position: var(--m-pos, 50% 50%); -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 10%, #000 72%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 10%, #000 72%, transparent 100%); }
  .plate > .plate-art::after { display: none; }
  .plate .plate-art figcaption { position: relative; inset: auto; text-align: left; padding: 0 var(--gutter); margin-top: -8px; }
  .plate-text, .plate--bottom .plate-text, .plate--top .plate-text { width: auto; margin: 0 var(--gutter) !important; padding: 16px 0 52px; }
  .column, .column--reverse { grid-template-columns: 1fr; padding: 0; }
  .column-art { position: relative; top: 0; height: 72vh; order: 0 !important; }
  .column-art img, .column--reverse .column-art img { object-position: var(--m-pos, 50% 50%); -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 8%, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 8%, #000 70%, transparent 100%); }
  /* Légende dans le fondu du bas, presque sur la nuit : à 12 %, elle passait sur les marcheurs varesh. */
  .column-art figcaption, .column--reverse .column-art figcaption { left: var(--gutter); right: var(--gutter); text-align: left; bottom: 3%; }
  .column-text { padding: 8px var(--gutter) 56px; }
}
@media (max-width: 640px) {
  :root { --read: 19px; }
  .m-hero h1 { font-size: 50px; }
  .tale-lede { font-size: 20px; }
}

/* Lente avancée des images d’en-tête (même mouvement que l’ouverture de l’accueil). */
@keyframes heroDrift { from { transform: scale(1.08); } to { transform: scale(1); } }

/* Bas des en-têtes : l’image se fond dans la nuit au lieu de s’arrêter net (le voile gauche est plus sombre que --night). */
.m-hero > img { -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 100%); mask-image: linear-gradient(180deg, #000 58%, transparent 100%); }
@media (min-width: 901px) {
  .m-hero::before { background:
    linear-gradient(180deg, rgba(13,14,15,0) 72%, var(--night) 100%),
    linear-gradient(90deg, rgba(8,8,9,.86) 0%, rgba(8,8,9,.6) 32%, rgba(8,8,9,0) 62%),
    linear-gradient(180deg, rgba(8,8,9,.55) 0%, rgba(8,8,9,0) 22%, rgba(8,8,9,0) 60%, var(--night) 100%); }
}
