.hero {
  position: relative;
  width: 100%;
  min-height: 60vh;
  height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  text-align: center;
  padding: 0;
  z-index: 1;
  --hero-overlay-opacity: 0; /* Variable par défaut */
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(
    0,
    0,
    0,
    var(--hero-overlay-opacity)
  ); /* Utilise la variable */
  z-index: 2;
}

/* Classes par taille */
.hero.hero-small {
  min-height: 50vh;
  height: 50vh;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 500px; /* Largeur fixe pour desktop */
  max-width: 90vw; /* Responsive avec max-width */
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.2); /* glassmorphism translucide */
  border-radius: 1.2em;
  padding: 2.5rem 3rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px) saturate(1);
  -webkit-backdrop-filter: blur(5px) saturate(1);
  border: 1.5px solid rgba(255, 255, 255, 0.35); /* border glassmorphism */
}

.hero h1,
.hero .hero-sub {
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-sub {
  font-weight: 500;
  font-size: 1.2em;
  line-height: 1.3;
}

.hero .highlight {
  color: rgb(var(--color-1));
  background: none;
  padding: 0;
  border-radius: 0;
}

/* Scaling progressif à partir de 550px */
@media (max-width: 550px) {
  .hero-content {
    width: 90vw;
    padding: 2rem 2.5rem;
    border-radius: 1em;
  }

  .hero h1 {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
  }

  .hero-sub {
    font-size: 1.1em;
  }
}

@media (max-width: 450px) {
  .hero-content {
    padding: 1.8rem 2rem;
    border-radius: 0.9em;
  }

  .hero h1 {
    font-size: 2rem;
    margin-bottom: 0.7rem;
  }

  .hero-sub {
    font-size: 1em;
  }
}

@media (max-width: 350px) {
  .hero-content {
    padding: 1.5rem 1.5rem;
    border-radius: 0.8em;
  }

  .hero h1 {
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
  }

  .hero-sub {
    font-size: 0.95em;
  }
}
