.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
}

.lightbox.is-open { display: block; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.82);
}

.lightbox-dialog {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 120px; /* marge “large” autour du contenu */
}

.lightbox-figure {
  margin: 0;
  /* Le contenu ne doit JAMAIS prendre toute la page */
  width: auto;
  height: auto;
  max-width: min(1100px, 72vw);
  max-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  /* containment strict dans le viewport (avec les marges de la dialog) */
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none; /* évite clic droit direct sur l'image */
}

.lightbox-btn {
  position: absolute;
  top: 24px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.lightbox-close { right: 24px; }

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-btn:hover { background: rgba(0,0,0,0.65); }

@media (max-width: 980px) {
  .lightbox-dialog { padding: 72px 16px; }
  .lightbox-figure { max-width: 92vw; max-height: 70vh; }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
  .lightbox-close { right: 12px; }
}

