/* ============================================================
   CAPRICE DESIGN SYSTEM — LIGHTBOX
   Source canonique pour overlay, boutons close/prev/next.
   Utilisé par lightbox.js et secure-media.js.
   Charger dans tout template qui affiche une lightbox.
   ============================================================ */

/* ── Overlay ────────────────────────────────────────────────── */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  animation: lb-fade-in 0.2s ease;
}

@keyframes lb-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Boutons communs (close / prev / next) ──────────────────── */

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(11, 11, 11, 0.8);
  border: 2px solid rgba(255, 62, 181, 0.5);
  color: #FF3EB5;
  cursor: pointer;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 0;          /* icônes SVG uniquement */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 100000;
  user-select: none;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
  padding: 0;
  line-height: 1;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: #FF3EB5;
  color: #fff;
  border-color: #FF3EB5;
  box-shadow: 0 0 25px rgba(255, 62, 181, 0.8);
}

/* ── Positionnement ─────────────────────────────────────────── */

.lightbox-close {
  top: 20px;
  right: 20px;
  transform-origin: center center;
}

.lightbox-close:hover { transform: rotate(90deg) scale(1.1); }

.lightbox-prev {
  left: calc(50% - 56px);
  bottom: 20px;
  top: auto;
}

.lightbox-prev:hover { transform: scale(1.1); }

.lightbox-next {
  right: calc(50% - 56px);
  bottom: 20px;
  top: auto;
}

.lightbox-next:hover { transform: scale(1.1); }

/* Masquer nav si un seul média */
.lightbox-overlay[data-count="1"] .lightbox-prev,
.lightbox-overlay[data-count="1"] .lightbox-next { display: none; }

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 768px) {
  .lightbox-close,
  .lightbox-prev,
  .lightbox-next { width: 40px; height: 40px; }
  .lightbox-prev { left: calc(50% - 48px); }
  .lightbox-next { right: calc(50% - 48px); }
  .lightbox-close { top: 10px; right: 10px; }
}

@media (max-width: 480px) {
  .lightbox-prev,
  .lightbox-next { width: 36px; height: 36px; }
}
