/* ========== 1. IMAGE ZOOMABLE ========== */

img.visu.zoomable {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 18px auto;
  border-radius: 12px;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}


/* ========== 2. OVERLAY DE FOND ========== */

.zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: none;
  background: rgba(0, 0, 0, 0.86);
}

.zoom-overlay.is-open {
  display: block;
}

body.no-scroll {
  overflow: hidden;
}


/* ========== 3. VIEWER ZOOM ========== */

.zoom-viewer {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 12px 42px;
}

.zoom-viewer.is-open {
  display: flex;
}

.zoom-box {
  display: grid;
  justify-items: center;
  gap: 10px;

  width: min(98vw, 1800px);
  max-height: 96vh;
}


/* ========== 4. IMAGE AGRANDIE ========== */

.zoom-big {
  max-width: 100%;
  max-height: 92vh;
  border-radius: 14px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
  cursor: pointer;

  transform: scale(1.40);
  transform-origin: center;
}


/* ========== 5. LÉGENDE ========== */

.zoom-cap {
  color: #fff;
  opacity: 0.95;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}


/* ========== 6. BOUTONS ========== */

/* masque les flèches si elles existent encore dans le HTML */
.zoom-btn.zoom-prev,
.zoom-btn.zoom-next {
  display: none !important;
}

.zoom-close {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 100000;

  border: 0;
  border-radius: 999px;
  padding: 10px 14px;

  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.zoom-close:hover {
  background: rgba(255, 255, 255, 0.22);
}


/* ========== 7. RESPONSIVE ========== */

@media (max-width: 768px) {
  .zoom-viewer {
    padding: 10px 16px;
  }

  .zoom-big {
    max-height: 88vh;
    transform: scale(1.12);
  }
}