/* ===========================================================================
   Gallery lightbox — /town and /loft only.
   NOT part of the shared shell: Les Mazots du Clos keeps the same rules inline
   in its gallery.html, so this is the same component living in its own file
   rather than a change to styles.css. Keep it out of styles.css or the drift
   check will (correctly) flag it.
   =========================================================================== */

/* the grid images are the trigger, so say so */
.gallery img { cursor: zoom-in; }
.gallery img:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.lb {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center;
  background: rgba(12, 16, 11, 0.92);
}
.lb.is-open { display: flex; }
/* the header is fixed and sits above everything; drop it while the lightbox is up */
body.lb-active .site-header { opacity: 0 !important; pointer-events: none !important; }
.lb__img {
  max-width: 94vw; max-height: 90vh; object-fit: contain;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}
.lb__btn {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
  opacity: 0.72; transition: opacity 0.3s var(--ease); padding: 0.6rem;
}
.lb__btn:hover, .lb__btn:focus-visible { opacity: 1; }
.lb__close { top: 1rem; right: 1rem; font-size: 2rem; line-height: 1; }
.lb__prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lb__next { right: 0.5rem; top: 50%; transform: translateY(-50%); }
.lb__count {
  position: absolute; bottom: 1.1rem; left: 0; right: 0; text-align: center;
  color: #fff; opacity: 0.7;
  font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase;
}
@media (max-width: 620px) {
  .lb__prev { left: 0; }
  .lb__next { right: 0; }
}
