/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: oklch(97% 0.018 62);
}

html, body {
  height: 100%;
}
body {
  font-family: 'Space Mono', monospace;
  background: oklch(97% 0.018 62);
  color: #1a1410;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

::selection { background: oklch(88% 0.07 62); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(9px); }
}

/* ============================================
   FIXED BACKGROUND
   ============================================ */
.fixed-bg {
  position: fixed;
  /* Étend le fond au-delà du viewport visible pour peindre aussi sous la
     barre de statut / la barre d'URL de Safari (zone "safe-area"), tout
     en laissant le CONTENU (texte, boutons) libre de s'afficher partout
     sans padding de protection — comme demandé. */
  top: calc(-1 * env(safe-area-inset-top, 0px));
  left: calc(-1 * env(safe-area-inset-left, 0px));
  right: calc(-1 * env(safe-area-inset-right, 0px));
  bottom: calc(-1 * env(safe-area-inset-bottom, 0px));
  width: calc(100vw + env(safe-area-inset-left, 0px) + env(safe-area-inset-right, 0px));
  height: calc(100dvh + env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px));
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  /* Force la composition GPU — corrige le bug Safari iOS où les éléments
     position:fixed "sautent" ou semblent bouger pendant le scroll. */
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.bg-parallax {
  position: absolute;
  inset: -40px;
  background-image: url('../images/Paris2sur4.svg');
  background-size: cover;
  background-position: center;
  opacity: 0.17;
  /* Image totalement statique — aucun mouvement, ni au scroll ni au clic */
}
.bg-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.44;
  transition: background-color 1.8s ease, opacity 1.8s ease;
  background-color: oklch(93% 0.052 62);
}

/* ============================================
   LOGO FIXE
   ============================================ */
.site-logo {
  position: fixed;
  top: 20px;
  left: 28px;
  z-index: 100;
}
.site-logo img {
  height: 38px;
  width: auto;
  display: block;
}

/* ============================================
   NAV DOTS
   ============================================ */
.metro-nav {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
}
.nav-dot {
  display: block;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.45s ease;
  background: rgba(26,20,16,0.2);
  width: 5px;
  height: 5px;
  flex-shrink: 0;
}
.nav-dot.active {
  background: #1a1410;
  width: 9px;
  height: 9px;
}
.nav-line {
  width: 1.5px;
  height: 8px;
  background: rgba(26,20,16,0.2);
  margin: 2px auto;
  flex-shrink: 0;
}

/* ============================================
   MAIN
   ============================================ */
main { position: relative; z-index: 2; }

/* ============================================
   PAPER SECTIONS
   ============================================ */
.paper-section {
  overflow: visible;
  position: relative;
  background: #F9F6F1;
  margin: 0 clamp(24px, 8vw, 140px);
  padding: 56px 8% 52px;
  box-shadow: 0 2px 60px rgba(26,20,16,0.08);
}
.paper-section::before,
.paper-section::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  pointer-events: none;
  z-index: 5;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.paper-section::before { bottom: calc(100% - 2px); }
.paper-section::after  { top: calc(100% - 2px); }

/* Top graphs */
.gt-1::before { aspect-ratio: 3449/406; background-image: url('../images/graph-1.svg'); }
.gt-3::before { aspect-ratio: 3447/492; background-image: url('../images/graph-3.svg'); }
.gt-5::before { aspect-ratio: 3448/444; background-image: url('../images/graph-5.svg'); }
/* Bottom graphs */
.gb-2::after  { aspect-ratio: 992/117;  background-image: url('../images/graph-2.svg'); }
.gb-4::after  { aspect-ratio: 1280/183; background-image: url('../images/graph-4.svg'); }
.gb-6::after  { aspect-ratio: 1280/164; background-image: url('../images/graph-6.svg'); }

#contact::after { display: none; }
.footer-section::after { display: none; }
.footer-section::before { display: none; }

/* ============================================
   SECTION SPACERS
   ============================================ */
.section-gap { height: 320px; }

/* Sur ordinateur, l'espace entre les blocs doit grandir avec la largeur
   réelle de la page (donc avec un dézoom navigateur, qui augmente la
   largeur en pixels CSS) — sinon les graphiques décoratifs (dont la
   hauteur suit la largeur du bloc via aspect-ratio) finissent par se
   chevaucher à fort dézoom. Le mobile n'est pas concerné : son espace
   est déjà suffisant et ne doit pas grandir davantage.
   21vw ≈ 320px sur une largeur desktop courante (~1512px) — donc un
   comportement quasi identique à 100% de zoom, et un espace qui suit
   naturellement la croissance des graphiques au-delà. */
