/* =========================================================================
   FAHAM — prototype Accueil « La Fente »
   Palette web D « Forêt et bois », validée le 18 septembre 2026.
   La charte historique et les médias restent intacts.
   ========================================================================= */

@font-face {
  font-family: "Archivo";
  src: url("./fonts/archivo-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("../../fonts/newsreader/Newsreader-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* D / Green Cab : fond ivoire, encre, forêt, cuivre et accent lichen.
     Le papier botanique conserve séparément sa réserve raster #fbf5e8. */
  --faham-site-color-cover: #07221b;
  --faham-site-color-forest: #034234;
  --faham-site-color-timber: #c5763d;
  --faham-site-color-ivory: #fffbf3;
  --faham-site-color-lichen: #a5d5ad;
  --faham-site-color-paper: #fffbf3;

  --ink: var(--faham-site-color-cover);
  --forest: var(--faham-site-color-forest);
  --timber: var(--faham-site-color-timber);
  --ivory: var(--faham-site-color-ivory);
  --lichen: var(--faham-site-color-lichen);
  --paper: var(--faham-site-color-paper);

  --font-sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, monospace;

  /* échelle 8 */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 40px;
  --s5: 64px;
  --s6: 96px;
  --s7: 160px;
  --s8: 240px;

  --gutter: 16px;
  /* viewport-fit=cover : en paysage sur un écran à encoche, la marge de page
     ne descend jamais sous l'inset système */
  --pad-l: max(20px, env(safe-area-inset-left, 0px));
  --pad-r: max(20px, env(safe-area-inset-right, 0px));
  --head-h: 56px;
  --rhythm: var(--s6);
  --hero-img: 62svh;

  --ease: var(--faham-ease-ambient, cubic-bezier(0.4, 0, 0.2, 1));
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --motion-fast: 180ms;
  --motion-ui: 280ms;
  --motion-editorial: 720ms;
}

@media (min-width: 768px) {
  :root {
    --gutter: 24px;
    --pad-l: clamp(40px, 6.6vw, 128px);
    --pad-r: clamp(32px, 4.4vw, 88px);
    --head-h: 52px;
    --rhythm: var(--s7);
    /* la barre desktop est hors flux (voir .masthead) : elle ne se soustrait
       plus du cadre. Image 78svh + bande 22svh = 100svh exactement. */
    --hero-img: 78svh;
  }
}

/* ---------- socle ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  --bg: var(--ivory);
  --fg: var(--ink);
  margin: 0;
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  overflow-x: hidden;
  /* l'ancrage de scroll fausserait la course de la fente : le navigateur
     compenserait la hauteur perdue par le cadre au lieu de la laisser filer */
  overflow-anchor: none;
  /* La marée n'altère plus le couple global fond/texte : S4–S6 vivent dans
     leur propre surface sombre et conservent un contraste stable. */
}

body[data-menu="open"] {
  overflow: hidden;
}

@media (min-width: 768px) {
  body {
    font-size: 17px;
    line-height: 1.5;
  }
}

img,
svg {
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.02;
  text-wrap: balance;
}

h2 {
  font-size: clamp(28px, 2.7vw, 40px);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
  max-width: 62ch;
}

figure {
  margin: 0;
}

.media-picture {
  display: block;
  width: 100%;
  height: 100%;
}

.media-picture > img {
  display: block;
}

a {
  color: inherit;
}

::selection {
  background: var(--timber);
  color: var(--ink);
}

/* Retour au studio : identité Koudkèr A, isolée de la palette FAHAM D. */
body .prototype-return {
  background: #ced7ec;
  color: #4e1d35;
  border-color: #4e1d35;
}
body .prototype-return a { color: #4e1d35; }
body .prototype-return a:focus-visible { outline-color: #4e1d35; }

/* pas de délai de 300 ms ni de double-tap zoom sur les commandes */
a,
button {
  touch-action: manipulation;
}

/* une ancre ne doit jamais atterrir sous la barre haute */
#contenu,
main [id] {
  scroll-margin-top: calc(var(--head-h) + var(--s2));
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--pad-l);
  top: -100px;
  z-index: 80;
  background: var(--ink);
  color: var(--ivory);
  padding: 12px 20px;
  font-size: 14px;
  text-decoration: none;
  transition: top 140ms var(--ease);
}

.skip-link:focus-visible {
  top: 12px;
}

/* ---------- fragments partagés ---------- */

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.12em;
  font-weight: 400;
}

.caption {
  color: color-mix(in srgb, var(--fg) 72%, transparent);
  max-width: 46ch;
}

/* box-sizing: border-box — une légende qui porte elle-même les marges de page
   doit ajouter ces marges à sa mesure, sinon elle se casse en colonne étroite */
.refuge__wide figcaption,
.refuge__tall figcaption {
  max-width: calc(46ch + var(--pad-l) + var(--pad-r));
}

.caption--lichen {
  color: var(--lichen);
}

.latin {
  font-family: var(--font-serif);
  font-style: normal;
  font-size: 1.06em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--motion-fast) var(--ease),
    border-color var(--motion-fast) var(--ease),
    color var(--motion-fast) var(--ease),
    transform var(--motion-fast) var(--ease-out);
}

.btn:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); }
  .btn--primary:hover {
    background: color-mix(in srgb, var(--timber) 88%, var(--ivory));
    border-color: color-mix(in srgb, var(--timber) 88%, var(--ivory));
  }
  .btn--ghost:hover {
    background: color-mix(in srgb, var(--fg) 8%, transparent);
  }
  .link:hover { text-decoration-thickness: 2px; }
  .masthead__mark:hover,
  .pied__mark:hover { opacity: 0.72; }
  .masthead__nav a:hover::after { transform: scaleX(1); }
  .lang__btn:hover { opacity: 1; }
  .menu-toggle:hover,
  .menu__close:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
  }
  .menu__nav a:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 6px;
  }
  .reviews__button:hover {
    background: var(--ink);
    color: var(--ivory);
  }
  .stay-index a:hover { text-decoration: underline; }
}

