/* Brizeux : direction éthérée. Fond blanc, typo lapis-lazuli,
   interludes d'archives en duotone entre les chapitres. */

@font-face {
  font-family: "PP Neue Montreal";
  src: url("../fonts/PPNeueMontreal-Book.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "PP Neue Montreal";
  src: url("../fonts/PPNeueMontreal-Italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "PP Neue Montreal";
  src: url("../fonts/PPNeueMontreal-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "PP Neue Montreal";
  src: url("../fonts/PPNeueMontreal-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "PP Eiko";
  src: url("../fonts/PPEiko-Black.woff2") format("woff2");
  font-weight: 900; font-style: normal; font-display: swap;
}

:root {
  --blanc: #ffffff;
  --bleu: #1e4da6;            /* lapis lazuli */
  --bleu-nuit: #102c6e;       /* base du duotone des archives */
  --bleu-65: rgba(30, 77, 166, .68);
  --bleu-40: rgba(30, 77, 166, .42);
  --bleu-15: rgba(30, 77, 166, .16);
}

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

html { scroll-behavior: smooth; }
html.js { scroll-behavior: auto; }

body {
  background: var(--blanc);
  color: var(--bleu);
  font: 400 17px/1.6 "PP Neue Montreal", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--bleu); color: var(--blanc); }

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--bleu); outline-offset: 3px;
}

.nb { white-space: nowrap; }

.wrap { width: min(1120px, 100% - 48px); margin: 0 auto; }
.narrow { width: min(760px, 100% - 48px); }

/* ---------- révélations ---------- */

.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.js .rv.in { opacity: 1; transform: none; }

.js .hero-fx { opacity: 0; }
.js .hero-fx.in { opacity: 1; transition: opacity 1.2s ease; }

/* ---------- interludes d'archives ---------- */

.interlude {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--bleu-nuit);
  padding: 0 24px;
}

.interlude-media { position: absolute; inset: -12% 0; z-index: 0; background: var(--bleu-nuit); }
.interlude-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04) brightness(1.03);
  mix-blend-mode: lighten;             /* duotone : ombres lapis, hautes lumières papier */
}

/* grain de pellicule, uniquement sur les images */
.interlude::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/></svg>");
  opacity: .13;
  mix-blend-mode: overlay;
}

/* voile derrière le titre et assise sombre en bas, pour la lisibilité */
.interlude::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 78% 58% at 50% 50%, rgba(16, 44, 110, .55), rgba(16, 44, 110, 0) 74%),
    linear-gradient(to top, rgba(16, 44, 110, .42), rgba(16, 44, 110, 0) 24%);
}

.interlude-text, .interlude-title { position: relative; z-index: 2; }

.interlude-title {
  color: var(--blanc);
  font-family: "PP Eiko", Georgia, serif;
  font-weight: 900;
  font-size: clamp(27px, 4vw, 60px);
  line-height: 1.14;
  letter-spacing: 0;
  text-align: center;
  text-wrap: pretty;
  max-width: 24ch;
}

.archive-note {
  position: absolute; left: 24px; bottom: 20px; z-index: 2;
  color: rgba(255, 255, 255, .62);
  font-size: 11px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
}

/* ---------- ouverture ---------- */

.hero .interlude-text { text-align: center; }

.hero-title {
  color: var(--blanc);
  font-family: "PP Eiko", Georgia, serif;
  font-weight: 900;
  font-size: clamp(70px, 15vw, 215px);
  line-height: 1;
  letter-spacing: 0;
}
.hero-title span { display: inline-block; }

.hero-sub {
  margin-top: clamp(14px, 2vw, 26px);
  color: var(--blanc);
  font-size: clamp(13px, 1.15vw, 16.5px); font-weight: 500;
  letter-spacing: .24em; text-transform: uppercase;
}

.scrolldown {
  position: absolute; left: 50%; bottom: 0; z-index: 2;
  width: 1px; height: 58px;
  background: rgba(255, 255, 255, .75);
  transform-origin: top;
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scaleY(.35); }
  50% { transform: scaleY(1); }
}

/* ---------- chapitres sur blanc ---------- */

.chap { background: var(--blanc); padding: clamp(88px, 11vw, 170px) 0; }

.tag {
  font-size: 12px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--bleu-65);
}

.chap-title {
  margin-top: 20px;
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 72px);
  line-height: 1.08;
  letter-spacing: -.015em;
  text-wrap: pretty;
  max-width: 24ch;
}

.lead-xl {
  font-size: clamp(23px, 2.6vw, 34px);
  line-height: 1.42;
  text-wrap: pretty;
}

.lead {
  margin-top: 22px;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.5;
  text-wrap: pretty;
  max-width: 46ch;
}

.small { font-size: 14.5px; color: var(--bleu-65); }

