/* ==========================================================================
   pages/photos.css — Galerie (photos.html)
   ========================================================================== */

.gallery-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.gallery-filters button {
  padding: 9px 18px; border-radius: 99px; border: 1px solid var(--line-2);
  background: var(--glass); font-weight: 600; font-size: .88rem; cursor: pointer;
}
.gallery-filters button[aria-pressed="true"] { background: var(--brass); color: var(--ink); border-color: var(--brass); }

.gallery { columns: 3 280px; column-gap: 14px; }
.gallery__item {
  display: block; width: 100%; margin-bottom: 14px; padding: 0; border: 0; cursor: zoom-in;
  border-radius: 14px; overflow: hidden; background: var(--ink-3); break-inside: avoid;
}
.gallery__item img { width: 100%; height: auto; transition: transform .4s ease; }
/* Pendant le chargement : une tuile propre (pas de texte de secours visible ni de saut de mise en page) */
.gallery__item img { min-height: 140px; object-fit: cover; color: transparent; font-size: 0; }
.gallery__item:hover img { transform: scale(1.04); }

/* Visionneuse */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(8, 6, 5, .94);
  display: flex; align-items: center; justify-content: center; padding: 40px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: 1100px; width: 100%; text-align: center; }
.lightbox img { max-height: 78vh; margin: 0 auto; border-radius: 12px; }
.lightbox figcaption { margin-top: 14px; color: var(--cream-2); }
.lightbox button {
  position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-2);
  background: rgba(0,0,0,.4); font-size: 1.4rem; cursor: pointer;
}
.lightbox [data-close] { top: 20px; right: 20px; }
.lightbox [data-prev]  { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox [data-next]  { right: 20px; top: 50%; transform: translateY(-50%); }

@media (max-width: 720px) {
  .gallery { columns: 2; column-gap: 8px; }
  .gallery__item { margin-bottom: 8px; border-radius: 10px; }
  .gallery-filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)) 20px; padding: 0 var(--gutter); scrollbar-width: none; }
  .gallery-filters button { flex-shrink: 0; }
}
@media (max-width: 520px) {
  .lightbox { padding: 16px; }
  .lightbox [data-prev], .lightbox [data-next] { top: auto; bottom: 20px; transform: none; }
}