.btn--primary {
  background: var(--timber);
  border-color: var(--timber);
  color: var(--ink);
}

.btn--ghost {
  border-color: currentColor;
  color: var(--fg);
}

.link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  padding-block: 12px;
  transition: text-decoration-thickness 140ms var(--ease);
}

/* l'axe rompu — un seul filet vertical par section, jamais de bordure fermée */
.axis {
  display: none;
}

@media (min-width: 1024px) {
  .axis {
    display: block;
    position: absolute;
    top: var(--axis-top, 0px);
    left: calc(
      var(--pad-l) + 3 *
        ((100% - var(--pad-l) - var(--pad-r) - 11 * var(--gutter)) / 12 + var(--gutter))
    );
    width: 1px;
    height: var(--axis-h, 160px);
    background: color-mix(in srgb, var(--forest) 35%, transparent);
    pointer-events: none;
  }
}

/* ---------- en-tête ---------- */

/* Mobile : barre ivoire de 56 px dans le flux, au-dessus du dérivé 4:5.
   Desktop (plus bas) : un rail compact hors flux de 80 vw, posé sur la photographie.
   Le rail appartient à la navigation, jamais à l'image : aucun voile ne
   recouvre le hero. */
.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: var(--head-h);
  /* encoche : la barre reste sous la barre d'état, viewport-fit=cover oblige */
  padding-top: env(safe-area-inset-top, 0px);
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding-inline: var(--pad-l) var(--pad-r);
  background: var(--ivory);
  color: var(--ink);
}

/* Le rail accompagne continûment le défilement. Seule sa densité évolue hors
   du haut de page ; il ne sort jamais du viewport ni de l'ordre de tabulation. */
.masthead[data-state="pinned"] {
  background: var(--ink);
  color: var(--ivory);
}

/* Sur mobile seulement, la bascule ivoire → encre accompagne le premier geste
   au lieu de claquer à 24 px. Le rail desktop conserve son contrat statique. */
@media (max-width: 767px) {
  .masthead {
    transition:
      background-color var(--motion-fast) var(--ease-out),
      color var(--motion-fast) var(--ease-out);
  }

}

/* Cibles : le contrat du brief 168 impose 44 px de haut comme de large.
   Le signe garde ses 20 px ; c'est la zone cliquable qui grandit. */
.masthead__mark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  line-height: 0;
  transition: opacity 140ms var(--ease);
}

/* Les pages intérieures commencent sur ivoire : aucun texte clair n'est posé sur un média. */
.masthead__wordmark,
.pied__wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1;
  text-decoration: none;
}

.masthead__mark svg {
  height: 20px;
  width: auto;
  display: block;
}

.masthead__group {
  display: none;
}

.masthead__nav {
  display: none;
  gap: var(--s4);
  font-size: 15px;
}

/* 11 px de part et d'autre d'une ligne de 22,5 px → 44,5 px de haut.
   Le filet se replace d'autant pour rester à 6 px sous le texte. */
.masthead__nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  padding-block: 11px;
}

/* le filet se dessine de gauche à droite : scaleX, pas width — animer une
   propriété de layout fait recalculer la ligne à chaque frame */
.masthead__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 5px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 140ms var(--ease);
}

.lang {
  display: none;
  align-items: center;
  /* la gouttière est absorbée par les cibles de 44 px, qui centrent leur texte */
  gap: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.lang__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  /* Une langue inactive reste une commande lisible, pas un état disabled. */
  opacity: 0.68;
  transition: opacity 140ms var(--ease);
}

.lang__btn[aria-pressed="true"] {
  opacity: 1;
}

.lang__btn[aria-pressed="true"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.lang__sep {
  opacity: 0.4;
}

/* le libellé reste calé sur la marge droite ; la cible s'étend vers la gauche */
.menu-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  background: none;
  border: 0;
  padding: 8px 0;
  min-width: 44px;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: inherit;
  cursor: pointer;
}

@media (max-width: 767px) {
  .masthead__group {
    display: flex;
    align-items: center;
    margin-left: auto;
  }

  .lang {
    display: flex;
  }

  .menu-toggle {
    margin-left: 0;
  }
}

@media (min-width: 768px) {
  /* Hors flux : le cadre photographique commence à y = 0 et garde ses 78svh.
     Le fond, le flou et la bordure restent bornés au rail FAHAM → EN, large
     de 80 vw et centré par deux marges de 10 vw. */
  .masthead {
    position: fixed;
    top: var(--s2);
    left: 10vw;
    right: auto;
    width: 80vw;
    /* Les commandes conservent 44 px de cible ; 3 px de respiration et la
       bordure donnent un rail visuel de 52 px, plus discret sur le hero. */
    min-height: 52px;
    padding: 3px var(--s2);
    gap: var(--s4);
    background: color-mix(in srgb, var(--ink) 86%, transparent);
    border: 1px solid color-mix(in srgb, var(--ivory) 18%, transparent);
    backdrop-filter: blur(14px) saturate(82%);
    -webkit-backdrop-filter: blur(14px) saturate(82%);
    color: var(--ivory);
  }

  /* ---- lisibilité de la navigation posée sur la photographie ----
     Un rail unique et fortement teinté porte tout le groupe FAHAM → EN.
     Le verre reste compact, à angles vifs et sans ombre : aucun voile,
     gradient ou calque global n'est ajouté à la photographie. */
  .masthead__mark,
  .masthead__group {
    padding-inline: 0;
    min-height: 44px;
  }
  .masthead__mark {
    margin-left: 0;
  }
  .masthead__group {
    display: flex;
    align-items: center;
    /* Le mot-signe ancre l'extrémité intérieure gauche ; liens et langues
       rejoignent l'extrémité intérieure droite du rail. */
    margin: 0 0 0 auto;
  }
  .masthead[data-state="top"] .masthead__mark,
  .masthead[data-state="top"] .masthead__group {
    background: transparent;
    color: inherit;
  }
  .masthead[data-state="pinned"] { background: color-mix(in srgb, var(--ink) 88%, transparent); }
  /* Même rail sur les trois pages. Cette réserve remplace seulement les
     52 px que le header sticky occupait dans le flux intérieur. */
  .page-interior main { padding-top: var(--head-h); }
  .masthead__nav,
  .lang {
    display: flex;
  }
  .menu-toggle {
    display: none;
  }
  .lang {
    margin-left: var(--s4);
  }
}

