/* === LIGHTBOX === */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 0;
  touch-action: none;
}
.lightbox.is-open { display: flex; }
.lightbox-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.25s ease;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}
.lightbox-img.is-zoomed {
  transform: scale(2);
  cursor: zoom-out;
}
.lightbox-img.is-pannable {
  cursor: grab;
}
.lightbox-img.is-pannable:active {
  cursor: grabbing;
}
.lightbox-counter {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.4em 0.8em;
  border-radius: 2px;
  letter-spacing: 0.05em;
  pointer-events: none;
  z-index: 2;
}
.lightbox-caption {
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.4);
  padding: 0.4em 0.8em;
  border-radius: 2px;
  max-width: 90vw;
  text-align: center;
  pointer-events: none;
  z-index: 2;
}
.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  padding: 0;
  border-radius: 0;
  z-index: 2;
  transition: background 0.15s;
}
.lightbox-btn:hover, .lightbox-btn:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}
.lightbox-btn svg { width: 24px; height: 24px; }
.lightbox-btn-prev { left: 8px; }
.lightbox-btn-next { right: 8px; }
.lightbox-btn-close {
  top: 12px; right: 12px; transform: none;
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.3);
}
@media (min-width: 768px) {
  .lightbox-btn { width: 56px; height: 56px; }
  .lightbox-btn svg { width: 28px; height: 28px; }
  .lightbox-btn-prev { left: 24px; }
  .lightbox-btn-next { right: 24px; }
  .lightbox-btn-close { top: 24px; right: 24px; }
}
/* Hide nav buttons on mobile edge swipe zones (use swipe gestures instead) */

/* === Cursor: scan-item devient cliquable === */
.scan-item, .sommaire-figure {
  cursor: zoom-in;
  position: relative;
}
.scan-item:hover, .sommaire-figure:hover {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}
