

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #ece7df;
  --ink: #2b2622;
  --accent: #a8794f;
  
  --brume: .7;
  
  --frappe: 13ms;
  --fondu: .9s;
}


@font-face {
  font-family: Mistrully;
  src: url("typo/mistrully.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

html, body { height: 100%; }


html.page-scarpa { scrollbar-gutter: auto; scroll-behavior: auto; }


.page-scarpa .header {
  --fondu-header: 32px;
  transition: transform .3s, background-color .35s, border-color .35s, box-shadow .35s;
}
.page-scarpa .header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: calc(100% + var(--fondu-header));
  z-index: -1;
  pointer-events: none;
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
  background: linear-gradient(to bottom, rgba(255,255,255,.34) 0%, rgba(255,255,255,.14) 55%, rgba(255,255,255,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 30%, rgba(0,0,0,.6) 58%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 30%, rgba(0,0,0,.6) 58%, transparent 100%);
  opacity: 0;
  transition: opacity .35s;
}
.page-scarpa .header:not(:hover, :focus-within, :has(.navp-open, .nav-menu-left.active)) {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: transparent;
  box-shadow: none;
}
.page-scarpa .header:not(:hover, :focus-within, :has(.navp-open, .nav-menu-left.active))::before { opacity: 1; }
@media (max-width: 768px) { .page-scarpa .header { --fondu-header: 14px; } }

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  
  overflow-x: clip;
}


#sceneCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 1;
}


body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 42%,
    transparent 55%, rgba(60,55,48,.10) 82%, rgba(40,36,30,.22) 100%);
}


.scene-scroll {
  position: relative;
  height: 700vh;
  z-index: 0;
  pointer-events: none;
}


.scene-veil {
  position: fixed;
  inset: 0;
  z-index: 3;
  background: #fbfaf7;
  opacity: 0;
  pointer-events: none;
}


.scene-captions {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.cap {
  position: absolute;
  top: 50%;
  left: 8vw;
  max-width: 34rem;
  transform: translateY(-50%);
  opacity: 0;
  filter: blur(6px);
  transition: opacity .35s ease, filter .35s ease;
}
.cap.is-active { opacity: 1; filter: none; }


.cap:not(.cap--pile),
.cap-bloc { isolation: isolate; }
.cap-bloc { position: relative; }
.cap:not(.cap--pile)::before,
.cap-bloc::before {
  content: "";
  position: absolute;
  inset: -45% -22%;
  z-index: -1;
  background: var(--nuage);
  pointer-events: none;
}


.lettre { opacity: 0; transition: opacity .25s ease; }
.cap:not(.cap--pile).is-active .lettre,
.cap-bloc.is-shown .lettre {
  opacity: 1;
  animation: lettreFondu var(--fondu) ease-out backwards;
  animation-delay: calc(var(--i) * var(--frappe));
}
@keyframes lettreFondu { from { opacity: 0; filter: blur(.3em); } }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}


.cap--mosaique { max-width: max(15rem, min(34rem, calc(42vw - 25vh - 3rem))); }

.cap-eyebrow {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.cap h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 300;
  line-height: 1.02;
  margin-bottom: 1.4rem;
}
.cap h2,
.final-text h2 {
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  font-weight: 300;
  line-height: 1.08;
  margin-bottom: 1rem;
}
.final-text p {
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 300;
  line-height: 1.7;
  color: #4c463f;
}

