/* ═══════════════════════════════════════════════════════
   MASK PROD Studio — gallery.css
   Page galerie : hero, filtres, grille masonry, lightbox
═══════════════════════════════════════════════════════ */

/* ── Gallery hero ────────────────────────────────────── */
.gallery-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.gallery-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../img/hero-background-marrakech.jpg');
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.04);
}
.gallery-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8,8,8,0.82) 0%,
    rgba(8,8,8,0.55) 40%,
    rgba(8,8,8,0.90) 75%,
    rgba(8,8,8,1) 100%
  );
}
.gallery-hero-content {
  position: relative;
  z-index: 10;
  max-width: 1260px;
  margin: 0 auto;
  width: 100%;
  padding: 120px 60px 60px;
}
.gallery-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(40px, 5.5vw, 76px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1.5px;
  color: var(--cream);
  margin-bottom: 20px;
}
.gallery-hero-sub {
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.8;
  color: var(--cream-muted);
  max-width: 560px;
}

/* ── Gallery stats band ──────────────────────────────── */
.gallery-stats {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 24px 60px;
  background: rgba(8,8,8,0.65);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass);
}
.gallery-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.gallery-stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
}
.gallery-stat-lbl {
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cream-muted);
}

/* ── Section main gallery ────────────────────────────── */
#gallery-main {
  background: var(--bg-primary);
  padding: 80px 60px 100px;
}

/* ── Filtres ─────────────────────────────────────────── */
.gallery-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}
.filter-btn {
  padding: 10px 24px;
  background: transparent;
  border: 1px solid var(--border-glass);
  border-radius: 4px;
  color: var(--cream-muted);
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  cursor: none;
  transition: all 0.3s cubic-bezier(0.23,1,0.32,1);
}
.filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.filter-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--amber));
  border-color: transparent;
  color: #080808;
}

/* ── Gallery masonry grid ────────────────────────────── */
.gallery-grid {
  columns: 4;
  column-gap: 16px;
}
.gallery-item {
  break-inside: avoid;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  margin-bottom: 16px;
  cursor: none;
  transition: opacity 0.4s, transform 0.4s;
}
.gallery-item img {
  width: 100%;
  display: block;
  object-fit: cover;
  filter: brightness(0.88) contrast(1.05) saturate(0.92);
  transition: transform 0.6s cubic-bezier(0.23,1,0.32,1), filter 0.4s;
}
.gallery-item:hover img {
  transform: scale(1.06);
  filter: brightness(0.72) contrast(1.1) saturate(0.85);
}
.gallery-item.hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

/* Overlay au hover */
.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background: linear-gradient(to top, rgba(8,8,8,0.85) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.4s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-cat {
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.gallery-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  color: var(--cream);
  line-height: 1.3;
}
.gallery-zoom {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(8,8,8,0.6);
  border: 1px solid var(--border-glass-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  transition: background 0.3s;
}
.gallery-zoom svg { width: 16px; height: 16px; }
.gallery-zoom:hover { background: rgba(201,168,76,0.2); }

/* ── CTA section ─────────────────────────────────────── */
.gallery-cta {
  text-align: center;
  margin-top: 80px;
}

/* ── Lightbox ────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(4,4,4,0.96);
  backdrop-filter: blur(20px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-inner img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 40px 120px rgba(0,0,0,0.8);
}
.lightbox-caption {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
}
#lightboxCat {
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
}
#lightboxTitle {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--cream-muted);
  font-style: italic;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  cursor: pointer;
  transition: all 0.3s;
  z-index: 9001;
}
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev  { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(201,168,76,0.15);
  border-color: var(--gold);
  color: var(--gold);
}
.lightbox-close svg,
.lightbox-prev svg,
.lightbox-next svg { width: 20px; height: 20px; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1200px) {
  .gallery-grid { columns: 3; }
}
@media (max-width: 900px) {
  .gallery-hero-content { padding: 100px 30px 50px; }
  .gallery-stats { gap: 28px; padding: 20px 30px; }
  #gallery-main { padding: 60px 30px 80px; }
  .gallery-grid { columns: 2; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}
@media (max-width: 600px) {
  .gallery-hero { min-height: 50vh; }
  .gallery-hero-content { padding: 80px 16px 40px; }
  .gallery-stats { flex-direction: column; gap: 12px; padding: 20px 16px; }
  .gallery-stats > div[style] { display: none; }
  #gallery-main { padding: 40px 16px 60px; }
  .gallery-grid { columns: 1; }
  .gallery-filters { gap: 8px; }
  .filter-btn { padding: 8px 16px; font-size: 10px; }
}
