:root {
  --gallery-blue: #1f83c6;
  --gallery-blue-dark: #145f93;
  --gallery-yellow: #f8d31b;
  --gallery-yellow-dark: #e3be00;
  --gallery-text: #1f2937;
  --gallery-muted: #667085;
  --gallery-bg: #f5f8fc;
  --gallery-card: #ffffff;
  --gallery-border: rgba(31, 131, 198, 0.12);
  --gallery-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.gallery-page {
  color: var(--gallery-text);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.section-space {
  padding: 5rem 0;
}

.gallery-hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 0 4.5rem;
  background:
    radial-gradient(circle at top right, rgba(248, 211, 27, 0.22), transparent 28%),
    linear-gradient(180deg, rgba(20, 95, 147, 0.98), rgba(31, 131, 198, 0.94));
  color: #fff;
}

.gallery-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 70px;
  background: linear-gradient(135deg, transparent 0 49%, #f7fbff 50% 100%);
  pointer-events: none;
}

.gallery-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 1rem;
}

.gallery-hero__title {
  max-width: 760px;
  font-size: clamp(2.25rem, 4vw, 4.3rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.gallery-hero__subtitle {
  max-width: 680px;
  font-size: 1.08rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
}

.gallery-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 999px;
  padding: .55rem .9rem;
  font-size: .92rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.gallery-hero__visual {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--gallery-shadow);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.gallery-hero__visual img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-hero__visual-badge {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  border-radius: 18px;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--gallery-text);
  box-shadow: var(--gallery-shadow);
}

.gallery-hero__visual-badge span {
  display: block;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gallery-blue);
  font-weight: 800;
  margin-bottom: .25rem;
}

.gallery-hero__visual-badge strong {
  font-size: 1.02rem;
  line-height: 1.35;
}

.section-heading {
  max-width: 820px;
}

.section-heading__eyebrow {
  display: inline-block;
  color: var(--gallery-blue);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  margin-bottom: .75rem;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 2.8vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: #0f172a;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--gallery-muted);
  line-height: 1.9;
  font-size: 1.02rem;
}

.albums-nav__wrap {
  display: flex;
  gap: .85rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  scrollbar-width: thin;
}

.albums-nav__item {
  min-width: 220px;
  text-decoration: none;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--gallery-border);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
  padding: 1rem 1.1rem;
  transition: box-shadow .2s ease, border-color .2s ease;
  color: var(--gallery-text);
  flex: 0 0 auto;
}

/* Pas de déplacement au survol : le retour visuel passe par l'ombre
   et la bordure, le bouton de filtre reste immobile. */
.albums-nav__item:hover {
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.09);
  border-color: rgba(31, 131, 198, 0.26);
}

.albums-nav__item span {
  display: block;
  color: var(--gallery-blue);
  font-weight: 800;
  margin-bottom: .25rem;
  font-size: .88rem;
}

.albums-nav__item small {
  display: block;
  color: var(--gallery-text);
  line-height: 1.45;
  font-weight: 600;
}

.album-card {
  padding: 2rem;
  margin-bottom: 1.5rem;
  border-radius: 28px;
  border: 1px solid var(--gallery-border);
  box-shadow: var(--gallery-shadow);
  overflow: hidden;
}

.album-card--blue {
  background:
    radial-gradient(circle at top right, rgba(31, 131, 198, 0.06), transparent 35%),
    #ffffff;
}

.album-card--white {
  background:
    radial-gradient(circle at top right, rgba(248, 211, 27, 0.10), transparent 32%),
    #ffffff;
}

.album-card__header {
  margin-bottom: 1.5rem;
}

.album-card__badge {
  display: inline-flex;
  align-items: center;
  padding: .45rem .85rem;
  border-radius: 999px;
  background: rgba(31, 131, 198, 0.10);
  color: var(--gallery-blue);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
  margin-bottom: .75rem;
}

.album-card__header h3 {
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 0;
  color: #0f172a;
}

