/* ===================================================
   PAGE GALERIE — Gertrude Festival 2026
   Hero navy + arches, grille masonry sur fond clair
   (cohérent avec la refonte index : coins arrondis,
   ombres douces, lift au survol)
   =================================================== */

/* ── HERO ────────────────────────────────────────── */
.galerie-hero {
  position: relative;
  min-height: 68vh;
  background: #000026;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 0 6vw 9vh;
}

.galerie-hero .arches-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.galerie-hero .hero-arches {
  width: 100%;
  height: 100%;
}

.galerie-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 38, 0.80) 0%,
    rgba(0, 0, 38, 0.40) 45%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
}

.galerie-hero .hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
}

.galerie-hero .hero-eyebrow {
  font-family: 'Roboto Flex', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(0.68rem, 1.3vw, 0.82rem);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #FEC00E;
  margin-bottom: 18px;
}

.galerie-hero .hero-title {
  font-family: 'Classica', Georgia, serif;
  font-weight: 700;
  font-size: clamp(4.5rem, 13vw, 11rem);
  line-height: 0.85;
  text-transform: uppercase;
  color: #FFDE00;
  margin-bottom: 24px;
  letter-spacing: .01em;
}

.galerie-hero .hero-title .line2 {
  display: block;
  margin-left: clamp(2rem, 10vw, 8rem);
  margin-top: -0.06em;
  color: #FFFFFF;
}

.galerie-hero .hero-sub {
  font-family: 'Classica', sans-serif;
  font-weight: 400;
  font-size: clamp(0.8rem, 1.6vw, 1.1rem);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72); /* contraste AA sur fond navy */
}

/* ── SECTION ─────────────────────────────────────── */
.galerie-section {
  background: #fff;
  padding: 80px 6vw 100px;
  min-height: 60vh;
}

/* ── GRILLE MASONRY ──────────────────────────────── */
.galerie-grid {
  columns: 4;
  column-gap: 20px;
  max-width: 1480px;
  margin: 0 auto;
}

.galerie-item {
  break-inside: avoid;
  margin: 0 0 20px;
  overflow: hidden;
  border-radius: 16px;
  cursor: zoom-in;
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 0, 38, 0.12);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.6s ease; /* préserve le fondu .reveal */
}

.galerie-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 50px rgba(0, 0, 38, 0.28);
}

/* Voile navy + loupe au survol */
.galerie-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 38, 0.45), rgba(0, 0, 38, 0) 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.galerie-item:hover::after { opacity: 1; }

.galerie-img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1.001);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  background: #e9eaef; /* placeholder pendant le lazy-load */
}

.galerie-item:hover .galerie-img { transform: scale(1.045); }

.galerie-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFDE00;
  color: #000026;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.galerie-item:hover .galerie-zoom {
  opacity: 1;
  transform: translateY(0);
}

/* Animation reveal mutualisée dans reveal.css ; ici le hover reprend la main
   une fois la photo révélée. */
.galerie-item.reveal.visible:hover {
  transform: translateY(-6px);
}

/* ── LIGHTBOX ────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 20, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
}

/* petit glissement à chaque changement de photo */
@keyframes lb-slide-left {
  from { opacity: 0; transform: translateX(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes lb-slide-right {
  from { opacity: 0; transform: translateX(-26px); }
  to   { opacity: 1; transform: none; }
}
.lightbox-img.slide-left  { animation: lb-slide-left  0.32s cubic-bezier(0.22, 1, 0.36, 1); }
.lightbox-img.slide-right { animation: lb-slide-right 0.32s cubic-bezier(0.22, 1, 0.36, 1); }

/* Boutons ronds, cohérents avec les chips du site */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  z-index: 10000;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: #FFDE00;
  border-color: #FFDE00;
  color: #000026;
  transform: scale(1.06);
}

.lightbox-close { top: 22px; right: 24px; }
.lightbox-prev  { left: 22px;  top: 50%; margin-top: -23px; }
.lightbox-next  { right: 22px; top: 50%; margin-top: -23px; }

.lightbox-counter {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Roboto Flex', system-ui, sans-serif;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.72rem;
  letter-spacing: .22em;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 8px 18px;
  margin: 0;
  z-index: 10000;
}

body.lightbox-open { overflow: hidden; }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 1200px) {
  .galerie-grid { columns: 3; }
}

@media (max-width: 1024px) {
  .galerie-hero {
    min-height: 60vh;
    padding: 80px 6vw 7vh;
  }

  .galerie-hero .hero-title {
    font-size: clamp(3.5rem, 11vw, 7rem);
  }

  .galerie-section { padding: 60px 5vw 80px; }
}

@media (max-width: 640px) {
  .galerie-grid {
    columns: 2;
    column-gap: 12px;
  }

  .galerie-item {
    margin-bottom: 12px;
    border-radius: 12px;
  }

  .galerie-zoom { display: none; } /* pas de hover sur mobile */

  .galerie-section { padding: 44px 4vw 60px; }

  .lightbox-close { top: 14px; right: 14px; }
  .lightbox-prev  { left: 10px; }
  .lightbox-next  { right: 10px; }
  .lightbox-prev, .lightbox-next, .lightbox-close {
    width: 40px;
    height: 40px;
  }
}
