/* =====================================================================
   GALERIE PHOTOS — css/gallery.css
   CSS spécifique à gallery.php (le reste : topbar, navbar, sidebar,
   footer, boutons flottants, .reveal, variables — vient de css/common.css)
   ===================================================================== */

/* ---------- HERO ---------- */
.hero {
  background: var(--green-dark);
  min-height: 44vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("https://images.unsplash.com/photo-1547970810-dc1eac37d174?w=1920&q=80")
    center/cover;
  opacity: 0.28;
}
.hero-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 40px 60px;
  max-width: 800px;
  animation: fadeInUp 0.9s ease both;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff12;
  border: 1px solid #ffffff25;
  color: var(--gold);
  font-size: 11px;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  width: fit-content;
  animation: float 3.5s ease-in-out infinite;
}
.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: #fff;
  line-height: 1.15;
  margin-bottom: 12px;
}
.hero h1 em {
  color: var(--gold);
  font-style: italic;
}
.hero-sub {
  color: #9fc9af;
  font-size: 14px;
  line-height: 1.75;
  max-width: 520px;
}

/* ---------- BREADCRUMB ---------- */
.breadcrumb {
  background: var(--off-white);
  padding: 12px 40px;
  border-bottom: 1px solid #e8ede8;
}
.breadcrumb-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--gray);
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--green-mid);
  text-decoration: none;
}

/* ---------- SECTION GALERIE ---------- */
.gallery-section {
  padding: 60px 40px;
}
.gallery-inner {
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------- ONGLETS CATÉGORIES ---------- */
.gallery-tabs-wrap {
  margin-bottom: 40px;
}
.gallery-tabs-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray);
  margin-bottom: 14px;
}
.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gtab {
  padding: 9px 20px;
  border-radius: 25px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid #d8e8d8;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.25s;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 7px;
}
.gtab:hover {
  border-color: var(--green-mid);
  color: var(--green-mid);
}
.gtab.active {
  background: var(--green-dark);
  color: var(--gold);
  border-color: var(--green-dark);
}
.gtab-count {
  background: rgba(255, 255, 255, 0.2);
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 10px;
}
.gtab.active .gtab-count {
  background: rgba(255, 255, 255, 0.15);
}

/* ---------- GRILLE ---------- */
.gallery-grid {
  columns: 4;
  column-gap: 14px;
  transition: opacity 0.3s;
}
.gallery-grid.loading {
  opacity: 0;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 14px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  display: block;
}
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.45s ease;
}
.gallery-item:hover img {
  transform: scale(1.06);
}
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 58, 42, 0.85),
    rgba(26, 58, 42, 0.05)
  );
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}
.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}
.gallery-item-title {
  font-family: "Playfair Display", serif;
  color: #fff;
  font-size: 14px;
  margin-bottom: 4px;
}
.gallery-item-cat {
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
}
.gallery-item-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s;
}
.gallery-item:hover .gallery-item-zoom {
  opacity: 1;
  transform: scale(1);
}

/* ---------- ÉTAT VIDE ---------- */
.gallery-empty {
  text-align: center;
  padding: 60px 20px;
  display: none;
}
.gallery-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.gallery-empty p {
  color: var(--gray);
  font-size: 14px;
}

/* ---------- VOIR PLUS ---------- */
.load-more-wrap {
  text-align: center;
  margin-top: 44px;
}
.btn-load-more {
  background: #fff;
  border: 2px solid var(--green-mid);
  color: var(--green-mid);
  padding: 12px 32px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  font-family: "DM Sans", sans-serif;
}
.btn-load-more:hover {
  background: var(--green-mid);
  color: #fff;
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.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-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-caption {
  margin-top: 14px;
  text-align: center;
}
.lightbox-caption-title {
  font-family: "Playfair Display", serif;
  color: #fff;
  font-size: 16px;
  margin-bottom: 4px;
}
.lightbox-caption-cat {
  color: var(--gold);
  font-size: 12px;
}
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-prev {
  left: 20px;
}
.lightbox-next {
  right: 20px;
}
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}
.lightbox-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

/* ---------- CTA BANNER ---------- */
.cta-banner {
  background: var(--green-mid);
  padding: 26px 40px;
}
.cta-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cta-icon {
  font-size: 30px;
  margin-right: 14px;
  animation: float 3.5s ease-in-out infinite;
}
.cta-text h3 {
  font-family: "Playfair Display", serif;
  color: #fff;
  font-size: 19px;
}
.cta-text p {
  color: #9fc9af;
  font-size: 13px;
  margin-top: 3px;
}
.btn-cta {
  background: var(--gold);
  color: var(--green-dark);
  padding: 11px 26px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.3s;
}
.btn-cta:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .gallery-grid {
    columns: 3;
  }
}
@media (max-width: 900px) {
  .hero-content {
    padding: 55px 20px 40px;
  }
  .breadcrumb {
    padding: 10px 20px;
  }
  .gallery-section {
    padding: 40px 20px;
  }
  .gallery-grid {
    columns: 2;
  }
  .cta-inner {
    flex-direction: column;
    text-align: center;
  }
  .lightbox-prev {
    left: 8px;
  }
  .lightbox-next {
    right: 8px;
  }
}
@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.9rem;
  }
  .gallery-grid {
    columns: 1;
  }
  .gtab {
    font-size: 12px;
    padding: 8px 14px;
  }
}
