/* =========================
   HERO — DroneCJ (2026)
   Layout: texte gauche / phone droite
   Responsive: 1080p -> 4K + mobile
========================= */

.hero {
  position: relative;
  padding-top: 140px;
  padding-bottom: clamp(46px, 6vh, 86px);
  min-height: min(980px, calc(100svh - 40px));
  overflow: hidden;
}

/* FX layer (canvas + halos + scan) */
.hero__fx {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* Canvas plein écran (globe spots) */
#fxCanvas {
  position: absolute;
  inset: 0;
  transform: translateX(-25%);
  transform-origin: left center;
  width: 100%;
  height: 100%;
  opacity: .55;
  filter: saturate(1.05);
}

/* Halo + scan + grid (tu les as déjà dans le HTML) */
.hero__halo {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(900px 700px at 0% 40%, rgba(47, 107, 255, .18), transparent 60%),
    radial-gradient(780px 620px at 0% 55%, rgba(124, 77, 255, .12), transparent 60%),
    radial-gradient(520px 420px at 10% 20%, rgba(0, 212, 255, .10), transparent 55%);
  opacity: .9;
}

.hero__scan {
  position: absolute;
  inset: -20%;
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, .06),
      rgba(255, 255, 255, .0) 40%,
      rgba(255, 255, 255, .08) 80%,
      rgba(255, 255, 255, .02));
  mix-blend-mode: soft-light;
  opacity: .65;
  animation: heroScan 10s ease-in-out infinite;
}

@keyframes heroScan {
  0% {
    transform: translateY(-1.5%);
    opacity: .52;
  }

  50% {
    transform: translateY(1.5%);
    opacity: .70;
  }

  100% {
    transform: translateY(-1.5%);
    opacity: .52;
  }
}

.hero__grid {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(11, 18, 32, .05) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: .18;
  transform: translateZ(0);
}

/* Content layer */
.hero__content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(22px, 3vw, 44px);

  /* confort 2K/4K */
  max-width: 1280px;
}

/* LEFT */
.hero__left {
  max-width: 660px;
}

/* Eyebrow pill (supporte .dot du HTML) */
.eyebrow {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .66);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
  font-weight: 850;
  color: rgba(11, 18, 32, .75);
  backdrop-filter: blur(14px);
}

.eyebrow .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 10px 20px rgba(47, 107, 255, .22);
}

/* H1 / lead : clamp pour 1080 -> 4K */
.hero .h1 {
  margin-top: 14px;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-size: clamp(38px, 4.4vw, 64px);
}

.hero .lead {
  margin-top: 14px;
  font-size: clamp(16px, 1.15vw, 19px);
  line-height: 1.55;
  color: rgba(11, 18, 32, .78);
}

/* CTA stores */
.hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 10px;
}

.store {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .70);
  background: rgba(255, 255, 255, .66);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  min-width: 200px;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
  will-change: transform;
}

.store:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .10);
}

.store__badge {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 950;
  color: white;
  background: var(--accent);
}

.store--gp .store__badge {
  background: var(--accent2);
}

.store__text small {
  display: block;
  color: rgba(11, 18, 32, .65);
  font-weight: 900;
}

.store__text b {
  display: block;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.chip {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .62);
  font-weight: 900;
  color: rgba(11, 18, 32, .76);
  backdrop-filter: blur(14px);
}

/* RIGHT */
.hero__right {
  display: grid;
  justify-items: end;
  align-items: center;
}

.device {
  /* Taille contrôlée pour éviter “trop grand” sur 2K/4K */
  --deviceW: clamp(270px, 26vw, 420px);
  width: var(--deviceW);
  max-width: 460px;

  position: relative;
  transform: translateZ(0);
  animation: deviceFloat 6.2s ease-in-out infinite;
}

@keyframes deviceFloat {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

/* Effet “premium” : glow derrière le phone */
.device::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(420px 520px at 50% 50%, rgba(47, 107, 255, .18), transparent 60%),
    radial-gradient(520px 520px at 60% 30%, rgba(0, 212, 255, .10), transparent 60%);
  filter: blur(2px);
  opacity: .9;
  z-index: -1;
}

