/* ============================================================
   SAYA CARD — Canvas Frame Scroll Website
   Palette: Violet profond & Blanc nacré
   purple-600 #9333ea / purple-500 #a855f7
   ============================================================ */

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

:root {
  --bg:           #1e1428;          /* fond violet profond — cohérent avec les coins de la vidéo */
  --bg-deep:      #120d1a;
  --purple:       #9333ea;          /* purple-600 — couleur principale */
  --purple-light: #a855f7;          /* purple-500 */
  --purple-dim:   rgba(147, 51, 234, 0.30);
  --cream:        #f4f0ff;          /* blanc légèrement violacé */
  --cream-dim:    #d0c4e8;          /* plus clair pour lisibilité sur vidéo */
  --muted:        #8878a8;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Jost', 'Helvetica Neue', Arial, sans-serif;
}

html { font-size: 16px; }

/* Styles body scopés à la homepage uniquement via :has(#loader)
   Sur les autres pages, #loader n'est pas dans le DOM → règle ignorée */
body:has(#loader) {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   LOADER
   ============================================================ */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-brand {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--cream);
}

.loader-track {
  width: 220px;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

#loader-bar {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 0%;
  background: var(--purple);
  transition: width 0.15s linear;
}

#loader-percent {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--muted);
}

/* ============================================================
   FILM GRAIN
   ============================================================ */
.grain {
  position: fixed;
  inset: 0;
  z-index: 997;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  mix-blend-mode: overlay;
}

/* ============================================================
   FIXED HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0; /* GSAP → 1 */
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(8, 6, 26, 0.75) 0%, transparent 100%);
  pointer-events: none;
}

.header-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
  text-decoration: none;
  position: relative;
}

/* Fonctionne pour .logo-l et .logo-S (les deux noms sont acceptés) */
.logo-l, .logo-S {
  color: var(--purple-light);
  font-size: 1.5rem;
  font-weight: 600;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  position: relative;
}

.header-nav a {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.nav-cta {
  border: 1px solid rgba(147, 51, 234, 0.55) !important;
  color: var(--purple-light) !important;
  padding: 9px 22px !important;
  transition: all 0.25s ease !important;
}

.nav-cta:hover {
  background: var(--purple) !important;
  color: #fff !important;
  border-color: var(--purple) !important;
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: relative;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--cream);
}

/* ============================================================
   HERO STANDALONE
   100vh, fond violet sombre cohérent avec le canvas
   ============================================================ */
.hero-standalone {
  position: relative;
  height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: flex-end;
  padding: 0 10vw 11vh;
  z-index: 10;
  background-image: radial-gradient(ellipse 80% 60% at 30% 60%, rgba(80, 20, 140, 0.4) 0%, transparent 70%);
}

/* Coins décoratifs violet */
.hero-standalone::before {
  content: '';
  position: absolute;
  top: 40px; right: 48px;
  width: 80px; height: 80px;
  border-top: 1px solid rgba(147, 51, 234, 0.2);
  border-right: 1px solid rgba(147, 51, 234, 0.2);
  pointer-events: none;
}

.hero-standalone::after {
  content: '';
  position: absolute;
  bottom: 40px; left: 48px;
  width: 80px; height: 80px;
  border-bottom: 1px solid rgba(147, 51, 234, 0.2);
  border-left: 1px solid rgba(147, 51, 234, 0.2);
  pointer-events: none;
}

.hero-content {
  max-width: 780px;
  position: relative;
}

.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 22px;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 8.5rem);
  font-weight: 500;              /* plus de présence, reste élégant */
  line-height: 0.92;
  color: var(--cream);
  margin-bottom: 30px;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 24px rgba(8, 6, 26, 0.7);
}

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

.hero-heading em {
  font-style: italic;
  color: var(--purple-light);
  font-weight: 400;
  text-shadow: 0 2px 32px rgba(147, 51, 234, 0.5);
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 44px;
  text-shadow: 0 1px 12px rgba(8, 6, 26, 0.8);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  right: 10vw;
  bottom: 11vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
}

