/* ==========================================================================
   WEEKEND 40 ANS — RACHEL & MARC
   Eynesse, 22-25 mai 2026

   Direction : éditoriale, contemplative, intemporelle.
   Références : Cereal Magazine, Openhouse, Aman, Locomotive Studio, Pentagram.

   Architecture CSS :
     01. Reset & base
     02. Tokens (couleurs, typo, espacements)
     03. Typographie
     04. Layout grid & container
     05. Navigation
     06. Hero & landing
     07. Sections éditoriales
     08. Galerie & photos
     09. Timeline & chapitres
     10. Formulaires
     11. Composants (buttons, tags, accordions)
     12. Leaflet custom
     13. Motion & reveal
     14. Footer
     15. Utils
     16. Responsive
     17. Password gate cinématique
   ========================================================================== */


/* ==========================================================================
   01. RESET & BASE
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-feature-settings: "liga", "kern", "calt";
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

ul, ol { list-style: none; }

button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }


/* ==========================================================================
   02. TOKENS
   ========================================================================== */

:root {
  /* Couleurs */
  --cream: #F3EADA;
  --cream-deep: #EEE1CB;
  --sand: #E9DDC6;
  --ink: #1A1410;
  --ink-soft: #3D342A;
  --ink-muted: #6B5D4E;
  --terracotta: #A14B28;
  --terracotta-dark: #7A371D;
  --olive: #4A5232;
  --olive-soft: #6B7349;
  --stone: #9A8B76;
  --line: #D4C7B0;
  --line-soft: #E5D9C1;
  --white: #FFFFFF;

  /* Typographie */
  --font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
  --font-body: 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Espacements (échelle éditoriale) */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 9rem;
  --space-4xl: 14rem;

  /* Layout */
  --max-w: 1440px;
  --content-w: 960px;
  --narrow-w: 680px;
  --edge: clamp(1.5rem, 6vw, 6rem);

  /* Typo fluide */
  --fs-micro: clamp(0.68rem, 0.65rem + 0.2vw, 0.75rem);
  --fs-small: clamp(0.85rem, 0.8rem + 0.25vw, 0.95rem);
  --fs-body: clamp(1rem, 0.95rem + 0.2vw, 1.1rem);
  --fs-lead: clamp(1.15rem, 1rem + 0.7vw, 1.45rem);
  --fs-h4: clamp(1.15rem, 1rem + 0.8vw, 1.5rem);
  --fs-h3: clamp(1.7rem, 1.3rem + 1.8vw, 2.6rem);
  --fs-h2: clamp(2.3rem, 1.6rem + 3.2vw, 4.5rem);
  --fs-h1: clamp(3.5rem, 2rem + 7vw, 8rem);
  --fs-hero: clamp(4rem, 2rem + 12vw, 14rem);

  /* Easing */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.7, 0, 0.3, 1);
  --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);

  /* Durées */
  --dur-fast: 300ms;
  --dur-med: 600ms;
  --dur-slow: 1000ms;
  --dur-xl: 1400ms;
}


/* ==========================================================================
   03. TYPOGRAPHIE
   ========================================================================== */

.display, h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
  font-feature-settings: "ss01", "ss02", "liga", "kern", "calt";
}

h1 { font-size: var(--fs-h1); line-height: 0.95; }
h2 { font-size: var(--fs-h2); line-height: 0.98; letter-spacing: -0.03em; }
h3 { font-size: var(--fs-h3); line-height: 1.08; letter-spacing: -0.02em; }

h4 {
  font-family: var(--font-body);
  font-size: var(--fs-h4);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p { font-size: var(--fs-body); line-height: 1.65; color: var(--ink-soft); }
p + p { margin-top: 1em; }

.lead {
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.015em;
}

em, .italic {
  font-style: italic;
  font-family: var(--font-display);
}

strong { font-weight: 600; color: var(--ink); }

/* Eyebrow / small caps */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: var(--space-md);
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: var(--terracotta);
  vertical-align: middle;
  margin-right: 1rem;
}

/* Chiffres romains / chapters */
.chapter-num {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 300;
  line-height: 1;
  color: var(--terracotta);
  font-style: italic;
  letter-spacing: -0.02em;
  opacity: 0.88;
}

