.public-gallery-page,
.photo-detail-page {
  background: #f7f8fa;
}

.gallery-main,
.photo-detail-main {
  padding-top: var(--header-height);
}

.gallery-hero {
  position: relative;
  padding-block: 110px 150px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 86% 22%, rgba(241, 196, 15, 0.2), transparent 28%),
    var(--ink);
}

.gallery-hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(241, 196, 15, 0.55), transparent);
  content: "";
}

.gallery-hero-shape {
  position: absolute;
  top: -140px;
  right: -100px;
  width: 470px;
  height: 470px;
  border: 90px solid rgba(241, 196, 15, 0.07);
  border-radius: 50%;
}

.gallery-hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 70px;
}

.gallery-hero h1 {
  max-width: 930px;
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(49px, 7vw, 90px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.gallery-hero h1 em {
  color: var(--yellow);
  font-style: normal;
}

.gallery-hero-layout > div:first-child > p:last-child {
  max-width: 690px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 17px;
}

.gallery-hero-count {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 10px;
}

.gallery-hero-count strong {
  color: var(--yellow);
  font-family: "Montserrat", sans-serif;
  font-size: 78px;
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.08em;
}

.gallery-hero-count span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.featured-photo-section {
  position: relative;
  z-index: 2;
  margin-top: -80px;
}

.featured-photo {
  position: relative;
  display: block;
  height: min(680px, 72vh);
  min-height: 480px;
  overflow: hidden;
  color: #fff;
  background: var(--ink);
  border: 8px solid #fff;
  border-radius: 28px;
  box-shadow: 0 35px 100px rgba(17, 24, 39, 0.2);
  isolation: isolate;
}

.featured-photo > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  transition: transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.featured-photo:hover > img {
  transform: scale(1.035);
}

.featured-overlay {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 13, 24, 0.93), rgba(8, 13, 24, 0.18) 68%),
    linear-gradient(0deg, rgba(8, 13, 24, 0.58), transparent 55%);
}

.featured-content {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: 0;
  display: flex;
  max-width: 680px;
  flex-direction: column;
  padding: 55px;
}

.featured-content > small {
  color: var(--yellow);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.featured-content > strong {
  margin-top: 8px;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(34px, 4.5vw, 58px);
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.featured-content > span {
  margin-top: 17px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.featured-content > em {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 25px;
  color: var(--yellow);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.featured-content > em svg {
  width: 16px;
}

.gallery-collection {
  padding-block: 115px 130px;
}

.gallery-collection-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.55fr);
  align-items: end;
  gap: 80px;
  margin-bottom: 40px;
}

.gallery-collection-heading h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Montserrat", sans-serif;
  font-size: clamp(41px, 5vw, 66px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.gallery-collection-heading h2 span {
  color: #b07900;
}

.gallery-collection-heading > p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 14px;
}

.public-gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 33px;
}

.public-gallery-filters a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.public-gallery-filters a span {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding-inline: 5px;
  color: var(--muted);
  background: #f0f1f3;
  border-radius: 999px;
  font-size: 8px;
}

.public-gallery-filters a:hover,
.public-gallery-filters a.is-active {
  color: var(--ink);
  background: var(--yellow);
  border-color: var(--yellow);
}

.public-gallery-filters a.is-active span {
  color: #fff;
  background: var(--ink);
}

.public-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.public-gallery-card {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(17, 24, 39, 0.06);
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.public-gallery-card.is-wide {
  grid-column: span 2;
}

.public-gallery-card:hover {
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.13);
  transform: translateY(-6px);
}

.public-gallery-image {
  position: relative;
  height: 330px;
  overflow: hidden;
  background: var(--ink);
}

.public-gallery-card.is-wide .public-gallery-image {
  height: 430px;
}

.public-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 650ms ease;
}

.public-gallery-card:hover img {
  transform: scale(1.06);
}

.card-arrow {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 50%;
  box-shadow: 0 8px 25px rgba(17, 24, 39, 0.2);
  transform: translateY(65px);
  transition: transform 260ms ease;
}

.public-gallery-card:hover .card-arrow {
  transform: translateY(0);
}

.card-arrow svg {
  width: 18px;
}

.public-gallery-copy {
  padding: 24px;
}

.public-gallery-copy > span {
  color: #9a6900;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.public-gallery-copy h3 {
  margin: 6px 0 9px;
  color: var(--ink);
  font-family: "Montserrat", sans-serif;
  font-size: 21px;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.public-gallery-copy > p {
  display: -webkit-box;
  min-height: 59px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.public-gallery-copy > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin-top: 17px;
  padding-top: 14px;
  color: #808793;
  border-top: 1px solid var(--line);
  font-size: 9px;
  font-weight: 700;
}

.public-gallery-copy > div span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.public-gallery-copy > div svg {
  width: 12px;
}

.public-empty-state {
  padding: 70px 30px;
  background: #fff;
  border: 1px dashed #cfd4dc;
  border-radius: 20px;
  text-align: center;
}

.public-empty-state strong {
  display: block;
  color: var(--ink);
  font-family: "Montserrat", sans-serif;
}

.public-empty-state a {
  display: inline-block;
  margin-top: 10px;
  color: #8a5d00;
  font-size: 12px;
  font-weight: 800;
}

.gallery-cta {
  padding-block: 90px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 10%, rgba(241, 196, 15, 0.19), transparent 28%),
    var(--ink);
}

