/* NILES : site public. Toutes les valeurs de couleur, police, rayon et courbe viennent de tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--story); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: .7; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; font-weight: 400; }

.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 16px; top: 12px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-button);
  background: var(--pill); color: var(--pillFg);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ---------- Barre de navigation ---------- */
.nav {
  position: fixed; left: 0; right: 0; top: 0; height: 72px; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 0 clamp(20px, 4vw, 52px);
  background: transparent; color: var(--heroFg);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  transition: background 1s ease, color 1s ease, border-color 1s ease;
}
.nav[data-solid] { background: var(--glass); color: var(--ink); border-bottom-color: var(--line); }
.nav__logo { font-family: var(--font-display); font-size: 15px; letter-spacing: .36em; }
.nav__spacer { flex: 1; }
.nav__links {
  display: flex; gap: clamp(16px, 2.6vw, 32px); align-items: center;
  font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase;
}
.nav__lang { opacity: .7; }
.nav__btn {
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--heroFg) 45%, transparent);
  transition: border-color 1s ease;
}
.nav[data-solid] .nav__btn { border-color: var(--line2); }
@media (max-width: 719px) { .nav__link { display: none; } }

/* ---------- Héro ---------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 560px;
  background: var(--story); color: var(--heroFg); overflow: hidden;
}
.hero__poster, .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__video, .s6__video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero__video { opacity: .95; }
.hero__shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--story) 35%, transparent) 0%,
    color-mix(in srgb, var(--story) 8%, transparent) 38%,
    color-mix(in srgb, var(--story) 62%, transparent) 100%);
}
.hero__content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  padding: 0 24px; text-align: center;
  transform: translateY(calc(var(--hp, 0) * 22vh));
  opacity: calc(1 - var(--hp, 0) * 1.3);
}
.hero__logo { display: flex; font-family: var(--font-display); font-size: clamp(54px, 11vw, 150px); line-height: 1; padding-left: .3em; }
.hero__l { display: inline-block; margin-right: .3em; }
.hero__tag { font-family: var(--font-text); font-style: italic; font-size: clamp(16px, 1.9vw, 23px); }
.hero__cue {
  position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: color-mix(in srgb, var(--heroFg) 70%, transparent);
  font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase;
}
.hero__cue::before {
  content: ""; width: 1px; height: 54px;
  background: linear-gradient(color-mix(in srgb, var(--heroFg) 0%, transparent), color-mix(in srgb, var(--heroFg) 70%, transparent));
}
.hero--moved .hero__cue { opacity: 0; transition-delay: 0s; }

/* ---------- 2. Affirmation ---------- */
.s2 {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 18vh clamp(24px, 8vw, 120px); background: var(--bg);
}
.s2__p {
  max-width: 1100px; text-align: center; font-family: var(--font-display);
  font-size: clamp(34px, 5.4vw, 78px); line-height: 1.12; text-wrap: balance;
}
.w { display: inline-block; }

/* ---------- 3. Une pièce, sa place ---------- */
.s3 { position: relative; background: var(--bg); }
.s3__stage {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; overflow: hidden; padding: 12vh 0;
}
.s3__plate {
  position: relative; width: min(70vw, 520px); aspect-ratio: 4 / 5; background: var(--plate);
  overflow: hidden;
  clip-path: inset(calc((1 - var(--k, 1)) * 40%) calc((1 - var(--k, 1)) * 36%));
}
.s3__plate img {
  position: absolute; left: 8%; top: 50%; width: 84%; height: auto;
  mix-blend-mode: multiply;
  transform: translateY(-50%) scale(calc(1.18 - .18 * var(--k, 1)));
}
.s3__cap { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 0 24px; }
.mono { font: 11px var(--font-mono); letter-spacing: .14em; color: var(--ink2); }
.s3__line { font-family: var(--font-text); font-style: italic; font-size: 17px; color: var(--ink2); }

/* ---------- 4. Détails ---------- */
.s4 { padding: 16vh clamp(24px, 6vw, 96px) 22vh; background: var(--bg); }
.s4__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: clamp(18px, 3vw, 44px); max-width: 1280px; margin: 0 auto; align-items: start;
}
.det { display: flex; flex-direction: column; gap: 16px; }
.det:nth-child(2) { margin-top: clamp(0px, 8vw, 120px); }
.det__frame { aspect-ratio: 3 / 4; background: var(--plate); overflow: hidden; position: relative; }
.det__stage { position: absolute; left: 0; right: 0; top: -10%; bottom: -10%; }
.det__stage img {
  position: absolute; left: 50%; width: var(--zoom, 300%); height: auto; max-width: none;
  top: calc((var(--py, 50) + var(--drift, 0)) * 1%);
  transform: translate(-50%, calc((var(--py, 50) + var(--drift, 0)) * -1%));
  mix-blend-mode: multiply;
}
.det__cap { display: flex; align-items: baseline; gap: 12px; }
.det__t { font-family: var(--font-display); font-size: 19px; flex: 1; }
.det__id { font: 10.5px var(--font-mono); letter-spacing: .12em; color: var(--ink2); }