.meta {
  display: flex; flex-wrap: wrap; gap: 12px 34px;
  margin-top: 38px;
  font-size: 12.5px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--bleu-65);
}

/* ---------- 01 l'intention ---------- */

.prose {
  margin-top: 20px;
  font-size: 16px; line-height: 1.65;
  max-width: 54ch;
  text-wrap: pretty;
}

.points { margin-top: 48px; }
.points ul { list-style: none; }
.points li {
  padding: 15px 0;
  border-top: 1px solid var(--bleu-15);
  font-size: 15.5px; line-height: 1.55;
  max-width: 52ch;
}

/* ---------- 02 le lieu ---------- */

.plan {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px 72px;
  margin-top: 58px;
}
.bat h3 {
  font-size: 16.5px; font-weight: 500;
  padding-bottom: 14px;
}
.bat h3 span { font-weight: 400; font-size: 13px; color: var(--bleu-65); margin-left: 8px; }
.lvl { border-top: 1px solid var(--bleu-15); padding: 14px 0; }
.lvl b {
  display: block;
  font-size: 11.5px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--bleu-65);
  margin-bottom: 6px;
}
.lvl p { font-size: 15px; line-height: 1.5; max-width: 36ch; }
.plan + .small { margin-top: 34px; }

/* ---------- la maison en fil : le scan qui tourne ---------- */

.scan-maison { display: none; height: 280svh; background: var(--blanc); }
.scan-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.scan-stage canvas { display: block; }
.scan-note, .scan-aide {
  position: absolute; bottom: 20px; z-index: 2;
  font-size: 11.5px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
}
.scan-note { left: 24px; color: var(--bleu-65); }
.scan-aide { top: 22px; right: 24px; bottom: auto; color: var(--bleu-40); }

/* ---------- la maison en images : grille 2 × 3 ---------- */

.photos { padding-top: 0; }
.photo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 34px 24px;
}
.cell { margin: 0; }
.cell .frame { background: var(--bleu-nuit); aspect-ratio: 4 / 3; overflow: hidden; }
.cell img {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04) brightness(1.18);
  mix-blend-mode: lighten;
}
.cell.sombre img { filter: grayscale(1) contrast(1.02) brightness(1.6); }
.cell figcaption {
  margin-top: 10px;
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 11.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--bleu-65);
}

/* ---------- galerie circulaire des résidents ---------- */

.ring { position: relative; margin-top: 40px; }
.ring-stage {
  position: relative;
  height: 100svh; min-height: 540px;
  display: grid; place-items: center;
  perspective: 1500px;
  overflow: hidden;
  --r: 460px;
}
.ring-track { position: relative; transform-style: preserve-3d; }
.card {
  position: absolute; left: 50%; top: 50%;
  width: min(300px, 62vw); aspect-ratio: 3 / 4;
  transform: translate(-50%, -50%) rotateY(calc(var(--i) * 45deg)) translateZ(var(--r));
  backface-visibility: hidden;
  background: var(--blanc);
  border: 1px solid var(--bleu-40);
  display: flex; flex-direction: column;
  padding: 16px 18px 14px;
}
.card span {
  font-size: 11px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--bleu-65);
}
.card b {
  margin: auto;
  font-size: clamp(56px, 7vw, 96px); font-weight: 400;
  line-height: 1;
  color: var(--bleu-15);
}
.card i { font-style: normal; font-size: 13px; color: var(--bleu-65); align-self: flex-end; }
.ring-note { position: absolute; left: 0; right: 0; bottom: 26px; text-align: center; }

html:not(.gsap-on) .ring-stage { height: auto; perspective: none; padding: 40px 0 70px; }
html:not(.gsap-on) .ring-track {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px;
  width: min(1120px, 100% - 48px);
}
html:not(.gsap-on) .card { position: static; transform: none; width: 100%; }

/* ---------- 03 une journée ---------- */

.day {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 30px 18px;
  border-top: 1px solid var(--bleu-15);
  margin-top: 44px; padding-top: 26px;
}
.seg b {
  display: block;
  font-size: clamp(26px, 2.6vw, 40px);
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.1;
}
.seg span { display: block; margin-top: 6px; font-size: 14px; color: var(--bleu-65); }
.note { margin-top: 40px; max-width: 62ch; line-height: 1.65; }

/* ---------- 04 dates et prix ---------- */

.dates-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); gap: 24px 48px;
  margin-top: 54px;
}
.date-card { border-top: 1px solid var(--bleu-15); padding-top: 16px; }
.date-card .n { font-size: 12px; font-weight: 500; letter-spacing: .14em; color: var(--bleu-40); }
.date-card strong { display: block; margin-top: 8px; font-size: 18px; font-weight: 500; }
.dates-grid + .small { margin-top: 18px; }

