/*!
 * WA Vimeo Showcase — styles de la galerie (lecteur + carrousel de vignettes)
 * Web Avalanche. Aucune dépendance.
 *
 * Tout est namespacé sous .wavs. Les sélecteurs sont volontairement plus
 * spécifiques que ceux des thèmes / d'Elementor, par exemple :
 *   .elementor img {height:auto;max-width:100%}            (0,1,1)
 *   [type=button]:hover, button:focus {background:#c36}     (0,2,0)  Hello Elementor
 *   .elementor-kit-N button:hover {…}                       (0,2,1)  Kit Elementor
 * d'où des sélecteurs en (0,2,x) / (0,3,x) pour les états et des remises à zéro
 * explicites (margin, padding, border, background, box-shadow, etc.).
 *
 * Mesures calées sur le design de référence de superyacht.tv.
 */

/* ---------------------------------------------------------------------------
 * Conteneur
 * ------------------------------------------------------------------------ */
.wavs {
  display: block;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wavs,
.wavs *,
.wavs *::before,
.wavs *::after {
  box-sizing: border-box;
}

/* Remise à zéro générique des éléments sensibles aux styles du thème. */
.wavs button,
.wavs a,
.wavs img,
.wavs iframe,
.wavs svg {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  min-height: 0;
  max-width: none;
  line-height: normal;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
}

.wavs .wavs-inner {
  display: block;
  margin: 0;
  padding: 20px;
  background: var(--wavs-bg, #0d1323);
  color: var(--wavs-text, #fff);
}

/* ---------------------------------------------------------------------------
 * Lecteur
 * ------------------------------------------------------------------------ */
.wavs .wavs-player {
  position: relative;
  display: block;
  width: 100%;
  height: 0;
  margin: 0;
  padding: 56.25% 0 0;
  overflow: hidden;
  background: #000;
}

.wavs .wavs-player iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}

/* ---------------------------------------------------------------------------
 * Zone des vignettes
 * ------------------------------------------------------------------------ */
.wavs .wavs-thumbs {
  position: relative;
  margin: 24px 0 0;
  padding: 0 0 40px;
}

.wavs .wavs-row {
  position: relative;
  direction: ltr;
}

/* Flèches ------------------------------------------------------------------ */
.wavs .wavs-row .wavs-arrow,
.wavs .wavs-row .wavs-arrow:hover,
.wavs .wavs-row .wavs-arrow:focus,
.wavs .wavs-row .wavs-arrow:active {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  float: none;
  width: 28px;
  min-width: 0;
  height: 100%;
  max-height: 120px;
  min-height: 0;
  margin: auto 0; /* centrage vertical (top:0 + bottom:0 + hauteur plafonnée) */
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  color: #fff;
  font: inherit;
  line-height: 0;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  white-space: normal;
  opacity: 0.85;
  cursor: pointer;
  transform: none;
  transition: opacity 0.2s, background-color 0.2s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.wavs .wavs-row .wavs-prev,
.wavs .wavs-row .wavs-prev:hover,
.wavs .wavs-row .wavs-prev:focus,
.wavs .wavs-row .wavs-prev:active {
  left: 0;
  right: auto;
}

.wavs .wavs-row .wavs-next,
.wavs .wavs-row .wavs-next:hover,
.wavs .wavs-row .wavs-next:focus,
.wavs .wavs-row .wavs-next:active {
  right: 0;
  left: auto;
}

.wavs .wavs-row .wavs-arrow:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

.wavs .wavs-row .wavs-arrow:focus-visible {
  opacity: 1;
  outline: 2px solid var(--wavs-text, #fff);
  outline-offset: 2px;
}

/* Flèche inactive (début / fin, ou toutes les vidéos visibles). */
.wavs .wavs-row .wavs-arrow[disabled] {
  visibility: hidden;
  pointer-events: none;
}

.wavs .wavs-row .wavs-arrow svg {
  display: block;
  flex: 0 0 auto;
  width: 12px;
  height: 16px;
  margin: 0;
  fill: #fff;
  pointer-events: none;
}

/* Fenêtre + piste ------------------------------------------------------------ */
.wavs .wavs-viewport {
  position: relative;
  margin: 0 38px; /* conservée même quand les flèches sont masquées */
  padding: 0;
  overflow: hidden;
  touch-action: pan-y;
}

.wavs .wavs-track {
  display: flex;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translate3d(0, 0, 0);
  transition: transform 0.6s ease;
  cursor: grab;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.wavs .wavs-track.is-dragging {
  cursor: grabbing;
  transition: none;
}

.wavs .wavs-track.is-dragging .wavs-card {
  cursor: grabbing;
}

.wavs .wavs-track.is-instant {
  transition: none;
}

.wavs .wavs-track.is-static {
  cursor: auto;
}

.wavs .wavs-track .wavs-slide {
  flex: 0 0 calc(100% / var(--wavs-pv, 6));
  width: calc(100% / var(--wavs-pv, 6));
  max-width: calc(100% / var(--wavs-pv, 6));
  min-width: 0;
  margin: 0;
  padding: 0 10px;
  list-style: none;
}

/* Vignette ----------------------------------------------------------------- */
.wavs .wavs-track .wavs-card,
.wavs .wavs-track .wavs-card:hover,
.wavs .wavs-track .wavs-card:focus,
.wavs .wavs-track .wavs-card:active,
.wavs .wavs-track .wavs-card:visited {
  position: relative;
  display: block;
  float: none;
  width: 100%;
  max-width: none;
  height: 0;
  min-height: 0;
  margin: 0;
  padding: 56% 0 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #000;
  box-shadow: none;
  color: #fff;
  font: inherit;
  text-decoration: none;
  opacity: 1;
  transform: none;
  transition: none;
  -webkit-user-drag: none;
}

.wavs .wavs-track .wavs-card:focus-visible {
  outline: 2px solid var(--wavs-text, #fff);
  outline-offset: -2px;
}

.wavs .wavs-track .wavs-card img {
  position: absolute;
  top: 0;
  right: auto;
  bottom: auto;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  object-fit: cover;
  opacity: 1;
  transform: scale(1);
  transition: transform 0.3s;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Icône lecture */
.wavs .wavs-track .wavs-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: block;
  margin: 0;
  padding: 9px 16px;
  border: 0;
  border-radius: 4px;
  background: rgba(17, 17, 17, 0.7);
  line-height: 0;
  transform: translate(-50%, -50%);
  transition: background-color 0.3s;
  pointer-events: none;
}

.wavs .wavs-track .wavs-play svg {
  display: block;
  width: 14px;
  height: 14px;
  margin: 0;
  fill: #fff;
}

.wavs .wavs-track .wavs-card.is-active .wavs-play {
  display: none;
}

/* Durée */
.wavs .wavs-track .wavs-time {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 1;
  display: block;
  margin: 0;
  padding: 2px;
  border: 0;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  font-style: normal;
  line-height: 12px;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  pointer-events: none;
}

/* Cadre de la vignette active */
.wavs .wavs-track .wavs-card::before {
  content: none;
  display: none;
}

.wavs .wavs-track .wavs-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 3px solid var(--wavs-accent, #c91530);
  border-radius: 0;
  background: none;
  box-shadow: none;
  opacity: 0;
  transform: none;
  transition: opacity 0.3s;
  pointer-events: none;
}

.wavs .wavs-track .wavs-card.is-active::after {
  opacity: 1;
}

/* Survol : uniquement sur les appareils qui gèrent vraiment le survol
   (évite l'état « collé » après un tap sur mobile). */
@media (hover: hover) {
  .wavs .wavs-track .wavs-card:hover img {
    transform: scale(1.1);
  }

  .wavs .wavs-track .wavs-card:hover .wavs-play {
    background: var(--wavs-accent, #c91530);
  }
}

.wavs .wavs-track .wavs-card:focus-visible .wavs-play {
  background: var(--wavs-accent, #c91530);
}

/* Puces dynamiques ---------------------------------------------------------- */
.wavs .wavs-row .wavs-dots {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 1;
  display: inline-flex;
  margin: 4px 0;
  padding: 0;
  line-height: 0;
  transform: translateX(-50%);
}

.wavs .wavs-row .wavs-dots[hidden] {
  display: none;
}

.wavs .wavs-dots .wavs-dots-window {
  display: inline-flex;
  width: 120px;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.wavs .wavs-dots .wavs-dots-track {
  display: flex;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
  transform: translateX(0);
  transition: transform 0.3s ease-out;
}

.wavs .wavs-dots .wavs-dot,
.wavs .wavs-dots .wavs-dot:hover,
.wavs .wavs-dots .wavs-dot:focus,
.wavs .wavs-dots .wavs-dot:active {
  display: block;
  flex: 0 0 auto;
  float: none;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  font: inherit;
  line-height: 0;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  opacity: 1;
  cursor: pointer;
  transform: none;
  transition: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.wavs .wavs-dots .wavs-dot:focus-visible {
  border-radius: 50%;
  outline: 2px solid var(--wavs-text, #fff);
  outline-offset: -2px;
}

.wavs .wavs-dots .wavs-dot span {
  display: block;
  width: 8px;
  height: 8px;
  margin: 0 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transform: scale(0.33);
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  pointer-events: none;
}

/* Distance à la position courante : 0, 1, 2, au-delà. */
.wavs .wavs-dots .wavs-dot-0 span {
  opacity: 1;
  transform: scale(1);
}

.wavs .wavs-dots .wavs-dot-1 span {
  opacity: 0.6;
  transform: scale(0.66);
}

.wavs .wavs-dots .wavs-dot-2 span {
  opacity: 0.3;
  transform: scale(0.33);
}

.wavs .wavs-dots .wavs-dot-far span {
  opacity: 0;
  transform: scale(0.33);
}

.wavs .wavs-dots .wavs-dot-0,
.wavs .wavs-dots .wavs-dot-0:hover,
.wavs .wavs-dots .wavs-dot-far,
.wavs .wavs-dots .wavs-dot-far:hover {
  cursor: default;
}

.wavs .wavs-dots .wavs-dot-far {
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
 * Liste de secours sans JavaScript (<noscript>)
 * ------------------------------------------------------------------------ */
.wavs .wavs-noscript {
  margin: 0;
  padding: 20px 20px 20px 40px;
  background: var(--wavs-bg, #0d1323);
  color: var(--wavs-text, #fff);
}

.wavs .wavs-noscript a {
  color: inherit;
  text-decoration: underline;
}

/* ---------------------------------------------------------------------------
 * Mouvements réduits
 * ------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .wavs .wavs-track,
  .wavs .wavs-track .wavs-card img,
  .wavs .wavs-track .wavs-play,
  .wavs .wavs-track .wavs-card::after,
  .wavs .wavs-row .wavs-arrow,
  .wavs .wavs-dots .wavs-dots-track,
  .wavs .wavs-dots .wavs-dot span {
    transition: none !important;
  }

  .wavs .wavs-track .wavs-card:hover img {
    transform: scale(1) !important;
  }
}
