/* Page Réalisations. Isolée à .rv-page. */

.rv-page {
  background: #f6f2e9;
  color: #132538;
}

.rv-page main h1,
.rv-page main h2,
.rv-page main p {
  margin: 0;
}

.rv-page main h1,
.rv-page main h2 {
  font-family: Manrope, Inter, sans-serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #0b1f33;
}

.rv-wrap {
  width: min(1320px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.rv-intro {
  padding: 3.4rem 0 0;
}

.rv-page .rv-intro h1 {
  max-width: 12em;
  font-size: clamp(2.15rem, 1.2rem + 1.8vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.rv-page .rv-lead {
  max-width: 38rem;
  margin-top: 1.15rem;
  color: #3e5163;
  font-size: 1.05rem;
  line-height: 1.7;
}

.rv-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rv-gallery {
  padding: 1.65rem 0 5.25rem;
}

.rv-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1.65rem;
  margin: 0 0 1.35rem;
  padding: 0;
}

.rv-filters button {
  position: relative;
  margin: 0;
  padding: 0.4rem 0 0.7rem;
  border: 0;
  background: transparent;
  color: #4a5c6e;
  font-family: Manrope, Inter, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  cursor: pointer;
}

.rv-filters button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0.28rem;
  left: 0;
  height: 1px;
  background: #c8a25a;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s ease;
}

.rv-filters button:hover {
  color: #0b1f33;
}

.rv-filters button.is-active {
  color: #0b1f33;
}

.rv-filters button.is-active::after {
  transform: scaleX(1);
}

.rv-filters button:focus-visible {
  outline: 2px solid #c8a25a;
  outline-offset: 3px;
}

.rv-masonry {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  opacity: 1;
  transition: opacity 0.28s ease;
}

.rv-masonry:not(.is-ready) {
  columns: 1;
  column-gap: 18px;
}

.rv-masonry:not(.is-ready) .rv-shot {
  position: static;
  width: auto !important;
  margin: 0 0 18px;
  transform: none !important;
  break-inside: avoid;
}

@media (min-width: 560px) {
  .rv-masonry:not(.is-ready) {
    columns: 2;
  }
}

@media (min-width: 1100px) {
  .rv-masonry:not(.is-ready) {
    columns: 3;
  }
}

.rv-masonry.is-filtering {
  opacity: 0.45;
}

.rv-shot {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
}

.rv-masonry.is-ready .rv-shot {
  transition: transform 0.42s ease;
}

.rv-shot[hidden] {
  display: none !important;
}

.rv-open {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #d9dde2;
  color: inherit;
  cursor: zoom-in;
}

.rv-open:focus-visible {
  outline: 2px solid #c8a25a;
  outline-offset: 3px;
}

.rv-open img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1);
  transition: transform 0.55s ease;
}

.rv-open::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 31, 51, 0.42) 0%, rgba(11, 31, 51, 0) 48%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.rv-cat {
  position: absolute;
  z-index: 1;
  left: 0.85rem;
  bottom: 0.75rem;
  color: #ffffff;
  font-family: Manrope, Inter, sans-serif;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(0.25rem);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.rv-open:hover img,
.rv-open:focus-visible img {
  transform: scale(1.035);
}

.rv-open:hover::after,
.rv-open:focus-visible::after {
  opacity: 1;
}

.rv-open:hover .rv-cat,
.rv-open:focus-visible .rv-cat {
  opacity: 1;
  transform: none;
}

html.rv-lock,
html.rv-lock body {
  overflow: hidden;
}

.rv-lightbox {
  width: min(1180px, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
  max-height: calc(100vh - 1.5rem);
  margin: auto;
  padding: 0.85rem 0.85rem 1rem;
  border: 0;
  background: #0b1f33;
  color: #ffffff;
}

.rv-lightbox::backdrop {
  background: rgba(11, 31, 51, 0.9);
}

.rv-lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.5rem;
  margin-bottom: 0.65rem;
}

.rv-lightbox-count {
  margin: 0;
  color: #d9dde2;
  font-family: Manrope, Inter, sans-serif;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.rv-lightbox-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}

.rv-lightbox-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

.rv-lightbox-photo img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(74vh, 820px);
  object-fit: contain;
  background: #0b1f33;
}

.rv-lightbox-caption {
  max-width: 46rem;
  margin: 0.8rem 0 0;
  color: #d9dde2;
  font-size: 0.92rem;
  line-height: 1.5;
}

.rv-lightbox-nav,
.rv-lightbox-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(217, 221, 226, 0.35);
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}

.rv-lightbox-nav:hover,
.rv-lightbox-close:hover {
  border-color: #c8a25a;
  color: #c8a25a;
}

.rv-lightbox-nav:focus-visible,
.rv-lightbox-close:focus-visible {
  outline: 2px solid #c8a25a;
  outline-offset: 3px;
}

.rv-lightbox-nav svg,
.rv-lightbox-close svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 760px) {
  .rv-wrap {
    width: min(1320px, calc(100% - 4.5rem));
  }
}

@media (min-width: 1100px) {
  .rv-intro {
    padding-top: 4.1rem;
  }

  .rv-wrap {
    width: min(1320px, calc(100% - 6rem));
  }
}

@media (max-width: 759px) {
  .rv-intro {
    padding-top: 2.35rem;
  }

  .rv-wrap {
    width: min(1320px, calc(100% - 1.5rem));
  }

  .rv-gallery {
    padding-bottom: 3.75rem;
  }

  .rv-filters {
    gap: 0.15rem 1.15rem;
    margin-bottom: 1.1rem;
  }

  .rv-filters button {
    font-size: 0.9rem;
  }

  .rv-lightbox {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
    padding: 0.7rem 0.55rem 0.85rem;
  }

  .rv-lightbox-stage {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "photo photo"
      "prev next";
  }

  .rv-lightbox-photo {
    grid-area: photo;
  }

  .rv-lightbox-nav[data-rv-prev] {
    grid-area: prev;
    justify-self: start;
  }

  .rv-lightbox-nav[data-rv-next] {
    grid-area: next;
    justify-self: end;
  }

  .rv-lightbox-photo img {
    max-height: 68vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rv-masonry,
  .rv-masonry.is-ready .rv-shot,
  .rv-open img,
  .rv-open::after,
  .rv-cat,
  .rv-filters button::after {
    transition: none;
  }

  .rv-open:hover img,
  .rv-open:focus-visible img {
    transform: none;
  }
}
