/* ═══════════════════════════════════════════════════════
   DV MOTION — PREMIUM SCROLL-DRIVEN EXPERIENCE
   Aesthetic: Space Luxury / Cinematic Dark
   Fonts: Orbitron (display) + Exo 2 (body)
═══════════════════════════════════════════════════════ */

:root {
  --bg-void: #000000;
  --bg-space: #04040f;
  --bg-deep: #080818;
  --accent-red: #CC1111;
  --accent-red-bright: #FF2222;
  --accent-red-glow: rgba(204, 17, 17, 0.25);
  --accent-silver: #C0C0D0;
  --text-primary: #FFFFFF;
  --text-secondary: #A0A0B8;
  --text-muted: #505068;
  --text-dim: #303048;
  --font-display: 'Orbitron', monospace;
  --font-body: 'Exo 2', sans-serif;
}

/* ── Reset & Base ──────────────────────────────────── */

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

html {
  scroll-behavior: auto; /* Lenis handles smooth scroll */
  overflow-x: hidden;
}

body {
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Loader ───────────────────────────────────────── */

#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-void);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.loader-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(204,17,17,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(204,17,17,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridPulse 3s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.loader-content {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loader-brand {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
}

.loader-dv {
  color: var(--accent-red);
  text-shadow: 0 0 40px var(--accent-red-glow), 0 0 80px var(--accent-red-glow);
}

.loader-motion {
  color: var(--text-primary);
}

.loader-status {
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.loader-bar-wrap {
  width: 280px;
  height: 1px;
  background: var(--text-dim);
  position: relative;
  overflow: hidden;
}

#loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-red-bright));
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--accent-red-glow);
}

#loader-percent {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

/* ── Fixed Header ─────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 40px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.site-header.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.nav-logo .logo-dv {
  color: var(--accent-red);
}

.nav-logo .logo-motion {
  color: var(--text-primary);
  font-weight: 400;
  font-family: var(--font-body);
  font-size: 1rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 36px;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links .nav-cta {
  color: var(--accent-red);
  border: 1px solid rgba(204, 17, 17, 0.4);
  padding: 8px 16px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links .nav-cta:hover {
  background: var(--accent-red);
  color: #fff;
}

/* ── Hero Standalone ──────────────────────────────── */

.hero-standalone {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  background: var(--bg-void);
  overflow: hidden;
  z-index: 1;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(204,17,17,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(204,17,17,0.06) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 100%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.hero-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(204,17,17,0.15) 0%, transparent 70%);
  top: -200px;
  right: -100px;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(204,17,17,0.08) 0%, transparent 70%);
  bottom: -150px;
  left: 10%;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-left: 8vw;
  max-width: min(900px, 50vw);
}

.hero-label {
  display: block;
  margin-bottom: 32px;
}

.hero-heading {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.02em;
  overflow: hidden;
}

.hero-word {
  display: block;
  overflow: hidden;
}

.hero-dv {
  font-size: clamp(6rem, 18vw, 16rem);
  color: var(--accent-red);
  text-shadow:
    0 0 60px rgba(204, 17, 17, 0.4),
    0 0 120px rgba(204, 17, 17, 0.2);
}

.hero-motion-word {
  font-size: clamp(3rem, 9vw, 8rem);
  color: var(--text-primary);
  font-weight: 400;
  letter-spacing: 0.15em;
}

.hero-tagline {
  margin-top: 32px;
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.hero-tagline em {
  font-style: italic;
  color: var(--accent-silver);
}

.hero-scroll-hint {
  margin-top: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
}

.hint-text {
  font-family: var(--font-display);
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.hint-arrow {
  animation: bounceY 1.8s ease-in-out infinite;
}

@keyframes bounceY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ── Hero Float Images — Orbite satellitaire ──────── */

.hero-floats {
  position: absolute;
  /* Centre de l'orbite : droite du hero */
  right: 22%;
  top: 50%;
  width: 0;
  height: 0;
  z-index: 2;
  pointer-events: none;
}

.float-card {
  position: absolute;
  width: 120px;
  height: 120px;
  /* Centré sur le point d'orbite */
  margin: -60px 0 0 -60px;
  animation: orbit-satellite 12s linear infinite;
}

.float-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.7));
}

