/* =============================================
   Pool Gallery — Carrousel média
   ============================================= */

.mova-pg {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

/* --- Viewer principal --- */
.mova-pg-viewer {
  position: relative;
  width: 100%;
  background: #f7f7f7;
  overflow: hidden;
}

.mova-pg-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.mova-pg-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.mova-pg-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.mova-pg-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mova-pg-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

/* --- Flèches --- */
.mova-pg-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: #1a4759;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition:
    background 0.2s,
    transform 0.2s;
}

.mova-pg-arrow:hover {
  background: #fff;
  color: inherit;
}

.mova-pg-arrow:focus {
  background: rgba(255, 255, 255, 0.85);
}

.mova-pg-arrow-prev {
  left: 12px;
}

.mova-pg-arrow-next {
  right: 12px;
}

/* --- Vignettes --- */
.mova-pg-thumbs {
  margin-top: 12px;
  overflow: hidden;
}

.mova-pg-thumbs-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.mova-pg-thumbs-track::-webkit-scrollbar {
  height: 4px;
}

.mova-pg-thumbs-track::-webkit-scrollbar-thumb {
  background: #ccc;
}

.mova-pg-thumb {
  flex: 0 0 auto;
  width: 100px;
  height: 68px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: #eee;
  position: relative;
  transition:
    border-color 0.2s,
    opacity 0.2s;
}

.mova-pg-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mova-pg-thumb:hover,
.mova-pg-thumb:focus {
  background-color: transparent;
  border-color: #1a4759;
}

.mova-pg-thumb.active {
  background-color: transparent;
  border-color: #1a4759;
  opacity: 1;
}

.mova-pg-thumb:not(.active) {
  opacity: 0.6;
}

/* Indicateur vidéo sur vignette */
.mova-pg-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

/* --- Curseur zoom sur images --- */
.mova-pg-slide img {
  cursor: default;
}

/* --- Bouton Zoom --- */
.mova-pg-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: #1a4759;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition:
    background 0.2s,
    transform 0.2s;
}

.mova-pg-zoom:hover {
  background: #fff;
  color: inherit;
}

.mova-pg-zoom:focus {
  background: #fff !important;
  color: inherit !important;
}

/* --- Lightbox --- */
.mova-pg-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.mova-pg-lightbox.open {
  display: flex;
}

.mova-pg-lb-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  transition: opacity 0.2s;
  z-index: 10;
}

.mova-pg-lb-close:hover {
  opacity: 0.7;
}

.mova-pg-lb-close:hover, .mova-pg-lb-close:focus  {
  background: none;
}

.mova-pg-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.mova-pg-lb-nav:hover, .mova-pg-lb-nav:focus {
  background: rgba(255, 255, 255, 0.3);
}

.mova-pg-lb-prev {
  left: 20px;
}

.mova-pg-lb-next {
  right: 20px;
}

.mova-pg-lb-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mova-pg-lb-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: cover;
  cursor: zoom-out;
}

.mova-pg-lb-content video {
  max-width: 100%;
  max-height: 85vh;
  background: #000;
}

.mova-pg-lb-counter {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  margin-top: 14px;
  text-align: center;
}

/* --- Responsive --- */
@media (max-width: 767px) {
  .mova-pg-thumb {
    width: 72px;
    height: 50px;
  }

  .mova-pg-arrow {
    width: 32px;
    height: 32px;
  }

  .mova-pg-arrow-prev {
    left: 6px;
  }

  .mova-pg-arrow-next {
    right: 6px;
  }

  .mova-pg-lb-nav {
    width: 36px;
    height: 36px;
  }

  .mova-pg-lb-prev {
    left: 10px;
  }

  .mova-pg-lb-next {
    right: 10px;
  }
}