.chapter-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}


/* ==========================================================================
   04. LAYOUT
   ========================================================================== */

.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}

.wrap-narrow {
  max-width: var(--narrow-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}

.wrap-content {
  max-width: var(--content-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}

section { padding: var(--space-3xl) 0; position: relative; }
section.tight { padding: var(--space-2xl) 0; }
section.muted { background: var(--sand); }
section.ink { background: var(--ink); color: var(--cream); }
section.ink h1, section.ink h2, section.ink h3 { color: var(--cream); }
section.ink p { color: var(--cream); opacity: 0.75; }

/* Grille éditoriale 12 cols */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-md);
}

.col-span-4 { grid-column: span 4; }
.col-span-5 { grid-column: span 5; }
.col-span-6 { grid-column: span 6; }
.col-span-7 { grid-column: span 7; }
.col-span-8 { grid-column: span 8; }
.col-span-12 { grid-column: span 12; }
.col-start-2 { grid-column-start: 2; }
.col-start-3 { grid-column-start: 3; }
.col-start-4 { grid-column-start: 4; }
.col-start-6 { grid-column-start: 6; }
.col-start-7 { grid-column-start: 7; }


/* ==========================================================================
   05. NAVIGATION
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 1.5rem var(--edge);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, rgba(243, 234, 218, 0.85), rgba(243, 234, 218, 0.65) 70%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: padding var(--dur-med) var(--ease-out), background var(--dur-med);
}

.site-header.scrolled {
  padding: 1rem var(--edge);
  background: rgba(243, 234, 218, 0.94);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand em { font-style: italic; color: var(--terracotta); }
.brand-sep { color: var(--ink-muted); font-weight: 300; }

.nav-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0.75rem 0;
  position: relative;
  z-index: 101;
}

.nav-toggle-icon {
  width: 28px;
  height: 12px;
  position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transition: transform var(--dur-med) var(--ease-out);
}

.nav-toggle-icon::before { top: 0; }
.nav-toggle-icon::after { bottom: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
  top: 5px;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
  bottom: 6px;
  transform: rotate(-45deg);
}

/* Menu overlay plein écran */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--ink);
  color: var(--cream);
  z-index: 100;
  padding: 6rem var(--edge) var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease-editorial);
  overflow-y: auto;
}

.nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nav-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/01-facade-nord.jpg') center/cover no-repeat;
  opacity: 0.08;
  filter: grayscale(100%);
  pointer-events: none;
}

.nav-menu {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 2vh, 1rem);
  margin-top: auto;
  margin-bottom: auto;
}

.nav-menu li {
  overflow: hidden;
}

.nav-menu a {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: var(--cream);
  padding: 0.3rem 0;
  transition: transform var(--dur-med) var(--ease-out), color var(--dur-fast);
  transform: translateY(100%);
  transition-delay: 0s;
}

.nav-overlay.is-open .nav-menu a {
  transform: translateY(0);
  transition-delay: calc(80ms * var(--i, 0) + 200ms);
}

.nav-menu a:hover { color: var(--terracotta); font-style: italic; }
.nav-menu a.active { color: var(--terracotta); }

.nav-menu-num {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--stone);
  margin-right: 1.5rem;
  vertical-align: middle;
}

.nav-footer {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 2rem;
  border-top: 1px solid rgba(243, 234, 218, 0.15);
  font-size: 0.8rem;
  color: rgba(243, 234, 218, 0.6);
}

.nav-footer a { color: var(--cream); }


/* ==========================================================================
   06. HERO & LANDING
   ========================================================================== */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-3xl) var(--edge) var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-lg);
}

.hero-eyebrow-line {
  flex: 0 0 4rem;
  height: 1px;
  background: var(--ink-muted);
}

.hero-title {
  font-size: var(--fs-hero);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.05em;
  margin-bottom: var(--space-lg);
  font-feature-settings: "ss01";
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line-inner {
  display: block;
}

.hero-title em {
  font-style: italic;
  color: var(--terracotta);
  font-weight: 300;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  max-width: 640px;
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line);
}

