#gallery button img {
  object-fit: cover;
}

/* Carrousel galerie — styles autonomes (ne dépend pas du purge Tailwind) */

.sl-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.92);
  box-sizing: border-box;
}

.sl-gallery-lightbox[hidden] {
  display: none !important;
}

.sl-gallery-lightbox__figure {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  min-height: 0;
  margin: 0;
}

.sl-gallery-lightbox__media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

.sl-gallery-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: min(85vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.sl-gallery-lightbox__caption {
  margin: 0.75rem 0 0;
  padding: 0 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
}

.sl-gallery-lightbox__counter {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.sl-gallery-lightbox__btn {
  position: absolute;
  border: none;
  cursor: pointer;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  line-height: 1;
  transition: background 0.2s ease;
}

.sl-gallery-lightbox__btn:hover,
.sl-gallery-lightbox__btn:focus-visible {
  background: rgba(0, 0, 0, 0.8);
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

.sl-gallery-lightbox__btn--close {
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  padding: 0.25rem 0.65rem;
  font-size: 2rem;
  border-radius: 9999px;
}

.sl-gallery-lightbox__btn--prev,
.sl-gallery-lightbox__btn--next {
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  padding: 0.5rem 0.85rem;
  font-size: 2.25rem;
  border-radius: 9999px;
}

.sl-gallery-lightbox__btn--prev {
  left: 0.5rem;
}

.sl-gallery-lightbox__btn--next {
  right: 0.5rem;
}

#gallerie > [hidden],
#gallerie [data-gallery-slot][hidden],
#gallerie [data-sl-gallery-slot][hidden] {
  display: none !important;
}

#gallerie img.sl-gallery-thumb {
  cursor: pointer;
  pointer-events: auto;
}
