/* ── LIGHTBOX (partagé entre toutes les pages demo-*.php) ── */
html.lightbox-lock, html.lightbox-lock body {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 12, 9, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  touch-action: none; /* on gère nous-mêmes le pincement, pas le navigateur */
  overscroll-behavior: contain;
}
.lightbox-overlay.open { opacity: 1; visibility: visible; }
.lightbox-overlay img {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  touch-action: none;
  will-change: transform;
  transform-origin: center center;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}
.lightbox-overlay.open img { transform: scale(1); }
.lightbox-caption {
  position: absolute;
  bottom: 28px;
  left: 0; right: 0;
  text-align: center;
  color: #f0ebe3;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  z-index: 2; /* toujours au-dessus de l'image, même quand elle a son propre contexte d'empilement (transform) */
  background: rgba(20, 15, 10, 0.65);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
  color:  #F5F2EC;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(20, 15, 10, 0.85);
  border-color: rgba(255,255,255,0.85);
}
.lightbox-close {
  top: 24px; right: 24px;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
}
.lightbox-prev, .lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
}
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
@media (max-width: 600px) {
  .lightbox-overlay { padding: 20px; }
  .lightbox-prev, .lightbox-next { width: 38px; height: 38px; font-size: 1.1rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: 12px; right: 12px; }
}