.hero-meta-item {
  display: flex;
  flex-direction: column;
}

.hero-meta-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

.hero-meta-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.hero-cta {
  margin-top: var(--space-xl);
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
}

.scroll-hint {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-muted);
  writing-mode: horizontal-tb;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  z-index: 2;
}

.scroll-hint::after {
  content: '';
  width: 1px;
  height: 40px;
  background: var(--ink-muted);
  animation: scrollPulse 2s var(--ease-out) infinite;
  transform-origin: top;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(0.3); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* Countdown éditorial */
.countdown {
  display: flex;
  gap: clamp(1rem, 4vw, 3rem);
  margin: var(--space-xl) 0;
  align-items: baseline;
}

.countdown-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.countdown-num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 300;
  line-height: 0.95;
  color: var(--ink);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum", "ss01";
}

.countdown-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 0.3rem;
}

.countdown-block:first-child .countdown-num {
  font-size: clamp(5rem, 14vw, 12rem);
  color: var(--terracotta);
  font-style: italic;
}


/* ==========================================================================
   07. SECTIONS ÉDITORIALES
   ========================================================================== */

.section-head {
  margin-bottom: var(--space-2xl);
}

.section-head-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: baseline;
}

.section-lead {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.8rem);
  line-height: 1.35;
  color: var(--ink-soft);
  max-width: 48ch;
}

.chapter-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--line);
}

.chapter-head .chapter-num {
  flex-shrink: 0;
}

.chapter-head-text {
  flex: 1;
}

.chapter-head h1, .chapter-head h2 {
  line-height: 0.95;
}

/* Callout / pull quote */
.pull {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
  font-style: italic;
  line-height: 1.3;
  color: var(--ink);
  max-width: 48ch;
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: var(--space-xl) 0;
  letter-spacing: -0.01em;
}

.pull::before {
  content: '«';
  display: block;
  font-size: 3em;
  line-height: 0.2;
  color: var(--terracotta);
  margin-bottom: 0.5rem;
  font-weight: 300;
}

/* Stats éditoriaux */
.stats-editorial {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat-item {
  padding: 0 var(--space-md);
  border-right: 1px solid var(--line);
}
.stat-item:last-child { border-right: none; }

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 0.9;
  color: var(--ink);
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
}

.stat-value em {
  font-style: italic;
  color: var(--terracotta);
  font-weight: 300;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}


/* ==========================================================================
   08. GALERIE & PHOTOS
   ========================================================================== */

.photo-frame {
  position: relative;
  overflow: hidden;
  background: var(--sand);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(1.05) brightness(1.02);
  transition: transform 1.4s var(--ease-editorial);
}

.photo-frame:hover img { transform: scale(1.04); }

.photo-frame.ratio-3-4 { aspect-ratio: 3 / 4; }
.photo-frame.ratio-4-5 { aspect-ratio: 4 / 5; }
.photo-frame.ratio-4-3 { aspect-ratio: 4 / 3; }
.photo-frame.ratio-16-9 { aspect-ratio: 16 / 9; }
.photo-frame.ratio-21-9 { aspect-ratio: 21 / 9; }
.photo-frame.ratio-1-1 { aspect-ratio: 1 / 1; }

.photo-caption {
  margin-top: var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.photo-caption::before {
  content: '';
  display: inline-block;
  width: 1.5rem;
  height: 1px;
  background: var(--ink-muted);
}

/* Hero photo pleine largeur */
.hero-photo-full {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  height: clamp(60vh, 80vh, 800px);
  overflow: hidden;
  position: relative;
}

.hero-photo-full img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.05);
}

/* Masonry-like editorial gallery */
.gallery-editorial {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-md);
}

.ge-1 { grid-column: 1 / span 7; grid-row: 1 / span 2; }
.ge-2 { grid-column: 8 / span 5; grid-row: 1 / span 1; }
.ge-3 { grid-column: 8 / span 5; grid-row: 2 / span 1; }
.ge-4 { grid-column: 1 / span 4; grid-row: 3 / span 1; }
.ge-5 { grid-column: 5 / span 4; grid-row: 3 / span 1; }
.ge-6 { grid-column: 9 / span 4; grid-row: 3 / span 1; }

