/* ============================================
   ALGORIS IT — hero.css
   Section hero. Vidéo bg, grille, typographie.
   ============================================ */


/* ─── Wrapper principal ─── */

.hero {
  position: relative;
  min-height: var(--vh-stable, 100svh);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  padding: 0 var(--space-xl);
}


/* ─── VIDÉO BACKGROUND ─── */

.hero__video-wrapper {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.55;
}

/* Overlay sombre par-dessus la vidéo */
.hero__video-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(5, 5, 8, 0.45) 0%,
      rgba(5, 5, 8, 0.25) 40%,
      rgba(5, 5, 8, 0.75) 100%
    );
}

/* Sans vidéo : overlay invisible */
.hero__video:not([src]) ~ .hero__video-overlay,
.hero__video[src=""] ~ .hero__video-overlay {
  background: transparent;
}


/* ─── FOND FALLBACK — Grille géométrique ─── */
/* Active quand pas de vidéo, reste visible en superposition subtile */

.hero__bg-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 30%, transparent 100%);
}

/* En light mode — grille encore plus discrète */
:root[data-theme="light"] .hero__bg-grid {
  opacity: 0.15;
}


/* ─── GLOW BLEU — discret, centré bas-gauche ─── */

.hero__bg-glow {
  position: absolute;
  z-index: 1;
  bottom: -10%;
  left: -5%;
  width: 55vw;
  height: 55vw;
  max-width: 700px;
  max-height: 700px;
  background: radial-gradient(circle, var(--accent-glow-lg) 0%, transparent 65%);
  pointer-events: none;
  filter: blur(40px);
}


/* ─── CONTENU ─── */

.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  padding-top: 80px; /* hauteur navbar */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
}


/* ─── Label au-dessus du titre ─── */

.hero__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Petit point pulsé avant le label */
.hero__label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: labelPulse 2.4s ease-in-out infinite;
}

@keyframes labelPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}


/* ─── Titre principal ─── */

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7.5vw, 7rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
  text-transform: uppercase;
}

.hero__title-line {
  display: block;
}

/* La dernière ligne — accent */
.hero__title-line--accent {
  color: var(--text-primary);
  position: relative;
}

/* Soulignement bleu fin sous la dernière ligne */
.hero__title-line--accent::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--accent), transparent);
  transform-origin: left;
  animation: underlineGrow 1s cubic-bezier(0.16, 1, 0.3, 1) 2.8s both;
}

@keyframes underlineGrow {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}


/* ─── Letter hover — effet interactif par lettre ─── */

.hero__letter {
  display: inline-block;
  transition:
    color 0.25s ease,
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    text-shadow 0.25s ease;
  cursor: default;
}

.hero__letter:hover {
  color: var(--accent);
  transform: translateY(-8px) scale(1.05);
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
}


/* ─── Tagline premium sous le titre ─── */

.hero__tagline {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 560px;
  margin-top: var(--space-sm);
  padding-left: var(--space-md);
  border-left: 2px solid var(--accent);
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 2.25s both;
}


/* ─── Sous-titre ─── */

.hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.65;
  margin-top: var(--space-sm);
}


/* ─── Actions / Boutons ─── */

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}

.hero__actions .btn--primary {
  font-size: 0.95rem;
  padding: 0.9rem 2rem;
  box-shadow: 0 0 0 0 var(--accent-glow);
  transition:
    background var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-base);
}

.hero__actions .btn--primary:hover {
  box-shadow: 0 0 32px var(--accent-glow), 0 0 64px var(--accent-glow-lg);
  transform: translateY(-2px);
}

.hero__actions .btn--outline {
  font-size: 0.95rem;
  padding: 0.9rem 2rem;
  color: var(--text-secondary);
}

.hero__actions .btn--outline:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}


/* ─── Scroll indicator ─── */

.hero__scroll {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}


/* ─── Dégradé de fondu bas de page ─── */
/* Transition douce hero → section suivante */

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--bg-primary));
  z-index: 2;
  pointer-events: none;
}


/* ─── Light mode adaptations ─── */

:root[data-theme="light"] .hero__video {
  opacity: 0.25;
}

:root[data-theme="light"] .hero__bg-glow {
  opacity: 0.5;
}

:root[data-theme="light"] .hero__title {
  color: var(--text-primary);
}


/* ─── Responsive ─── */

@media (max-width: 900px) {
  .hero {
    padding: 0 var(--space-lg);
  }

  .hero__title {
    font-size: clamp(2.5rem, 9vw, 4.5rem);
  }

  .hero__subtitle {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 0 var(--space-lg);
    min-height: var(--vh-stable, 100svh);
  }

  .hero__content {
    padding-top: 64px;
    gap: var(--space-md);
  }

  .hero__title {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .hero__tagline {
    font-size: 0.7rem;
    padding-left: var(--space-sm);
  }

  .hero__subtitle {
    font-size: 0.9rem;
    max-width: 100%;
  }

  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero__label {
    font-size: 0.62rem;
  }

  .hero__scroll { display: none; }
}

@media (max-width: 400px) {
  .hero { padding: 0 var(--space-md); }
  .hero__title { font-size: clamp(1.7rem, 9vw, 2.5rem); }
  .hero__tagline { font-size: 0.6rem; }
}