/* Design Gallery : fond noir, doré et grille des résultats par catégorie. */
.gallery-page main {
  background: #050504;
  font-family: Georgia, 'Times New Roman', serif;
}

.gallery-hero {
  min-height: 27.75vw;
  display: flex;
  align-items: center;
  background: url('../images/optimized/hero-gallery.webp') center / cover no-repeat;
}

.gallery-hero::before {
  background: linear-gradient(90deg, #080807 0%, #080807 51%, transparent 63%);
}

.gallery-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 52%;
  padding: 2vw 2.2vw;
}

.gallery-rule {
  display: block;
  width: 5vw;
  height: 1px;
  background: var(--gold);
  margin: 1.3vw auto;
}

.gallery-intro h1 {
  font-size: 4.5vw;
  line-height: 1.1;
  margin: 0 0 1vw;
}

.gallery-subtitle {
  gap: 1vw;
  letter-spacing: .35vw;
}

.gallery-subtitle::before, .gallery-subtitle::after {
  width: 8vw;
}

.gallery-intro > p:last-child {
  font-size: 1.3vw;
  line-height: 1.7;
}

.gallery-categories {
  display: flex;
  align-items: center;
  gap: 3.2vw;
  padding: 1.4vw 4.2vw;
  border-bottom: 1px solid var(--line);
  color: #eee;
  font: .86vw Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: .15vw;
}

.gallery-categories a {
  white-space: nowrap;
}

.gallery-categories a[aria-current] {
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
  padding-bottom: .95vw;
  margin-bottom: -.95vw;
}

.gallery-categories span {
  margin-left: auto;
  color: #a89981;
  white-space: nowrap;
  font-size: .72vw;
}

.gallery-mobile-filter {
  display: none;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8vw;
  padding: 1.4vw 1.9vw 2.5vw;
}

.gallery-photo {
  aspect-ratio: 3 / 4;
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #111;
  border: 1px solid #28231d;
}

.gallery-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 34%;
  filter: saturate(.9);
  transition: transform .45s ease, filter .45s ease;
}

.gallery-photo picture {
  display: block;
  width: 100%;
  height: 100%;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .gallery-photo:hover img {
    transform: scale(1.04);
    filter: saturate(1.05);
  }
}

.gallery-photo figcaption {
  display: none;
}

.gallery-empty {
  margin: 0;
  padding: 24px 20px 48px;
  color: var(--gold);
  font-size: clamp(16px, 1.3vw, 20px);
  text-align: center;
}

.gallery-page-indicator {
  --progress: 75%;
  gap: 1.4vw;
  margin: 0 4.2vw;
  padding: 2.3vw 0;
  font: 1vw Arial, sans-serif;
}

.gallery-page-indicator .page-progress {
  width: 6vw;
}

.gallery-page-indicator p {
  margin: 0 auto;
  color: #eee;
  font-size: .75vw;
  letter-spacing: .3vw;
  text-transform: uppercase;
}

.gallery-page-indicator strong {
  font: 1.2vw Georgia, serif;
}

.gallery-page-indicator small {
  font: .65vw Arial, sans-serif;
  letter-spacing: .2vw;
}

/* Version mobile : menu de catégories et grille centrée en deux colonnes. */
@media (max-width: 900px) {
  /* Bannière raccourcie pour laisser rapidement la place aux photos. */
  .gallery-hero {
    min-height: 285px;
    background-image: url('../images/optimized/hero-gallery-mobile.webp');
    background-position: center;
  }

  .gallery-hero::before {
    background: linear-gradient(90deg, #080807 0%, rgba(8, 8, 7, .88) 46%, rgba(8, 8, 7, .62));
  }

  .gallery-intro {
    width: 100%;
    height: auto;
    max-width: 600px;
    margin: auto;
    padding: 40px 20px;
  }

  .gallery-intro .eyebrow {
    font-size: 10px;
    letter-spacing: 4px;
  }

  .gallery-intro h1 {
    font-size: 40px;
    margin-bottom: 18px;
  }

  .gallery-subtitle {
    font-size: 11px;
    letter-spacing: 1px;
  }

  .gallery-intro > p:last-child {
    font-size: 15px;
  }

  .gallery-intro br {
    display: none;
  }

  /* Le menu déroulant remplace les onglets et reste visible pendant le défilement. */
  .gallery-categories {
    display: none;
  }

  .gallery-mobile-filter {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 20;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(5, 5, 4, .98);
    border-bottom: 1px solid var(--line);
    color: var(--gold);
    font: 12px/1.5 Arial, sans-serif;
    letter-spacing: .5px;
    text-transform: uppercase;
  }

  .gallery-mobile-filter select {
    min-width: 0;
    width: 52%;
    flex-shrink: 0;
    min-height: 48px;
    padding: 10px 8px;
    border: 1px solid var(--gold);
    border-radius: 0;
    background: #080807;
    color: var(--gold);
    font: 16px Arial, sans-serif;
    letter-spacing: 0;
  }

  /* Deux colonnes régulières : chaque photo garde un format carré lisible. */
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px;
  }

  .gallery-photo {
    aspect-ratio: 1;
  }

  .gallery-page-indicator {
    margin: 0 20px;
    padding: 24px 0;
    font-size: 11px;
    gap: 12px;
  }

  .gallery-page-indicator .page-progress {
    width: 55px;
  }

  .gallery-page-indicator p, .gallery-page-indicator strong {
    display: none;
  }
}