/* ---------- menu plein écran (mobile) ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--ink);
  color: var(--ivory);
  display: flex;
  flex-direction: column;
  /* plein écran sous l'encoche et au-dessus de l'indicateur d'accueil */
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: calc(var(--s4) + env(safe-area-inset-bottom, 0px));
  padding-left: calc(var(--pad-l) + env(safe-area-inset-left, 0px));
  padding-right: calc(var(--pad-r) + env(safe-area-inset-right, 0px));
  /* le geste de scroll ne fuit jamais vers la page derrière le panneau */
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transform: translateY(-2%);
  visibility: hidden;
  transition:
    opacity var(--motion-ui) var(--ease-out),
    transform var(--motion-ui) var(--ease-out),
    visibility 0s linear var(--motion-ui);
}

.menu[hidden] {
  display: none;
}

.menu[data-state="open"] {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition:
    opacity var(--motion-ui) var(--ease-out),
    transform var(--motion-ui) var(--ease-out),
    visibility 0s linear 0s;
}

.menu__head {
  height: var(--head-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu__word {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.14em;
}

.menu__close {
  background: none;
  border: 0;
  padding: 8px 0;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: inherit;
  cursor: pointer;
}

.menu__nav {
  margin-top: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.menu__nav a {
  font-size: 32px;
  letter-spacing: -0.02em;
  text-decoration: none;
  padding-block: 6px;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 240ms var(--ease-out),
    transform var(--motion-ui) var(--ease-out);
}

.menu[data-state="open"] .menu__nav a {
  opacity: 1;
  transform: translateY(0);
}

.menu[data-state="open"] .menu__nav a:nth-child(2) { transition-delay: 45ms; }
.menu[data-state="open"] .menu__nav a:nth-child(3) { transition-delay: 90ms; }

.menu__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 240ms var(--ease-out) 90ms,
    transform var(--motion-ui) var(--ease-out) 90ms;
}

.menu[data-state="open"] .menu__foot {
  opacity: 1;
  transform: translateY(0);
}

.menu__foot .lang {
  display: flex;
}

/* ---------- S1 · Seuil ---------- */

.hero__frame {
  height: var(--hero-img);
  overflow: hidden;
}

.hero__frame picture {
  display: block;
}

.hero__img {
  display: block;
  width: 100%;
  height: var(--hero-img);
  object-fit: cover;
  object-position: center;
}

.hero__band {
  min-height: 22svh;
  padding: var(--s3) var(--pad-r) var(--s4) var(--pad-l);
  display: grid;
  row-gap: var(--s3);
  align-content: end;
}

/* 38 px : la valeur mobile de la conception 167, fixe et non négociée.
   La bande grandit avec le titre plutôt que de le comprimer ; le hero mobile
   peut dépasser le viewport, il ne déborde jamais en largeur. */
.hero__title {
  font-size: 38px;
  max-width: 24ch;
}

/* cible du skip link : le focus doit se voir même quand :focus-visible
   ne s'applique pas à un élément rendu focalisable par tabindex="-1" */
.hero__title:focus {
  outline: 2px solid currentColor;
  outline-offset: 6px;
}

.hero__aside {
  display: grid;
  row-gap: 12px;
  justify-items: start;
}

.hero__place {
  color: color-mix(in srgb, var(--fg) 70%, transparent);
}

.hero__types {
  font-size: 16px;
  max-width: 34ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  max-width: none;
}

/* Ouverture signature : une seule fois, sur l'Accueil, sans modifier le flux. */
@media (prefers-reduced-motion: no-preference) {
  body[data-page="home"]::before,
  body[data-page="home"]::after {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
  }

  body[data-page="home"]::before {
    content: "";
    background: var(--ink);
    animation: faham-curtain 900ms var(--ease-in-out) both;
  }

  body[data-page="home"]::after {
    content: "FAHAM";
    display: grid;
    place-items: center;
    color: var(--ivory);
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw, 58px);
    font-weight: 500;
    letter-spacing: 0.16em;
    animation: faham-intro-mark 620ms var(--ease-out) both;
  }

  body[data-page="home"] .hero__img {
    animation: hero-image-enter 720ms var(--ease-out) 120ms both;
  }

  body[data-page="home"] .hero__title {
    animation: hero-copy-enter 680ms var(--ease-out) 300ms both;
  }

  body[data-page="home"] .hero__aside {
    animation: hero-copy-enter 620ms var(--ease-out) 360ms both;
  }

  @keyframes faham-curtain {
    0%, 38% { transform: translateY(0); }
    100% { transform: translateY(-100%); }
  }

  @keyframes faham-intro-mark {
    0% { opacity: 0; transform: translateY(12px); }
    32%, 62% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
  }

  @keyframes hero-image-enter {
    from { transform: scale(1.035); }
    to { transform: scale(1); }
  }

  @keyframes hero-copy-enter {
    from { opacity: 0; transform: translateY(24px); clip-path: inset(0 0 100%); }
    to { opacity: 1; transform: translateY(0); clip-path: inset(0); }
  }
}

@media (min-width: 768px) {
  /* le premier écran tient exactement dans 100svh : 78svh d'image + 22svh de
     bande ivoire, boutons compris. La barre haute est hors flux. */
  .hero__band {
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--gutter);
    align-items: end;
    row-gap: 0;
    padding-block: var(--s2) 28px;
  }
  .hero__title {
    grid-column: 1 / span 6;
    /* échelle desktop : la bande de 22svh doit continuer de tenir le pli */
    font-size: clamp(30px, 3.1vw, 46px);
  }
  .hero__aside {
    grid-column: 8 / span 5;
    align-self: end;
  }
  .hero__types {
    font-size: 17px;
    max-width: 44ch;
  }
}

