/* 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);
}

/* Voile relevé sur la maquette (Figma 12011:33467) : un seul dégradé linéaire
   noir, de 0.69 dans l'angle haut gauche vers la transparence, incliné de 27°
   vers le bas. Mesuré en comparant l'export du noeud à la photo source. */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    117deg,
    rgba(20, 20, 20, 0.69) 0%,
    rgba(20, 20, 20, 0) 80%
  );
}

.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;
  backdrop-filter: blur(5px);
  background-color: rgb(255 255 255 / 10%);
}

.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);
}

/* .subheading is set at line-height 1, meant for one line: a long surtitre
   wraps on mobile and its lines would touch. */
.hero__subheading {
  line-height: 1.3;
}

.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 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) {
  /* Figma 12012:36443 : le cadre est plus haut que large, le dégradé y pique
     davantage vers le bas (53° au lieu de 27°) pour la même opacité de départ. */
  .hero__media::after {
    background-image: linear-gradient(
      143deg,
      rgba(20, 20, 20, 0.69) 0%,
      rgba(20, 20, 20, 0) 92%
    );
  }

  .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;
  }
}