.album-card__copy {
  background: #fff;
  border-radius: 22px;
  padding: 1.3rem 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.album-card__intro {
  font-size: 1.05rem;
  line-height: 1.85;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
}

.album-card__copy p {
  color: var(--gallery-muted);
  line-height: 1.95;
  margin-bottom: .9rem;
  font-size: 0.98rem;
}

.album-card__copy p:last-child {
  margin-bottom: 0;
}

.gallery-photo {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: #eef4fb;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(31, 131, 198, 0.08);
  height: 100%;
}

.gallery-photo__button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-photo__button:focus-visible {
  outline: 3px solid var(--gallery-yellow);
  outline-offset: 3px;
}

.gallery-photo img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.gallery-photo:hover img {
  transform: scale(1.03);
}

.gallery-lightbox-open {
  overflow: hidden;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: grid;
  place-items: center;
  padding: 2rem 5rem;
  background: rgba(3, 7, 18, 0.92);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}

.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gallery-lightbox__content {
  position: relative;
  width: min(100%, 1120px);
  height: min(78vh, 760px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox__content img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, transform .2s ease;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__nav:hover,
.gallery-lightbox__close:focus-visible,
.gallery-lightbox__nav:focus-visible {
  background: rgba(255, 255, 255, 0.26);
  transform: scale(1.05);
}

.gallery-lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 48px;
  height: 48px;
  font-size: 1.2rem;
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translateY(-50%);
  font-size: 1.35rem;
}

.gallery-lightbox__nav:hover,
.gallery-lightbox__nav:focus-visible {
  transform: translateY(-50%) scale(1.05);
}

.gallery-lightbox__nav--prev {
  left: 1.5rem;
}

.gallery-lightbox__nav--next {
  right: 1.5rem;
}

.gallery-lightbox__caption {
  position: absolute;
  left: 50%;
  bottom: -3.25rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .75rem;
  max-width: min(100%, 720px);
  color: #fff;
  text-align: center;
}

.gallery-lightbox__caption span {
  font-weight: 700;
  line-height: 1.35;
}

.gallery-lightbox__caption strong {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: .3rem .65rem;
  background: rgba(255, 255, 255, 0.16);
  font-size: .88rem;
}

.gallery-closing__card {
  background:
    linear-gradient(180deg, rgba(31, 131, 198, 0.07), rgba(31, 131, 198, 0.03)),
    #ffffff;
  border-radius: 28px;
  border: 1px solid var(--gallery-border);
  box-shadow: var(--gallery-shadow);
  padding: 2.2rem;
  text-align: center;
}

.gallery-closing__card h3 {
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1rem;
}

.gallery-closing__card p {
  max-width: 760px;
  margin: 0 auto;
  color: var(--gallery-muted);
  line-height: 1.95;
  font-size: 1.02rem;
}

.gallery-closing__signature {
  margin-top: 1.25rem;
  font-weight: 800;
  color: var(--gallery-blue);
  letter-spacing: .02em;
}

.btn-yellow {
  background: var(--gallery-yellow);
  border-color: var(--gallery-yellow);
  color: #111827;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(248, 211, 27, 0.22);
}

.btn-yellow:hover,
.btn-yellow:focus {
  background: var(--gallery-yellow-dark);
  border-color: var(--gallery-yellow-dark);
  color: #111827;
}

.btn-outline-light {
  border-width: 2px;
  font-weight: 700;
}

@media (max-width: 991.98px) {
  .gallery-hero {
    padding: 4.5rem 0 4rem;
  }

  .gallery-hero__title {
    max-width: 100%;
  }

  .gallery-hero__visual {
    max-width: 540px;
    margin: 0 auto;
  }

  .album-card {
    padding: 1.25rem;
  }

  .album-card__copy {
    padding: 1.1rem;
  }
}

@media (max-width: 575.98px) {
  .section-space {
    padding: 3.25rem 0;
  }

  .gallery-hero__subtitle,
  .section-heading p,
  .gallery-closing__card p {
    font-size: .98rem;
    line-height: 1.8;
  }

  .albums-nav__item {
    min-width: 190px;
  }

  .album-card__header h3 {
    font-size: 1.35rem;
  }

  .gallery-lightbox {
    padding: 4.75rem 1rem 5.5rem;
  }

  .gallery-lightbox__content {
    height: 68vh;
  }

  .gallery-lightbox__close {
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
  }

  .gallery-lightbox__nav {
    top: auto;
    bottom: 1rem;
    width: 48px;
    height: 48px;
    transform: none;
  }

  .gallery-lightbox__nav:hover,
  .gallery-lightbox__nav:focus-visible {
    transform: scale(1.05);
  }

  .gallery-lightbox__nav--prev {
    left: calc(50% - 58px);
  }

  .gallery-lightbox__nav--next {
    right: calc(50% - 58px);
  }

  .gallery-lightbox__caption {
    bottom: -4.25rem;
    width: 100%;
    justify-content: center;
    flex-direction: column;
    gap: .45rem;
  }
}