/* la fente — un seul geste, une seule fois, jamais réutilisé ailleurs */
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .hero__frame {
      animation: fente linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 100vh;
    }
    @keyframes fente {
      from {
        height: 78svh;
      }
      to {
        height: 32svh;
      }
    }
  }
}

/* ---------- Avis · une scène éditoriale, immédiatement après le seuil ---------- */

.reviews {
  position: relative;
  margin-top: clamp(96px, 10vw, 144px);
  min-height: clamp(360px, 46svh, 520px);
  padding: clamp(72px, 9vw, 136px) var(--pad-r) clamp(64px, 8vw, 112px) var(--pad-l);
  border-bottom: 1px solid color-mix(in srgb, var(--forest) 22%, transparent);
  display: grid;
  align-content: center;
  gap: var(--s5);
}

.reviews__heading {
  display: grid;
  gap: var(--s2);
  align-content: start;
}

.reviews__heading h2 {
  max-width: 12ch;
}

.reviews__stage {
  min-width: 0;
}

.reviews__item {
  margin: 0;
}

.reviews:not(.review-enhanced) .reviews__item:not(.is-active) {
  display: none;
}

.reviews__item > p {
  max-width: 32ch;
  font-size: clamp(25px, 3vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.reviews__item footer {
  margin-top: var(--s3);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px var(--s2);
}

.reviews__item cite {
  font-style: normal;
  font-weight: 600;
}

.reviews__item footer .mono {
  color: color-mix(in srgb, var(--ink) 68%, transparent);
}

.reviews__controls {
  display: none;
  align-items: center;
  gap: 10px;
}

.reviews__button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid color-mix(in srgb, var(--ink) 42%, transparent);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: background-color var(--motion-ui) var(--ease-out), color var(--motion-ui) var(--ease-out);
}

.reviews__button--toggle {
  margin-left: 4px;
  font-size: 14px;
}

.reviews__button--toggle[aria-pressed="true"] {
  background: var(--ink);
  color: var(--ivory);
}

.review-enhanced .reviews__stage {
  display: grid;
}

.review-enhanced .reviews__item {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(16px);
  clip-path: inset(0 0 100% 0);
  transition:
    opacity 360ms var(--ease-out),
    transform 560ms var(--ease-out),
    clip-path 560ms var(--ease-in-out),
    visibility 0s linear 560ms;
}

.review-enhanced .reviews__item.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  clip-path: inset(0);
  transition-delay: 0s;
}

.review-enhanced .reviews__controls {
  display: flex;
}

@media (min-width: 1024px) {
  .reviews {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
  }
  .reviews__heading { grid-column: 1 / span 3; }
  .reviews__stage { grid-column: 4 / span 6; }
  .reviews__controls {
    grid-column: 10 / span 3;
    align-self: end;
    justify-self: end;
  }
}

/* ---------- S2 · Le lieu ---------- */

.lieu {
  position: relative;
  padding-top: var(--rhythm);
  display: grid;
  row-gap: var(--s4);
}

.lieu__text {
  padding-inline: var(--pad-l) var(--pad-r);
  display: grid;
  row-gap: var(--s3);
  justify-items: start;
}

.lieu__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 36% 50%;
}

@media (min-width: 1024px) {
  .lieu {
    grid-template-columns: var(--pad-l) minmax(0, 30%) minmax(var(--gutter), 1fr) minmax(0, 46%);
    row-gap: 0;
    align-items: end;
  }
  .lieu__text {
    grid-column: 2;
    padding-inline: 0;
    padding-bottom: var(--s2);
  }
  .lieu__media {
    grid-column: 4;
  }
}

/* ---------- S3 · Le nom ---------- */

.nom {
  position: relative;
  margin-top: var(--rhythm);
  padding-block: var(--s6);
  /* papier accordé au fond mesuré de la planche BOT-001 (rgb 251 245 232) :
     sans cela l'illustration dessine un rectangle plus clair sur --paper */
  background: #fbf5e8;
  color: var(--ink);
  display: grid;
  row-gap: var(--s4);
  padding-inline: var(--pad-l) var(--pad-r);
}

.nom__plate img {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
}

.nom__text {
  display: grid;
  row-gap: var(--s3);
  justify-items: start;
}

@media (min-width: 1024px) {
  .nom {
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--gutter);
    align-items: start;
    row-gap: 0;
  }
  .nom__plate {
    grid-column: 2 / span 4;
  }
  .nom__text {
    grid-column: 7 / span 5;
  }
}

/* ---------- S4 à S6 · La marée devient une surface ---------- */

.tide-zone {
  --bg: var(--forest);
  --fg: var(--ivory);
  position: relative;
  margin-top: var(--s8);
  padding-block: clamp(72px, 8vw, 128px) clamp(96px, 10vw, 160px);
  overflow: clip;
  background: var(--forest);
  color: var(--ivory);
  isolation: isolate;
}

.interlude {
  margin-top: 0;
}

