@font-face {
  font-family: Geist;
  src: url('fonts/geist-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --opening-paper: #fafaf8;
  --opening-ink: #151515;
  --opening-muted: #5a6775;
  --opening-line: #dce2e8;
  --opening-accent: #173b5c;
  --opening-point: #173b5c;
  --opening-soft: #eaf1f8;
  --opening-on-accent: #fff;
  --opening-gutter: clamp(24px, 5vw, 120px);
  --header-height: 92px;
  font-family: Geist, Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--opening-paper); color: var(--opening-ink); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--opening-ink); outline-offset: 6px; }
[hidden] { display: none !important; }
.skip { position: fixed; left: 20px; top: -80px; padding: 12px; z-index: 30; background: var(--opening-paper); }
.skip:focus { top: 10px; }
.site-header { position: fixed; inset: 0 0 auto; z-index: 20; min-height: 92px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 40px; padding: 20px var(--opening-gutter); border-bottom: 1px solid var(--opening-line); background: var(--opening-paper); color: var(--opening-ink); transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease; }
.site-header::before { content: ''; position: absolute; inset: 0 0 -32px; z-index: -1; pointer-events: none; background: linear-gradient(rgb(0 0 0 / 65%), rgb(0 0 0 / 35%) 65%, transparent); opacity: 0; transition: opacity 200ms ease; }
.site-header.is-over-photo { background: transparent; color: #fff; border-color: transparent; text-shadow: 0 1px 3px rgb(0 0 0 / 80%); }
.site-header.is-over-photo::before { opacity: 1; }
.site-header.is-over-photo .brand-point { background: #fff; }
.site-header :focus-visible { outline-color: currentColor; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 600; letter-spacing: -.055em; }
.brand-point { display: block; width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; background: var(--opening-point); }
.header-nav { display: flex; align-items: center; justify-content: center; gap: 24px; }
.site-header button { min-height: 44px; border: 0; padding: 10px 0; background: transparent; color: inherit; font-size: 12px; white-space: nowrap; text-shadow: inherit; }
.header-nav button { font-size: 14px; font-weight: 700; }
.header-nav button:hover { text-decoration: underline; text-underline-offset: 6px; }
.opening { min-height: 66.667svh; padding: calc(var(--header-height) + clamp(28px, 4vh, 65px)) var(--opening-gutter) 34px; }
.opening-name { margin: 0 0 20px; font-size: clamp(18px, 1.5vw, 26px); font-weight: 400; letter-spacing: -.04em; }
h1 { margin: 0; font-size: clamp(48px, 5.5vw, 108px); font-weight: 600; letter-spacing: -.065em; line-height: 1.01; }
.fixed-title { display: block; }
.rotating-line { display: none; color: var(--opening-accent); overflow: hidden; padding-block: .07em .15em; margin-block: .04em -.15em; min-height: 1.24em; }
.rotating-word { display: inline-block; white-space: nowrap; }
.static-words { display: block; color: var(--opening-accent); padding-top: .1em; }
.is-enhanced .rotating-line { display: block; }
.is-enhanced .static-words { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rotating-word.is-leaving { animation: opening-leave 260ms cubic-bezier(.6,0,.9,.4) both; }
.rotating-word.is-entering { animation: opening-enter 500ms cubic-bezier(.16,1,.3,1) both; }
@keyframes opening-leave { to { transform: translateY(-120%); opacity: 0; } }
@keyframes opening-enter { from { transform: translateY(120%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.photo-story { --photo-height: min(100svh, 75vw); height: calc(var(--photo-height) + 125svh); background: var(--opening-ink); }
.photo-stage { position: sticky; top: 0; height: var(--photo-height); overflow: hidden; }
.opening-photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.next-page { position: relative; z-index: 2; margin-top: calc(-1 * min(100svh, 75vw)); min-height: 100svh; padding: clamp(75px, 13vh, 160px) var(--opening-gutter); background: var(--opening-paper); }
.chapter-label { margin: 0 0 36px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--opening-muted); }
.next-page h2 { margin: 0; font-size: clamp(38px, 5.7vw, 112px); line-height: 1.08; letter-spacing: -.055em; font-weight: 500; }
.next-page h2 span { color: var(--opening-accent); }
@media (min-width: 2100px) { h1 { font-size: 5.2vw; } }
@media (max-width: 1100px) {
  :root { --header-height: 128px; }
  .site-header { grid-template-columns: 1fr auto; padding: 14px 24px; gap: 6px 20px; }
  .header-nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
}
@media (max-width: 700px) {
  .wordmark { font-size: 17px; }
  .opening { padding-top: calc(var(--header-height) + 32px); }
  .opening-name { font-size: 18px; margin-bottom: 20px; }
  h1 { font-size: clamp(37px, 9vw, 60px); letter-spacing: -.06em; line-height: 1.08; }
  /* Écran vertical : la photo occupe tout l'écran pendant le défilement,
     recadrée sur la façade, au lieu d'une bande paysage sur fond noir. */
  .photo-story { --photo-height: 100svh; height: calc(var(--photo-height) * 2 + 25svh); }
  .opening-photo { object-position: 50% 45%; }
  .next-page { margin-top: -100svh; }
  .next-page h2 { font-size: clamp(34px, 7.8vw, 55px); }
}
@media (max-width: 540px) {
  :root { --header-height: 105px; }
  .site-header { grid-template-columns: 1fr; gap: 3px; padding: 14px 24px; }
  .wordmark { min-height: 30px; }
  .header-nav { grid-row: 2; justify-content: center; gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header, .site-header::before { transition: none; }
  .rotating-word { animation: none !important; }
  .photo-story { height: auto; }
  .photo-stage { position: relative; }
  .next-page { margin-top: 0; }
}

/* Deux entrées de même importance, séparées du titre. */
.opening-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 0; }
.opening-copy { min-width: 0; padding-right: clamp(28px, 4vw, 80px); }
.opening-entries { border-left: 1px solid var(--opening-line); padding: 32px clamp(20px, 4vw, 80px); display: grid; justify-items: center; gap: 24px; }
.opening-entry { width: 220px; max-width: 100%; }
.opening-entry button { width: 100%; max-width: 100%; min-height: 44px; padding: 10px 15px; border: 1px solid #173b5c; border-radius: 8px; background: var(--opening-accent); color: #fff; box-shadow: 0 3px 0 #102c45, 0 7px 14px rgb(23 59 92 / 18%), inset 0 1px 0 rgb(255 255 255 / 15%); font-size: 14px; font-weight: 500; line-height: 1.4; }
@media (max-width: 1100px) {
  .opening-layout { margin-left: 0; }
}
@media (max-width: 700px) {
  .opening-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .opening-copy { padding-right: 0; }
  .opening-entries { border-left: 0; border-top: 1px solid var(--opening-line); padding: 28px 0 0; gap: 22px; }
}

@media (min-width: 701px) {
  .opening-layout { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .opening-entries { grid-column: 2; grid-row: 1; border-right: 0; border-left: 1px solid var(--opening-line); }
  .opening-copy { grid-column: 1; grid-row: 1; padding-left: 0; padding-right: clamp(28px, 4vw, 80px); }
}

/* Garder la place des accès évite un saut de page à leur apparition. */
.scroll-entries { display: flex; justify-self: end; gap: 10px; opacity: 0; transform: translateY(-6px); visibility: hidden; pointer-events: none; transition: opacity 280ms ease, transform 280ms ease, visibility 0s linear 280ms; }
.has-scroll-entries .scroll-entries { opacity: 1; transform: translateY(0); visibility: visible; pointer-events: auto; transition-delay: 0s; }
.site-header .scroll-entries button { width: 145px; min-height: 44px; padding: 10px 8px; border: 1px solid #173b5c; border-radius: 8px; background: var(--opening-accent); color: #fff; font-size: 12px; font-weight: 500; text-shadow: none; box-shadow: 0 3px 0 #102c45, 0 5px 12px rgb(23 59 92 / 18%); }
@media (max-width: 1100px) {
  .scroll-entries { grid-column: 2; grid-row: 1; }
}
@media (max-width: 700px) {
  .site-header { grid-template-columns: 1fr; }
  .scroll-entries { grid-column: 1; grid-row: 3; justify-self: stretch; justify-content: center; }
  .site-header .scroll-entries button { width: 145px; max-width: calc((100% - 10px) / 2); white-space: normal; }
}

.site-header .scroll-entries button { transition: background-color 300ms ease, border-color 300ms ease, box-shadow 300ms ease; }
.site-header.is-over-photo .scroll-entries button { background: transparent; border-color: rgb(255 255 255 / 85%); color: #fff; box-shadow: none; text-shadow: 0 1px 3px rgb(0 0 0 / 65%); }
@media (prefers-reduced-motion: reduce) {
  .scroll-entries, .site-header .scroll-entries button { transition: none; transform: none; }
}

/* Retour visuel des deux accès, dans l’ouverture et le menu. */
.opening-entry button, .site-header .scroll-entries button {
  transition: transform 180ms ease, background-color 300ms ease, border-color 300ms ease, box-shadow 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .opening-entry button:hover, .site-header .scroll-entries button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 0 #102c45, 0 9px 18px rgb(23 59 92 / 24%);
  }
  .site-header.is-over-photo .scroll-entries button:hover {
    background: rgb(255 255 255 / 12%);
    box-shadow: 0 4px 12px rgb(0 0 0 / 16%);
  }
}
.opening-entry button:active, .site-header .scroll-entries button:active {
  transform: translateY(1px) scale(.98);
  box-shadow: 0 1px 0 #102c45, 0 2px 5px rgb(23 59 92 / 16%);
}
.site-header.is-over-photo .scroll-entries button:active {
  background: rgb(255 255 255 / 20%);
  box-shadow: none;
}
@media (prefers-reduced-motion: reduce) {
  .opening-entry button, .site-header .scroll-entries button { transition: none; }
  .opening-entry button:hover, .opening-entry button:active,
  .site-header .scroll-entries button:hover, .site-header .scroll-entries button:active { transform: none; }
}

.opening-entry + .opening-entry { position: relative; }
.opening-entry + .opening-entry::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  width: 48px;
  height: 1px;
  background: var(--opening-line);
  transform: translateX(-50%);
}
@media (max-width: 700px) {
  .opening-entry + .opening-entry::before { top: -11px; }
}

.opening-entries { gap: 48px; }
.opening-entry + .opening-entry::before { top: -24px; }

/* Navigation regroupée près du nom du site. */
@media (min-width: 1101px) {
  .site-header { grid-template-columns: auto auto minmax(0, 1fr); gap: 28px; }
}
.header-nav { justify-content: flex-start; }

@media (min-width: 701px) {
  .opening-copy h1 { font-size: clamp(30px, 3.7vw, 74px); }
  .fixed-title { white-space: nowrap; }
}

/* Centrage de l’ouverture dans l’espace libre sous le menu fixe. */
.opening {
  min-height: calc(66.667svh - 20px);
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + 24px);
  padding-bottom: 24px;
}
.opening-layout { width: 100%; }

.header-nav { position: relative; z-index: 2; } /* Le panneau passe devant les deux entrées du bandeau. */
.unified-trigger { cursor: pointer; }
.navigation-panel { position: absolute; top: 100%; left: 0; width: 310px; max-width: calc(100vw - 48px); padding: 20px; border: 1px solid var(--opening-line); border-radius: 8px; background: var(--opening-paper); color: var(--opening-ink); text-shadow: none; box-shadow: 0 12px 24px rgb(23 59 92 / 12%); animation: navigation-enter 160ms ease-out; }
.navigation-panel h2 { margin: 0 0 12px; font-size: 14px; font-weight: 650; color: var(--opening-accent); }
.navigation-panel p { margin: 0; padding: 11px 0; font-size: 13px; color: var(--opening-muted); }
.site-header .navigation-panel button { display: block; width: 100%; padding: 11px 0; text-align: left; font-size: 13px; font-weight: 500; line-height: 1.45; white-space: normal; text-shadow: none; }
.site-header .navigation-panel button:hover, .site-header .navigation-panel button:focus-visible { background: var(--opening-soft); text-decoration: none; }
@media (max-width: 700px) {
  .navigation-panel { grid-template-columns: 1fr; gap: 20px; padding: 20px 24px; max-height: calc(100dvh - var(--header-height)); overflow-y: auto; }
}

@keyframes navigation-enter { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .navigation-panel { animation: none; } }

.next-page { padding-bottom: clamp(30px, 4vh, 55px); }

/* Liens du panneau de navigation (menu Engagement) : même rendu que les entrées-boutons du panneau. */
.site-header .navigation-panel a { display: block; padding: 11px 0; font-size: 13px; font-weight: 500; line-height: 1.45; color: inherit; text-shadow: none; }
.site-header .navigation-panel a:hover, .site-header .navigation-panel a:focus-visible { background: var(--opening-soft); }
.site-header .navigation-panel a[aria-current="page"] { font-weight: 650; color: var(--opening-accent); }

/* Menu du 31 octobre : logo agrandi à gauche, liens centrés, accès à droite au même
   format que les liens ; transparent, texte noir, sans bouton bleu. Il glisse
   hors de l’écran quand on descend et revient quand on remonte, avec un fond
   pour rester lisible (comportement inspiré d’izhak.fr ; menu-scroll.js). */
.site-header { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 24px; background: transparent; border-bottom-color: transparent; color: var(--opening-ink); text-shadow: none; transition: transform 700ms cubic-bezier(.5, .3, .1, 1), background-color 400ms ease, border-color 400ms ease; }
.site-header::before { display: none; }
.site-header .header-nav { grid-column: 2; grid-row: 1; justify-self: center; justify-content: center; gap: 28px; }
.site-header .wordmark { grid-column: 1; grid-row: 1; justify-self: start; font-size: clamp(24px, 2.1vw, 32px); white-space: nowrap; }
.site-header .scroll-entries { grid-column: 3; grid-row: 1; justify-self: end; gap: 28px; }
.site-header .scroll-entries button,
.site-header .scroll-entries button:hover,
.site-header .scroll-entries button:active,
.site-header.is-over-photo .scroll-entries button,
.site-header.is-over-photo .scroll-entries button:hover,
.site-header.is-over-photo .scroll-entries button:active { width: auto; max-width: none; min-height: 44px; padding: 10px 0; border: 0; border-radius: 0; background: transparent; color: inherit; box-shadow: none; text-shadow: none; transform: none; font-size: 14px; font-weight: 700; }
.site-header .scroll-entries button:hover { text-decoration: underline; text-underline-offset: 6px; }
.site-header.is-over-photo { background: transparent; color: var(--opening-ink); border-color: transparent; text-shadow: none; }
.site-header.is-over-photo .brand-point { background: var(--opening-point); }
.site-header.is-banded { background: rgb(250 250 248 / 94%); border-bottom-color: var(--opening-line); backdrop-filter: blur(8px); }
.site-header.is-hidden { transform: translateY(-100%); }
@media (max-width: 1100px) {
  .site-header { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; padding: 12px 24px; }
  .site-header .wordmark { grid-column: 1 / -1; grid-row: 1; justify-self: start; }
  .site-header .header-nav { grid-column: 1; grid-row: 2; justify-self: start; gap: 20px; }
  .site-header .scroll-entries { grid-column: 2; grid-row: 2; gap: 20px; }
}
@media (max-width: 540px) {
  .site-header { grid-template-columns: 1fr; }
  .site-header .header-nav { grid-column: 1; grid-row: 2; justify-self: center; }
  .site-header .scroll-entries { grid-column: 1; grid-row: 3; justify-self: center; }
  .site-header .header-nav button, .site-header .scroll-entries button { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header { transition: none; }
}

.opening-description { max-width: 44ch; margin: 12px 0 0; font-size: clamp(17px, 1.4vw, 22px); line-height: 1.55; color: var(--opening-muted); }

/* Barre flottante : verre translucide et relief, visible en permanence. */
.site-header,
.site-header.is-banded,
.site-header.is-over-photo {
  inset: 12px 14px auto;
  min-height: 76px;
  padding: 14px 28px;
  border: 1px solid rgb(255 255 255 / 65%);
  border-radius: 22px;
  background: rgb(250 250 248 / 74%);
  color: #151515;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 8px 24px rgb(15 35 52 / 14%), 0 2px 5px rgb(15 35 52 / 7%), inset 0 1px 0 rgb(255 255 255 / 75%);
  transform: none;
  text-shadow: none;
}
.site-header.is-hidden { transform: none; }
.site-header .navigation-panel { border-radius: 16px; }
@media(max-width:700px) {
  .site-header { inset: 8px 8px auto; padding: 10px 16px; border-radius: 18px; }
}
@supports not (backdrop-filter: blur(1px)) { .site-header { background: rgb(250 250 248 / 96%); } }

/* Logo plus discret dans la barre flottante. */
.site-header .wordmark { font-size: 22px; gap: 9px; }
.site-header .wordmark .brand-point { width: 8px; height: 8px; }
@media(max-width:540px) { .site-header .wordmark { font-size: 18px; gap: 7px; } }

/* Présentation longue : davantage de largeur pour le texte et accès à droite. */
@media(min-width:1001px) {
 .opening-layout { grid-template-columns:minmax(0,3fr) minmax(260px,1fr); }
 .opening-copy { padding-right:32px; }
 .opening-description { max-width:none; }
 .opening-entries { padding-inline:20px 0; }
}

/* Sous-titres synchronisés : hauteur stable pendant l’alternance. */
.is-enhanced .opening-descriptions { display:grid; }
.is-enhanced .opening-descriptions .opening-description { grid-area:1 / 1;visibility:hidden; }
.is-enhanced .opening-descriptions .opening-description.is-current { visibility:visible; }
.is-enhanced .description-label { display:none; }

/* Annoncer les deux autres messages sans déplacer le sous-titre. */
.is-enhanced .rotating-line{display:flex;flex-direction:column;align-items:flex-start;gap:.06em;padding:0;margin:.12em 0 .2em;overflow:hidden;}
.rotating-line .rotating-word{line-height:1.12;}
.rotating-neighbor{display:block;border:0;background:none;padding:0;min-height:44px;font:inherit;font-size:.56em;font-weight:500;letter-spacing:inherit;line-height:1.15;color:#173b5c;opacity:.25;cursor:pointer;text-align:left;transition:opacity 180ms;}
.rotating-neighbor:hover,.rotating-neighbor:focus-visible{opacity:.65;}
.rotating-neighbor:focus-visible{outline:2px solid #173b5c;outline-offset:2px;}
/* Les trois mots tournent ensemble autour du mot central. */
.is-enhanced .rotating-line{position:relative;display:block;height:2.65em;min-height:0;perspective:700px;overflow:hidden;}
.rotating-line .rotating-word,.rotating-line .rotating-neighbor{position:absolute;top:calc(50% - .56em);left:0;display:block;margin:0;padding:0;border:0;font:inherit;line-height:1.12;letter-spacing:inherit;white-space:nowrap;transform-origin:left center;backface-visibility:hidden;}
.rotating-line .rotating-word{transform:translateY(0) scale(1);opacity:1;}
.rotating-line [data-word-prev]{transform:translateY(-.8em) scale(.56);opacity:.25;}
.rotating-line [data-word-next]{transform:translateY(.8em) scale(.56);opacity:.25;}
.rotating-line .rotating-neighbor{min-height:0;transition:none;}
.rotating-line .rotating-neighbor:focus-visible{outline-offset:4px;opacity:.65;}
.rotating-line .rotating-neighbor { font-style: normal; }

/* La roue des mots est sortie du titre (ses boutons ne doivent pas en faire partie) : elle garde sa typographie. */
.rotating-line { font-size: clamp(48px, 5.5vw, 108px); font-weight: 600; letter-spacing: -.065em; line-height: 1.01; }
@media (min-width: 2100px) { .rotating-line { font-size: 5.2vw; } }
@media (max-width: 1100px) { .rotating-line { font-size: clamp(37px, 9vw, 60px); letter-spacing: -.06em; line-height: 1.08; } }
@media (min-width: 701px) { .rotating-line { font-size: clamp(30px, 3.7vw, 74px); } }
