#et-main-area.modal-active,
.custom_galerie.modal-active {
  z-index: 99999;
  position: relative;
}


.custom_lightbox-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

/* Contenu principal */
.custom_lightbox-modal_content {
  position: relative;
  margin: auto;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow:hidden;
}

/* Les slides */
.custom_lightbox-mySlides {
  display: none;
  text-align: center;
  height: 100%; 
}

.custom_lightbox-mySlides::after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
    background-image: linear-gradient(
      180deg, 
      rgba(0, 0, 0, 0.4) 7%, 
      rgba(0, 0, 0, 0.05) 40%, 
      rgba(0, 0, 0, 0.05) 50%, 
      rgba(0, 0, 0, 0.05) 60%, 
      rgba(0, 0, 0, 0.4) 93%);
  z-index: 0;
  width: 100%;
  height: 100%;
}


.custom_lightbox-mySlides img {
  width: 100%;
  height: 100vh;
  object-fit: cover;
}

.custom_lightbox-close,
.custom_lightbox-prev,
.custom_lightbox-next {
  position: absolute;
  width: 40px;
  height:40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  z-index: 9999;
  background-color: #fff;
  padding: 4px;
  border-radius: 100px;
}

.custom_lightbox-close:hover::before,
.custom_lightbox-prev:hover::before,
.custom_lightbox-next:hover::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: #fff;
    position: absolute;
    inset: 0;
    border-radius: 100px;
    z-index: -1;
    opacity: 0;
    transition: all .3s ease-in-out;
}

.custom_lightbox-close:hover::before,
.custom_lightbox-prev:hover::before,
.custom_lightbox-next:hover::before {
  opacity: 1;
}

/* Bouton fermeture */
.custom_lightbox-close {
  top: 6vw;
  right: 6vw;
}

/* Flèches */
.custom_lightbox-prev,
.custom_lightbox-next {
  top: 50%;
}

.custom_lightbox-prev .prev-icon,
.custom_lightbox-next .next-icon,
.custom_lightbox-close .close-icon {
  font-family: ETmodules !important;
  font-weight: 400 !important;
  color: #000000;
  font-size: 30px;
  margin-bottom: -3px;
}


.custom_lightbox-prev {
  left: 6vw;
}
.custom_lightbox-next {
  right: 6vw;
}

.custom_lightbox-prev:hover,
.custom_lightbox-next:hover {
  background-color: rgba(0, 0, 0, 0.6);
}

/* Caption */
.caption-container {
  text-align: center;
  color: #f2f2f2;
  padding: 8px;
}

/* Miniatures */
.custom_lightbox-thumb_wrapper {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 10px;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 100%;
  width: 100%;
}

.custom_lightbox-thumb_column {
  flex: 0 0 100px;
  margin: 5px;
  z-index: 100;
}

.custom_lightbox-thumb_column img {
  width: 100%;
  opacity: 1;
  cursor: pointer;
  border-radius: 6px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.custom_lightbox-thumb_column img.active,
.custom_lightbox-thumb_column img:hover {
  opacity: 1;
  border: 2px solid white;
}

@media screen and (max-width:1200px) {
  .custom_lightbox-thumb_column {
    flex: 0 0 80px;
  }
}


@media screen and (max-width:980px) {
  .custom_lightbox-thumb_column {
    flex: 0 0 60px;
  }
}


@media screen and (max-width:768px) {
  .custom_lightbox-thumb_column {
    flex: 0 0 40px;
  }
}