/* Shine sweep */
.device::after {
  content: "";
  position: absolute;
  inset: -10%;
  background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, .22), transparent 60%);
  transform: translateX(-30%) rotate(2deg);
  opacity: .0;
  animation: shineSweep 4.8s ease-in-out infinite;
  z-index: 5;
  pointer-events: none;
}

@keyframes shineSweep {
  0% {
    transform: translateX(-35%) rotate(2deg);
    opacity: .0;
  }

  25% {
    opacity: .18;
  }

  55% {
    transform: translateX(35%) rotate(2deg);
    opacity: .0;
  }

  100% {
    transform: translateX(35%) rotate(2deg);
    opacity: .0;
  }
}

/* Scroll hint : supporte ton HTML (.scroll-hint) */
.scroll-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(11, 18, 32, .65);
  font-weight: 950;
  z-index: 3;
}

.scroll-hint i {
  width: 22px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(11, 18, 32, .25);
  position: relative;
  background: rgba(255, 255, 255, .45);
}

.scroll-hint i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--a);
  animation: dotAnim 1.2s infinite ease-in-out;
}

@keyframes dotAnim {
  0% {
    transform: translateX(-50%) translateY(0);
    opacity: .35;
  }

  40% {
    opacity: 1;
  }

  100% {
    transform: translateX(-50%) translateY(14px);
    opacity: 0;
  }
}

/* =========================
   Responsive
========================= */

@media (max-width: 1100px) {
  .hero__content {
    max-width: 980px;
  }
}

@media (max-width: 980px) {
  .hero {
    padding-top: 120px;
    min-height: auto;
  }

  .hero__content {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: left;
  }

  .hero__right {
    justify-items: center;
    margin-top: 10px;
  }

  .device {
    --deviceW: clamp(260px, 62vw, 420px);
  }
}

@media (max-width: 600px) {
  /* garde tes règles existantes (.hero padding-top etc.) */

  .hero__cta{
    flex-wrap: nowrap;          /* empêche le retour à la ligne */
    gap: 10px;
  }

  .store{
    min-width: 0;               /* annule le 100% */
    flex: 1 1 0;                /* 2 boutons sur une ligne, largeur égale */
    padding: 11px 10px;         /* un peu plus compact */
  }

  .store__badge{
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .store__text b{
    font-size: 15px;
  }
}


/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

  .device,
  .hero__scan,
  .device::after {
    animation: none !important;
  }
}

/* Important: le conteneur doit être le référentiel */
.device__screen {
  position: relative;
}

/* Le canvas doit couvrir exactement l’écran */
#distortCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  /* au-dessus de la vidéo */
}

/* On garde la vidéo visible au départ (fallback),
   et on la cache seulement quand le canvas dessine */
#heroVideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* L'island/HUD au-dessus du tout */
.device__island,
.hud {
  position: absolute;
  z-index: 3;
}

/* Scroll hint — anim Apple */
.scroll-hint{
  transition:
    opacity .35s ease,
    transform .55s cubic-bezier(.22,1,.36,1);
  will-change: transform, opacity;
}

.scroll-hint.is-leaving{
  opacity: 0;
  transform: translateX(-50%) translateY(-16px);
  pointer-events: none;
}

.scroll-hint.is-hidden{
  opacity: 0;
  transform: translateX(-50%) translateY(10px) scale(.98);
  pointer-events: none;
}

@media (max-width: 600px) {

  /* 1) On réserve de la place en bas pour le bouton Découvrir */
  .hero{
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .chip {
  font-weight: 600;
}
  
  .eyebrow {
  gap: 6px;
  padding: 9px 12px;
  font-weight: 600;
  backdrop-filter: blur(7px);
}
  /* 2) On remonte légèrement le phone pour éviter tout chevauchement */
  .hero__right{
    margin-bottom: 70px;
  }

  /* 3) Le bouton reste collé au bas mais avec safe-area iPhone */
  .scroll-hint{
    bottom: calc(18px + env(safe-area-inset-bottom));
  }
}