.interlude__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.interlude__control {
  position: absolute;
  right: 16px;
  bottom: 16px;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  background: var(--ivory);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.interlude__control:focus-visible { outline: 2px solid var(--ivory); outline-offset: 4px; }
.interlude__control:disabled { cursor: default; }

.interlude__frame :is(img, video) {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% 50%;
  --parallax-y: 0px;
  transform: translate3d(0, var(--parallax-y), 0) scale(1.08);
  transform-origin: center;
}

@media (min-width: 768px) {
  .interlude__frame {
    aspect-ratio: 21 / 9;
  }
  .interlude__frame :is(img, video) {
    object-position: center bottom;
  }
}

/* ---------- S5 · Le refuge ---------- */

.refuge {
  position: relative;
  margin-top: var(--rhythm);
  display: grid;
  row-gap: var(--s5);
}

.refuge__wide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.refuge__wide figcaption,
.refuge__tall figcaption {
  margin-top: var(--s2);
  padding-inline: var(--pad-l) var(--pad-r);
}

.refuge__side {
  display: grid;
  row-gap: var(--s3);
  padding-inline: var(--pad-l) var(--pad-r);
}

.refuge__tall {
  margin-top: var(--s2);
}

.refuge__tall img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

@media (min-width: 1024px) {
  .refuge {
    grid-template-columns: minmax(0, 58%) minmax(var(--gutter), 1fr) minmax(0, 30%) var(--pad-r);
    row-gap: 0;
    align-items: start;
  }
  .refuge__wide {
    grid-column: 1;
  }
  .refuge__wide figcaption {
    padding-inline: var(--pad-l) 0;
  }
  .refuge__side {
    grid-column: 3;
    margin-top: 200px;
    padding-inline: 0;
  }
  .refuge__tall figcaption {
    padding-inline: 0;
  }
}

/* ---------- S6 · Les deux lodges ---------- */

.lodges {
  margin-top: var(--rhythm);
  display: grid;
  row-gap: var(--s5);
}

.lodges__band {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: var(--s3);
}

.lodges__media {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  transform-origin: center;
}

.lodges__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lodges__band--a .crop-sousbois {
  transform: scale(1.6);
  transform-origin: 50% 22%;
}

.lodges__panel {
  display: grid;
  row-gap: var(--s2);
  justify-items: start;
  padding-inline: var(--pad-l) var(--pad-r);
}

.lodges__band--b .lodges__panel {
  padding-left: calc(var(--pad-l) + 24px);
}

.lodges__count {
  color: color-mix(in srgb, var(--fg) 70%, transparent);
}

@media (min-width: 1024px) {
  .lodges__band {
    grid-template-rows: 56svh auto;
    row-gap: var(--s2);
  }
  .lodges__media {
    grid-row: 1;
    grid-column: 1;
    aspect-ratio: auto;
    height: 100%;
  }
  .lodges__band--a .crop-sousbois {
    transform: none;
    object-position: center 30%;
  }
  .lodges__band--a .lodges__media {
    width: calc(100% - 380px);
    justify-self: end;
  }
  .lodges__band--b {
    grid-template-rows: clamp(560px, 72svh, 720px) auto;
  }
  .lodges__band--b .lodges__media {
    width: calc(100% - 380px);
    justify-self: start;
  }
  /* le plateau occupe le bas du cadrage natif : sans décalage la bande
     ne montrerait que de l'eau */
  .lodges__band--b .lodges__media img {
    object-position: center 80%;
  }
  .lodges__panel {
    grid-row: 1;
    grid-column: 1;
    width: 380px;
    justify-self: start;
    align-content: end;
    background: var(--ivory);
    color: var(--ink);
    padding: var(--s4);
    row-gap: var(--s2);
  }
  .lodges__band--b .lodges__panel {
    justify-self: end;
    padding-left: var(--s4);
  }
  .lodges__panel .lodges__count {
    color: color-mix(in srgb, var(--ink) 70%, transparent);
  }
}

/* ---------- S7 · Les objets ---------- */

.objets {
  position: relative;
  margin-top: var(--rhythm);
  display: grid;
  row-gap: var(--s4);
  padding-inline: var(--pad-l) var(--pad-r);
}

.objets__text {
  display: grid;
  row-gap: var(--s3);
}

.objets__gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s3);
  align-items: start;
}

.objets__gallery figure {
  min-width: 0;
}

.objets__gallery img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 767px) {
  .objets__welcome {
    grid-column: 1 / -1;
  }
}

@media (min-width: 768px) {
  .objets {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--s3);
  }

  .objets__text {
    grid-column: 1 / span 4;
    align-self: start;
    position: sticky;
    top: 8rem;
  }

  .objets__gallery {
    grid-column: 5 / -1;
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .objets__welcome {
    grid-column: 1 / -1;
  }

  .objets__card {
    grid-column: 1 / span 3;
  }

  .objets__towel {
    grid-column: 4 / span 2;
    margin-top: var(--s5);
  }

  .objets__bottles {
    grid-column: 6 / span 3;
  }
}

/* ---------- S8 · Appel ---------- */

.appel {
  margin-top: var(--rhythm);
  padding: var(--s6) var(--pad-r) var(--s7) var(--pad-l);
}

.appel__inner {
  display: grid;
  row-gap: var(--s3);
  justify-items: start;
  max-width: 46ch;
}

.appel__action {
  margin-top: var(--s2);
}

/* ---------- surfaces intérieures ---------- */

.interior-intro,
.booking {
  position: relative;
  padding: clamp(72px, 10vw, 160px) var(--pad-r) var(--s6) var(--pad-l);
}

.interior-intro {
  height: min(36svh, 420px);
  min-height: 0;
  padding-block: 64px;
  display: grid;
  align-content: end;
  gap: var(--s3);
}

.interior-intro > p:not(.mono) {
  max-width: 54ch;
}

.stay-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px var(--s3);
  padding: 0 var(--pad-r) 0 var(--pad-l);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
}

.stay-index a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
  text-underline-offset: 5px;
}

.stay-index a:focus-visible { text-decoration: underline; }

.stay-feature,
.stay-bath,
.stay-types,
.stay-gestures {
  position: relative;
  margin-top: var(--stay-rhythm, var(--rhythm));
}

/* Le passage du lodge au bain marque un vrai changement de pièce. */
.stay-feature + .stay-bath {
  margin-top: 112px;
}

.stay-feature {
  display: grid;
  gap: var(--s4);
  align-items: end;
}

