/* ============================================================================
   ART&SUITES — CARROUSEL POP-UP (lightbox galerie)
   Charte BMG · night-purple / mokaccino / warm-paper
   Data-driven : une collection par suite (window.SUITE_GALLERY)
   ========================================================================== */

.lb {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: rgba(28, 12, 41, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  backdrop-filter: blur(18px) saturate(1.05);
  opacity: 0;
  visibility: hidden;
  transition: opacity 420ms cubic-bezier(0.4, 0, 0.2, 1), visibility 420ms;
}
.lb.is-open {
  opacity: 1;
  visibility: visible;
}
html.lb-locked,
body.lb-locked {
  overflow: hidden;
}

/* ── Barre haute ────────────────────────────────────────────────────── */
.lb__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(18px, 3vw, 32px) clamp(20px, 5vw, 64px);
  flex: 0 0 auto;
}
.lb__meta {
  display: flex;
  align-items: baseline;
  gap: 18px;
  min-width: 0;
}
.lb__title {
  font-family: var(--font-display, serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--c-warm-paper, #FCF2E6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb__counter {
  font-family: var(--font-body, sans-serif);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-mokaccino, #E2B791);
  white-space: nowrap;
}
.lb__counter b {
  color: var(--c-warm-paper, #FCF2E6);
  font-weight: 600;
}
.lb__close {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(226, 183, 145, 0.4);
  background: transparent;
  color: var(--c-warm-paper, #FCF2E6);
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease, color 200ms ease;
}
.lb__close:hover {
  background: var(--c-warm-paper, #FCF2E6);
  color: var(--c-night-purple, #331649);
  border-color: var(--c-warm-paper, #FCF2E6);
  transform: rotate(90deg);
}

/* ── Scène centrale ─────────────────────────────────────────────────── */
.lb__stage {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0 clamp(20px, 7vw, 100px);
}
.lb__frame {
  position: relative;
  max-width: min(1180px, 100%);
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 260px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  background: rgba(252, 242, 230, 0.04);
  opacity: 1;
  transition: opacity 320ms ease;
}
.lb__img.is-swapping {
  opacity: 0;
}

/* ── Flèches ────────────────────────────────────────────────────────── */
.lb__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(48px, 5vw, 62px);
  height: clamp(48px, 5vw, 62px);
  border-radius: 50%;
  border: 1px solid rgba(226, 183, 145, 0.45);
  background: rgba(28, 12, 41, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--c-warm-paper, #FCF2E6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 220ms ease, border-color 220ms ease, color 220ms ease, transform 220ms ease;
}
.lb__arrow svg { width: 40%; height: 40%; }
.lb__arrow:hover {
  background: var(--c-mokaccino, #E2B791);
  border-color: var(--c-mokaccino, #E2B791);
  color: var(--c-night-purple, #331649);
}
.lb__arrow--prev { left: clamp(12px, 3vw, 40px); }
.lb__arrow--next { right: clamp(12px, 3vw, 40px); }
.lb__arrow--prev:hover { transform: translateY(-50%) translateX(-3px); }
.lb__arrow--next:hover { transform: translateY(-50%) translateX(3px); }

/* ── Bas : légende + pellicule ──────────────────────────────────────── */
.lb__bottom {
  flex: 0 0 auto;
  padding: clamp(14px, 2vw, 22px) clamp(20px, 5vw, 64px) clamp(20px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
}
.lb__caption {
  font-family: var(--font-display, serif);
  font-style: italic;
  font-size: clamp(0.95rem, 1.6vw, 1.25rem);
  color: var(--c-warm-paper, #FCF2E6);
  text-align: center;
  max-width: 60ch;
  min-height: 1.4em;
  opacity: 0.9;
  transition: opacity 320ms ease;
}
.lb__caption.is-swapping { opacity: 0; }

.lb__rail {
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding: 6px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(226, 183, 145, 0.5) transparent;
  scroll-behavior: smooth;
}
.lb__rail::-webkit-scrollbar { height: 5px; }
.lb__rail::-webkit-scrollbar-thumb {
  background: rgba(226, 183, 145, 0.5);
  border-radius: 999px;
}
.lb__thumb {
  flex: 0 0 auto;
  width: clamp(54px, 7vw, 78px);
  height: clamp(38px, 5vw, 52px);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.42;
  border: 0;
  padding: 0;
  position: relative;
  outline: 1px solid transparent;
  outline-offset: 2px;
  transition: opacity 220ms ease, outline-color 220ms ease;
}
.lb__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lb__thumb:hover { opacity: 0.8; }
.lb__thumb.is-active {
  opacity: 1;
  outline-color: var(--c-mokaccino, #E2B791);
}

/* ── Déclencheur galerie : compteur visible + signal cliquable ──────── */
.galerie .ph { cursor: zoom-in; }

@media (max-width: 700px) {
  .lb__img { max-height: calc(100vh - 230px); }
  .lb__title { font-size: 1rem; }
  .lb__arrow { background: rgba(28, 12, 41, 0.5); }
}

@media (prefers-reduced-motion: reduce) {
  .lb, .lb__img, .lb__caption, .lb__arrow, .lb__close, .lb__thumb {
    transition-duration: 0.01ms !important;
  }
}
