/* ==========================================================================
   Hero vidéo de la homepage (index.html)
   Desktop : texte à gauche, film vertical 9:16 dans un cadre flottant en
             perspective (halo, ombre, reflet, parallaxe souris) — jamais étiré.
   Mobile  : le film occupe le premier écran, texte lisible sur dégradé.
   ========================================================================== */

.hv-hero { align-items: center; }
.hv-layout {
  position: relative; z-index: 2;
  width: 100%; max-width: 1240px; margin: 0 auto;
  min-height: 100vh;
  padding: 112px 24px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
}
.hv-copy.hero-content { padding: 0; margin: 0; max-width: 600px; }

/* ---- Titre : la marque, en très grand ---- */
.hv-title.hero-title {
  font-size: clamp(46px, 6.6vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0 0 22px;
  max-width: none;
}
.hv-title .hw:last-child .hw-i {
  background: linear-gradient(100deg, #8FB7FF 0%, var(--accent-3) 35%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hv-tagline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  font-family: 'Sora', sans-serif; font-weight: 600;
  font-size: clamp(15px, 1.6vw, 19px); letter-spacing: 0.01em;
  color: #E9F0FF;
  margin: 0 0 20px;
  opacity: 0; transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.16,1,.3,1) .22s, transform .9s cubic-bezier(.16,1,.3,1) .22s;
}
.hero.is-in .hv-tagline, .hero.is-visible .hv-tagline { opacity: 1; transform: none; }
.hv-tagline i { font-style: normal; color: var(--accent-3); }
.hv-tagline .hv-short { display: none; }
.hv-sub.hero-subtitle { font-size: clamp(15px, 1.4vw, 17px); max-width: 520px; margin-bottom: 30px; }

/* ---- Scène 3D ---- */
.hv-stage {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  perspective: 1500px;
  --rx: 4deg; --ry: -15deg; --p: 0; --sx: 30%;
  opacity: 0; transform: translateY(40px);
  transition: opacity 1.1s cubic-bezier(.16,1,.3,1) .35s, transform 1.4s cubic-bezier(.16,1,.3,1) .35s;
}
.hero.is-in .hv-stage, .hero.is-visible .hv-stage { opacity: 1; transform: none; }
.hv-tilt {
  position: relative;
  transform-style: preserve-3d;
  /* --p : progression de sortie du hero (0 → 1, piloté au scroll) : le cadre
     se redresse, rétrécit et glisse vers la suite de la page. */
  transform:
    translate3d(0, calc(var(--p) * 90px), 0)
    rotateX(calc(var(--rx) * (1 - var(--p))))
    rotateY(calc(var(--ry) * (1 - var(--p))))
    scale(calc(1 - var(--p) * 0.2));
  will-change: transform;
}
.hv-frame {
  position: relative; margin: 0;
  height: min(70vh, 700px);
  max-height: 700px; min-height: 420px;
  aspect-ratio: 9 / 16;
  border-radius: 30px;
  overflow: hidden;
  background: #050A1C;
  border: 1px solid rgba(160, 190, 255, 0.22);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 50px 90px -30px rgba(0, 0, 0, 0.85),
    0 30px 120px -20px rgba(47, 107, 255, 0.45),
    0 0 60px -10px rgba(111, 177, 252, 0.35);
  -webkit-box-reflect: below 16px linear-gradient(transparent 76%, rgba(255,255,255,0.16));
  transform: translateZ(0);
}
.hv-poster, .hv-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.hv-video { opacity: 0; transition: opacity .6s ease; }
.hv-video.is-on { opacity: 1; }
/* reflet de lumière sur la « vitre », suit la souris */
.hv-sheen {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(115deg, transparent calc(var(--sx) - 18%), rgba(255,255,255,0.10) var(--sx), transparent calc(var(--sx) + 18%));
  mix-blend-mode: screen;
}
.hv-halo {
  position: absolute; left: 50%; top: 50%;
  width: 150%; height: 115%;
  transform: translate3d(-50%, -50%, -120px);
  background: radial-gradient(closest-side, rgba(47,107,255,0.42), rgba(47,107,255,0.10) 55%, transparent 75%);
  filter: blur(10px);
  pointer-events: none;
}

/* ---- Boutons son / lecture ---- */
.hv-controls { position: relative; z-index: 4; display: flex; gap: 10px; margin-top: 30px; min-height: 40px; }
.hv-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 13.5px/1 'Manrope', sans-serif; color: #fff;
  padding: 11px 16px; border-radius: 999px; cursor: pointer;
  background: rgba(10, 19, 48, 0.55);
  border: 1px solid rgba(160, 190, 255, 0.35);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.hv-btn:hover { background: rgba(47,107,255,0.35); border-color: rgba(160,190,255,0.7); }
.hv-btn:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 3px; }
.hv-btn[hidden] { display: none; }
.hv-btn[aria-pressed="true"] { background: rgba(47,107,255,0.5); }