.stay-facts,
.stay-prepare {
  position: relative;
  margin-top: var(--stay-rhythm, var(--rhythm));
  padding-inline: var(--pad-l) var(--pad-r);
}

.stay-facts dl {
  margin: 0;
  display: grid;
  gap: 0;
}

.stay-facts div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr);
  gap: var(--s3);
  padding-block: 20px;
  border-top: 1px solid color-mix(in srgb, var(--forest) 35%, transparent);
}

.stay-facts div:last-child { border-bottom: 1px solid color-mix(in srgb, var(--forest) 35%, transparent); }
.stay-facts dt { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; }
.stay-facts dd { margin: 0; max-width: 42ch; }
.stay-prepare {
  display: grid;
  gap: var(--stay-prepare-gap, var(--s3));
  max-width: 860px;
  padding-bottom: var(--s7);
}
.stay-prepare > p:not(.mono) { max-width: 42ch; }
.stay-prepare .btn { justify-self: start; margin-top: var(--stay-prepare-action-gap, 20px); }

.stay-feature__copy,
.stay-bath > div,
.stay-gestures > h2 {
  padding-inline: var(--pad-l) var(--pad-r);
}

.stay-feature__copy,
.stay-bath > div {
  display: grid;
  gap: var(--stay-copy-gap, var(--s3));
}

.stay-feature figure,
.stay-bath figure,
.stay-types img,
.stay-poster img,
.stay-gestures img,
.booking__aside img {
  margin: 0;
}

.stay-feature img,
.stay-bath img,
.stay-types img,
.stay-poster :is(img, video),
.stay-gestures img,
.booking__aside img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.stay-feature img { aspect-ratio: 16 / 9; }

.stay-bath {
  display: grid;
  gap: var(--s4);
}

.stay-bath figure:last-child {
  padding-inline: var(--pad-l) var(--pad-r);
}

.stay-bath figure:last-child img { aspect-ratio: 4 / 5; }

.stay-types {
  display: grid;
  gap: 0;
  padding-top: var(--s6);
}

.stay-types > h2 {
  max-width: 20ch;
  margin-bottom: var(--stay-type-title-gap, 72px);
  padding-inline: var(--pad-l) var(--pad-r);
}
.stay-types article { display: grid; gap: var(--stay-type-media-gap, var(--s4)); }
.stay-types article + article { margin-top: var(--stay-type-pair-gap, 80px); }
.stay-types article > div { padding-inline: var(--pad-l) var(--pad-r); display: grid; gap: var(--stay-type-copy-gap, 20px); justify-items: start; }
.stay-types__media { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; }
.stay-types img { height: 100%; aspect-ratio: 4 / 5; }
.stay-types article:first-of-type img {
  object-position: center 30%;
  transform: scale(1.6);
  transform-origin: 50% 22%;
}
.stay-types article:nth-of-type(2) img { object-position: center bottom; }

.stay-poster { margin-top: var(--stay-rhythm, var(--s7)); }
.stay-poster :is(img, video) { aspect-ratio: 4 / 5; }