/* Décalage orbital — chaque satellite à 1/5 d'avance */
.float-1 { animation-delay:    0s; }
.float-2 { animation-delay: -2.4s; }
.float-3 { animation-delay: -4.8s; }
.float-4 { animation-delay: -7.2s; }
.float-5 { animation-delay: -9.6s; }

/*
  Orbite elliptique inclinée ~35°
  FRONT (bas-droite) = grand + pleine opacité
  BACK  (haut-gauche) = petit + quasi invisible
  Les satellites passent devant l'un après l'autre
*/
@keyframes orbit-satellite {
  0%   { transform: translate( 50px,  110px) scale(1.3);  opacity: 1;    } /* AVANT — face à l'écran */
  15%  { transform: translate(175px,   20px) scale(0.72); opacity: 0.65; } /* DROITE */
  30%  { transform: translate(110px, -100px) scale(0.44); opacity: 0.3;  } /* ARRIÈRE-DROITE */
  50%  { transform: translate(-50px, -115px) scale(0.38); opacity: 0.18; } /* ARRIÈRE — dos à l'écran */
  68%  { transform: translate(-170px,  10px) scale(0.44); opacity: 0.3;  } /* ARRIÈRE-GAUCHE */
  85%  { transform: translate( -60px, 100px) scale(0.72); opacity: 0.65; } /* GAUCHE */
  100% { transform: translate(  50px, 110px) scale(1.3);  opacity: 1;    } /* retour AVANT */
}

@media (max-width: 900px) {
  .hero-floats { display: none; }
  .hero-content { max-width: 100%; }
}

/* ── Section Images (grandes, côté opposé au texte) ── */

.section-image {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 60vh;
  pointer-events: none;
  z-index: 4;
}

.section-image.img-right {
  justify-content: flex-end;
  padding-left: 56vw;
  padding-right: 4vw;
}

.section-image.img-left {
  justify-content: flex-start;
  padding-right: 56vw;
  padding-left: 4vw;
}

.section-image img {
  width: clamp(180px, 32vw, 420px);
  height: auto;
  object-fit: contain;
  filter:
    drop-shadow(0 20px 60px rgba(0, 0, 0, 0.85))
    drop-shadow(0 0 30px rgba(204, 17, 17, 0.08));
  will-change: transform, opacity;
}

@media (max-width: 768px) {
  .section-image { display: none; }
}

/* ── Section Label (shared) ───────────────────────── */

.section-label {
  font-family: var(--font-display);
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-red);
  display: block;
  margin-bottom: 20px;
}

/* ── Canvas Wrap (fixed) ──────────────────────────── */

.canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 2;
  clip-path: circle(0% at 50% 50%);
  pointer-events: none;
}

#canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Dark Overlay (fixed) ─────────────────────────── */

#dark-overlay {
  position: fixed;
  inset: 0;
  z-index: 3;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  pointer-events: none;
}

/* ── Marquees (fixed) ─────────────────────────────── */

.marquee-wrap {
  position: fixed;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 4;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.marquee-bottom {
  top: 60%;
}

.marquee-text {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(8vw, 12vw, 14vw);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  will-change: transform;
}

/* ── Scroll Container ─────────────────────────────── */

#scroll-container {
  position: relative;
  height: 1000vh;
  z-index: 5;
}

/* ── Scroll Sections (shared) ─────────────────────── */

.scroll-section {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 100vh;
  pointer-events: none;
}

/* ── Content Sections ─────────────────────────────── */

.section-content {
  pointer-events: auto;
}

.align-left {
  padding-left: 5vw;
  padding-right: 55vw;
  justify-content: flex-start;
}

