/* =====================================================================
   FAMILLE VOYAGE — RÉCIT ET VOYAGE (version-images v12, 1er déc. 2026)
   Pages : capsules.html, transmission.html, voyage.html.
   Couche posée APRÈS la dernière feuille de style du <head> de chaque
   page. Elle ne retire RIEN de la v11 : elle impose les jetons, la
   typographie d'apparat et la composition des images spec approuvées
   du lot G (voyage-clair.png / voyage-sombre.png) :
   - un champ de strates de papier déchiré (crème chaud en clair,
     marine profond en sombre, poussière d'or en sombre) ;
   - des panneaux horizontaux pleine largeur, bordés d'un double filet
     d'or, posés sur les strates comme les cinq bandes de l'image ;
   - une chaîne d'or verticale au centre de la page, qui traverse les
     panneaux du haut jusqu'au bas, coiffée en haut d'une spirale φ
     enroulée en chaîne (anneaux concentriques d'or, CSS pur).
   Aucune référence externe. Aucun mot ajouté : la chaîne et la spirale
   sont des pseudo-éléments décoratifs sans texte.
   Les sélecteurs sont préfixés (html:root, html body…) pour passer
   après les blocs <style> historiques portés par le <body> des pages,
   à spécificité supérieure, sans toucher à ces blocs.
   ===================================================================== */

/* ---------- Jetons de la famille ---------- */
html:root{
  --fv-apparat:Didot,"Bodoni MT","Playfair Display",Georgia,serif;
  --font-apparat:var(--fv-apparat);
  --serif:var(--fv-apparat);
  /* mode clair — papier crème de l'image voyage-clair */
  --fond:#FAF6ED;
  --fond2:#F1EAD8;
  --carte:#FFFCF4;
  --carte2:#F7F0DE;
  --puit:#F1EAD8;
  --puit2:#F6EFDD;
  --encre:#132A47;
  --encre-foncee:#0D1F36;
  --texte:#26344A;
  --texte-doux:#4C5D74;
  --or:#6E5200;
  --or-clair:#A8842C;
  --or-decor:#A8842C;
  --ligne:#D8CDB4;
  --fv-or:#A8842C;
  --fv-or-fin:rgba(168,132,44,.55);
  --fv-plein:#B8860B;
  --encre-sur-or:#132A47;
  color-scheme:light;
}
html[data-theme="sombre"]{
  /* mode sombre — marine profond et or lumineux de voyage-sombre */
  --fond:#0B1E3A;
  --fond2:#081A2C;
  --carte:#10264A;
  --carte2:#0D2142;
  --puit:#081A2C;
  --puit2:#0D2142;
  --encre:#F2EAD8;
  --encre-foncee:#FDFBF4;
  --texte:#EDE6D4;
  --texte-doux:#B9C9D9;
  --or:#D9B45B;
  --or-clair:#E7CD85;
  --or-decor:#D9B45B;
  --ligne:#2E4A73;
  --fv-or:#D9B45B;
  --fv-or-fin:rgba(217,180,91,.55);
  --fv-plein:#B8860B;
  --encre-sur-or:#0B1E3A;
  color-scheme:dark;
}

/* ---------- Typographie d'apparat ---------- */
html body h1,
html body h2,
html body h3{
  font-family:var(--fv-apparat);
  letter-spacing:.01em;
}
html body .entete-sec h2{
  font-family:var(--fv-apparat);
}
html body .entete-sec{
  border-bottom:3px double var(--fv-or);
  padding-bottom:.55rem;
}
html body .entete-sec .num{color:var(--fv-or);}

/* ---------- Le champ de strates (fond de page) ---------- */
/* Strates horizontales de papier déchiré : bandes crème alternées,
   liserés d'ombre douce aux jonctions, comme le fond de l'image. */