/* Horizontal scroll gallery (pour la landing) */
.horizontal-gallery {
  overflow: hidden;
  padding: var(--space-xl) 0;
}

.horizontal-track {
  display: flex;
  gap: var(--space-md);
  will-change: transform;
}

.horizontal-track .photo-frame {
  flex: 0 0 clamp(280px, 32vw, 480px);
  aspect-ratio: 4 / 5;
}


/* ==========================================================================
   09. TIMELINE & PROGRAMME
   ========================================================================== */

.timeline-editorial {
  position: relative;
}

.day-block {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-xl);
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--line);
}

.day-block:last-child { border-bottom: 1px solid var(--line); }

.day-number {
  font-family: var(--font-display);
  font-size: clamp(5rem, 14vw, 12rem);
  font-weight: 300;
  line-height: 0.85;
  color: var(--terracotta);
  font-style: italic;
  letter-spacing: -0.05em;
  position: sticky;
  top: 8rem;
  align-self: flex-start;
}

.day-content h2 {
  margin-bottom: var(--space-sm);
}

.day-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-md);
  display: block;
}

.day-lead {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem);
  line-height: 1.4;
  color: var(--ink-soft);
  margin-bottom: var(--space-xl);
  font-style: italic;
  max-width: 54ch;
}

.moments {
  display: flex;
  flex-direction: column;
}

.moment {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--line-soft);
  align-items: baseline;
}

.moment:first-child { border-top: none; padding-top: 0; }

.moment-time {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
}

.moment-content h4 {
  margin-bottom: 0.3rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.moment-content p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.55;
}


/* ==========================================================================
   10. FORMULAIRES (RSVP multi-étapes)
   ========================================================================== */

.rsvp-form {
  max-width: 640px;
  margin: 0 auto;
}

.form-step {
  display: none;
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease-out);
}

.form-step.active {
  display: block;
  opacity: 1;
}

.form-progress {
  display: flex;
  gap: 0.5rem;
  margin-bottom: var(--space-xl);
}

.form-progress-item {
  flex: 1;
  height: 2px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.form-progress-item.done {
  background: var(--terracotta);
}

.form-progress-item.active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--terracotta);
  animation: progressFill 0.6s var(--ease-out) forwards;
}

@keyframes progressFill {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.form-step-num {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-xs);
}

.form-step-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 1.3rem + 1.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: var(--space-lg);
}

.form-field {
  margin-bottom: var(--space-lg);
}

.form-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.6rem;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field textarea {
  width: 100%;
  padding: 0.9rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--ink);
  transition: border-color var(--dur-fast);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-bottom-color: var(--terracotta);
}

.form-field textarea {
  resize: vertical;
  min-height: 100px;
  padding-top: 0.5rem;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--stone);
  font-style: italic;
}

/* Radio & checkbox */
.choices {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  font-size: 0.95rem;
}

.choice:hover {
  border-color: var(--terracotta);
  background: rgba(161, 75, 40, 0.04);
}

.choice input {
  accent-color: var(--terracotta);
  cursor: pointer;
}

.choice:has(input:checked) {
  border-color: var(--terracotta);
  background: rgba(161, 75, 40, 0.06);
}

.choices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem;
  margin-top: 0.6rem;
}

/* Nav boutons formulaire */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line);
}

.form-nav .spacer { flex: 1; }


/* ==========================================================================
   11. COMPOSANTS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 2rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--ink);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: all var(--dur-med) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--terracotta);
  transform: translateY(101%);
  transition: transform var(--dur-med) var(--ease-editorial);
  z-index: 0;
}

.btn span { position: relative; z-index: 1; }

.btn:hover {
  border-color: var(--terracotta);
  color: var(--cream);
}

.btn:hover::before { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-outline::before { background: var(--ink); }
.btn-outline:hover { color: var(--cream); border-color: var(--ink); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: none;
  padding: 0.75rem 0;
  text-transform: uppercase;
}

.btn-ghost::before { display: none; }

.btn-ghost .arrow {
  display: inline-block;
  transition: transform var(--dur-med) var(--ease-out);
}

.btn-ghost:hover { color: var(--terracotta); }
.btn-ghost:hover .arrow { transform: translateX(6px); }

/* Tag / pill */
.tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--cream-deep);
  border: 1px solid var(--line);
}