@media (min-width: 769px) {
  .section-gap { height: max(320px, 21vw); }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 9% 140px;
  position: relative;
}
.hero h1 {
  font-size: clamp(54px, 9.5vw, 128px);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.035em;
  margin-bottom: 30px;
  animation: fadeUp 1s 0.18s both;
  text-wrap: balance;
}
.hero-subtitle {
  font-size: 12px;
  letter-spacing: 0.13em;
  color: rgba(26,20,16,0.5);
  margin-bottom: 68px;
  animation: fadeUp 1s 0.35s both;
  line-height: 1.7;
  max-width: 520px;
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  animation: fadeUp 1s 0.52s both;
}
.scroll-hint {
  position: absolute;
  bottom: 44px;
  left: 50%;
  animation: pulse 2.8s ease-in-out infinite;
  color: rgba(26,20,16,0.32);
  text-align: center;
}
.scroll-hint-label {
  font-size: 8px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.scroll-hint-arrow { font-size: 18px; }

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10,8,6,0.93);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  cursor: pointer;
}
.lightbox.open { display: flex; }
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}
.lightbox-img {
  max-width: min(90vw, 1000px);
  max-height: 74vh;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}
.lightbox-controls {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 24px;
  cursor: default;
}
.lb-btn {
  background: rgba(252,249,244,0.1);
  border: 1px solid rgba(252,249,244,0.25);
  color: rgba(252,249,244,0.85);
  font-size: 20px;
  width: 48px;
  height: 48px;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  transition: background 0.2s;
}
.lb-btn:hover { background: rgba(252,249,244,0.22); }
.lightbox-counter {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(252,249,244,0.4);
  font-family: 'Space Mono', monospace;
  min-width: 52px;
  text-align: center;
}
.lightbox-caption {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(252,249,244,0.45);
  font-family: 'Space Mono', monospace;
  text-align: center;
  margin-top: 10px;
  max-width: 80vw;
  min-height: 16px;
}
.lb-close {
  position: fixed;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(252,249,244,0.6);
  font-size: 24px;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
}

/* ============================================
   GALLERIES & ACCORDIONS
   ============================================ */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.gallery-thumb {
  aspect-ratio: 1;
  cursor: zoom-in;
  background-size: cover;
  background-position: center;
  transition: opacity 0.18s;
}
.gallery-thumb:hover { opacity: 0.85; }

.acc-list { border-top: 1px solid rgba(26,20,16,0.12); }
.acc-item { border-bottom: 1px solid rgba(26,20,16,0.1); }
.acc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s;
}
.acc-header:hover { opacity: 0.75; }
.acc-title { display: flex; gap: 12px 20px; align-items: flex-start; flex-wrap: nowrap; }
.acc-num {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(26,20,16,0.35);
  min-width: 28px;
  padding-top: 3px;
  flex-shrink: 0;
}
.acc-name { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; }
.acc-sub { font-size: 11px; color: rgba(26,20,16,0.45); }
.acc-dates-head {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(26,20,16,0.38);
  margin-top: 2px;
}
.acc-icon {
  font-size: 20px;
  color: rgba(26,20,16,0.4);
  transition: transform 0.3s;
  display: inline-block;
  flex-shrink: 0;
}
.acc-body { padding-bottom: 40px; }
.acc-dates {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(26,20,16,0.38);
  margin-bottom: 14px;
}
.acc-desc {
  font-size: 13px;
  line-height: 1.92;
  color: rgba(26,20,16,0.65);
  margin-bottom: 20px;
  white-space: pre-line;
}
.acc-lieu { font-size: 11px; color: rgba(26,20,16,0.45); margin-top: 3px; }

/* ============================================
   PROJET MEDIA ROW
   ============================================ */
.projet-media { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; justify-content: center; }
.projet-img-single {
  max-width: 520px;
}
.projet-img-single img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

/* ============================================
   INSTAGRAM EMBED
   ============================================ */
