/* ==========================================================================
   glightbox.css — Lightbox vanilla universelle (remplace prettyPhoto)
   Compatible avec les attributs rel="prettyPhoto[...]" existants.
   ========================================================================== */

.glightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: gbFadeIn 0.25s ease;
}

.glightbox-overlay.gb-closing {
  animation: gbFadeOut 0.2s ease forwards;
}

.glightbox-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 3rem;
}

.glightbox-container img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.glightbox-container iframe,
.glightbox-container video {
  max-width: 90vw;
  max-height: 85vh;
  border: none;
}

/* Boutons */
.gb-btn {
  position: absolute;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: color 0.2s;
  z-index: 5;
}

.gb-btn:hover {
  color: #fff;
}

.gb-close {
  top: 1.25rem;
  right: 1.25rem;
  font-size: 1.75rem;
  line-height: 1;
}

.gb-prev {
  left: 1rem;
  font-size: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.gb-next {
  right: 1rem;
  font-size: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.gb-counter {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
  font-family: var(--font-body, 'Karla', sans-serif);
}

.gb-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: hsl(35, 40%, 55%);
  border-radius: 50%;
  animation: gbSpin 0.7s linear infinite;
}

@keyframes gbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes gbFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes gbSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (max-width: 768px) {
  .glightbox-container {
    padding: 1.5rem;
  }

  .glightbox-container img {
    max-width: 95vw;
    max-height: 80vh;
  }

  .gb-prev,
  .gb-next {
    font-size: 1.8rem;
  }

  .gb-prev { left: 0.25rem; }
  .gb-next { right: 0.25rem; }
}