/* ---- Réalisations : la vidéo d'intro devient la réalisation « 00 » ---- */
.hv-reel {
  display: grid; grid-template-columns: 1.04fr 0.96fr;
  gap: clamp(30px, 5vw, 72px); align-items: center;
  margin-bottom: clamp(52px, 8vw, 104px);
  opacity: 0; transform: translateY(26px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}
.hv-reel.is-in { opacity: 1; transform: none; }
.hv-dock-wrap {
  position: relative; aspect-ratio: 4 / 3;
  border-radius: 18px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(70% 80% at 50% 45%, rgba(47,107,255,0.35), transparent 70%),
    linear-gradient(160deg, var(--hero-bg-3), var(--hero-bg-1));
  box-shadow: 0 34px 80px -34px rgba(15, 23, 42, 0.38);
  perspective: 1200px;
}
.hv-dock {
  position: relative; height: 86%; aspect-ratio: 9 / 16;
  border-radius: 18px; overflow: hidden; background: #050A1C;
  border: 1px solid rgba(160,190,255,0.25);
  box-shadow: 0 24px 60px -18px rgba(0,0,0,0.7), 0 0 50px -8px rgba(47,107,255,0.5);
}
.hv-dock.is-docking { animation: hv-dock-in 1.1s cubic-bezier(.16,1,.3,1) both; }
@keyframes hv-dock-in {
  0%   { transform: translateY(-60px) rotateX(5deg) rotateY(-15deg) scale(1.28); opacity: .35; }
  100% { transform: none; opacity: 1; }
}
.hv-reel .reel-copy { max-width: 468px; margin-left: auto; }

/* ==========================================================================
   MOBILE — le film occupe le premier écran
   ========================================================================== */
@media (max-width: 860px) {
  .hv-hero { min-height: 100vh; min-height: 100svh; align-items: stretch; }
  .hv-layout {
    display: block; min-height: 100vh; min-height: 100svh;
    padding: 0;
  }
  .hv-stage {
    position: absolute; inset: 0; z-index: 0;
    perspective: none; transform: none; opacity: 1; transition: none;
  }
  .hv-stage::after { /* dégradé de lisibilité : haut (header) + bas (texte) */
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
      linear-gradient(180deg, rgba(4,6,14,0.55) 0%, rgba(4,6,14,0) 16%),
      linear-gradient(180deg, rgba(4,6,14,0) 38%, rgba(4,6,14,0.72) 60%, rgba(4,6,14,0.96) 84%, var(--hero-bg-1) 100%);
  }
  .hv-tilt { position: absolute; inset: 0; transform: none; }
  .hv-halo { display: none; }
  .hv-frame {
    position: absolute; inset: 0; height: auto; min-height: 0; max-height: none; aspect-ratio: auto;
    border-radius: 0; border: 0; box-shadow: none; -webkit-box-reflect: unset;
  }
  .hv-sheen { display: none; }
  .hv-controls { position: absolute; top: 84px; right: 16px; margin: 0; }
  .hv-btn { padding: 10px 14px; font-size: 13px; }

  .hv-copy.hero-content {
    position: relative; z-index: 3;
    min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 0 22px 34px; max-width: none;
  }
  .hv-copy .kicker { align-self: flex-start; font-size: 12px; padding: 6px 12px; margin-bottom: 14px; }
  .hv-title.hero-title { font-size: clamp(40px, 12.5vw, 60px); margin-bottom: 12px; }
  .hv-tagline { font-size: 15px; margin-bottom: 22px; }
  .hv-tagline .hv-long { display: none; }
  .hv-tagline .hv-short { display: inline; }
  .hv-sub.hero-subtitle, .hv-copy .hero-locations, .hv-copy .btn-secondary { display: none; }
  .hv-copy .hero-ctas { margin-bottom: 0; }
  /* pleine largeur moins la place du bouton flottant Veloras Seller (bas droite) */
  .hv-copy .btn-primary { width: calc(100% - 72px); justify-content: center; }
  .hv-hero .hero-scroll-cue { display: none; }

  .hv-reel { grid-template-columns: 1fr; gap: 20px; margin-bottom: 56px; }
  .hv-dock-wrap { aspect-ratio: 4 / 5; }
  .hv-reel .reel-copy { max-width: none; margin: 0; }
}

/* ==========================================================================
   prefers-reduced-motion : image fixe, aucune lecture automatique,
   aucun mouvement (la vidéo reste disponible sur demande via « Voir la vidéo »).
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .hv-stage, .hv-tagline, .hv-reel { opacity: 1; transform: none; transition: none; }
  .hv-tilt { transform: rotateY(-10deg) rotateX(3deg); }
  .hv-dock.is-docking { animation: none; }
  .hv-video { transition: none; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 860px) {
  .hv-tilt { transform: none; }
}