.insta-wrap {
  flex: 0 0 320px;
  min-width: 240px;
  max-width: 320px;
  overflow: hidden;
}
.insta-wrap iframe,
.insta-wrap blockquote {
  max-width: 320px !important;
  min-width: 0 !important;
  width: 100% !important;
  margin: 0 !important;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.two-col   { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 80px; }
.three-col { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }

/* ============================================
   BUTTONS & LINKS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1.5px solid rgba(26,20,16,0.5);
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: #1a1410;
  transition: all 0.22s ease;
  background: none;
  cursor: pointer;
}
.btn:hover { background: #1a1410; color: oklch(97% 0.018 62); }
.btn-ghost { border-color: rgba(26,20,16,0.3); color: rgba(26,20,16,0.6); }
.btn-ghost:hover { border-color: rgba(26,20,16,0.7); color: #1a1410; background: none; }
.btn-sm { padding: 9px 18px; font-size: 9px; }

/* ============================================
   FORMS
   ============================================ */
.form-stack { display: flex; flex-direction: column; gap: 0; max-width: 440px; }
.form-stack-wide { max-width: 520px; }
.field {
  padding: 13px 18px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  border: 1.5px solid rgba(26,20,16,0.35);
  border-bottom: none;
  background: rgba(252,249,244,0.8);
  color: #1a1410;
  outline: none;
  width: 100%;
  display: block;
}
.field:last-of-type, textarea.field { border-bottom: 1.5px solid rgba(26,20,16,0.35); }
textarea.field { resize: vertical; }
select.field { appearance: none; cursor: pointer; }
.rgpd-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border: 1.5px solid rgba(26,20,16,0.35);
  border-top: none;
}
.rgpd-row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  accent-color: #1a1410;
  cursor: pointer;
}
.rgpd-label { font-size: 10px; color: rgba(26,20,16,0.5); line-height: 1.65; cursor: pointer; }
.newsletter-success {
  display: none;
  font-size: 13px;
  color: rgba(26,20,16,0.7);
  padding: 20px 24px;
  border: 1px solid rgba(26,20,16,0.12);
  display: none;
}

/* ============================================
   EXPO LIST
   ============================================ */
.expo-year {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(26,20,16,0.38);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(26,20,16,0.1);
}
.expo-year.permanent { color: rgba(26,20,16,0.5); border-bottom-width: 2px; border-color: rgba(26,20,16,0.15); }
.expo-row {
  padding: 10px 0;
  border-bottom: 1px solid rgba(26,20,16,0.06);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: baseline;
}
.expo-name { font-size: 13px; line-height: 1.5; }
.expo-date { font-size: 11px; color: rgba(26,20,16,0.42); display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.expo-link { color: rgba(26,20,16,0.45); text-decoration: none; font-size: 10px; letter-spacing: 0.08em; border-bottom: 1px solid rgba(26,20,16,0.18); }
.expo-link:hover { color: #1a1410; }

/* ============================================
   PARTNERS LOGOS
   ============================================ */
.logos-row { display: flex; flex-wrap: wrap; gap: 28px 36px; align-items: center; justify-content: center; }
.logos-row img { height: 44px; width: auto; display: block; mix-blend-mode: multiply; }
.logos-row img.tall { height: 68px; }

/* ============================================
   CONTACT COORDS
   ============================================ */
.coords { display: flex; flex-direction: column; gap: 20px; padding-top: 4px; }
.coords-label { font-size: 8px; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(26,20,16,0.35); margin-bottom: 6px; }
.coords-val { font-size: 14px; font-weight: 700; color: #1a1410; text-decoration: none; }
.coords-val-sm { font-size: 13px; color: #1a1410; text-decoration: none; }

/* ============================================
   SECTION HEADINGS
   ============================================ */
.section-label {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(26,20,16,0.35);
  margin-bottom: 20px;
}
.section-meta { font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(26,20,16,0.35); margin-bottom: 28px; }
h2.section-h2 {
  font-size: clamp(28px, 4.5vw, 58px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.03em;
  margin-bottom: 48px;
}
.footer-legal {
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(26,20,16,0.28);
  text-decoration: none;
  border-bottom: 1px solid rgba(26,20,16,0.15);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.footer-legal:hover { color: rgba(26,20,16,0.6); }

/* ============================================
   HERO BUTTONS
   ============================================ */
.hero-btn {
  padding: 12px 26px;
  border: 1.5px solid rgba(26,20,16,0.65);
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: #1a1410;
  transition: all 0.22s ease;
  background: rgba(252,249,244,0.68);
}
.hero-btn:hover { background: #1a1410; color: oklch(97% 0.018 62); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .two-col   { grid-template-columns: 1fr; gap: 36px 0; }
  .three-col { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .gallery-4    { grid-template-columns: repeat(2, 1fr); }

  /* Instagram centré sur mobile */
  .insta-wrap {
    flex: 1 1 100%;
    max-width: 100%;
    overflow: visible;
    display: flex;
    justify-content: center;
  }
  .insta-wrap blockquote { max-width: 100% !important; }

  .metro-nav { right: 10px; }
  .site-logo { left: 16px; }
  .site-logo img { height: 30px; }

  .paper-section { padding: 40px 6% 40px; }
}

/* ============================================
   TOAST — notification flottante (formulaires)
   ============================================ */
.site-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-140%);
  z-index: 300;
  max-width: min(90vw, 420px);
  padding: 14px 22px;
  background: #1a1410;
  color: #FAF8F3;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  text-align: center;
  border-radius: 3px;
  box-shadow: 0 8px 30px rgba(26,20,16,0.25);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), opacity 0.4s ease;
  pointer-events: none;
}
.site-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.site-toast.error {
  background: #7a1f1f;
}

/* Visible pour les lecteurs d'écran uniquement (SEO/accessibilité) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