html body{
  background-color:var(--fond);
  background-image:
    repeating-linear-gradient(179deg,
      #FAF6ED 0 118px, #EFE5CC 118px 122px,
      #F7F0DE 122px 238px, #E9DCBC 238px 242px,
      #FAF6ED 242px 360px);
}
html[data-theme="sombre"] body{
  background-color:#081A2C;
  background-image:
    radial-gradient(rgba(217,180,91,.55) 1px, transparent 1.7px),
    radial-gradient(rgba(217,180,91,.32) 1px, transparent 1.6px),
    repeating-linear-gradient(179deg,
      #0B1E3A 0 118px, #050F1C 118px 123px,
      #0D2142 123px 238px, #040B16 238px 243px,
      #0B1E3A 243px 360px);
  background-size:90px 90px, 140px 140px, auto;
  background-position:0 0, 34px 52px, 0 0;
}

/* ---------- La chaîne d'or centrale et sa spirale φ ---------- */
/* La chaîne descend au centre de la page et traverse les panneaux,
   comme sur les deux images. Purement décorative, sans texte,
   elle ne reçoit aucun clic. */
html body::before{
  content:"";
  position:fixed;
  top:0;bottom:0;
  left:calc(50% - 6px);
  width:12px;
  z-index:3;
  pointer-events:none;
  background:
    radial-gradient(circle at 50% 50%, transparent 2.4px, var(--fv-or) 3.1px, transparent 4.4px) 50% 0 / 12px 15px repeat-y,
    linear-gradient(90deg, transparent 5px, var(--fv-or-fin) 5px, var(--fv-or-fin) 7px, transparent 7px);
  opacity:.75;
}
html[data-theme="sombre"] body::before{
  opacity:.95;
  filter:drop-shadow(0 0 5px rgba(217,180,91,.65));
}
/* La spirale φ en tête : la chaîne s'enroule en anneaux concentriques
   d'or au-dessus du premier panneau, au centre, comme sur l'image. */
html body::after{
  content:"";
  position:absolute;
  top:84px;
  left:50%;
  transform:translateX(-50%);
  width:92px;height:92px;
  border-radius:50%;
  z-index:3;
  pointer-events:none;
  background:repeating-radial-gradient(circle at 50% 50%,
    transparent 0 6px, var(--fv-or) 6px 8px);
  opacity:.8;
}
html[data-theme="sombre"] body::after{
  opacity:.95;
  filter:drop-shadow(0 0 9px rgba(217,180,91,.7));
}
@media (max-width:719px){
  html body::after{width:64px;height:64px;top:72px;}
  html body::before{opacity:.5;}
}
/* voyage.html (corps .page-mag) : son premier écran porte déjà, dans
   son art d'origine, la vraie spirale-chaîne d'or de l'image spec —
   le médaillon CSS ferait double emploi et tomberait sur les cartes
   de sa bannière. Il est donc retiré sur cette seule page ; la
   chaîne centrale, elle, traverse la page entière comme l'image. */
html body.page-mag::after{display:none;}

/* ---------- Les panneaux horizontaux bordés d'or ---------- */
/* Chaque bloc devient une bande de l'image : fond carte, double filet
   d'or (bordure + filet intérieur en ombre portée interne), coins à
   peine arrondis, ombre de strate dessous. */
html body section.bloc,
html body .carte,
html body .capsule,
html body .etape-pas,
html body .carte-compteur{
  background:var(--carte);
  border:1px solid var(--fv-or);
  border-radius:6px;
  box-shadow:
    inset 0 0 0 3px var(--fond),
    inset 0 0 0 4px var(--fv-or-fin),
    0 12px 26px var(--ombre, rgba(60,45,10,.12));
}
html body .capsule-vide{
  background:var(--carte2);
  border:1px dashed var(--fv-or);
  border-radius:6px;
}
/* Capsules externes : même bande, filet plus discret */
html body .capsule.capsule-ext{
  box-shadow:
    inset 0 0 0 3px var(--fond),
    inset 0 0 0 4px var(--fv-or-fin),
    0 8px 18px var(--ombre, rgba(60,45,10,.10));
}

/* Le bandeau de palier de capsules.html : habillage seul — la
   mécanique module-paliers reste intacte. Le module injecte son
   propre fond marine et son encre crème (.bandeau-palier) : la
   famille ne pose que le filet d'or autour, sans toucher au fond
   ni à l'encre du module en sombre. En clair seulement, la bande
   passe au papier doré de la famille — et alors l'encre, le gras
   et le lien sont repris en tons marine/or lisibles sur crème,
   à spécificité supérieure au style injecté par le module. */
html body [data-bandeau-palier]{
  border:1px solid var(--fv-or);
  border-left:6px solid var(--fv-plein);
  border-radius:6px;
  padding:.7rem .9rem;
  margin:.8rem 0;
}
html:root:not([data-theme="sombre"]) body [data-bandeau-palier]{
  background:linear-gradient(180deg, rgba(184,134,11,.16), rgba(184,134,11,.08));
  color:var(--texte);
}
html:root:not([data-theme="sombre"]) body [data-bandeau-palier] strong{
  color:var(--or);
}
html:root:not([data-theme="sombre"]) body [data-bandeau-palier] a{
  color:var(--encre);
  font-weight:700;
}

/* ---------- Voyage : les vitres des scènes deviennent les panneaux -- */
html body .scene .vitre,
html body .scene .ouvert-texte{
  background:var(--carte);
  border:1px solid var(--fv-or);
  border-radius:6px;
  box-shadow:
    inset 0 0 0 3px var(--fond),
    inset 0 0 0 4px var(--fv-or-fin),
    0 14px 30px rgba(0,0,0,.28);
}
html body .b5-panneau{
  background:var(--carte);
  border:1px solid var(--fv-or);
  border-radius:6px;
  box-shadow:
    inset 0 0 0 3px var(--fond),
    inset 0 0 0 4px var(--fv-or-fin),
    0 10px 22px var(--ombre, rgba(60,45,10,.12));
}
html body .b5-panneau .pnum{
  font-family:var(--fv-apparat);
  color:var(--fv-or);
}

/* ---------- Boutons pleins : l'or plein de l'image ---------- */
html body button.action{
  background:var(--fv-plein);
  color:#132A47;
  border:1px solid var(--fv-plein);
}
html[data-theme="sombre"] body button.action{
  background:var(--fv-plein);
  color:#0B1E3A;
  border-color:var(--fv-or);
}

/* ---------- Mouvement réduit : la chaîne reste, rien ne bouge ------ */
@media (prefers-reduced-motion: reduce){
  html body::before, html body::after{filter:none;}
}
