/* Didatec — bloc « hero ».
   Chargé uniquement quand le bloc est présent (enqueue_style ACF). */

/* Hero ------------------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 503px;
  overflow: hidden;
  color: var(--wp--preset--color--white);
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--wp--preset--color--black);
}

/* La maquette compte sur une photo sombre à gauche pour la lisibilité du texte.
   Un voile garantit le contraste quel que soit le visuel chargé. */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(
      90deg,
      rgba(20, 20, 20, 0.8) 0%,
      rgba(20, 20, 20, 0.45) 45%,
      rgba(20, 20, 20, 0.1) 100%
    ),
    linear-gradient(
      180deg,
      rgba(20, 20, 20, 0.25) 0%,
      rgba(20, 20, 20, 0.45) 100%
    );
}

.hero__video,
.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__inner {
  display: flex;
  width: 100%;
  max-width: var(--wp--style--global--wide-size);
  margin-inline: auto;
  padding: var(--wp--preset--spacing--80);
  padding-block-end: calc(var(--wp--preset--spacing--80) + 32px);
}

.hero__card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--wp--preset--spacing--60);
  width: 100%;
  max-width: 548px;
  border: 1px solid var(--wp--preset--color--white-30);
  border-radius: 5px;
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* Figma 12011:33470 / 12106:35370 : 40px en desktop, 24px en mobile. */
  padding: clamp(24px, calc(24px + 16 * (100vw - 600px) / 520), 40px);
}

.hero__title {
  font-size: var(--wp--preset--font-size--h-1);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.05em;
  color: var(--wp--preset--color--white);
}

.hero__desc {
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--wp--preset--color--white);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px;
}

@media (min-width: 1024px) {
  .hero {
    min-height: 646px;
  }
  .hero__card {
    min-height: calc(646px - 2 * var(--wp--preset--spacing--80) - 32px);
  }

  /* Hero de page intérieure — Figma 12106:35367 : bandeau plus court, carte
     plus large et ancrée en haut, sans étirement vertical. */
  .hero.is-style-page {
    min-height: 548px;
    align-items: flex-start;
  }

  .hero.is-style-page .hero__card {
    max-width: 764px;
    min-height: 321px;
    height: 321px;
  }
}

@media (max-width: 1023px) {
  .hero__card {
    max-width: none;
  }

  /* Figma 12106:35378 : le bandeau de page intérieure est plus court que celui
     de l'accueil en mobile aussi. */
  .hero.is-style-page {
    min-height: 415px;
  }
}