.scroll-line {
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, var(--purple-light), transparent);
  animation: lineBreath 2.4s ease-in-out infinite;
}

@keyframes lineBreath {
  0%, 100% { opacity: 0.4; transform: scaleY(0.9); }
  50%       { opacity: 1;   transform: scaleY(1.1); }
}

.hero-scroll-hint span {
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--purple);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 32px;
  border: 1px solid var(--purple);
  transition: background 0.25s, border-color 0.25s;
}

.btn-primary:hover {
  background: var(--purple-light);
  border-color: var(--purple-light);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(184, 170, 206, 0.3);
  transition: color 0.2s, border-color 0.2s;
}

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

.arrow-r {
  display: inline-block;
  transition: transform 0.22s ease;
}

.btn-ghost:hover .arrow-r { transform: translateX(5px); }

/* ============================================================
   CANVAS — fixed, circle-wipe reveal
   ============================================================ */
.canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 1;
  clip-path: circle(0% at 50% 50%);
  pointer-events: none;
  will-change: clip-path;
}

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

/* ============================================================
   DARK OVERLAY — stats section (z-index 2)
   ============================================================ */
#dark-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  background: rgba(8, 6, 22, 0.91);
  opacity: 0;
  pointer-events: none;
}

/* ============================================================
   SCROLL VIGNETTE — persistant, remplace les ::before section
   Gradient bilatéral continu, animé par JS (z-index 3.5)
   ============================================================ */
#scroll-vignette {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
  background:
    linear-gradient(to right,  rgba(8, 6, 26, 0.82) 0%, rgba(8, 6, 26, 0.48) 28%, transparent 55%),
    linear-gradient(to left,   rgba(8, 6, 26, 0.82) 0%, rgba(8, 6, 26, 0.48) 28%, transparent 55%),
    linear-gradient(to bottom, rgba(8, 6, 26, 0.50) 0%, transparent 18%),
    linear-gradient(to top,    rgba(8, 6, 26, 0.50) 0%, transparent 18%);
}

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

.marquee-inner {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(9vw, 11vw, 11vw);
  font-weight: 300;
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1px rgba(147, 51, 234, 0.2);
  letter-spacing: 0.03em;
  white-space: nowrap;
  will-change: transform;
}

/* ============================================================
   SCROLL CONTAINER
   ============================================================ */
#scroll-container {
  position: relative;
  height: 900vh;
}

/* ============================================================
   SCROLL SECTIONS
   ============================================================ */
.scroll-section {
  position: absolute;
  left: 0; right: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}

/* Midpoints des plages enter/leave : feat1=26.5, feat2=43.5, stats=60, feat3=75.5, cta=91.5 */
.section-feat-1 { top: 26.5%; transform: translateY(-50%); }
.section-feat-2 { top: 43.5%; transform: translateY(-50%); }
.section-stats  { top: 60%;   transform: translateY(-50%); z-index: 6; }
.section-feat-3 { top: 75.5%; transform: translateY(-50%); }
.section-cta    { top: 91.5%; transform: translateY(-50%); }

.align-left  { padding-left: 5vw;  padding-right: 55vw; }
.align-right { padding-left: 55vw; padding-right: 5vw;  }

.align-left  .s-inner,
.align-right .s-inner { max-width: 40vw; position: relative; z-index: 2; }

/* Les overlays par section sont supprimés — remplacés par #scroll-vignette */

.s-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 18px;
  text-shadow: 0 1px 10px rgba(8, 6, 26, 0.9);
}

.s-heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 5.4rem);
  font-weight: 600;              /* poids fort = lisibilité sans shadow excessif */
  line-height: 1.0;
  color: var(--cream);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
  text-shadow:
    0 2px 16px rgba(8, 6, 26, 0.85),
    0 0  48px rgba(8, 6, 26, 0.5);
}

