/* ======================================================
   GALERIES PUBLIQUES
   listing, détail, contact, lightbox
====================================================== */


/* =========================
   PAGE GALERIES
========================= */

body.public-gallery .public-page--galleries{
  max-width: 1320px;
  padding-top: 28px;
}

body.public-gallery .public-page__header--compact{
  margin-bottom: 28px;
}

body.public-gallery .public-page__header--compact h1{
  margin: 0 0 8px;
}

body.public-gallery .public-page__header--compact p{
  margin: 0;
  max-width: 56ch;
  color: var(--muted);
}

body.public-gallery .gallery-listing{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

body.public-gallery .gallery-teaser{
  min-width: 0;
}

body.public-gallery .gallery-teaser__link{
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 24px rgba(0,0,0,0.16);
  transition:
    transform 0.16s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

body.public-gallery .gallery-teaser__link:hover,
body.public-gallery .gallery-teaser__link:focus-visible{
  transform: translateY(-3px);
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 18px 36px rgba(0,0,0,0.22);
}

body.public-gallery .gallery-teaser__media{
  position: relative;
  aspect-ratio: 4 / 3;
  max-height: 220px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

body.public-gallery .gallery-teaser__image{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

body.public-gallery .gallery-teaser__link:hover .gallery-teaser__image{
  transform: scale(1.03);
}

body.public-gallery .gallery-teaser__placeholder{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 13px;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
}

body.public-gallery .gallery-teaser__body{
  padding: 14px 14px 16px;
}

body.public-gallery .gallery-teaser__title{
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.35;
  color: #fff;
}

body.public-gallery .gallery-teaser__text{
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

body.public-gallery .gallery-teaser__text strong{
  color: #fff;
  font-weight: 600;
}

body.public-gallery .gallery-empty{
  padding: 22px 0 8px;
}


/* =========================
   PAGE DETAIL GALERIE PHOTO
========================= */

body.public-gallery-detail .public-page--gallery-detail{
  max-width: 1380px;
  padding-top: 30px;
}

body.public-gallery-detail .gallery-detail-header{
  margin-bottom: 30px;
}

body.public-gallery-detail .gallery-detail-header__eyebrow{
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ivory);
}

body.public-gallery-detail .gallery-detail-header h1{
  margin: 0 0 10px;
}

body.public-gallery-detail .gallery-detail-header__meta{
  margin: 0;
  color: var(--muted);
}

body.public-gallery-detail .gallery-detail-empty{
  padding: 10px 0 4px;
}

body.public-gallery-detail .photo-showcase-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px 22px;
  align-items: start;
}

body.public-gallery-detail .photo-showcase-card{
  min-width: 0;
}

body.public-gallery-detail .photo-showcase-card__button{
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

body.public-gallery-detail .photo-showcase-card__frame{
  display: block;
  padding: 5px;
  border-radius: 10px;
  background: linear-gradient(145deg, #f7f0e4 0%, #eadfc9 100%);
  box-shadow:
    0 0 0 1px rgba(221,209,187,0.95),
    0 12px 24px rgba(0,0,0,0.16);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

body.public-gallery-detail .photo-showcase-card__button:hover .photo-showcase-card__frame,
body.public-gallery-detail .photo-showcase-card__button:focus-visible .photo-showcase-card__frame{
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px rgba(221,209,187,0.98),
    0 18px 32px rgba(0,0,0,0.20);
}

body.public-gallery-detail .photo-showcase-card__image{
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  background: #d8d2c8;
}

body.public-gallery-detail .photo-showcase-card__meta{
  padding-top: 10px;
}

body.public-gallery-detail .photo-showcase-card__title{
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}


/* =========================
   LIGHTBOX GALERIE DETAIL
========================= */

body.public-site.lightbox-open{
  overflow: hidden;
}

body.public-gallery-detail .gallery-lightbox{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

body.public-gallery-detail .gallery-lightbox.is-open{
  display: block;
}

body.public-gallery-detail .gallery-lightbox__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(2,8,18,0.86);
  backdrop-filter: blur(4px);
}

body.public-gallery-detail .gallery-lightbox__panel{
  position: relative;
  z-index: 2;
  width: min(92vw, 1280px);
  margin: 4vh auto;
  padding: 22px 22px 18px;
  border-radius: 20px;
  background: rgba(10,18,34,0.96);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 24px 60px rgba(0,0,0,0.40);
}

body.public-gallery-detail .gallery-lightbox__close{
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

body.public-gallery-detail .gallery-lightbox__media{
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 16px;
}

body.public-gallery-detail .gallery-lightbox__image{
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 10px;
  background: #0b1220;
}

body.public-gallery-detail .gallery-lightbox__nav{
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

body.public-gallery-detail .gallery-lightbox__caption{
  padding-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}


/* =========================
   GALERIE CONTACT
========================= */

body.public-gallery-contact .public-page--gallery-contact{
  max-width: 1480px;
  padding-top: 52px;
}

body.public-gallery-contact .gallery-contact-header{
  margin: 12px 0 34px;
  text-align: center;
}

body.public-gallery-contact .gallery-contact-header__eyebrow{
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory);
}

body.public-gallery-contact .gallery-contact-header h1{
  margin: 0 0 10px;
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  line-height: 1.05;
}

body.public-gallery-contact .gallery-contact-header__meta{
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.96rem;
}

body.public-gallery-contact .gallery-contact-header__meta:last-child{
  margin-bottom: 0;
}

body.public-gallery-contact .gallery-contact-empty{
  padding: 16px 0 6px;
  text-align: center;
}

body.public-gallery-contact .contact-sheet{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px 18px;
  align-items: start;
}

body.public-gallery-contact .contact-sheet__item{
  margin: 0;
  min-width: 0;
}

body.public-gallery-contact .contact-sheet__button{
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

body.public-gallery-contact .contact-sheet__frame{
  display: block;
  padding: 5px;
  border-radius: 8px;
  background: linear-gradient(145deg, #f7f0e4 0%, #eadfc9 100%);
  box-shadow:
    0 0 0 1px rgba(221,209,187,0.96),
    0 10px 22px rgba(0,0,0,0.14);
  transition:
    transform 0.16s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

body.public-gallery-contact .contact-sheet__button:hover .contact-sheet__frame,
body.public-gallery-contact .contact-sheet__button:focus-visible .contact-sheet__frame{
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(221,209,187,1),
    0 16px 28px rgba(0,0,0,0.18);
  filter: brightness(1.01);
}

body.public-gallery-contact .contact-sheet__image{
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 3px;
  background: #d8d2c8;
}

body.public-gallery-contact .contact-sheet__caption{
  margin-top: 10px;
  padding: 0 2px;
  text-align: center;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted-soft);
}

body.public-gallery-contact .contact-sheet__caption strong{
  color: var(--text);
  font-weight: 600;
}

body.public-gallery-contact .contact-sheet__caption span{
  color: var(--muted-soft);
}


/* =========================
   LIGHTBOX GALERIE CONTACT
========================= */

body.public-gallery-contact .contact-lightbox{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

body.public-gallery-contact .contact-lightbox.is-open{
  display: block;
}

body.public-gallery-contact .contact-lightbox__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(2,8,18,0.90);
  backdrop-filter: blur(5px);
}

body.public-gallery-contact .contact-lightbox__panel{
  position: relative;
  z-index: 2;
  width: min(92vw, 1320px);
  margin: 5vh auto;
  padding: 20px 20px 16px;
  border-radius: 18px;
  background: rgba(9,18,34,0.96);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 24px 60px rgba(0,0,0,0.42);
}

body.public-gallery-contact .contact-lightbox__close{
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

body.public-gallery-contact .contact-lightbox__media{
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  gap: 14px;
  align-items: center;
}

body.public-gallery-contact .contact-lightbox__image{
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 10px;
  background: #0b1220;
}

body.public-gallery-contact .contact-lightbox__nav{
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

body.public-gallery-contact .contact-lightbox__caption{
  padding-top: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}


/* =========================
   LIGHTBOX GALERIE CONTACT
   PANNEAU INFOS
========================= */

body.public-gallery-contact .contact-lightbox__panel--split{
  width: min(94vw, 1460px);
  padding: 20px 20px 16px;
}

body.public-gallery-contact .contact-lightbox__layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: stretch;
}

body.public-gallery-contact .contact-lightbox__viewer{
  min-width: 0;
}

body.public-gallery-contact .contact-lightbox__sidebar{
  min-width: 0;
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
}

body.public-gallery-contact .contact-lightbox__title{
  margin: 0 0 12px;
  font-size: 1.1rem;
  line-height: 1.35;
  color: #fff;
}

body.public-gallery-contact .contact-lightbox__sidebar .contact-lightbox__caption{
  padding-top: 0;
  text-align: left;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1280px){
  body.public-gallery-contact .contact-sheet{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1200px){
  body.public-gallery .gallery-listing{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.public-gallery-detail .photo-showcase-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px){
  body.public-gallery-contact .contact-sheet{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 16px;
  }

  body.public-gallery-contact .contact-lightbox__layout{
    grid-template-columns: 1fr;
    gap: 16px;
  }

  body.public-gallery-contact .contact-lightbox__sidebar{
    padding: 16px 14px;
  }
}

@media (max-width: 820px){
  body.public-gallery .gallery-listing{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  body.public-gallery .gallery-teaser__media{
    max-height: 200px;
  }

  body.public-gallery-detail .photo-showcase-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
  }

  body.public-gallery-detail .gallery-lightbox__panel{
    width: min(94vw, 1000px);
    padding: 18px 14px 14px;
  }

  body.public-gallery-detail .gallery-lightbox__media{
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 10px;
  }

  body.public-gallery-detail .gallery-lightbox__nav{
    width: 42px;
    height: 42px;
    font-size: 20px;
  }
}

@media (max-width: 720px){
  body.public-gallery-contact .contact-sheet{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.public-gallery-contact .contact-lightbox__panel{
    width: min(94vw, 1000px);
    padding: 16px 12px 12px;
  }

  body.public-gallery-contact .contact-lightbox__media{
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 8px;
  }

  body.public-gallery-contact .contact-lightbox__nav{
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

@media (max-width: 560px){
  body.public-gallery .gallery-listing{
    grid-template-columns: 1fr;
  }

  body.public-gallery .gallery-teaser__media{
    max-height: none;
  }

  body.public-gallery-detail .photo-showcase-grid{
    grid-template-columns: 1fr;
  }

  body.public-gallery-detail .gallery-lightbox__panel{
    margin: 2vh auto;
  }
}

@media (max-width: 520px){
  body.public-gallery-contact .contact-sheet{
    grid-template-columns: 1fr;
  }
}