@charset "UTF-8";
/* ============================================================
   GALERIE PHOTO - CSS FRONTEND
   À inclure dans le template front pour l'affichage des galeries
   ============================================================ */
/* ----- Base ----- */
/* ============================================================
   MODE MASONRY (CSS columns)
   ============================================================ */
/* Masonry : les formats dictent la hauteur naturelle de l'image */
/* ============================================================
   MODE GRILLE (CSS Grid, hauteur uniforme par ligne)
   ============================================================ */
/* Grille : forcer un ratio uniforme par défaut (carré) */
/* Grille : permettre aux formats de changer le ratio */
/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Tablette */
/* Mobile */
/* ============================================================
   LIGHTBOX
   ============================================================ */
/* Caption lightbox */
/* Navigation arrows */
/* Close */
/* Counter */
.photo-gallery {
  --gallery-columns: 3;
  --gallery-gap: 10px;
  margin: 30px 0;
}

.photo-gallery__item {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 4px;
  position: relative;
}

.photo-gallery__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.photo-gallery__link {
  display: block;
  overflow: hidden;
  border-radius: 4px;
  position: relative;
}
.photo-gallery__link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  pointer-events: none;
}
.photo-gallery__link:hover::after {
  background: rgba(0, 0, 0, 0.15);
}
.photo-gallery__link:hover .photo-gallery__img {
  transform: scale(1.05);
}

.photo-gallery__caption {
  padding: 8px 4px;
  font-size: 13px;
  color: #555;
  text-align: center;
  line-height: 1.4;
}

.photo-gallery--masonry {
  column-count: var(--gallery-columns);
  gap: var(--gallery-gap);
}
.photo-gallery--masonry .photo-gallery__item {
  break-inside: avoid;
  margin-bottom: var(--gallery-gap);
  display: inline-block;
  width: 100%;
  margin-bottom: calc(var(--gallery-gap) - 5px);
}
.photo-gallery--masonry .photo-gallery__item--landscape .photo-gallery__img {
  aspect-ratio: 3/2;
}
.photo-gallery--masonry .photo-gallery__item--square .photo-gallery__img {
  aspect-ratio: 1/1;
}
.photo-gallery--masonry .photo-gallery__item--portrait .photo-gallery__img {
  aspect-ratio: 2/3;
}

.photo-gallery--grid {
  display: grid;
  grid-template-columns: repeat(var(--gallery-columns), 1fr);
  gap: var(--gallery-gap);
}
.photo-gallery--grid .photo-gallery__item {
  overflow: hidden;
}
.photo-gallery--grid .photo-gallery__item > .photo-gallery__img {
  aspect-ratio: 1/1;
}
.photo-gallery--grid .photo-gallery__link {
  aspect-ratio: 1/1;
}
.photo-gallery--grid .photo-gallery__item--landscape .photo-gallery__link {
  aspect-ratio: 3/2;
}
.photo-gallery--grid .photo-gallery__item--landscape > .photo-gallery__img {
  aspect-ratio: 3/2;
}
.photo-gallery--grid .photo-gallery__item--square .photo-gallery__link {
  aspect-ratio: 1/1;
}
.photo-gallery--grid .photo-gallery__item--square > .photo-gallery__img {
  aspect-ratio: 1/1;
}
.photo-gallery--grid .photo-gallery__item--portrait .photo-gallery__link {
  aspect-ratio: 2/3;
}
.photo-gallery--grid .photo-gallery__item--portrait > .photo-gallery__img {
  aspect-ratio: 2/3;
}
.photo-gallery--grid .photo-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: zoom-out;
}

.photo-lightbox-overlay.active {
  opacity: 1;
}
.photo-lightbox-overlay.active .photo-lightbox-content img {
  transform: scale(1);
}

.photo-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-lightbox-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  cursor: default;
}

.photo-lightbox-caption {
  position: absolute;
  bottom: -40px;
  left: 0;
  right: 0;
  text-align: center;
  color: #ccc;
  font-size: 14px;
  line-height: 1.5;
}

.photo-lightbox-prev {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 32px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
  line-height: 1;
  left: 20px;
}
.photo-lightbox-prev:hover {
  background: rgba(255, 255, 255, 0.25);
}

.photo-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 32px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
  line-height: 1;
  right: 20px;
}
.photo-lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}

.photo-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
  line-height: 1;
}
.photo-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.photo-lightbox-counter {
  position: absolute;
  top: 20px;
  left: 20px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  z-index: 10;
}

@media (max-width: 991px) {
  .photo-gallery--masonry {
    column-count: 2;
  }
  .photo-gallery--grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 575px) {
  .photo-gallery--masonry {
    column-count: 1;
  }
  .photo-gallery--grid {
    grid-template-columns: 1fr;
  }
}

/*# sourceMappingURL=photo-gallery.css.map */
