/* Hero page écoles — image plein écran + contenu centré en bas */

.ec-hero {
  --ec-hero-shift: 10vh;
  --ec-hero-pad-bottom: clamp(2.5rem, 6vh, 4rem);
  position: relative;
  box-sizing: border-box;
  min-height: calc(100svh + var(--ec-hero-shift) + var(--ec-hero-pad-bottom) + clamp(1rem, 2.5vh, 1.75rem));
  display: flex;
  align-items: flex-end;
  margin-top: 0;
  padding: 0 0 var(--ec-hero-pad-bottom);
  overflow: visible;
  color: var(--white);
  background: #000000;
}

.ec-hero__media {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  max-height: 100svh;
  z-index: 0;
  pointer-events: none;
  background-color: #000000;
}

.ec-hero__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.ec-street__media picture,
.ec-moment__media picture,
.ec-image-banner__figure picture {
  display: block;
  width: 100%;
}

.ec-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Dégradé : noir total au bord bas de l’image (jointure avec le fond #000 du hero) */
.ec-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.22) 42%,
    rgba(0, 0, 0, 0.52) 68%,
    rgba(0, 0, 0, 0.78) 82%,
    #000000 100%
  );
  pointer-events: none;
}

.ec-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.ec-hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 56rem;
  margin-inline: auto;
}

.ec-hero__lead.section-lead {
  margin-bottom: var(--space-lg);
}

.ec-hero__title.section-title {
  margin-bottom: var(--space-md);
}

.ec-hero__eyebrow.section-eyebrow--ecole {
  margin-bottom: var(--space-md);
}

.ec-hero__title {
  color: var(--white);
  font-size: clamp(2.35rem, 6.2vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  max-width: none;
  margin-bottom: var(--space-md);
}

.ec-hero__title-line,
.ec-hero__title-accent {
  display: block;
}

.ec-hero__title-accent {
  white-space: nowrap;
}

.ec-hero__title-accent .accent-blue {
  font-style: normal;
  font-weight: 900;
  color: var(--blue);
}

.ec-hero__lead {
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.55;
  max-width: 42rem;
  margin-bottom: var(--space-lg);
}

.ec-hero__cta {
  justify-content: center;
  margin-bottom: var(--space-md);
}

.ec-hero__btn-primary {
  background: var(--white);
  color: var(--anthracite);
}

.ec-hero__btn-primary:hover {
  background: var(--off-white);
}

.ec-hero__btn-secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}

.ec-hero__btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
}

.ec-hero__signal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.62);
  max-width: 36rem;
}

.ec-hero__signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(94, 197, 255, 0.22);
  animation: ec-hero-pulse 2.4s infinite;
  flex-shrink: 0;
}

@keyframes ec-hero-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(94, 197, 255, 0.22); }
  50% { box-shadow: 0 0 0 10px rgba(94, 197, 255, 0); }
}

@media (max-width: 640px) {
  .ec-hero__title-accent {
    white-space: normal;
  }

  .ec-hero__cta {
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 22rem);
  }

  .ec-hero__cta .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ec-hero__signal-dot {
    animation: none;
  }
}

/* Hero vidéo YouTube (page évènementiel) */
.ec-hero--youtube .ec-hero__image {
  display: none;
}

.ec-hero__video {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ec-hero__video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  border: 0;
}

.ec-hero--youtube .ec-hero__scrim {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.35) 42%,
    rgba(0, 0, 0, 0.58) 68%,
    rgba(0, 0, 0, 0.82) 82%,
    #000000 100%
  );
}

.ec-hero--youtube .ec-hero__inner {
  z-index: 2;
}