.align-right {
  padding-left: 55vw;
  padding-right: 5vw;
  justify-content: flex-end;
}

.section-inner {
  max-width: 38vw;
}

.heading-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.heading-img {
  display: none; /* desktop : masquée, la grande image scrollable prend le relais */
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7));
  opacity: 0.9;
  transform-origin: center bottom;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0;
  text-shadow: 0 2px 30px rgba(0,0,0,0.8);
}

.section-body {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 32px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.9);
}

.section-link {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-red);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(204, 17, 17, 0.3);
  padding-bottom: 4px;
  transition: color 0.2s, border-color 0.2s;
}

.section-link:hover {
  color: var(--accent-red-bright);
  border-color: var(--accent-red-bright);
}

.section-link span {
  transition: transform 0.2s;
}

.section-link:hover span {
  transform: translateX(4px);
}

/* ── Stats Section ────────────────────────────────── */

.section-stats {
  justify-content: center;
  align-items: center;
  z-index: 6;
  pointer-events: auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  width: 100%;
  max-width: 1200px;
  padding: 0 6vw;
}

.stat {
  text-align: center;
  padding: 40px 20px;
  border-right: 1px solid var(--text-dim);
}

.stat:last-child {
  border-right: none;
}

.stat-number-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  line-height: 1;
  margin-bottom: 16px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--accent-red);
  align-self: flex-start;
  margin-top: 4px;
}

.stat-label {
  font-family: var(--font-display);
  font-size: 0.45rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── CTA Section ──────────────────────────────────── */

.section-cta {
  justify-content: center;
  align-items: center;
  z-index: 6;
  pointer-events: auto;
}

.cta-inner {
  text-align: center;
  padding: 60px 40px;
  max-width: 700px;
}

.cta-heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 28px;
  text-shadow: 0 0 60px rgba(0,0,0,0.8);
}

.cta-heading em {
  font-style: italic;
  color: var(--accent-red);
  font-weight: 400;
}

.cta-body {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.3vw, 1.2rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 48px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bg-void);
  background: var(--accent-red);
  padding: 18px 40px;
  margin-bottom: 40px;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 0 30px rgba(204, 17, 17, 0.3);
}

.cta-button:hover {
  background: var(--accent-red-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(204, 17, 17, 0.5);
}

.cta-button span {
  transition: transform 0.2s;
}

.cta-button:hover span {
  transform: translateX(4px);
}

.cta-sub-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cta-sub-links a {
  font-family: var(--font-display);
  font-size: 0.45rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}

.cta-sub-links a:hover {
  color: var(--text-secondary);
}

.cta-sub-links span {
  color: var(--text-dim);
  font-size: 0.6rem;
}

/* ── Mobile ───────────────────────────────────────── */

@media (max-width: 768px) {
  #scroll-container {
    height: 600vh;
  }

  .align-left,
  .align-right {
    padding: 0 6vw;
    justify-content: flex-start;
  }

  .section-inner {
    max-width: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    padding: 32px 24px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat {
    border-right: none;
    border-bottom: 1px solid var(--text-dim);
  }

  .stat:nth-child(2n) {
    border-right: none;
  }

  .stat:nth-child(3),
  .stat:nth-child(4) {
    border-bottom: none;
  }

  /* Images inline à côté du titre sur mobile */
  .heading-img {
    display: block;
  }

  .site-header {
    padding: 16px 20px;
  }

  .nav-links {
    display: none;
  }

  .hero-content {
    padding-left: 6vw;
    padding-right: 6vw;
  }

  .hero-dv {
    font-size: clamp(5rem, 25vw, 8rem);
  }

  .hero-motion-word {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .marquee-text {
    font-size: 18vw;
  }
}

/* ── Utility: clip-reveal base ────────────────────── */

.clip-target {
  clip-path: inset(100% 0 0 0);
}

/* ── Scrollbar ────────────────────────────────────── */

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--bg-void);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-red);
  border-radius: 2px;
}