.tag-accent { color: var(--terracotta); border-color: var(--terracotta); }

/* Link underline éditorial */
.ulink {
  position: relative;
  display: inline-block;
  color: var(--ink);
}

.ulink::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transform: scaleX(1);
  transition: transform 0.6s var(--ease-editorial);
}

.ulink:hover::after {
  transform-origin: left;
  transform: scaleX(0);
  animation: ulinkRedraw 0.6s var(--ease-editorial) 0.3s forwards;
}

@keyframes ulinkRedraw {
  from { transform: scaleX(0); transform-origin: left; }
  to { transform: scaleX(1); transform-origin: left; }
}

/* Accordion FAQ */
.accordion {
  border-top: 1px solid var(--line);
}

.accordion-item {
  border-bottom: 1px solid var(--line);
}

.accordion-trigger {
  width: 100%;
  text-align: left;
  padding: var(--space-md) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.5rem);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  transition: color var(--dur-fast);
}

.accordion-trigger:hover { color: var(--terracotta); }

.accordion-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 50%;
  position: relative;
  transition: transform var(--dur-med) var(--ease-out);
}

.accordion-icon::before,
.accordion-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1px;
  background: currentColor;
  transform-origin: center;
  transition: transform var(--dur-med) var(--ease-out);
}

.accordion-icon::before { transform: translate(-50%, -50%) rotate(0deg); }
.accordion-icon::after { transform: translate(-50%, -50%) rotate(90deg); }

.accordion-item.open .accordion-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-slow) var(--ease-editorial);
}

.accordion-panel-inner {
  padding-bottom: var(--space-md);
  max-width: 60ch;
  color: var(--ink-soft);
}

.accordion-item.open .accordion-panel {
  max-height: 500px;
}


/* ==========================================================================
   12. CARTE LEAFLET (teinte custom)
   ========================================================================== */

.map-wrap {
  width: 100%;
  height: clamp(400px, 55vh, 620px);
  position: relative;
  overflow: hidden;
  background: var(--sand);
  border: 1px solid var(--line);
}

#map, #activity-map { width: 100%; height: 100%; }

/* Tint sepia/cream sur les tiles OSM */
.leaflet-tile {
  filter: sepia(20%) saturate(85%) hue-rotate(-10deg) brightness(1.02) contrast(0.95);
}

.leaflet-container { background: var(--cream-deep); }

.leaflet-popup-content-wrapper {
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(26, 20, 16, 0.1);
  border-radius: 2px;
}

.leaflet-popup-content {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink);
}

.leaflet-popup-tip { background: var(--cream); }


/* ==========================================================================
   13. MOTION & REVEAL
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-editorial), transform 1s var(--ease-editorial);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

.line-mask {
  overflow: hidden;
  display: block;
}

.line-mask > * {
  display: block;
  transform: translateY(110%);
  transition: transform 1.2s var(--ease-editorial);
}

.line-mask.visible > * {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .line-mask > * { transform: none; }
}


/* ==========================================================================
   14. FOOTER
   ========================================================================== */

.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: var(--space-2xl) var(--edge) var(--space-lg);
  margin-top: var(--space-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
  max-width: var(--max-w);
  margin: 0 auto;
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(243, 234, 218, 0.15);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1;
  color: var(--cream);
  letter-spacing: -0.03em;
}

.footer-brand em { color: var(--terracotta); font-style: italic; }

.footer-tag {
  font-size: 0.82rem;
  color: rgba(243, 234, 218, 0.6);
  margin-top: 0.8rem;
  letter-spacing: 0.02em;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(243, 234, 218, 0.45);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  color: var(--cream);
  font-size: 0.92rem;
  padding: 0.3rem 0;
  transition: color var(--dur-fast);
}

.footer-col a:hover { color: var(--terracotta); }

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: var(--space-lg);
  font-size: 0.75rem;
  color: rgba(243, 234, 218, 0.45);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}


