/* Conteneur général */
.am-source-gallery {
  margin: 2rem 0;
}

/* Image principale */
.am-gallery-main {
  margin-bottom: 1rem;
  text-align: center;
}

.am-gallery-main-img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

/* Bande de miniatures */
.am-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.am-gallery-thumb {
  flex: 0 0 auto;
  width: 120px;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.am-gallery-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

/* Hover + active */
.am-gallery-thumb:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.am-gallery-thumb.am-thumb--active {
  opacity: 1;
  border-color: #111;
}

/* Mobile */
@media (max-width: 600px) {
  .am-gallery-thumb {
    width: 80px;
  }
}
/* ---------- LIGHTBOX ---------- */

.am-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 9999;
}

.am-lightbox--visible {
  opacity: 1;
  visibility: visible;
}

.am-lightbox__inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.am-lightbox__img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  border-radius: 8px;
}

/* Bouton fermer */
.am-lightbox__close {
  position: absolute;
  top: -10px;
  right: -10px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 22px;
  line-height: 30px;
  cursor: pointer;
}

/* Flèches de navigation */
.am-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  width: 40px;
  height: 60px;
  font-size: 26px;
  cursor: pointer;
}

.am-lightbox__nav--prev {
  left: -50px;
}

.am-lightbox__nav--next {
  right: -50px;
}

@media (max-width: 768px) {
  .am-lightbox__nav--prev {
    left: -30px;
  }
  .am-lightbox__nav--next {
    right: -30px;
  }
}
