/* ================= OVERLAY ROOT ================= */

.overlay-gallery-box {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.96);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* empêcher héritage galerie */
.overlay-gallery-box *,
.overlay-gallery-box img {
  box-sizing: border-box;
}

/* ================= CONTENT ================= */

.overlay-gallery-content {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ================= MAIN IMAGE / VIDEO ================= */

.overlay-gallery-main {
  max-width: 100%;
  max-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.overlay-gallery-main img,
.overlay-gallery-main video {
  max-width: 100%;
  max-height: 80vh;
  border: 1px solid #000;
  display: block;
}

/* ================= CAPTION ================= */

.overlay-caption {
  margin-top: 12px;
  font-family: "Special Elite", monospace;
  font-size: 14px;
  text-align: center;
}

/* ================= ARROWS ================= */

.overlay-gallery-box .overlay-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 60px;
  color: #888;
  cursor: pointer;
  z-index: 2;
  user-select: none;
}

.overlay-gallery-box .overlay-arrow.prev { left: 30px; }
.overlay-gallery-box .overlay-arrow.next { right: 30px; }

/* ================= PROGRESS ================= */

.overlay-progress {
  width: 200px;
  height: 2px;
  background: rgba(0,0,0,0.15);
  margin-top: 8px;
}

.overlay-progress-bar {
  width: 0%;
  height: 100%;
  background: #000;
  transition: width 0.1s linear;
}

/* ================= THUMBNAILS ================= */

.overlay-gallery-thumbs {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  overflow-x: auto;
  max-width: 90vw;
  padding-bottom: 4px;
}

.overlay-gallery-thumbs .thumb-wrapper {
  position: relative;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.25s ease;
}

.overlay-gallery-thumbs .thumb-wrapper.active,
.overlay-gallery-thumbs .thumb-wrapper:hover {
  opacity: 1;
}

.overlay-gallery-thumbs img {
  height: 48px;
  width: auto;
  display: block;
  border: 1px solid #000;
}

/* icône vidéo */
.thumb-video-icon {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  color: white;
  text-shadow: 0 0 6px black;
  pointer-events: none;
}
.video-sound-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 5px 8px;
  cursor: pointer;
  font-size: 20px;
}
.video-sound-btn:hover {
  background: rgba(0,0,0,0.7);
}
.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 30px;
  cursor: pointer;
  display: block;
  text-align: center;
  line-height: 50px;
}
.video-play-btn:hover {
  background: rgba(0,0,0,0.7);
}

