/* =========================
   BASE PAGE GALLERY
========================= */

.gallery-page {
  min-height: 100vh;
}

/* Blur age restriction */
body.blurred main,
body.blurred header,
body.blurred footer {
  filter: blur(10px);
  pointer-events: none;
  user-select: none;
}

/* =========================
   AGE GATE
========================= */

.age-gate {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.age-gate-box {
  max-width: 600px;
  background: #111;
  color: #fff;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  font-family: Inter, sans-serif;
}

.age-gate-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  gap: 10px;
}

.age-gate-actions button {
  flex: 1;
  padding: 10px;
  cursor: pointer;
  border: none;
  border-radius: 6px;
}

#enterBtn {
  background: white;
  color: black;
}

#leaveBtn {
  background: #333;
  color: white;
}

/* =========================
   HERO GALLERY
========================= */

.gallery-hero {
  position: relative;
  min-height: 10vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 40px 80px;
  overflow: hidden;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(8,12,9,0.3), rgba(8,12,9,0.96));
}

.gallery-intro {
  position: relative;
  z-index: 2;
  max-width: 850px;
}

.section-label {
  font-family: 'Playfair Display', serif; /* ou Inter, Montserrat, etc */
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(199,211,194,0.65);
  display: inline-block;
  margin-bottom: 12px;
}

.gallery-intro h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 300;
  margin-bottom: 50px;
}

.gallery-intro p {
  color: rgba(199,211,194,0.72);
  line-height: 1.8;
}

/* =========================
   WRAPPER
========================= */

.gallery-wrapper {
  padding: 80px 6vw 140px;
}

/* =========================
   GRID
========================= */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

/* responsive */
@media (max-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   ITEMS (CORRECTION IMPORTANTE)
========================= */

.gallery-item {
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* ✔ CORRECTION CLÉ ICI */
.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;   /* garantit les miniatures carrées */
  object-fit: cover;
  display: block;
  transition: transform 0.7s ease, opacity 0.4s ease;
  filter: brightness(0.95);
}

/* focus points */
.focus-top img {
  object-position: 50% 20%;
}

.focus-center img {
  object-position: 50% 50%;
}

.focus-bottom img {
  object-position: 50% 80%;
}

.focus-left img {
  object-position: 20% 50%;
}

.focus-right img {
  object-position: 80% 50%;
}

/* hover */
.gallery-item:hover img {
  transform: scale(1.03);
  opacity: 0.92;
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8,12,9,0.12);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* =========================
   LIGHTGALLERY FIX
========================= */

.lg-backdrop {
  background: rgba(8,12,9,0.97) !important;
}

.lg-toolbar,
.lg-actions {
  background: transparent !important;
}

.lg-icon {
  color: #c7d3c2 !important;
}

.lg-sub-html {
  display: none;
}


/* =========================
   MOBILE OPTIMIZATION
========================= */
@media (max-width: 768px) {

  /* HERO */
  .gallery-hero {
    padding: 80px 20px 50px !important;
    min-height: auto;
  }

  .gallery-intro {
    max-width: 100%;
  }

  .gallery-intro h1 {
    font-size: 2.2rem;
    line-height: 1.1;
  }

  .gallery-intro p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  /* WRAPPER */
  .gallery-wrapper {
    padding: 40px 16px 80px !important;
  }

  /* GRID */
  .gallery-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* ITEMS */
  .gallery-item {
    width: 100%;
  }

  .gallery-item img {
    width: 100%;
    aspect-ratio: auto !important;
    height: auto;
    object-fit: cover;
  }

  /* AGE GATE */
  .age-gate-box {
    width: calc(100% - 30px);
    padding: 24px;
  }

  .age-gate-actions {
    flex-direction: column;
  }

}