.gallery-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}

.gallery-cta-inner > div > span {
  color: var(--yellow);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.gallery-cta h2 {
  margin: 8px 0 0;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

/* Détail d'une photo */

.photo-detail-main {
  padding-block: calc(var(--header-height) + 46px) 110px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.breadcrumbs a:hover {
  color: #8b5d00;
}

.breadcrumbs > span:last-child {
  max-width: 300px;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(350px, 0.75fr);
  min-height: 650px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(17, 24, 39, 0.13);
}

.photo-detail-image {
  min-height: 650px;
  background: var(--ink);
}

.photo-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-detail-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px;
}

.photo-category {
  color: #9a6900;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.photo-detail-copy h1 {
  margin: 10px 0 20px;
  color: var(--ink);
  font-family: "Montserrat", sans-serif;
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.photo-detail-copy > p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.photo-detail-copy dl {
  display: grid;
  gap: 0;
  margin: 30px 0 0;
}

.photo-detail-copy dl > div {
  display: grid;
  grid-template-columns: 115px 1fr;
  gap: 15px;
  padding-block: 13px;
  border-top: 1px solid var(--line);
}

.photo-detail-copy dt {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.photo-detail-copy dt svg {
  width: 14px;
  color: #a87300;
}

.photo-detail-copy dd {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.photo-detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 30px;
}

.text-link {
  color: #875c00;
  font-size: 11px;
  font-weight: 800;
}

.photo-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.photo-pagination > a {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  transition: border-color 180ms ease, transform 180ms ease;
}

.photo-pagination > a:hover {
  border-color: var(--yellow);
  transform: translateY(-2px);
}

.photo-pagination > a:last-child {
  justify-content: flex-end;
  text-align: right;
}

.photo-pagination img {
  width: 80px;
  height: 65px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 10px;
}

.photo-pagination span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.photo-pagination small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.photo-pagination strong {
  overflow: hidden;
  color: var(--ink);
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-footer a {
  color: var(--yellow);
  font-weight: 800;
}

@media (max-width: 940px) {
  .gallery-hero-layout,
  .gallery-collection-heading {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .gallery-hero-count {
    display: none;
  }

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

  .photo-detail {
    grid-template-columns: 1fr;
  }

  .photo-detail-image {
    min-height: auto;
    aspect-ratio: 4 / 3;
  }

  .photo-detail-copy {
    padding: 42px;
  }
}

@media (max-width: 650px) {
  .gallery-hero {
    padding-block: 80px 120px;
  }

  .gallery-hero h1 {
    font-size: clamp(44px, 13vw, 61px);
  }

  .gallery-hero-layout > div:first-child > p:last-child {
    font-size: 14px;
  }

  .featured-photo {
    height: 570px;
    min-height: 0;
    border-width: 5px;
  }

  .featured-photo > img {
    object-position: center;
  }

  .featured-overlay {
    background: linear-gradient(0deg, rgba(8, 13, 24, 0.95), rgba(8, 13, 24, 0.08) 75%);
  }

  .featured-content {
    padding: 30px;
  }

  .gallery-collection {
    padding-block: 85px 95px;
  }

  .public-gallery-filters {
    flex-wrap: nowrap;
    margin-right: -14px;
    margin-left: -14px;
    padding-inline: 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .public-gallery-filters a {
    flex: 0 0 auto;
  }

  .public-gallery-grid {
    grid-template-columns: 1fr;
  }

  .public-gallery-card.is-wide {
    grid-column: auto;
  }

  .public-gallery-image,
  .public-gallery-card.is-wide .public-gallery-image {
    height: 330px;
  }

  .gallery-cta-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .photo-detail-main {
    padding-block: calc(var(--header-height) + 25px) 75px;
  }

  .photo-detail {
    border-radius: 20px;
  }

  .photo-detail-image {
    aspect-ratio: 1 / 1.08;
  }

  .photo-detail-copy {
    padding: 28px 24px 34px;
  }

  .photo-detail-copy dl > div {
    grid-template-columns: 95px 1fr;
  }

  .photo-detail-actions .button {
    width: 100%;
  }

  .photo-pagination {
    grid-template-columns: 1fr;
  }

  .photo-pagination > a:last-child {
    flex-direction: row-reverse;
    justify-content: flex-start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .featured-photo > img,
  .public-gallery-image img,
  .public-gallery-card,
  .card-arrow {
    transition: none;
  }
}