.price-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 48px;
  margin-top: 64px;
}
.price { border-top: 1px solid var(--bleu-15); padding-top: 18px; }
.price b {
  display: block;
  font-size: 12px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--bleu-65);
}
.price strong { display: block; margin-top: 14px; font-size: clamp(28px, 2.6vw, 38px); font-weight: 400; }
.price p { margin-top: 12px; font-size: 14.5px; line-height: 1.55; color: var(--bleu-65); max-width: 34ch; }
.price-grid + .small { margin-top: 30px; }

/* ---------- 05 les règles ---------- */

.rules { list-style: none; margin-top: 46px; }
.rules li {
  display: grid; grid-template-columns: 64px 1fr; gap: 0 12px;
  border-top: 1px solid var(--bleu-15);
  padding: 24px 0;
}
.rules .n { font-size: 12.5px; font-weight: 500; letter-spacing: .14em; color: var(--bleu-40); padding-top: 4px; }
.rules h3 { font-size: 19px; font-weight: 500; line-height: 1.35; text-wrap: pretty; max-width: 34ch; }
.rules li p { margin-top: 6px; font-size: 15px; color: var(--bleu-65); max-width: 52ch; }

/* ---------- 06 les résidents ---------- */

#residents .small { margin-top: 26px; }

/* ---------- 07 candidater ---------- */

.apply-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px 96px;
  margin-top: 54px;
}

.faq dt { font-size: 16.5px; font-weight: 500; margin-top: 26px; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin-top: 6px; font-size: 15px; line-height: 1.55; color: var(--bleu-65); max-width: 48ch; }

.form-box label {
  display: block;
  margin-top: 24px;
  font-size: 11.5px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--bleu-65);
}
.form-box label:first-child { margin-top: 0; }
.form-box input, .form-box textarea {
  width: 100%;
  margin-top: 8px;
  border: 0; border-bottom: 1px solid var(--bleu-40); border-radius: 0;
  background: transparent;
  padding: 8px 0 10px;
  font: 400 16px/1.5 "PP Neue Montreal", "Helvetica Neue", Arial, sans-serif;
  color: var(--bleu);
}
.form-box input:focus, .form-box textarea:focus { outline: none; border-bottom-color: var(--bleu); }
.form-box ::placeholder { color: var(--bleu-40); }
.form-box textarea { resize: vertical; }

.btn {
  display: inline-block;
  margin-top: 36px;
  border: 1px solid var(--bleu); border-radius: 999px;
  background: transparent;
  color: var(--bleu);
  font: 500 14px/1 "PP Neue Montreal", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .05em;
  padding: 15px 28px;
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
.btn:hover { background: var(--bleu); color: var(--blanc); }
.btn:disabled { opacity: .55; cursor: default; }

.form-note { margin-top: 14px; font-size: 13px; color: var(--bleu-65); }

/* ---------- le voyage : la planète ---------- */

.voyage {
  position: relative;
  height: 100svh; min-height: 560px;
  background: var(--blanc);
  overflow: hidden;
}
.voyage canvas { position: absolute; inset: 0; display: block; }
html:not(.gsap-on) .voyage { display: none; }

/* ---------- bouton flottant ---------- */

.cta-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 10;
  background: var(--bleu); color: var(--blanc);
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 13.5px; font-weight: 500; letter-spacing: .05em;
  text-decoration: none;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
.cta-float.show { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- pied de page ---------- */

footer.site { border-top: 1px solid var(--bleu-15); padding: 34px 0 40px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 10px 40px; justify-content: space-between; }
footer.site span { font-size: 13px; color: var(--bleu-65); }
footer.site a { text-decoration-color: var(--bleu-40); text-underline-offset: 3px; }

/* ---------- largeurs intermédiaires et mobile ---------- */

@media (max-width: 1000px) {
  .plan { grid-template-columns: 1fr; gap: 40px; }
  .lvl p, .rules h3, .rules li p { max-width: none; }
  .apply-grid { grid-template-columns: 1fr; gap: 72px; }
}

@media (max-width: 880px) {
  .points li { max-width: none; }
  .ring-stage { --r: 310px; perspective: 1100px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 26px 18px; }
  .dates-grid { grid-template-columns: repeat(2, 1fr); }
  .price-grid { grid-template-columns: 1fr; gap: 36px; }
  .day { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
  .wrap, .narrow { width: calc(100% - 40px); }
  .rules li { grid-template-columns: 44px 1fr; }
  .archive-note { left: 20px; bottom: 16px; }
  .interlude { padding: 0 20px; }
}

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

@media (prefers-reduced-motion: reduce) {
  .scrolldown { animation: none; }
  .js .rv, .js .hero-fx { opacity: 1; transform: none; transition: none; }
  .voyage { display: none; }
  .scan-maison { display: none !important; }
}
