.superzoom {
  position: relative;
  text-align: center;
}

.superzoom-container {
  position: relative;
  display: inline-block;
}


/* ========== MODE NAVBAR : Style de base ========== */


.superzoom-navbar-btn {
  /* Réinitialisation des styles du mode photo */
  position: static !important;
  left: auto !important;
  top: auto !important;
  width: auto !important;
  height: auto !important;
  
  /* Style de base */
  display: inline-block !important;
  vertical-align: middle !important;
  text-decoration: none;
  cursor: pointer;
  padding: 0.375rem 0.75rem;
  margin: 0 0.25rem;
  
  /* Fond transparent */
  background-color: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 0.25rem;
  
  /*transition: all 0.15s ease-in-out;*/


}



.superzoom-navbar-btn:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  text-decoration: none;
}

/* L'icône SVG 
.superzoom-navbar-btn svg {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  display: inline-block;
} */

.superzoom-navbar-btn svg path {
  stroke: #fff;
}

/* ========== Adaptations spécifiques par thème ========== */

/* Bootstrap Darkroom : navbar contextuelle 
.navbar-contextual .superzoom-navbar-btn svg path {
  stroke: #fff !important; 
} */ 

/* ========== Ajustement vertical pour modus et elegant ========== */

/* Modus : décalage vers le haut */
body.theme-modus .superzoom-navbar-btn {
  margin-top: -6px !important;
}

/* Elegant : décalage vers le haut */
body.theme-elegant .superzoom-navbar-btn {
  margin-top: -8px !important;
}

/* ========== MODE PHOTO : Position par défaut à côté de la photo ========== */
.superzoom-btn-open {
  position: absolute;
  top: 0;
  left: calc(100% + 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  box-shadow: none;
  border: 0;
  border-radius: 3px;
  aspect-ratio: 1;
  cursor: pointer;
  z-index: 10;
  width: 42px;
  height: 42px;
}

.superzoom-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  margin: auto;
}

.superzoom-wrapper > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.superzoom-viewport {
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}

.superzoom-content img {
  width: auto;
  height: auto;
  margin: auto;
  max-width: none !important;
}

.superzoom-dialog-controls {
  position: absolute;
  top: 1rem;
  right: 2rem;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.superzoom-dialog-controls .superzoom-dialog-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  box-shadow: none;
  border: 0;
  border-radius: 3px;
  aspect-ratio: 1;
  cursor: pointer;
  z-index: 10;
}

.superzoom-dialog {
  position: fixed;
  display: block;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  overflow: hidden;
  padding: 0;
  margin: 0;
  border: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
  background: #000;
}

.superzoom-dialog[open] {
  animation: animation-open-modal .3s cubic-bezier(.25,0,.3,1) forwards;
}

.superzoom-dialog:not([open]) {
  pointer-events: none;
  opacity: 0;
}

@keyframes animation-open-modal {
  0% {
    opacity: 0;
    transform: scale(.75);
  }
}


/* Mobile : on désactive en n'affichant pas le bouton loupe  */
@media screen and (max-width: 767px) {
  .superzoom-btn-open {
    display: none !important;
  }
}