/* =====================================================================
   VISAGE V11 — « les images approuvées, en code »
   Base : les images de direction 3 montrées en live le 30 novembre 2026
   (double mode, élaborée) — chaîne d'or en spirale φ sur marine profond
   texturé / crème chaud, grand titre serif d'apparat, matière et
   profondeur. Cette couche ne retire rien : elle monte le rendu des
   pages-étalons de design-v10 au niveau de ces images.
   ===================================================================== */

@font-face{
  font-family:"Bodoni Moda V11";
  src:url("../polices-source/BodoniModa.ttf") format("truetype");
  font-weight:400 800; font-display:swap;
}
@font-face{
  font-family:"Bodoni Moda V11";
  src:url("../polices-source/BodoniModa-Italic.ttf") format("truetype");
  font-style:italic; font-weight:400 800; font-display:swap;
}

/* ---------- Le frontispice devient le premier écran de l'image ------ */
.phi-ouverture.visage-hero{
  overflow:hidden;
  border-bottom:1px solid rgba(201,162,39,.45);
  box-shadow:inset 0 -60px 90px -60px rgba(0,0,0,.45);
}
html[data-theme="sombre"] .phi-ouverture.visage-hero{
  background:
    radial-gradient(920px 620px at 80% 26%, rgba(201,162,39,.17), transparent 62%),
    radial-gradient(700px 500px at 12% 88%, rgba(38,84,124,.20), transparent 65%),
    linear-gradient(163deg, #0B2138 0%, #081A2C 54%, #050F1C 100%);
}
html:not([data-theme="sombre"]) .phi-ouverture.visage-hero{
  background:
    radial-gradient(920px 620px at 80% 26%, rgba(201,162,39,.13), transparent 62%),
    linear-gradient(163deg, #FBF7ED 0%, #F4EDDC 58%, #EFE5CF 100%);
  box-shadow:inset 0 -50px 80px -60px rgba(122,92,0,.25);
}
.visage-hero .phi-ouverture-in{position:relative; z-index:1; padding-top:44px; padding-bottom:40px}

/* ---------- Le fond : strates, spirale-chaîne, poussière d'or ------- */
.visage-fond{position:absolute; inset:0; overflow:hidden; pointer-events:none; z-index:0}
.visage-strates{position:absolute; inset:0; width:100%; height:100%}
html:not([data-theme="sombre"]) .visage-strates{display:none}

.visage-spirale{
  position:absolute; width:min(44%, 500px); aspect-ratio:1/1;
  right:-2%; top:-20px;
}
html[data-theme="sombre"] .visage-spirale{filter:drop-shadow(0 0 12px rgba(212,175,55,.30))}
html:not([data-theme="sombre"]) .visage-spirale{opacity:.55}
.visage-spirale .spirale-trace{stroke:#C9A227; stroke-width:2; opacity:.16}
.visage-spirale .maillon{
  fill:none; stroke:url(#v11-or-clair);
  opacity:0; animation:v11-maillon .8s ease forwards;
  animation-delay:calc(var(--i)*26ms);
}
html[data-theme="sombre"] .visage-spirale .maillon{stroke:url(#v11-or-sombre)}
.visage-spirale .maillon-reflet{
  fill:none; stroke:#FFF6D8; opacity:0;
  animation:v11-maillon .8s ease forwards;
  animation-delay:calc(var(--i)*26ms + 14ms);
}
html[data-theme="sombre"] .visage-spirale .maillon-reflet{opacity:0}
@keyframes v11-maillon{from{opacity:0}to{opacity:1}}
html[data-theme="sombre"] .visage-spirale .maillon-reflet{animation-name:v11-reflet-sombre}
@keyframes v11-reflet-sombre{from{opacity:0}to{opacity:.38}}
html:not([data-theme="sombre"]) .visage-spirale .maillon-reflet{animation-name:v11-reflet-clair}
@keyframes v11-reflet-clair{from{opacity:0}to{opacity:.5}}
.visage-spirale .spirale-liens{
  transform-box:fill-box; transform-origin:center;
  animation:v11-derive 170s linear infinite;
}
@keyframes v11-derive{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}

.visage-poussiere{position:absolute; inset:0; width:100%; height:100%}
.visage-poussiere .poussiere{
  fill:#F6E27A; opacity:0;
  animation:v11-scintille 5.4s ease-in-out infinite;
  animation-delay:calc(var(--i)*.41s);
}
@keyframes v11-scintille{0%,100%{opacity:0}50%{opacity:.85}}
html:not([data-theme="sombre"]) .visage-poussiere .poussiere{fill:#B8860B}
html:not([data-theme="sombre"]) .visage-poussiere{opacity:.4}

/* Bodoni Moda variable : l'opsz automatique de Chrome déraille les
   chasses à certains corps (glyphes qui se chevauchent, constaté au
   banc d'essai) — on fige l'instance par défaut, nette à tout corps. */
.visage-maxime, .titre-acte, #p-accueil h2, #commencer-5-secondes h2,
.barometre .chiffre{font-optical-sizing:none}

/* ---------- La maxime, à l'échelle de l'image ----------------------- */
.visage-maxime{
  grid-column:1 / -1;
  font-family:"Bodoni Moda V11", Didot, "Bodoni MT", "Playfair Display", serif;
  font-weight:600; letter-spacing:.004em;
  font-size:clamp(2.6rem, 5.8vw, 5rem);
  line-height:1.04; margin:.18em 0 .05em; max-width:none;
  position:relative; z-index:2;
}
html[data-theme="sombre"] .visage-maxime{color:#FDFBF4; text-shadow:0 3px 34px rgba(0,0,0,.45)}
html:not([data-theme="sombre"]) .visage-maxime{color:#132C49}
.visage-maxime-filet{grid-column:1 / -1; margin:.35rem 0 .4rem}
.visage-maxime-filet span{
  display:block; width:78px; height:2px;
  background:linear-gradient(90deg, #B8860B, #F6E27A, #B8860B);
}
.visage-hero .phi-logotype{max-width:205px; position:relative; z-index:2; opacity:.94}
.visage-hero .phi-coquillage{position:relative; z-index:2; max-width:410px; justify-self:end}
.visage-hero .phi-coquillage .cq-embleme{filter:drop-shadow(0 10px 26px rgba(0,0,0,.35))}
.visage-hero .phi-compteur, .visage-hero .phi-sceau, .visage-hero .phi-ancrage{position:relative; z-index:2}
.visage-hero .phi-sceau{
  background:rgba(238,244,248,.05);
  box-shadow:0 18px 38px -18px rgba(0,0,0,.55);
  backdrop-filter:blur(2px);
}
html:not([data-theme="sombre"]) .visage-hero .phi-sceau{
  background:rgba(255,255,255,.5);
  box-shadow:0 18px 38px -20px rgba(122,92,0,.35);
}
/* Mode clair : le hero crème de l'image renverse la bande marine —
   les variables de bande sont re-teintées dans le seul hero, pour que
   compteur, sceau, ancrage et logotype (encre = currentColor)
   redeviennent lisibles sur le crème, en marine et or profond. */
html:not([data-theme="sombre"]) .phi-ouverture.visage-hero{
  --cv-bande-encre:#152E4D; --cv-bande-doux:#3D5878; --cv-bande-muet:#5D7494;
  --cv-bande-ligne:rgba(122,92,0,.38);
  --cv-bande-or:#8A6414; --cv-bande-or-clair:#8A6414;
  color:#152E4D;
}
html:not([data-theme="sombre"]) .visage-hero .phi-sceau-empreinte{
  background:rgba(21,46,77,.07);
}

/* ---------- La carte d'action, finie comme un panneau --------------- */
#commencer-5-secondes{
  border:1px solid #C9A227 !important;
  border-radius:16px !important;
  box-shadow:0 26px 54px -20px rgba(4,16,30,.50), inset 0 1px 0 rgba(255,255,255,.45);
}
#commencer-5-secondes h2{
  font-family:"Bodoni Moda V11", Didot, "Bodoni MT", serif;
  font-weight:600; letter-spacing:.01em;
}

/* ---------- Les titres de l'accueil montent en apparat --------------- */
#p-accueil h2{
  font-family:"Bodoni Moda V11", Didot, "Bodoni MT", "Playfair Display", serif;
  letter-spacing:.008em;
}

/* ---------- Le Registre : la fioriture et le titre d'acte ----------- */
.visage-fioriture{display:block; width:min(560px, 88%); height:auto; margin:10px auto 0}
.visage-fioriture .fior-volute{stroke:url(#v11-or-fior); stroke-width:2.2; fill:none; stroke-linecap:round}
.visage-fioriture .fior-filet{stroke:#C9A227; stroke-width:1; opacity:.6}
.visage-fioriture .fior-losange{fill:#C9A227}
.visage-fioriture .fior-maillon{fill:none; stroke:#B8860B; stroke-width:1.6}
.titre-acte{
  font-family:"Bodoni Moda V11", Didot, "Bodoni MT", serif;
  letter-spacing:.012em;
}
.barometre .chiffre{font-family:"Bodoni Moda V11", Didot, "Bodoni MT", serif}

/* ---------- Mobile : la spirale respire en fond --------------------- */
@media (max-width:820px){
  .visage-spirale{width:105%; right:-38%; top:-24px; opacity:.5}
  html[data-theme="sombre"] .visage-spirale{opacity:.65}
  .visage-maxime{font-size:clamp(2.3rem, 11.5vw, 3.1rem)}
  .visage-hero .phi-coquillage{max-width:250px; justify-self:center}
}

/* ---------- Mouvements réduits : tout se fige, tout reste lisible --- */
@media (prefers-reduced-motion: reduce){
  .visage-spirale .maillon, .visage-spirale .maillon-reflet{animation:none !important; opacity:1 !important}
  html:not([data-theme="sombre"]) .visage-spirale .maillon-reflet{opacity:.5 !important}
  .visage-spirale .spirale-liens{animation:none !important}
  .visage-poussiere .poussiere{animation:none !important; opacity:.45 !important}
}
