/* =========================================================
   Pages : Galerie détaillée
   Reusable CSS for all photo gallery pages
   ========================================================= */

.gallery-detail-page {
  background:
    radial-gradient(circle at 8% 18%, rgba(248, 222, 196, 0.18), transparent 18%),
    radial-gradient(circle at 94% 10%, rgba(224, 232, 206, 0.26), transparent 22%),
    var(--cream, #fffdf8);
}

.gallery-detail-section {
  width: calc(100% - 96px);
  max-width: 1320px;
  margin: 0 auto;
  padding: 52px 0 58px;
}

/* Header */

.gallery-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 30px;
}

.gallery-detail-icon {
  display: block;
  width: 82px;
  height: 82px;
  object-fit: contain;
  flex: 0 0 82px;
}

.gallery-detail-title-wrap h1 {
  margin: 0;
  color: var(--gallery-title-color, var(--green, #2b625b));
  font-family: var(--script, "Caveat", cursive);
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 700;
  line-height: 0.95;
}

.gallery-title-green {
  --gallery-title-color: var(--green, #2b625b);
}

.gallery-title-orange {
  --gallery-title-color: var(--terracotta, #c95b3d);
}
  
.gallery-detail-line-heart {
    display: block;
    width: 320px;
    max-width: 100%;
    height: auto;
    margin-top: -18px;
    object-fit: contain;
}

/* Intro text */

.gallery-detail-intro {
  position: relative;
  margin: 0 0 34px;
  padding-right: 140px;
}

.gallery-detail-intro p {
  margin: 0;
  max-width: 980px;
  color: #1f302d;
  font-family: var(--body, "Nunito", sans-serif);
  font-size: 1.28rem;
  font-weight: 900;
  line-height: 1.45;
}

.gallery-detail-leaf {
  position: absolute;
  right: 42px;
  top: 10%;
  width: 94px;
  height: auto;
  transform: translateY(-50%);
  object-fit: contain;
  pointer-events: none;
}

/* Photo grid */

.gallery-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.gallery-photo-grid img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(189, 142, 101, 0.22);
  cursor: zoom-in;
}

/* Fullscreen gallery image viewer */

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 32px;

  background: rgba(20, 18, 15, 0.86);
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox-img {
  display: block;
  max-width: 94vw;
  max-height: 90vh;
  width: auto;
  height: auto;

  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.gallery-lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;

  width: 46px;
  height: 46px;

  color: #fff;
  background: rgba(255, 253, 248, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;

  font-family: var(--body, "Nunito", sans-serif);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;

  cursor: pointer;
}

.gallery-lightbox-close:hover {
  background: rgba(255, 253, 248, 0.28);
}

.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 10000;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 58px;
  height: 58px;
  padding: 0;

  color: #fff;
  background: rgba(255, 253, 248, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;

  font-family: Arial, sans-serif;
  font-size: 0;
  font-weight: 700;
  line-height: 1;

  cursor: pointer;
  transform: translateY(-50%);
}

.gallery-lightbox-prev {
  left: 34px;
}

.gallery-lightbox-next {
  right: 34px;
}

.gallery-lightbox-nav:hover {
  background: rgba(255, 253, 248, 0.28);
}

.gallery-lightbox-nav.is-disabled {
  opacity: 0.25;
  pointer-events: none;
}

.gallery-lightbox-nav::before {
  display: block;
  color: inherit;
  font-family: Arial, sans-serif;
  font-size: 4.2rem;
  font-weight: 700;
  line-height: 1;
}

.gallery-lightbox-prev::before {
  content: "‹";
  transform: translate(-1px, -4px);
}

.gallery-lightbox-next::before {
  content: "›";
  transform: translate(1px, -4px);
}

/* Responsive */

@media (max-width: 900px) {
  .gallery-detail-section {
    width: calc(100% - 32px);
    padding-top: 38px;
  }

  .gallery-detail-header {
    flex-direction: column;
    text-align: center;
  }

  .gallery-detail-line-heart {
    margin-left: auto;
    margin-right: auto;
  }

  .gallery-detail-intro {
    padding-right: 0;
    text-align: center;
  }

  .gallery-detail-leaf {
    position: static;
    display: block;
    margin: 18px auto 0;
    transform: none;
  }

  .gallery-photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-photo-grid img {
    height: 150px;
  }
}