.s-body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.78;
  color: var(--cream-dim);
  margin-bottom: 22px;
  max-width: 370px;
  text-shadow: 0 1px 8px rgba(8, 6, 26, 0.9);
}

.s-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple-light);
  text-shadow: 0 1px 8px rgba(8, 6, 26, 0.9);
}

.s-note::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--purple-light);
  flex-shrink: 0;
}

/* ============================================================
   STATS
   ============================================================ */
.section-stats {
  justify-content: center;
  align-items: center;
  padding: 0 6vw;
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 900px;
  width: 100%;
}

.stat {
  flex: 1;
  text-align: center;
  padding: 0 28px;
}

.stat-row {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  margin-bottom: 14px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 9vw, 9.5rem);
  font-weight: 500;
  color: var(--cream);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 4.5rem);
  font-weight: 400;
  color: var(--purple-light);
  line-height: 1;
}

.stat-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.stat-sep {
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--purple-dim), transparent);
  flex-shrink: 0;
}

/* ============================================================
   CTA
   ============================================================ */
.section-cta {
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Vignette radiale centrale pour la section CTA */
.section-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 65% 70% at 50% 50%,
    rgba(8, 6, 26, 0.82) 0%,
    rgba(8, 6, 26, 0.45) 55%,
    transparent 80%
  );
  pointer-events: none;
  z-index: 1;
}

.section-cta .s-inner { position: relative; z-index: 2; }

.cta-inner {
  max-width: 600px !important;
  text-align: center;
}

.cta-heading {
  font-size: clamp(3rem, 5.5vw, 5.5rem) !important;
  line-height: 0.95 !important;
  margin-bottom: 24px !important;
}

.cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.cta-btn { min-width: 195px; justify-content: center; }

.cta-fine {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 768px) {

  .site-header { padding: 20px 24px; }
  .header-nav { display: none; }

  .header-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: rgba(8, 6, 26, 0.97);
    z-index: 200;
    justify-content: center;
    align-items: center;
    gap: 36px;
  }

  .header-nav.open a {
    font-size: 1.4rem;
    letter-spacing: 0.1em;
  }

  .nav-burger { display: flex; z-index: 201; position: relative; }

  .hero-standalone { padding: 0 6vw 14vh; }
  .hero-standalone::before,
  .hero-standalone::after { display: none; }
  .hero-heading { font-size: clamp(3rem, 13vw, 5rem); }
  .hero-scroll-hint { display: none; }

  .align-left,
  .align-right {
    padding-left: 0;
    padding-right: 0;
    align-items: flex-end;
    padding-bottom: 10vh;
  }

  .align-left .s-inner,
  .align-right .s-inner {
    max-width: 100%;
    width: 100%;
    padding: 28px 24px 32px;
    background: linear-gradient(
      to top,
      rgba(8, 6, 26, 0.94) 0%,
      rgba(8, 6, 26, 0.8) 60%,
      transparent 100%
    );
  }

  .s-heading { font-size: clamp(2.4rem, 9vw, 3.2rem); }
  .s-body { max-width: 100%; }

  .stats-grid { flex-direction: column; gap: 32px; }

  .stat-sep {
    width: 48px; height: 1px;
    background: linear-gradient(to right, transparent, var(--purple-dim), transparent);
  }

  .stat-number { font-size: clamp(3.5rem, 16vw, 5.5rem); }
  .stat { padding: 0; }

  #scroll-container { height: 600vh; }

  .section-feat-1 { top: 20%; }
  .section-feat-2 { top: 37%; }
  .section-stats  { top: 55%; }
  .section-feat-3 { top: 72%; }
  .section-cta    { top: 89%; }

  .cta-inner {
    padding: 28px 24px;
    background: rgba(8, 6, 26, 0.88);
  }

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

@media (max-width: 480px) {
  .hero-heading { font-size: clamp(2.6rem, 15vw, 3.8rem); }
  .hero-actions { flex-direction: column; align-items: flex-start; }
}
