/*
 * Vidéos courtes en boucle (19/10/2026) — templates/vitrine/_video_boucle.html,
 * piloté par static/js/video-boucle.js. Chargée seulement par /recuperer/,
 * le hub bike fitting et /performer/.
 *
 * Ratio réservé dès le HTML (aucun saut de mise en page) : 9:16 sous 768 px,
 * plafonné à ~70 % de la hauteur d'écran (recadrage `cover`), 16:9 au-dessus.
 * La <video> n'apparaît que sous `.vb--active`, posée par le JS : sans JS ou
 * avec « réduire les animations », l'affiche reste seule.
 */
.vb-section {
  background: var(--pa-fond-profond);
  padding-block: 32px 0;
}

.vb {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 70vh;
  max-height: 70svh;
  overflow: hidden;
  background: var(--pa-fond);
}

.vb__affiche,
.vb__affiche img,
.vb__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.vb__affiche img,
.vb__video {
  object-fit: cover;
  object-position: center;
}

.vb__video { display: none; }
.vb--active .vb__video { display: block; }

/* Bouton pause / lecture : 44 px, coin bas droit ; survol en blanc (charte : hover = blanc). */
.vb__bouton {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--pa-bordure-vive);
  border-radius: 0;
  background: rgba(1, 26, 47, 0.72);
  color: var(--pa-blanc);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.vb__bouton[hidden] { display: none; }
.vb__bouton:hover {
  background: var(--pa-blanc);
  color: var(--pa-fond);
}
.vb__bouton:focus-visible {
  outline: 2px solid var(--pa-accent);
  outline-offset: 2px;
}

.vb__icone {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.vb__icone--lecture { display: none; }
.vb--pause .vb__icone--pause { display: none; }
.vb--pause .vb__icone--lecture { display: block; }

@media (min-width: 768px) {
  .vb-section { padding-block: 48px 0; }
  .vb {
    aspect-ratio: 16 / 9;
    max-height: 82vh;
    max-height: 82svh;
  }
  .vb__bouton { right: 16px; bottom: 16px; }
}