.stay-gestures { display: grid; gap: var(--stay-gesture-heading-gap, 48px); }
.stay-gestures > div { display: grid; grid-template-columns: 1fr 1fr; gap: var(--stay-gesture-media-gap, var(--s3)); padding-inline: var(--pad-l) var(--pad-r); }
.stay-gestures img { aspect-ratio: 4 / 5; }
.booking { display: grid; align-items: start; gap: var(--s6); }
.booking__form { display: grid; gap: var(--s3); max-width: 620px; }
.booking__form form { display: grid; gap: var(--s3); }
.form-grid { display: grid; gap: var(--s3); }
.booking label { display: grid; gap: 8px; font-size: 15px; font-weight: 500; }
.booking input,
.booking select,
.booking textarea { width: 100%; min-height: 48px; border: 1px solid var(--ink); border-radius: 0; background: var(--ivory); color: var(--ink); font: inherit; padding: 10px 12px; }
.booking :is(input, textarea)::placeholder { color: color-mix(in srgb, var(--ink) 72%, var(--ivory)); opacity: 1; }
.booking textarea { min-height: 120px; resize: vertical; }
.booking input[readonly] { opacity: 0.72; }
.booking small { color: color-mix(in srgb, var(--ink) 72%, transparent); font-size: 13px; font-weight: 400; }
.form-status { min-height: 1.5em; font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em; }
.form-status[data-kind="error"] { color: #7d271b; }
.form-status[data-kind="success"] { color: var(--forest); }
.form-error { min-height: 1.35em; color: #7d271b !important; }
.booking :is(input, select, textarea)[aria-invalid="true"] { border-color: #7d271b; outline-color: #7d271b; }
.booking__aside {
  display: grid;
  align-content: start;
  gap: var(--s3);
  padding-bottom: var(--s4);
  overflow: clip;
  background: var(--forest);
  color: var(--ivory);
}
.booking__aside img { aspect-ratio: 3 / 2; }
.booking-summary {
  margin-inline: var(--s3);
  border-top: 1px solid color-mix(in srgb, var(--lichen) 58%, transparent);
  padding-top: var(--s3);
  display: grid;
  gap: var(--s2);
}

body[data-page="stay"] {
  --stay-rhythm: 88px;
  --stay-copy-gap: var(--s3);
  --stay-type-title-gap: 72px;
  --stay-type-pair-gap: 80px;
  --stay-type-media-gap: var(--s4);
  --stay-type-copy-gap: 20px;
  --stay-gesture-heading-gap: 48px;
  --stay-gesture-media-gap: var(--s3);
  --stay-prepare-gap: var(--s3);
  --stay-prepare-action-gap: 20px;
}

@media (min-width: 768px) {
  body[data-page="stay"] {
    --stay-rhythm: clamp(128px, 10vw, 144px);
    --stay-copy-gap: var(--s4);
    --stay-type-title-gap: 80px;
    --stay-type-pair-gap: var(--s6);
    --stay-type-media-gap: var(--s3);
    --stay-type-copy-gap: var(--s3);
    --stay-gesture-heading-gap: 56px;
    --stay-gesture-media-gap: 32px;
    --stay-prepare-gap: 32px;
    --stay-prepare-action-gap: var(--s3);
  }

  .interior-intro {
    height: min(34svh, 360px);
    padding-top: 96px;
    padding-bottom: var(--s2);
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--gutter);
  }
  .interior-intro > .mono { grid-column: 1 / span 4; }
  .interior-intro > h1, .interior-intro > p:not(.mono) { grid-column: 4 / span 6; }
  .stay-feature {
    grid-template-columns:
      minmax(var(--pad-l), 1fr)
      minmax(280px, 340px)
      minmax(var(--gutter), 1fr)
      minmax(0, 54%);
  }
  .interior-intro + .stay-index { margin-top: var(--s2); }
  .stay-index { padding-left: calc(var(--pad-l) + ((100% - var(--pad-l) - var(--pad-r) - (11 * var(--gutter))) / 12 * 3) + (3 * var(--gutter))); }
  .stay-index + .stay-feature { margin-top: clamp(40px, 4vw, 72px); }
  .stay-feature__copy { grid-column: 2; padding-inline: 0; min-width: 0; }
  .stay-feature figure { grid-column: 4; min-width: 0; }
  .stay-feature + .stay-bath { margin-top: calc(var(--stay-rhythm) + 32px); }
  .stay-bath { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; padding-inline: var(--pad-l) var(--pad-r); }
  .stay-bath > div { grid-column: 1 / span 3; padding-inline: 0; }
  .stay-bath figure:nth-of-type(1) { grid-column: 5 / span 4; }
  .stay-bath figure:nth-of-type(2) { grid-column: 10 / span 3; padding-inline: 0; margin-top: 160px; }
  .stay-types article { grid-template-columns: 1fr 380px; align-items: end; }
  .stay-types { margin-top: 128px; padding-top: 80px; }
  .stay-types article > div { padding: 48px; background: var(--ivory); color: var(--ink); margin-left: calc(380px * -1); z-index: 1; }
  .stay-types article:nth-of-type(2) { grid-template-columns: 380px 1fr; }
  .stay-types article:nth-of-type(2) > div { grid-column: 1; grid-row: 1; margin-left: 0; margin-right: calc(380px * -1); }
  .stay-types article:nth-of-type(2) .stay-types__media { grid-column: 2; }
  .stay-types article:first-of-type img {
    transform: scale(1.45);
    transform-origin: 50% 30%;
  }
  .stay-poster { display: grid; grid-template-columns: 5fr 1fr 4fr 2fr; }
  .stay-poster figure { grid-column: 3; }
  .stay-gestures > div { grid-template-columns: 280px 280px; }
  .stay-facts,
  .stay-prepare { margin-top: 128px; }
  .stay-facts { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
  .stay-facts dl { grid-column: 4 / span 6; }
  .stay-prepare { margin-left: calc(var(--pad-l) + ((100% - var(--pad-l) - var(--pad-r) - (11 * var(--gutter))) / 12 * 3) + (3 * var(--gutter))); padding-inline: 0; }
  .booking { grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); }
  .booking__form { grid-column: 1 / span 6; }
  .booking__aside { grid-column: 8 / span 5; }
  .form-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .booking::before {
    content: "";
    position: absolute;
    top: clamp(120px, 14vw, 208px);
    bottom: var(--s6);
    left: calc(50% + (var(--gutter) / 2));
    width: 1px;
    background: color-mix(in srgb, var(--forest) 35%, transparent);
    pointer-events: none;
  }
}

@media (min-width: 1024px) {
  .appel {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--gutter);
  }
  .appel__inner {
    grid-column: 4 / span 7;
  }
}

/* ---------- pied ---------- */

.pied {
  background: var(--forest);
  color: var(--ivory);
  padding: var(--s5) var(--pad-r) var(--s5) var(--pad-l);
}

.pied__inner {
  display: grid;
  row-gap: var(--s3);
  justify-items: start;
}

.pied__mark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  line-height: 0;
  transition: opacity 140ms var(--ease);
}

.pied__mark svg {
  height: 24px;
  width: auto;
  display: block;
}

.pied__place {
  color: color-mix(in srgb, var(--ivory) 72%, transparent);
}

.pied .lang {
  display: flex;
}

.pied__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.pied__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  font-size: 15px;
  text-underline-offset: 4px;
}

@media (min-width: 768px) {
  .pied__inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: var(--s4);
  }
}

/* ---------- barre de conversion mobile ---------- */

.bar-mobile {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  /* 56 px utiles + l'indicateur d'accueil, jamais 56 px dont l'indicateur */
  height: calc(56px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  align-items: center;
  padding-inline: calc(var(--pad-l) + env(safe-area-inset-left, 0px))
    calc(var(--pad-r) + env(safe-area-inset-right, 0px));
  background: var(--ivory);
  color: var(--ink);
}

.bar-mobile[hidden] {
  display: none;
}

.bar-mobile .btn {
  min-height: 44px;
  padding: 0 24px;
}

@media (max-width: 767px) {
  /* la barre basse ne doit jamais couvrir la mention du pied */
  .pied {
    padding-bottom: calc(var(--s5) + 56px + env(safe-area-inset-bottom, 0px));
  }
}

@media (min-width: 768px) {
  .bar-mobile {
    display: none;
  }
}

/* ---------- couche motion éditoriale ---------- */

.motion-enhanced .motion-reveal {
  --motion-x: 0px;
  --motion-y: 20px;
  --motion-scale: 1;
  opacity: 0;
  transform: translate3d(var(--motion-x), var(--motion-y), 0) scale(var(--motion-scale));
  transition:
    opacity var(--motion-editorial) var(--ease-out) var(--motion-delay, 0ms),
    transform var(--motion-editorial) var(--ease-out) var(--motion-delay, 0ms);
}

.motion-enhanced .motion-reveal--media {
  --motion-y: 14px;
  --motion-scale: 0.985;
  --motion-clip-top: 0;
  --motion-clip-right: 0;
  --motion-clip-bottom: 14%;
  --motion-clip-left: 0;
  clip-path: inset(
    var(--motion-clip-top)
    var(--motion-clip-right)
    var(--motion-clip-bottom)
    var(--motion-clip-left)
  );
  transition:
    opacity 680ms var(--ease-out) var(--motion-delay, 0ms),
    transform 740ms var(--ease-out) var(--motion-delay, 0ms),
    clip-path 740ms var(--ease-in-out) var(--motion-delay, 0ms);
}

.motion-enhanced .motion-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  clip-path: inset(0);
}

