/* Grand visuel vidéo en haut de page, commun à Notre école (a-propos.php) et aux Formations (formations.php).
   Script : assets/js/a-propos-hero.js (son, pause, format réel de la vidéo, repère en bas). */

/* about-hero--plein : toute la largeur, sans titre dessus (en-tête de page dessous). */

.about-hero {
  position: relative;
  height: calc(100vh - var(--header-h, 7.6rem));
  height: calc(100svh - var(--header-h, 7.6rem));
  min-height: 26rem;
  background: var(--color-bg);
  /* marge du bas commune au texte et aux boutons, pour qu'ils finissent à la même hauteur */
  --hero-bottom: clamp(1.25rem, 4vh, 2.5rem);
}

.about-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* v1 : toute la largeur, jamais plus haut que l'écran. Écran étroit (tablette, téléphone) :
   bande moins haute, pour ne pas recadrer les côtés de plus de 15 % (--video-ratio mis à jour
   par le script). Écran large : hauteur de l'écran, le haut et le bas sont recadrés. */
.about-hero--plein {
  --video-ratio: 1.7778;
  --crop-max: 0.85;
  --hero-vh: 100vh;
  --hero-h: min(
    calc(var(--hero-vh) - var(--header-h, 7.6rem)),
    calc(100vw / (var(--crop-max) * var(--video-ratio)))
  );
  overflow: hidden;
  min-height: 0;
  height: var(--hero-h);
}

@supports (height: 100svh) {
  .about-hero--plein {
    --hero-vh: 100svh;
  }
}

/* Repère en bas au centre, comme à l'accueil (trait animé) */
.about-hero__hint {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.about-hero__hint[hidden] {
  display: none;
}

.about-hero__hint::after {
  content: "";
  width: 1px;
  height: 2.25rem;
  background: currentColor;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  animation: about-hint 2.4s var(--ease, ease) infinite;
  transform-origin: top;
}

/* Vidéo à fond clair (Formations) : repère en couleur du texte, sans ombre */
.about-hero--clair .about-hero__hint {
  color: var(--color-ink);
  text-shadow: none;
}

.about-hero--clair .about-hero__hint::after {
  box-shadow: none;
}

/* « Moins d'animations » activé : pas de vidéo du tout (Formations, Notre école), la page commence par l'en-tête */
@media (prefers-reduced-motion: reduce) {
  .about-hero--sans-si-calme {
    display: none;
  }
}

@keyframes about-hint {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .about-hero__hint::after {
    animation: none;
  }
}

.about-hero--plein .about-hero__frame {
  position: absolute;
  inset: 0;
}

/* Boutons son et pause, en bas à droite */
.about-hero__controls {
  position: absolute;
  z-index: 2;
  right: clamp(1rem, 3vw, 2rem);
  bottom: var(--hero-bottom);
  display: flex;
  gap: 0.5rem;
}

.about-hero__controls[hidden] {
  display: none;
}

.about-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--color-ink) 18%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-bg) 72%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--color-ink);
  cursor: pointer;
}

/* Icônes : trait fin, couleur du texte */
.about-hero__icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.about-hero__icon--play {
  fill: currentColor;
  stroke-width: 1.2;
}

/* Une seule icône visible selon l'état (son coupé / lecture en pause) */
.about-hero__btn[data-muted="true"] .about-hero__icon--sound,
.about-hero__btn[data-muted="false"] .about-hero__icon--muted,
.about-hero__btn[data-paused="true"] .about-hero__icon--pause,
.about-hero__btn[data-paused="false"] .about-hero__icon--play {
  display: none;
}

.about-hero__btn:hover {
  background: var(--color-bg);
}

.about-hero__btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* v1, téléphone : visuel moins haut, boutons plus près du bord */
@media (max-width: 40em) {
  .about-hero--plein {
    --hero-bottom: 0.75rem;
  }

  .about-hero--plein .about-hero__controls {
    right: 0.75rem;
  }
}