/* ==========================================================================
   15. UTILS
   ========================================================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: var(--space-xl) 0;
}

.hide-mobile { }
.show-mobile { display: none; }


/* ==========================================================================
   16. RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .grid-12 { gap: var(--space-sm); }
  .col-span-4, .col-span-5, .col-span-6, .col-span-7, .col-span-8 { grid-column: span 12; }
  .col-start-2, .col-start-3, .col-start-4, .col-start-6, .col-start-7 { grid-column-start: 1; }

  .section-head-row { grid-template-columns: 1fr; gap: var(--space-md); }

  .day-block { grid-template-columns: 1fr; gap: var(--space-md); }
  .day-number { position: static; font-size: clamp(4rem, 18vw, 8rem); }

  .gallery-editorial { display: flex; flex-direction: column; }
  .ge-1, .ge-2, .ge-3, .ge-4, .ge-5, .ge-6 { grid-column: auto; grid-row: auto; }

  .footer-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
}

@media (max-width: 768px) {
  section { padding: var(--space-2xl) 0; }
  .hero { padding: calc(var(--space-3xl) + 2rem) var(--edge) var(--space-xl); }
  .hero-meta { grid-template-columns: 1fr; gap: var(--space-md); }
  .countdown { flex-wrap: wrap; gap: var(--space-md); }
  .stat-item { border-right: none; border-bottom: 1px solid var(--line); padding: var(--space-md); }
  .stat-item:last-child { border-bottom: none; }
  .moment { grid-template-columns: 1fr; gap: 0.25rem; }

  .hide-mobile { display: none; }
  .show-mobile { display: block; }

  .nav-menu a { font-size: clamp(2rem, 11vw, 4rem); }
}


/* ==========================================================================
   17. PASSWORD GATE CINÉMATIQUE
   ========================================================================== */

.gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--ink);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--edge);
  transition: clip-path 1.2s var(--ease-editorial);
}

.gate::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/01-facade-nord.jpg') center/cover no-repeat;
  opacity: 0.25;
  filter: grayscale(100%) brightness(0.7);
  z-index: 0;
}

.gate::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 20, 16, 0.3), rgba(26, 20, 16, 0.8));
  z-index: 1;
}

.gate-inner {
  position: relative;
  z-index: 2;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.gate-eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: var(--space-md);
}

.gate-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 300;
  font-style: italic;
  line-height: 0.95;
  color: var(--cream);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

.gate-sub {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(243, 234, 218, 0.7);
  margin-bottom: var(--space-xl);
  line-height: 1.5;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

.gate input {
  width: 100%;
  padding: 1.1rem 1.5rem;
  background: transparent;
  border: 1px solid rgba(243, 234, 218, 0.25);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
  transition: border-color var(--dur-fast);
}

.gate input:focus {
  outline: none;
  border-color: var(--terracotta);
}

.gate input::placeholder {
  color: rgba(243, 234, 218, 0.3);
  letter-spacing: 0.2em;
}

.gate-btn {
  padding: 1rem 2.5rem;
  background: var(--terracotta);
  color: var(--cream);
  border: none;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--dur-fast);
}

.gate-btn:hover { background: var(--terracotta-dark); }

.gate-error {
  font-size: 0.85rem;
  color: var(--terracotta);
  min-height: 1.2em;
  margin-top: 0.5rem;
  opacity: 0;
  transition: opacity var(--dur-fast);
}

.gate-error.show { opacity: 1; }

.gate.is-opening {
  clip-path: inset(0 0 100% 0);
}

/* Lock scroll while gate is visible */
body.gate-active { overflow: hidden; }


/* ==========================================================================
   SCROLL PROGRESS
   ========================================================================== */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: transparent;
  z-index: 60;
  pointer-events: none;
}

.scroll-progress-bar {
  height: 100%;
  background: var(--terracotta);
  transform-origin: left;
  transform: scaleX(0);
}


/* ==========================================================================
   PAGE NUMBER INDICATOR
   ========================================================================== */

.page-indicator {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--edge);
  z-index: 40;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  pointer-events: none;
  mix-blend-mode: difference;
  color: var(--cream);
}
