/*
  hero.css
  Styles de la section hero, desktop et responsive.
  Factorisation, optimisation, documentation complète.
*/

/* CSS SECTION HERO DESKTOP */
.section-hero {
  display: var(--hero-display);
  flex-direction: var(--hero-flex-direction);
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 570px; /* Hauteur fixe pour éviter les sauts lors de l'effet parallaxe */
  overflow: hidden; /* Cache les débordements lors des translations */
  position: relative; /* Nécessaire pour le positionnement du bloc-hero */
  background-color: #000; /* Fond noir pour éviter toute bordure visible */
}


/* CSS BLOC HERO */
.bloc-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 105%; /* Plus large pour accommoder un effet parallaxe plus prononcé */
  height: 590px; /* Plus haute pour le même effet */
  box-sizing: border-box;
  position: relative; /* Pour l'effet parallaxe */
  transform-origin: center center;
  will-change: transform; /* Optimisation des performances */
  overflow: hidden; /* Assure que rien ne déborde */
  margin-left: -2.5%; /* Centrer le bloc élargi uniformément */
  margin-top: -5px; /* Ajuster vers le haut */
}

.hero-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.1); /* Agrandissement plus important pour éviter les espaces vides pendant l'effet */
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1; /* Assurez-vous que c'est inférieur au z-index du titre néon (100) */
}

/* MEDIA QUERY POUR VERSION RESPONSIVE */
@media (max-width: 900px) {
  .section-hero {
    height: 285px !important;
    min-height: 0 !important;
    max-height: 285px !important;
    overflow-x: visible !important;
    position: relative !important;
  }
  .bloc-hero {
    height: 295px !important;
    min-height: 0 !important;
    max-height: 295px !important;
    overflow-x: hidden !important;
    position: relative !important;
  }
  .hero-img {
    width: 120vw !important;
    left: 50%;
    transform: translateX(-50%) scale(1.1) !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    margin: 0 !important;
    z-index: 1 !important;
  }
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: auto;
    padding: 16px 0;
  }
  .neon-text {
    font-size: 4vw;
    text-align: center;
    word-break: break-word;
    margin-top: 12px;
  }
}
