/* ============================================================
   sections/hero/style.css
   hero.css + hero-background.css fusionnés
   ============================================================ */

/* ── Fond grille cyberpunk ─────────────────────────────────── */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  opacity: 0.2;
}

.grid {
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image:
    linear-gradient(var(--hero-grid-color, var(--hero-accent, var(--primary-color))) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid-color, var(--hero-accent, var(--primary-color))) 1px, transparent 1px);
  background-size: var(--hero-grid-size, 50px) var(--hero-grid-size, 50px);
  animation: gridMove 10s linear infinite;
}

.grid::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 0%, var(--bg-color) 90%);
}

/* ── Section hero ──────────────────────────────────────────── */
.hero {
  background: var(--hero-bg, var(--bg-color));
  color: var(--hero-text, var(--text-color));
  padding: var(--hero-padding, 120px 0 7rem);
  border-top:    var(--hero-border-t, none);
  border-right:  var(--hero-border-r, none);
  border-bottom: var(--hero-border-b, none);
  border-left:   var(--hero-border-l, none);
  border-radius: var(--hero-radius, 0);
  box-shadow:    var(--hero-shadow, none);
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  z-index: 1;
}

.hero::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  background: var(--hero-accent, var(--primary-color));
  border-radius: 50%;
  filter: blur(180px);
  opacity: 0.25;
  top: -250px;
  left: -250px;
  animation: float 8s ease-in-out infinite;
}

.hero::after {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  background: var(--secondary-color);
  border-radius: 50%;
  filter: blur(180px);
  opacity: 0.25;
  bottom: -200px;
  right: -200px;
  animation: float 10s ease-in-out infinite;
}

.hero h1 {
  font-size: var(--hero-title-size, clamp(2.5rem, 8vw, 4.5rem));
  font-family: var(--hero-title-font, inherit);
  font-weight: var(--hero-title-weight, 700);
  color: var(--hero-title-color, var(--hero-text, var(--header-color)));
  letter-spacing: -0.02em;
  line-height: 1.1;
  position: relative;
}

.hero h1 .intro-text {
  font-family: var(--font-main);
  font-size: var(--hero-intro-size, clamp(1.8rem, 5vw, 2.5rem));
  font-weight: 300;
  display: block;
  margin-bottom: 1rem;
  color: var(--hero-text, var(--text-color));
  text-transform: none;
  letter-spacing: 0;
}

.hero h1 .highlight {
  font-family: var(--font-headers);
  font-weight: 700;
  color: var(--hero-accent, var(--primary-color));
  text-transform: uppercase;
  position: relative;
  animation: glitch 1s linear infinite;
}

.highlight {
  color: var(--hero-accent, var(--primary-color));
  position: relative;
  display: inline-block;
  font-family: var(--font-mono);
}

h1 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--header-color);
  animation: fadeInUp 1s ease-out;
}

.lead {
  font-family: var(--font-main);
  font-weight: 300;
  font-size: 1.25rem;
  letter-spacing: 0.2px;
  animation: fadeInUp 1s ease-out 0.2s backwards;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  animation: fadeInUp 1s ease-out 0.4s backwards;
}

.cta-buttons .btn {
  margin-bottom: 1rem;
}

/* ── Boutons CTA ────────────────────────────────────────────── */
.cta-buttons .btn-primary {
  color:         var(--hero-btn-primary-color, var(--bg-color));
  border-top:    var(--hero-btn-primary-border-t, none);
  border-right:  var(--hero-btn-primary-border-r, none);
  border-bottom: var(--hero-btn-primary-border-b, none);
  border-left:   var(--hero-btn-primary-border-l, none);
  border-radius: var(--hero-btn-primary-radius, 0rem);
  box-shadow:    var(--hero-btn-primary-shadow, none);
}

.cta-buttons .btn-primary:hover,
.cta-buttons .btn-primary:focus,
.cta-buttons .btn-primary:active {
  color: var(--hero-btn-primary-color, var(--bg-color));
}

/* Bouton secondaire (outline) :
   --hero-btn-secondary-color contrôle le texte, la bordure ET le fond au survol.
   --hero-btn-secondary-hover-color contrôle la couleur du texte au survol. */
.cta-buttons .btn-outline-primary {
  color:        var(--hero-btn-secondary-color, var(--primary-color));
  border-color: var(--hero-btn-secondary-color, var(--primary-color));
  border-radius: var(--hero-btn-secondary-radius, 0rem);
  box-shadow:    var(--hero-btn-secondary-shadow, none);
}

.cta-buttons .btn-outline-primary:hover,
.cta-buttons .btn-outline-primary:focus,
.cta-buttons .btn-outline-primary:active {
  color:            var(--hero-btn-secondary-hover-color, var(--bg-color));
  background-color: var(--hero-btn-secondary-color, var(--primary-color));
  border-color:     var(--hero-btn-secondary-color, var(--primary-color));
}

@media (max-width: 768px) {
  .cta-buttons {
    margin-top: 3rem;
    margin-bottom: 2rem;
    justify-content: center;
    width: 100%;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 300px;
    margin-bottom: 1rem;
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  /* Désactiver les orbes flous animés sur iOS */
  .hero::before,
  .hero::after {
    display: none;
  }

  .hero h1 .highlight {
    animation: none;
  }

  .grid {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    animation: none;
    transform: perspective(var(--hero-grid-perspective, 500px)) rotateX(var(--hero-grid-angle, 80deg));
  }
}
