/*
 * Galeries vidéo du site KCVO.
 *
 * Reprend la présentation des composants vidéo du site en ligne : vignette
 * 16/9 avec le bouton « Lire la vidéo » et la durée, puis l'éditeur, le titre
 * et la description. Les dimensions (colonnes de 413 px, gouttière de 20 px,
 * marge haute de 50 px) sont celles que le composant Wix applique en ligne.
 */

.kcvo-videos {
  box-sizing: border-box;
  padding: 36px 84px;
  font-family: helvetica-w01-roman, helvetica-w02-roman, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.kcvo-videos__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(275px, 1fr));
  gap: 50px 20px;
  align-items: start;
}

/* --- vignette ----------------------------------------------------------- */

.kcvo-card {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.kcvo-card__frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.kcvo-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Au repos la vignette n'est pas teintée, comme en ligne : seul le survol
   assombrit l'image. */
.kcvo-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  transition: background .2s ease;
}

.kcvo-card:hover .kcvo-card__overlay,
.kcvo-card:focus-visible .kcvo-card__overlay { background: rgba(0, 0, 0, .25); }

.kcvo-card:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }

.kcvo-card__play {
  position: relative;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  border: 2px solid #fafafa;
}

.kcvo-card__play::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent #fafafa;
  transform: translateX(2px);
}

.kcvo-card__playLabel {
  color: #fafafa;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13.3333px;
  line-height: 15px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}

.kcvo-card__time {
  position: absolute;
  right: 10px;
  bottom: 10px;
  color: #fafafa;
  font-family: helvetica-w01-roman, helvetica-w02-roman, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 12px;
  line-height: 14px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}

/* Le composant Wix aligne toutes les cartes d'une galerie sur une hauteur
   commune, réservée qu'il y ait une description ou non ; le build reprend la
   valeur relevée en ligne dans `--kcvo-info-height`. Les polices (questrial,
   syne) et les tailles sont celles du site en ligne. */
.kcvo-card__info {
  display: block;
  box-sizing: border-box;
  padding: 24px 20px 0;
  min-height: var(--kcvo-info-height, 0);
}

.kcvo-card__publisher {
  display: block;
  color: #000;
  font-family: questrial, sans-serif;
  font-size: 14px;
  line-height: 15px;
}

.kcvo-card__title {
  display: block;
  color: #000;
  font-family: syne, sans-serif;
  font-size: 25px;
  line-height: 25px;
  padding: 2.5px 0;
  margin-top: 10px;
}

.kcvo-card__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #000;
  font-family: questrial, sans-serif;
  font-size: 15px;
  line-height: 15px;
  padding: 1.5px 0;
  margin-top: 10px;
}

/* --- fenêtre de lecture -------------------------------------------------- */

.kcvo-modal {
  border: 0;
  padding: 0;
  background: transparent;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden;
  color: #fff;
  font-family: helvetica-w01-roman, helvetica-w02-roman, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.kcvo-modal::backdrop { background: rgba(0, 0, 0, .9); }

.kcvo-modal__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  padding: 56px 72px;
  box-sizing: border-box;
}

.kcvo-modal__stage {
  width: min(100%, 1280px);
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kcvo-modal__frame,
.kcvo-modal__video {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  object-fit: contain;
}

.kcvo-modal__title {
  margin: 0;
  flex: none;
  font-size: 17px;
  text-align: center;
}

.kcvo-modal__btn {
  position: absolute;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s ease;
}

.kcvo-modal__btn:hover { background: rgb(var(--wix-color-7, 255, 44, 95)); }
.kcvo-modal__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.kcvo-modal__btn[hidden] { display: none; }

.kcvo-modal__close { top: 16px; right: 16px; }
.kcvo-modal__prev { left: 16px; top: calc(50% - 22px); }
.kcvo-modal__next { right: 16px; top: calc(50% - 22px); }

/* --- bandeau « Lire la vidéo » de la page A propos ----------------------- */

.kcvo-hero-trigger { cursor: pointer; }

@media (max-width: 980px) {
  .kcvo-videos__grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px 20px; }
  .kcvo-modal__body { padding: 56px 16px; }
}
