/* Default CSS */
/* Generated by the CoffeeCup HTML Editor - www.coffeecup.com */

/* ---- Galerie en cascade (masonry) en CSS pur ---- */   

:root {
  --gap:1rem;
  --text: #f4f4f2;
}

.gallery {
  max-width: 1200px;
  margin: 2rem auto 4rem;
  padding: 0 1.5rem;
  columns: 4 260px;  /* nb de colonnes indicatif + largeur min par colonne */
  column-gap: var(--gap);
}

.gallery figure {
  margin: 0 0 var(--gap);
  break-inside: avoid;      /* empêche une image d'être coupée entre 2 colonnes */
  border-radius: 6px;
  overflow: hidden;
  background: #1c1c1c;
  position: relative;
}

.gallery img {
  width: 100%;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.gallery figure:hover img {
  transform: scale(1.03);
}

.gallery figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.6rem 0.8rem;
  font-size: 1.5rem;
  color: var(--text);
  background: linear-gradient(to top, rgba(138,43,226,1), rgba(138,43,226,0.35));
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  text-align:center;
}

.gallery figure:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

/* Style de la modale lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  text-align: center;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85vh;
  margin: auto;
  display: block;
  box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: #bbb;
  text-decoration: none;
}

.lightbox-caption {
  margin: 15px auto;
  max-width: 80%;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  text-align: center;
}
/* ---- Responsive : moins de colonnes sur petits écrans ---- */
@media (max-width: 700px) {
  .gallery { columns: 2 180px; }
}

@media (max-width: 520px) {
  .gallery { columns: 1; }
}