/* ---------- 5. Cinq maisons ---------- */
.s5 { background: var(--story); color: var(--heroFg); padding: 22vh 0; overflow: hidden; }
.s5__row {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 40px clamp(48px, 7vw, 120px); padding: 0 24px;
}
.city { display: flex; flex-direction: column; gap: 14px; }
.city__n { font-family: var(--font-display); font-size: clamp(54px, 9vw, 132px); line-height: 1; }
.city__t { font: 12px var(--font-mono); letter-spacing: .16em; color: color-mix(in srgb, var(--heroFg) 62%, transparent); min-height: 1.2em; }
.s5__p {
  margin: 12vh auto 0; text-align: center; font-family: var(--font-text); font-style: italic;
  font-size: clamp(17px, 1.8vw, 22px); color: color-mix(in srgb, var(--heroFg) 75%, transparent); padding: 0 24px;
}

/* ---------- 6. Partout où vous vivez ---------- */
.s6 { position: relative; background: var(--story); }
.s6__stage { min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.s6__box {
  position: relative; overflow: hidden; background: var(--story);
  width: calc(58vw + 42vw * var(--k, 1)); height: calc(54vh + 46vh * var(--k, 1));
  border-radius: calc(10px * (1 - var(--k, 1)));
}
.s6__dim { position: absolute; inset: 0; background: color-mix(in srgb, var(--story) calc(var(--dim, .45) * 100%), transparent); }
.s6__t {
  position: absolute; left: 0; right: 0; bottom: 12vh; text-align: center; padding: 0 24px;
  color: var(--heroFg); font-family: var(--font-display); font-size: clamp(34px, 5vw, 72px);
}

/* ---------- 7. Il sait ---------- */
.s7 {
  min-height: 120vh; display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: clamp(40px, 8vw, 140px); padding: 16vh clamp(24px, 6vw, 96px); background: var(--bg);
}
.phone {
  width: 290px; height: 600px; flex: none; border-radius: 48px; padding: 10px;
  background: var(--story);
  box-shadow: 0 60px 120px -40px color-mix(in srgb, var(--ink) 45%, transparent);
  transform: translateY(calc((.5 - var(--p7, .5)) * 60px));
}
.phone__screen {
  width: 100%; height: 100%; border-radius: 38px; background: var(--bg);
  display: flex; flex-direction: column; padding: 56px 26px 26px;
}
.phone__logo { align-self: center; font-family: var(--font-display); font-size: 11px; letter-spacing: .36em; }
.phone__body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.phone__who { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink2); }
.phone__msg { font-family: var(--font-text); font-style: italic; font-size: 19px; line-height: 1.45; min-height: 140px; }
.caret { display: none; width: 1px; height: 1em; background: var(--ink); vertical-align: -2px; margin-left: 2px; }
.phone__img { height: 120px; border-radius: 6px; background: var(--plate); overflow: hidden; position: relative; }
.phone__img img {
  position: absolute; left: 14%; top: 50%; width: 72%; height: auto; transform: translateY(-50%);
  mix-blend-mode: multiply;
}
.s7__text { max-width: 440px; display: flex; flex-direction: column; gap: 20px; }
.s7__t { font-family: var(--font-display); font-size: clamp(34px, 4.2vw, 58px); line-height: 1.08; }
.s7__sub { font-family: var(--font-text); font-style: italic; font-size: clamp(17px, 1.7vw, 21px); line-height: 1.5; color: var(--ink2); }

