/* DA Panthenna (r7) : socle commun des pages à nous (PAN-1099), servi par /static/da.css. Polices embarquées, jetons, base, fond
   animé (voile, grain), en-tête, mise en page commune, révélation à l'entrée et scène d'hologramme (moteur : holo.js).
   Mode d'emploi : commun/README.md. Chaque page y ajoute sa feuille, chargée après celle-ci (accueil-r7.css, acces-r8.css…). */
/* Accueil de panthenna.com, DA r7 (maquette design-accueil/r7, validée le 07/10). Polices servies par l'app
   (CSP font-src 'self'), jamais par Google Fonts : Literata (OFL, axes opsz 7-72 et wght 200-900) et
   Schibsted Grotesk (OFL, wght 400-900), sous-ensembles latin (+ latin-ext pour le texte courant), cf. static/SOURCE. */
@font-face { font-family: "Literata"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("/static/police/Literata-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/static/police/SchibstedGrotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/static/police/SchibstedGrotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* ---------- jetons ----------
   Fond quasi noir, texte jamais blanc pur, un seul bleu pour tout ce qui se clique.
   Un seul thème : sombre. Raison : la ronde 4 était jugée « pas assez sombre » ; un thème clair
   revient à proposer ce que l’utilisateur a refusé. */
:root {
  --fond: #08090C; --fg: #E4E8F0; --fg2: #A7B2C8; --fg3: #9AA5BC;
  --bleu: #3B82F6; --bleu-t: #8DB4FA; --sur-bleu: #0B1220; --focus: #8DB4FA;
  --ok: #4CC38A; --lueur: #E8B870;
  --serif: 'Literata', Georgia, 'Times New Roman', serif;
  --sans: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --g: clamp(20px, 5vw, 72px);
  --barre: 64px;
  --col: 1240px;
  --halo: 0 0 22px var(--fond), 0 0 8px var(--fond), 0 0 2px var(--fond);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--fond); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--barre) + 12px); scroll-behavior: smooth; }
body { margin: 0; background: var(--fond); color: var(--fg); font: 400 18px/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
ul, ol { list-style: none; }
a { color: var(--bleu-t); text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saut { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--fond); color: var(--fg); padding: 10px 14px; }
.saut:focus { left: 8px; }
.txt, main h1, main h2, main h3, main p, main li, main summary { text-shadow: var(--halo); }
.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; background: var(--bleu); color: var(--sur-bleu); font: 600 16px/1 var(--sans); text-decoration: none; border-radius: 4px; cursor: pointer; transition: background-color .15s, transform .15s; text-shadow: none; }
.bouton:hover { background: #5B9AF8; }
.bouton:active { transform: translateY(1px); }
.lien { font: 600 16px/44px var(--sans); color: var(--bleu-t); }

/* ---------- le fond : un canvas 2D, un voile de bord, du grain ---------- */
#fond { position: fixed; left: 0; top: 0; width: 100%; height: 100lvh; z-index: 0; display: block; pointer-events: none; background: var(--fond); }
.voile, .grain { position: fixed; left: 0; top: 0; width: 100%; height: 100lvh; z-index: 0; pointer-events: none; }
.voile { background:
  radial-gradient(120% 90% at 50% 44%, rgba(8,9,12,0) 38%, rgba(8,9,12,.62) 100%),
  linear-gradient(to bottom, rgba(8,9,12,.55), rgba(8,9,12,0) 14%),
  linear-gradient(to right, rgba(8,9,12,.66) 0%, rgba(8,9,12,.52) 38%, rgba(8,9,12,0) 80%); }
@media (max-width: 760px) { .voile { background:
  radial-gradient(120% 90% at 50% 44%, rgba(8,9,12,0) 38%, rgba(8,9,12,.62) 100%),
  linear-gradient(to bottom, rgba(8,9,12,.55), rgba(8,9,12,0) 14%), rgba(8,9,12,.4); } }
.grain { left: -80px; top: -80px; width: calc(100% + 160px); height: calc(100lvh + 160px); opacity: .045; background-image: var(--grain, none); background-size: 160px 160px; }
/* le grain bouge par déplacement du calque (compositeur), jamais par repeinture */
html.anim .grain { animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-40px, 22px); } 40% { transform: translate(31px, -57px); } 60% { transform: translate(-72px, 48px); } 80% { transform: translate(58px, 12px); } 100% { transform: translate(0, 0); } }
main, footer { position: relative; z-index: 1; }

/* ---------- en-tête ---------- */
.barre { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--barre); display: flex; align-items: center; gap: 20px; padding: 0 var(--g); color: var(--fg);
  background: linear-gradient(to bottom, rgba(8,9,12,.92), rgba(8,9,12,0)); transition: background-color .3s var(--ease); }
.barre.solide { background: linear-gradient(to bottom, rgba(8,9,12,.97) 70%, rgba(8,9,12,0)); }
.marque { display: block; color: inherit; flex: none; }
.logo { display: block; height: 24px; width: auto; aspect-ratio: 13350/2384; color: inherit; }
.chap-nav { display: none; margin: 0 auto; gap: 28px; }
.chap-nav a { position: relative; color: var(--fg); text-decoration: none; font: 600 15px/44px var(--sans); padding: 0 4px; min-width: 44px; text-align: center; }
.chap-nav a::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 6px; height: 2px; background: var(--bleu); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.chap-nav a:hover::after, .chap-nav a[aria-current="true"]::after { transform: scaleX(1); }
.outils { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.chap-nav + .outils { margin-left: 0; }
.lien-statut { color: var(--fg); font: 500 15px/44px var(--sans); padding: 0 10px; text-decoration: none; display: none; }
.lien-statut:hover { text-decoration: underline; }
.outils .bouton { min-height: 44px; padding: 0 18px; }
.outils .long { display: none; }
.menu summary { list-style: none; white-space: nowrap; min-height: 44px; padding: 0 12px; font: 600 15px/44px var(--sans); display: flex; gap: 6px; align-items: center; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.menu[open] summary::after { transform: translateY(1px) rotate(225deg); }
/* panneau du menu téléphone : pleine largeur, sans bord ni arrondi, une page qui se pose sous la barre */
.menu nav { position: fixed; left: 0; right: 0; top: var(--barre); padding: 8px var(--g) 22px; background: rgba(8,9,12,.97); display: grid; }
.menu nav a { display: block; font: 600 20px/52px var(--sans); color: var(--fg); text-decoration: none; }
.menu nav a:hover { color: var(--bleu-t); }
@media (min-width: 640px) { .outils .long { display: inline; } .outils .court { display: none; } .lien-statut { display: block; } }
@media (min-width: 900px) { .chap-nav { display: flex; } .menu { display: none; } }

/* mise en page commune (r6 : .in est défini après la ligne 92 reprise) */
.in { width: 100%; max-width: var(--col); margin: 0 auto; padding: 0 var(--g); }

/* révélation à l'entrée : une fois, sous 700 ms ; sans animation, tout est visible */
html.anim [data-r] { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
html.anim [data-r].ent { opacity: 1; transform: none; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 26px; }

/* scène d'hologramme : un carré, le canvas du moteur dedans */
.stage { position: relative; width: 100%; max-width: min(660px, max(380px, calc(100svh - 250px))); margin: 0 auto; aspect-ratio: 1; touch-action: pan-y; cursor: grab; -webkit-tap-highlight-color: transparent; }
.stage:active { cursor: grabbing; }
.stage:focus-visible { outline: 3px solid var(--focus); outline-offset: -6px; border-radius: 4px; }
.stage canvas { width: 100%; height: 100%; display: block; }