.cap p {
  font-size: clamp(1.05rem, 1.6vw, 1.5rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
}
.cap p + p { margin-top: .8rem; }

.cap-souligne {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
}
.cap-manuscrite {
  font-family: Mistrully, cursive;
  font-size: 1.75em;
  line-height: 1;
  color: var(--accent);
  padding: 0 .06em;
}


.cap--droite { left: auto; right: 8vw; max-width: 30rem; }

.cap--etroite { max-width: min(34rem, 28vw); }


.cap--pile p { font-size: clamp(.95rem, 1.2vw, 1.15rem); }
.cap-bloc {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(12px);
  transition: opacity .7s ease, filter .7s ease, transform .7s ease;
}
.cap-bloc.is-shown { opacity: 1; filter: none; transform: none; }
.cap-bloc + .cap-bloc { margin-top: 1.2rem; }


.scene-final {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: auto minmax(0, 34rem);
  justify-content: center;
  align-items: center;
  column-gap: clamp(2.5rem, 7vw, 7rem);
  padding: 0 6vw;
  pointer-events: none;
}


.final-media {
  width: min(48vh, 38vw, 531px);
  aspect-ratio: 531 / 793;
}
.final-media img {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;   
}

.final-text > * {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(12px);
  transition: opacity .35s ease, filter .35s ease, transform .35s ease;
}
.final-text p + p { margin-top: 1rem; }

.scene-final.is-text .final-text { pointer-events: auto; }
.scene-final.is-text .final-text > * {
  opacity: 1;
  filter: blur(0);
  transform: none;
  transition-duration: .7s;
}

.scene-final.is-text .final-text > :nth-child(2) { transition-delay: .09s; }
.scene-final.is-text .final-text > :nth-child(3) { transition-delay: .18s; }
.scene-final.is-text .final-text > :nth-child(4) { transition-delay: .27s; }
.scene-final.is-text .final-text > :nth-child(5) { transition-delay: .36s; }
.scene-final.is-text .final-text > :nth-child(6) { transition-delay: .45s; }


.final-suite { margin-top: 2.4rem; }
.final-suite p { font-size: clamp(.95rem, 1.2vw, 1.1rem); }
.final-suite .final-link { margin: .6rem 2rem 0 0; }

.final-link {
  display: inline-block;
  margin-top: 2rem;
  padding-bottom: .25rem;
  font-size: .78rem;
  
  line-height: 1.9;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: .55rem;
  
  visibility: hidden;
  transition: opacity .35s ease, filter .35s ease, transform .35s ease, visibility 0s linear .35s;
}
.scene-final.is-text .final-link { visibility: visible; }
.final-link:hover { color: var(--accent); }
.final-link:focus-visible { color: var(--accent); }


.ap-modal, .ap-corps { overscroll-behavior: contain; }

.ap-modal .doc-modal {
  display: flex;
  flex-direction: column;
  max-width: 680px;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
}
.ap-corps { overflow-y: auto; padding: clamp(24px, 3vw, 34px) clamp(28px, 4vw, 44px); }
.ap-modal .doc-modal-close { z-index: 1; border-radius: 50%; background: rgba(255, 255, 255, .92); }

.ap-modal .ct-champs { margin-top: 18px; padding-top: 20px; gap: 16px 24px; }
.ap-modal .doc-form-check { margin-top: 18px; }
.ap-modal .doc-form-submit { margin-top: 16px; }
html.ap-ouvert { overflow: hidden !important; scrollbar-gutter: stable; }
.ap-modal .doc-form-check input[aria-invalid="true"] { outline: 1px solid #a3402f; outline-offset: 1px; }
.ap-erreur { margin-top: 14px; font-size: 13.5px; font-weight: 400; line-height: 1.55; color: #a3402f; }
.ap-erreur a { color: inherit; }
.ap-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.ap-modal .ap-actions .dc-bouton { margin-top: 0; text-decoration: none; }
.ap-modal .ap-fermer { background: transparent; color: var(--dc-encre); }


.scene-hint {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: .55;
  
  pointer-events: none;
  animation: hintPulse 2.4s ease-in-out infinite;
  transition: opacity .4s;
}
@keyframes hintPulse { 0%,100%{opacity:.35} 50%{opacity:.7} }

.scene-hint.is-hidden { opacity: 0; animation: none; }

.scene-progress {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(0,0,0,.08);
  z-index: 5;
}
.scene-progress span {
  display: block; height: 100%; width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--accent);
}


.scene-loader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity .5s ease .3s, visibility 0s linear .8s;
}
.scene-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-logo {
  position: relative;
  width: 180px;
  height: 80px;
  animation: loaderLogo .5s cubic-bezier(.34, 1.56, .64, 1) both;
}
.loader-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.loader-logo-2 { opacity: 0; transition: opacity .2s linear, transform .3s ease-out; }
.scene-loader.is-hidden .loader-logo-2 { transform: scale(1.1); }
.loader-barre {
  width: 200px;
  height: 3px;
  margin-top: 30px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  animation: loaderBarre .4s ease-out .2s both;
}
.loader-barre span {
  display: block;
  width: 0;
  height: 100%;
  background: #000;
  border-radius: 3px;
  transition: width .1s;
}
.loader-texte {
  margin-top: 15px;
  font-size: 12px;
  color: #999;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: loaderTexte .3s ease-out .3s both;
}
@keyframes loaderLogo { from { opacity: 0; transform: scale(.8); } }
@keyframes loaderBarre { from { opacity: 0; width: 0; } }
@keyframes loaderTexte { from { opacity: 0; transform: translateY(10px); } }


@media (max-width: 1000px) {
  .final-text .cap-eyebrow { font-size: .72rem; letter-spacing: .14em; }
  .final-link { font-size: .72rem; letter-spacing: .12em; }
}


.no-scene #sceneCanvas,
.no-scene .scene-veil,
.no-scene .scene-loader,
.no-scene .scene-hint,
.no-scene .scene-progress,
.no-scene .scene-scroll,
.no-scene body::after { display: none; }
.no-scene .scene-captions,
.no-scene .scene-final { position: static; }
.no-scene .cap {
  position: static;
  margin: 14vh 8vw;
  transform: none;
  opacity: 1;
  filter: none;
}
.no-scene .cap-bloc,
.no-scene .lettre { opacity: 1; filter: none; transform: none; }
.no-scene .scene-final { padding: 14vh 6vw; }
.no-scene .final-media img { opacity: 1; }
.no-scene .final-text { pointer-events: auto; }
.no-scene .final-text > * { opacity: 1; filter: none; transform: none; }
.no-scene .final-link { visibility: visible; }

@media (max-width: 720px) {
  .cap { left: 6vw; max-width: 82vw; }
  .cap--droite { left: 6vw; right: auto; }
  .cap--etroite { max-width: 82vw; }
  
  .cap--pile p { font-size: .9rem; line-height: 1.45; }
  .cap-bloc + .cap-bloc { margin-top: .8rem; }

  
  .cap p { color: var(--ink); font-weight: 400; }
  .cap p br { display: none; }
  .scene-hint { white-space: nowrap; letter-spacing: .2em; }
}


@media (orientation: portrait) {
  .cap {
    top: calc(env(safe-area-inset-top, 0px) + 7vh);
    transform: none;
  }
  
  .cap--titre { top: calc(env(safe-area-inset-top, 0px) + 7vh + 56px); }
}


@media (max-width: 720px) and (orientation: portrait) {
  .scene-final {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    row-gap: 1.4rem;
  }
  
  .final-media { width: min(19vh, 60vw); }
  .final-link { margin-top: 1.4rem; }
  .final-suite { margin-top: 1.2rem; }
  .final-suite .final-link { margin-top: .35rem; }
}


@media (max-width: 360px) {
  .final-text .cap-eyebrow { letter-spacing: .06em; }
  .final-link { font-size: .68rem; letter-spacing: .04em; }
  
  .cap h1 { font-size: 2rem; }
  .cap .cap-eyebrow { letter-spacing: .22em; }
}


@media (max-height: 600px) {
  .scene-final { column-gap: 2rem; row-gap: 1rem; }
  .final-text .cap-eyebrow { margin-bottom: .6rem; }
  .final-text h2 { font-size: 1.6rem; margin-bottom: .55rem; }
  .final-text p { font-size: .92rem; line-height: 1.5; }
  .final-text p + p { margin-top: .5rem; }
  .final-link { margin-top: .9rem; }
  .final-suite { margin-top: .8rem; }
  .final-suite p { font-size: .85rem; }
  .final-suite .final-link { margin-top: .2rem; }
  
  .cap--pile p { font-size: .85rem; line-height: 1.4; }
  .cap-bloc + .cap-bloc { margin-top: .7rem; }
}

@media (max-width: 720px) and (orientation: portrait) and (max-height: 500px) {
  .final-media { width: min(15vh, 60vw); }
  .cap--pile p { font-size: .82rem; }
}
