/* HG 1.5.1 – Lightbox d'œuvre : seule l'icône est cliquable. */
.hg-zoom-oeuvre-target {
  position: relative !important;
}
/* Le conteneur de l'image Divi est normalement déjà inline-block. */
.et_pb_image_wrap.hg-zoom-oeuvre-target { position: relative !important; }
.hg-zoom-oeuvre-image-box {
  display: inline-block;
  max-width: 100%;
  margin: 0;
  line-height: 0;
  vertical-align: top;
}
.hg-zoom-oeuvre-image {
  display: block;
  max-width: 100%;
  height: auto;
}
.hg-zoom-oeuvre-trigger {
  position: absolute;
  z-index: 10;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  cursor: zoom-in;
  line-height: 0;
  appearance: none;
  -webkit-appearance: none;
  transition: opacity .2s ease;
}
.hg-zoom-oeuvre-trigger:hover,
.hg-zoom-oeuvre-trigger:focus-visible {
  background: transparent;
  box-shadow: none;
  opacity: .86;
}
.hg-zoom-oeuvre-trigger:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.hg-zoom-oeuvre-trigger .hg-zoom-oeuvre-icon {
  display: block;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
}
/* La balise du shortcode ne doit pas laisser d'espace sous l'image. */
.hg-zoom-oeuvre-slot { display: inline-block; }
.hg-zoom-oeuvre-source-module { display: none !important; }
/* Si aucun module Image n'est trouvé, le bouton reste accessible en ligne. */
.hg-zoom-oeuvre-slot > .hg-zoom-oeuvre-trigger { position: static; }
.hg-zoom-oeuvre-modal-open { overflow: hidden !important; }
.hg-zoom-oeuvre-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 52px 20px 24px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, .94);
}
.hg-zoom-oeuvre-dialog {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}
.hg-zoom-oeuvre-modal-image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(96vw, 1800px);
  max-height: calc(100dvh - 80px);
  object-fit: contain;
}
.hg-zoom-oeuvre-close {
  position: absolute;
  top: 12px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  font: 300 32px/1 Arial, sans-serif;
  cursor: pointer;
}
.hg-zoom-oeuvre-close:hover,
.hg-zoom-oeuvre-close:focus-visible { background: rgba(255, 255, 255, .3); }
.hg-zoom-oeuvre-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 767px) {
  .hg-zoom-oeuvre-trigger { right: 8px; bottom: 8px; }
  .hg-zoom-oeuvre-modal { padding: 56px 8px 16px; }
  .hg-zoom-oeuvre-modal-image { max-width: calc(100vw - 16px); max-height: calc(100dvh - 72px); }
}
@media (prefers-reduced-motion: reduce) {
  .hg-zoom-oeuvre-trigger { transition: none; }
}