/* ---------- 8. Sur invitation ---------- */
.s8 {
  min-height: 90vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
  padding: 16vh 24px; background: var(--bg); text-align: center; border-top: 1px solid var(--line);
}
.s8__t { font-family: var(--font-display); font-size: clamp(44px, 7vw, 104px); line-height: 1; }
.s8__p { font-size: 13px; letter-spacing: .06em; color: var(--ink2); max-width: 420px; line-height: 1.7; }
.s8__btns { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.btn {
  height: var(--size-buttonHeight); padding: 0 32px; border-radius: var(--radius-button);
  display: flex; align-items: center; font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
}
.btn--solid { background: var(--pill); color: var(--pillFg); }
.btn--line { border: 1px solid var(--line2); }

/* ---------- Pied de page ---------- */
.foot {
  background: var(--story); color: color-mix(in srgb, var(--heroFg) 70%, transparent);
  padding: 72px clamp(24px, 5vw, 72px) 40px; display: flex; flex-direction: column; gap: 48px;
}
.foot__top { display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.foot__logo { font-family: var(--font-display); font-size: clamp(40px, 6vw, 84px); letter-spacing: .3em; color: var(--heroFg); flex: 1; line-height: 1.1; }
.foot__cities { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; }
.foot__bar {
  display: flex; gap: 28px; flex-wrap: wrap; font-size: 11.5px; letter-spacing: .06em;
  border-top: 1px solid color-mix(in srgb, var(--heroFg) 14%, transparent); padding-top: 24px;
}
.foot__copy { flex: 1; }

/* ---------- Pages de lecture (confidentialité, mentions, 404) ---------- */
.doc { min-height: 100vh; padding: 168px clamp(24px, 6vw, 96px) 120px; background: var(--bg); }
.doc__in { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 56px; }
.doc__head { display: flex; flex-direction: column; gap: 20px; }
.doc__t { font-family: var(--font-display); font-size: clamp(44px, 6vw, 80px); line-height: 1.04; }
.doc__lead { font-family: var(--font-text); font-style: italic; font-size: clamp(18px, 2vw, 22px); line-height: 1.5; color: var(--ink2); }
.doc__date { font-size: 12px; letter-spacing: .08em; color: var(--ink2); }
.doc__s { display: flex; flex-direction: column; gap: 14px; padding-top: 28px; border-top: 1px solid var(--line); }
.doc__h { font-family: var(--font-display); font-size: 24px; line-height: 1.2; }
.doc__s p, .doc__s li { font-family: var(--font-text); font-size: 17px; line-height: 1.7; color: var(--ink); }
.doc__s ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.doc__s a, .doc__link { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line2); }
.doc__back { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; }
.nf { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 24px; text-align: center; background: var(--bg); }

/* ---------- Mouvement : états initiaux (uniquement si JS actif et mouvement autorisé) ---------- */
.anim .hero__video { opacity: 0; transform: scale(1.12); transition: opacity 2.6s ease, transform 9s var(--ease-reveal); }
.anim.is-loaded .hero__video { opacity: .95; transform: scale(1); }
.anim .hero__l {
  opacity: 0; transform: translateY(.28em); filter: blur(8px); margin-right: .7em;
  transition: opacity 2s var(--ease-reveal) var(--d), transform 2.2s var(--ease-reveal) var(--d), filter 2s ease var(--d), margin 2.6s var(--ease-reveal) var(--d);
}
.anim.is-loaded .hero__l { opacity: 1; transform: none; filter: blur(0); margin-right: .3em; }
.anim .hero__tag { opacity: 0; transform: translateY(14px); transition: opacity 2s ease 1.5s, transform 2.4s var(--ease-reveal) 1.5s; }
.anim.is-loaded .hero__tag { opacity: 1; transform: none; }
.anim .hero__cue { opacity: 0; }
.anim.is-loaded .hero__cue { opacity: 1; transition: opacity 2s ease 2.4s; }
.anim.is-loaded .hero--moved .hero__cue { opacity: 0; transition-delay: 0s; }

.anim .w { opacity: .1; transform: translateY(.32em); transition: opacity 1.6s var(--ease-reveal), transform 1.8s var(--ease-reveal); }
.anim .w.on { opacity: 1; transform: none; }

.anim .s3 { height: 190vh; }
.anim .s3__stage { position: sticky; top: 0; height: 100vh; min-height: 0; padding: 0; }
.anim .s3__cap { opacity: 0; transform: translateY(12px); transition: opacity 1.2s ease, transform 1.4s var(--ease-reveal); }
.anim .s3__cap.on { opacity: 1; transform: none; }

.anim .det { opacity: 0; transform: translateY(40px); transition: opacity 1.6s var(--ease-reveal), transform 2s var(--ease-reveal); }
.anim .det.on { opacity: 1; transform: none; }

.anim .s5__row { flex-wrap: nowrap; justify-content: flex-start; padding: 0; gap: clamp(48px, 7vw, 120px); white-space: nowrap; will-change: transform; transform: translateX(calc((.55 - var(--p5, .55)) * 70vw)); }
.anim .s5__p { opacity: 0; transition: opacity 1.6s ease; }
.anim .s5__p.on { opacity: 1; }

.anim .s6 { height: 220vh; }
.anim .s6__stage { position: sticky; top: 0; height: 100vh; min-height: 0; }
.anim .s6__t { opacity: 0; transform: translateY(18px); transition: opacity 1.4s ease, transform 1.8s var(--ease-reveal); }
.anim .s6__t.on { opacity: 1; transform: none; }

.anim .phone { transition: transform 2s var(--ease-reveal); }
.anim .caret { display: inline-block; }
.anim .phone__img { opacity: 0; transition: opacity 1.6s ease; }
.anim .phone__img.on { opacity: 1; }
.anim .s7__text { opacity: 0; transform: translateY(24px); transition: opacity 1.6s ease, transform 2s var(--ease-reveal); }
.anim .s7__text.on { opacity: 1; transform: none; }

.anim .s8__t { opacity: 0; transform: translateY(30px); transition: opacity 1.8s ease, transform 2.2s var(--ease-reveal); }
.anim .s8__t.on { opacity: 1; transform: none; }
.anim .s8__p { opacity: 0; transition: opacity 1.8s ease .3s; }
.anim .s8__btns { opacity: 0; transition: opacity 1.8s ease .5s; }
.anim .s8__p.on, .anim .s8__btns.on { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-delay: 0s !important; scroll-behavior: auto !important; }
}
