/* ══════════════════════════════════════════════
   LIGHTBOX / CARROUSEL — composant partagé
   Utilisé par les 4 pages Casa (galeries photos)
   ══════════════════════════════════════════════ */

.lb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-top: 2rem;
}
.lb-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
  filter: saturate(0.98);
}
.lb-grid img:hover {
  transform: scale(1.035);
  filter: saturate(1.08);
}
@media (max-width: 900px) {
  .lb-grid { grid-template-columns: repeat(3, 1fr); }
  .lb-grid img { height: 170px; }
}
@media (max-width: 600px) {
  .lb-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .lb-grid img { height: 140px; }
}

/* ── Overlay plein écran ── */
.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(8, 6, 5, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
.lb-overlay.lb-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0s;
}

.lb-stage {
  position: relative;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), 0 4px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.lb-overlay.lb-open .lb-img.lb-visible {
  opacity: 1;
  transform: scale(1);
}

.lb-caption {
  position: absolute;
  bottom: -2.6rem;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
}

.lb-close,
.lb-prev,
.lb-next {
  position: fixed;
  z-index: 2001;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  line-height: 1;
}
.lb-close:hover,
.lb-prev:hover,
.lb-next:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}

.lb-close {
  top: 1.6rem;
  right: 1.6rem;
  width: 46px;
  height: 46px;
  font-size: 1.5rem;
  font-weight: 300;
}
.lb-close:hover { transform: rotate(90deg); }

.lb-prev,
.lb-next {
  top: 50%;
  width: 54px;
  height: 54px;
  font-size: 1.3rem;
  transform: translateY(-50%);
}
.lb-prev { left: 1.6rem; }
.lb-next { right: 1.6rem; }
.lb-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lb-next:hover { transform: translateY(-50%) translateX(3px); }

.lb-counter {
  position: fixed;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2001;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
}

@media (max-width: 640px) {
  .lb-prev, .lb-next { width: 42px; height: 42px; font-size: 1.05rem; }
  .lb-close { width: 40px; height: 40px; top: 1rem; right: 1rem; }
  .lb-prev { left: 0.6rem; }
  .lb-next { right: 0.6rem; }
  .lb-counter { bottom: 1rem; }
}