/* Scrollcraft global — chaque scène garde un geste et un critère de retrait propres. */
.motion-enhanced .motion-scene--nom.motion-reveal--media {
  --motion-y: 18px;
  --motion-scale: 0.99;
  --motion-clip-bottom: 20%;
}

.motion-enhanced .motion-scene--nom.motion-reveal--copy,
.motion-enhanced .motion-scene--refuge-copy {
  --motion-y: 12px;
}

.motion-enhanced .motion-scene--refuge-wide {
  --motion-y: 18px;
  --motion-scale: 0.99;
  --motion-clip-bottom: 18%;
}

.motion-enhanced .motion-scene--refuge-bath {
  --motion-y: 22px;
  --motion-scale: 0.985;
  --motion-clip-bottom: 22%;
}

.motion-enhanced .motion-scene--lodges-a.motion-reveal--media {
  --motion-x: -10px;
  --motion-y: 0px;
  --motion-scale: 0.992;
  --motion-clip-right: 10%;
  --motion-clip-bottom: 0;
}

.motion-enhanced .motion-scene--lodges-b.motion-reveal--media {
  --motion-x: 10px;
  --motion-y: 0px;
  --motion-scale: 0.992;
  --motion-clip-bottom: 0;
  --motion-clip-left: 10%;
}

.motion-enhanced .motion-scene--lodges-a.motion-reveal--copy,
.motion-enhanced .motion-scene--lodges-b.motion-reveal--copy {
  --motion-y: 8px;
}

.motion-enhanced .motion-scene--objets.motion-reveal--copy {
  --motion-y: 12px;
}

.motion-enhanced .motion-scene--objets.motion-reveal--media {
  --motion-y: 16px;
  --motion-scale: 0.975;
  --motion-clip-bottom: 18%;
}

/* Scrollcraft 004 — S2 se découvre au rythme de son entrée, sans toucher à sa géométrie. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .motion-enhanced .lieu__media.motion-reveal--media {
      animation: lieu-media-reveal 1ms linear both;
      animation-timeline: view(block);
      animation-range: entry 35% entry 100%;
      transition: none;
    }

    @keyframes lieu-media-reveal {
      from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
        clip-path: inset(0 0 26% 0);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
        clip-path: inset(0);
      }
    }
  }
}

@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  /* Le premier frame doit exister avant même que Chromium/WebKit n'échantillonne
     la scroll-timeline. Sans ce socle, le reveal générique (opacity: 0) peut
     rester peint jusqu'au tout premier événement de scroll. */
  .motion-enhanced .stay-feature figure.motion-reveal--media {
    opacity: 0.18;
    transform: translate3d(0, 16px, 0) scale(1);
    clip-path: inset(0 0 18% 0);
  }

  @supports (animation-timeline: view()) {
    .motion-enhanced .stay-feature figure.motion-reveal--media {
      animation: stay-feature-media-reveal 1ms linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 42vh;
      transition: none;
    }

    @keyframes stay-feature-media-reveal {
      from {
        opacity: 0.18;
        transform: translate3d(0, 16px, 0) scale(1);
        clip-path: inset(0 0 18% 0);
      }
      to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        clip-path: inset(0);
      }
    }
  }
}

.motion-enhanced .booking-summary.is-refreshing {
  animation: booking-summary-refresh 180ms var(--ease-out);
}

@keyframes booking-summary-refresh {
  0%, 100% { opacity: 1; }
  46% { opacity: 0.58; }
}

/* ---------- popup de transparence du concept ---------- */

.concept-notice {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100svh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  background: var(--ivory);
  color: var(--ink);
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition:
    opacity var(--motion-ui) var(--ease-out),
    transform var(--motion-ui) var(--ease-out),
    overlay var(--motion-ui) allow-discrete,
    display var(--motion-ui) allow-discrete;
}

.concept-notice[open] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.concept-notice::backdrop {
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  opacity: 0;
  transition:
    opacity var(--motion-ui) var(--ease-out),
    overlay var(--motion-ui) allow-discrete,
    display var(--motion-ui) allow-discrete;
}

.concept-notice[open]::backdrop { opacity: 1; }

@starting-style {
  .concept-notice[open] {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  .concept-notice[open]::backdrop { opacity: 0; }
}

.concept-notice__inner {
  display: grid;
  gap: var(--s3);
  padding: clamp(32px, 6vw, 64px);
}

.concept-notice__inner h2 { max-width: 14ch; }
.concept-notice__inner p { max-width: 48ch; }
.concept-notice__inner .btn { justify-self: start; }

/* ---------- mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero__frame {
    animation: none !important;
    height: var(--hero-img) !important;
  }
  body[data-page="home"]::before,
  body[data-page="home"]::after {
    content: none !important;
  }
  .motion-reveal {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  .interlude__frame :is(img, video) {
    transform: none !important;
  }
  .menu,
  .menu__nav a,
  .menu__foot,
  .concept-notice,
  .concept-notice::backdrop {
    transition-delay: 0s !important;
    transform: none !important;
  }
}
