/* Navigation de la galerie : catégories et pagination. */
.gallery-page .tabs {
  position: relative;
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: clamp(8px, 1.4vw, 18px) auto 0;
  padding: 5px;
  border: 1px solid rgba(226, 174, 114, .2);
  border-radius: 999px;
  background: rgba(12, 12, 10, .78);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .3), inset 0 1px rgba(255, 255, 255, .025);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.gallery-page .tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px clamp(17px, 2.5vw, 34px);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--gallery-muted, #b9ad9a);
  background: transparent;
  box-shadow: none;
  font: 500 clamp(.68rem, .9vw, .82rem)/1.25 Cinzel, Georgia, serif;
  letter-spacing: .1em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  text-shadow: none;
  transition: color .22s ease, background .22s ease, border-color .22s ease, transform .22s ease;
}

.gallery-page .tabs a:hover {
  border-color: rgba(226, 174, 114, .18);
  color: var(--gallery-ivory, #f4eddf);
  background: rgba(226, 174, 114, .055);
  box-shadow: none;
  transform: none;
}

.gallery-page .tabs a.active,
.gallery-page .tabs a[aria-current="page"] {
  border-color: rgba(226, 174, 114, .58);
  color: #100e0c;
  background: linear-gradient(135deg, var(--gallery-copper-light, #e2ae72), var(--gallery-copper, #bf7a3d));
  box-shadow: 0 7px 20px rgba(135, 78, 31, .28), inset 0 1px rgba(255, 255, 255, .28);
  font-weight: 600;
  pointer-events: none;
  text-shadow: none;
  transform: none;
}

.gallery-page .tabs a:focus-visible {
  outline: 2px solid var(--gallery-copper-light, #e2ae72);
  outline-offset: 4px;
}

.gallery-page .pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: clamp(44px, 6vw, 82px) 0 0;
  font-family: Cinzel, Georgia, serif;
  text-align: center;
}

.gallery-page .pagination__pages {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(226, 174, 114, .16);
  border-radius: 999px;
  background: rgba(16, 16, 14, .7);
}

.gallery-page .pagination a,
.gallery-page .pagination .active,
.gallery-page .pagination .ellipsis {
  display: inline-grid;
  min-width: 40px;
  min-height: 40px;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  place-items: center;
  color: var(--gallery-muted, #b9ad9a);
  background: transparent;
  font: 500 .76rem/1 Cinzel, Georgia, serif;
  letter-spacing: .04em;
  text-decoration: none;
  text-shadow: none;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.gallery-page .pagination a:hover {
  border-color: rgba(226, 174, 114, .28);
  color: var(--gallery-ivory, #f4eddf);
  background: rgba(226, 174, 114, .08);
  transform: translateY(-1px);
}

.gallery-page .pagination a:focus-visible {
  outline: 2px solid var(--gallery-copper-light, #e2ae72);
  outline-offset: 3px;
}

.gallery-page .pagination .active {
  color: #100e0c;
  background: var(--gallery-copper-light, #e2ae72);
  box-shadow: 0 5px 16px rgba(135, 78, 31, .24);
  font-weight: 700;
}

.gallery-page .pagination .ellipsis {
  min-width: 26px;
  padding-right: 5px;
  padding-left: 5px;
  color: rgba(244, 237, 223, .45);
}

.gallery-page .pagination a.pagination__direction {
  display: inline-flex;
  gap: 9px;
  min-width: auto;
  padding: 12px 18px;
  border-color: rgba(226, 174, 114, .2);
  color: var(--gallery-copper-light, #e2ae72);
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media screen and (max-width: 620px) {
  .gallery-page .tabs {
    width: 100%;
  }

  .gallery-page .tabs a {
    flex: 1 1 50%;
    min-width: 0;
    min-height: 46px;
    padding: 9px 12px;
    font-size: clamp(.61rem, 2.7vw, .72rem);
    letter-spacing: .065em;
  }

  .gallery-page .pagination {
    gap: 12px 6px;
  }

  .gallery-page .pagination__pages {
    order: -1;
    flex-basis: 100%;
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
  }

  .gallery-page .pagination a.pagination__direction {
    min-height: 42px;
    padding: 10px 15px;
    font-size: .67rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-page .tabs a,
  .gallery-page .pagination a {
    transition: none;
  }
}
