/* This page owns its grid and dialog; legacy global gallery hooks are not used. */
.gallery-page {
  --gallery-gold: #796033;
  --gallery-paper: #fffdf8;
  background: #f8f5ee;
}
.gallery-page h1,
.gallery-page h2 {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -.04em;
}
.gallery-page .page-intro { padding-top: 44px; padding-bottom: 38px; }
.gallery-page .breadcrumb { margin-bottom: 24px; }
.gallery-page .page-intro h1 { font-size: clamp(43px, 5vw, 66px); line-height: 1.12; }
.gallery-page .page-intro h1 span { color: var(--gallery-gold); }
.gallery-page .page-intro > p:not(.eyebrow) { max-width: 760px; font-size: 15px; margin-top: 20px; line-height: 1.8; }
.gallery-content { padding-bottom: 50px; }
.realisations-section { border-top: 1px solid var(--line); padding-top: 28px; }
.realisations-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 25px; }
.realisations-heading h2 { font-size: 30px; line-height: 1.2; }
.realisations-heading > div > p { font-size: 13.2px; color: var(--muted); margin-top: 9px; }
.realisations-count { font-size: 13.2px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.realisations-filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }
.realisations-filters button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid #d7cbb1;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font-size: 13.2px;
  line-height: 1.5;
  transition: background .18s, border-color .18s, color .18s;
}
.realisations-filters button:hover { border-color: var(--gallery-gold); background: #eee7d9; }
.realisations-filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.realisation-filter-count { font-size: 11px; opacity: .72; font-variant-numeric: tabular-nums; }

/* A real CSS grid, never masonry/columns. Every preview has the same square frame. */
.realisations-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 22px; align-items: start; }
.realisations-grid--selection { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 900px; gap: 30px; }
.realisation-card { min-width: 0; background: var(--gallery-paper); border: 1px solid #ded5c3; border-radius: 8px; overflow: hidden; }
.gallery-page .realisation-card[hidden],
.gallery-page [data-realisations-empty][hidden],
.gallery-page [data-realisations-more][hidden],
.realisations-dialog [hidden] { display: none; }
.realisation-card figure { margin: 0; }
.realisation-photo {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: #e9e3d8;
}
.realisation-photo img { display: block; width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center; }
.realisation-photo:focus-visible { outline-offset: -5px; outline: 3px solid #fffdf8; }
.realisation-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid #fff9;
  border-radius: 4px;
  background: #fffdf8ed;
  color: #443821;
  font-size: 11px;
  transition: background .18s;
}
.realisation-photo:hover .realisation-zoom { background: #fffdf8; }
.realisation-caption { padding: 18px 18px 12px; }
.realisation-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  min-height: 3.1em;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 500;
  letter-spacing: -.015em;
}
.realisation-metadata { min-height: 3.6em; margin-top: 9px; }
.realisation-origin,
.realisation-credit { font-size: 12.1px; color: var(--muted); line-height: 1.8; overflow-wrap: anywhere; }
.realisation-caption-details { margin-top: 13px; border-top: 1px solid var(--line); }
.realisation-caption-details summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; list-style: none; color: var(--ink); font-size: 13.2px; cursor: pointer; }
.realisation-caption-details summary::-webkit-details-marker { display: none; }
.realisation-caption-details summary svg { flex-shrink: 0; transform: rotate(90deg); transition: transform .18s; }
.realisation-caption-details[open] summary svg { transform: rotate(-90deg); }
.realisation-full-caption { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.2px; line-height: 1.9; color: var(--ink); }
.realisation-caption-details .realisation-full-caption { padding: 4px 0 18px; }
.realisation-post-link { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-size: 12.1px; line-height: 1.6; color: var(--gallery-gold); }
.realisation-post-link svg { flex-shrink: 0; }
.realisation-post-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.realisations-more { display: flex; justify-content: center; margin-top: 30px; }
.realisations-more button { border-color: #b4a17f; background: var(--gallery-paper); border-radius: 5px; }
.realisations-empty { padding: 25px 0; color: var(--muted); font-size: 14px; }
.realisations-note { max-width: 780px; font-size: 13.2px; color: var(--muted); line-height: 1.8; padding-top: 24px; }

/* Existing nine salon/inspiration assets remain available, but outside the result count. */
.realisations-archives { margin-top: 38px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.realisations-archives > summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 110px; padding-block: 23px; list-style: none; cursor: pointer; }
.realisations-archives > summary::-webkit-details-marker { display: none; }
.realisations-archives > summary strong { display: block; font-size: 24px; font-weight: 500; line-height: 1.4; letter-spacing: -.025em; }
.realisations-archives > summary > span:first-child > span { display: block; margin-top: 6px; font-size: 13.2px; color: var(--muted); }
.realisations-archive-toggle { display: flex; align-items: center; gap: 20px; flex-shrink: 0; font-size: 12.1px; color: var(--muted); }
.realisations-archive-toggle svg { transform: rotate(90deg); transition: transform .18s; }
.realisations-archives[open] .realisations-archive-toggle svg { transform: rotate(-90deg); }
.realisations-albums { padding-bottom: 30px; }
.realisations-album { padding-top: 28px; border-top: 1px solid var(--line); }
.realisations-album + .realisations-album { margin-top: 32px; }
.realisations-album > header { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-bottom: 22px; }
.realisations-album h2 { font-size: 27px; line-height: 1.25; }
.realisations-album header p { max-width: 560px; font-size: 13.2px; color: var(--muted); line-height: 1.8; }
.realisation-card--archive .realisation-title { font-size: 14px; }
.realisation-card--archive .realisation-origin { margin-top: 7px; min-height: 3.6em; }
.gallery-page .social-band { gap: 24px; padding-top: 30px; }
.gallery-page .social-band p { font-family: var(--sans); font-size: 24px; line-height: 1.4; letter-spacing: -.025em; }

/* The lightbox shows the whole available image, with an independently scrollable caption. */
.realisations-dialog {
  width: min(1180px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  border: 1px solid #d7cbb1;
  border-radius: 9px;
  color: var(--ink);
  background: var(--gallery-paper);
  box-shadow: 0 18px 80px #0004;
}
.realisations-dialog::backdrop { background: #171811de; }
.realisations-dialog[open] { display: flex; flex-direction: column; }
.realisation-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.realisation-dialog-header h2 { font-family: var(--sans); font-size: 19px; font-weight: 500; letter-spacing: -.02em; line-height: 1.45; }
.realisation-dialog-close { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #d7cbb1; border-radius: 4px; background: transparent; color: var(--ink); font-size: 29px; line-height: 1; }
.realisation-dialog-close:hover { background: #eee7d9; }
.realisation-dialog-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); min-height: 0; height: min(70vh, 730px); height: min(70dvh, 730px); }
.realisation-dialog-image { display: flex; align-items: center; justify-content: center; min-height: 0; min-width: 0; padding: 18px; background: #e9e3d8; }
.realisation-dialog-image img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; }
.realisation-dialog-text { min-height: 0; min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 25px 27px; }
.realisation-dialog-origin,
.realisation-dialog-credit { font-size: 12.1px; color: var(--muted); line-height: 1.8; overflow-wrap: anywhere; }
.realisation-dialog-text .realisation-full-caption { margin-top: 20px; font-size: 13px; }
.realisation-dialog-text .realisation-post-link { margin-top: 18px; font-size: 13.2px; }
.realisation-dialog-footer { display: flex; align-items: center; justify-content: center; gap: 25px; min-height: 62px; padding: 9px 20px; border-top: 1px solid var(--line); flex-shrink: 0; }
.realisation-dialog-footer button { width: 44px; min-height: 44px; border: 1px solid #d7cbb1; border-radius: 4px; background: transparent; color: var(--ink); }
.realisation-dialog-footer button:hover:not(:disabled) { background: #eee7d9; }
.realisation-dialog-footer button:disabled { opacity: .35; cursor: default; }
.realisation-dialog-position { min-width: 65px; text-align: center; font-size: 12.1px; color: var(--muted); font-variant-numeric: tabular-nums; }

@media (max-width: 1300px) {
  .realisations-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .realisations-grid--selection { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .realisations-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .realisations-album > header { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-width: 760px) {
  .gallery-page .page-intro { padding-top: 32px; padding-bottom: 28px; }
  .gallery-page .page-intro > p:not(.eyebrow) { font-size: 14px; }
  .realisations-section { padding-top: 24px; }
  .realisations-heading { align-items: flex-start; gap: 15px; }
  .realisations-heading h2 { font-size: 27px; }
  .realisations-heading > div > p { max-width: 250px; font-size: 12.1px; }
  .realisations-count { font-size: 12.1px; padding-top: 6px; }
  .realisations-filters { gap: 8px; margin-bottom: 24px; }
  .realisations-filters button { font-size: 12.1px; padding: 10px 12px; gap: 9px; }
  .realisations-grid { gap: 22px 16px; }
  .realisation-caption { padding: 16px 16px 10px; }
  .realisation-title { font-size: 15px; }
  .realisations-archives { margin-top: 30px; }
  .realisations-archives > summary { gap: 16px; }
  .realisations-archives > summary strong { font-size: 21px; }
  .realisations-archive-toggle { gap: 12px; }
  .realisations-archive-toggle > span { display: none; }
  .realisations-album h2 { font-size: 25px; }
  .gallery-page .social-band p { font-size: 22px; }
  .gallery-page .social-band .text-link { margin-top: 14px; }
  .realisations-dialog { width: calc(100vw - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .realisation-dialog-header { padding: 10px 13px; gap: 12px; }
  .realisation-dialog-header h2 { font-size: 16px; }
  .realisation-dialog-body { display: block; height: auto; overflow-y: auto; overscroll-behavior: contain; }
  .realisation-dialog-image { height: min(48vh, 430px); height: min(48dvh, 430px); padding: 13px; }
  .realisation-dialog-text { overflow: visible; padding: 20px; }
  .realisation-dialog-text .realisation-full-caption { font-size: 13.2px; margin-top: 15px; }
  .realisation-dialog-footer { min-height: 58px; padding-block: 7px; }
}
@media (max-width: 620px) {
  .realisations-grid,
  .realisations-grid--selection { grid-template-columns: minmax(0, 1fr); }
  .realisations-grid--archives { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .realisation-card--archive .realisation-caption { padding: 12px; }
  .realisation-card--archive .realisation-title { font-size: 13.2px; }
  .realisation-card--archive .realisation-origin { font-size: 11px; }
  .realisation-card--archive .realisation-zoom { right: 7px; bottom: 7px; padding: 5px 8px; font-size: 9.9px; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .realisations-filters button,
  .realisation-zoom,
  .realisation-caption-details summary svg,
  .realisations-archive-toggle svg { transition: none; }
}

/* Owner-approved photothèque: whole photographs, compact editorial mosaic. */
.gallery-page .realisations-grid:not(.realisations-grid--archives) { gap: 22px 18px; }
.gallery-page .realisation-card[data-realisation-tile] { overflow: visible; border-radius: 9px; }
.gallery-page [data-realisation-tile] .realisation-photo { aspect-ratio: 3 / 4; border-radius: 8px 8px 0 0; }
.gallery-page [data-realisation-tile] .realisation-photo img { aspect-ratio: auto; object-fit: contain; }
.gallery-page [data-realisation-tile] .realisation-caption { padding: 13px 14px 9px; }
.gallery-page [data-realisation-tile] .realisation-title { font-size: 15px; line-height: 1.5; min-height: 3em; }
.gallery-page [data-realisation-tile] .realisation-metadata { min-height: 0; position: relative; padding-right: 32px; }
.gallery-page [data-realisation-tile] .realisation-origin { font-size: 11px; line-height: 1.5; margin-top: 5px; }
.realisation-series { position: absolute; right: 0; top: 0; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.phototheque-tools { display: flex; justify-content: flex-end; align-items: center; gap: 20px; margin: -12px 0 24px; }
.phototheque-topic { display: none; font-size: 12.1px; color: var(--muted); }
.phototheque-topic select { display: block; width: 100%; min-height: 44px; margin-top: 6px; padding: 10px 32px 10px 12px; border: 1px solid #d7cbb1; border-radius: 5px; background: var(--gallery-paper); color: var(--ink); font: inherit; }
.phototheque-motion { display: flex; align-items: center; gap: 12px; font-size: 12.1px; color: var(--muted); }
.phototheque-motion button { min-width: 76px; min-height: 44px; padding: 8px 12px; background: transparent; color: var(--ink); border: 1px solid #d7cbb1; border-radius: 5px; font: inherit; }
.phototheque-motion button:disabled { opacity: .55; cursor: default; }
.phototheque-motion [hidden] { display: none; }
.gallery-page [data-realisation-tile] { animation: prestige-photo-drift var(--drift-duration, 24s) ease-in-out var(--drift-delay, 0s) infinite; animation-play-state: paused; transform-origin: center; }
.gallery-page .is-idle [data-realisation-tile] { animation-play-state: running; }
@keyframes prestige-photo-drift { 0%,100% { transform: translate3d(0,0,0) scale(1); } 35% { transform: translate3d(3px,-4px,0) scale(.985); } 70% { transform: translate3d(-3px,3px,0) scale(1.012); } }
@media (max-width: 760px) {
  .gallery-page .page-intro h1 { font-size: 38px; }
  .gallery-page .realisations-filters { display: none; }
  .phototheque-tools { align-items: flex-end; justify-content: space-between; margin: 0 0 22px; gap: 12px; }
  .phototheque-topic { display: block; flex: 1; min-width: 0; }
  .phototheque-motion { flex-direction: column; align-items: flex-end; gap: 6px; font-size: 11px; }
  .phototheque-motion button { font-size: 12.1px; }
}
@media (max-width: 620px) {
  .gallery-page .realisations-grid:not(.realisations-grid--archives) { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 12px; }
  .gallery-page [data-realisation-tile] .realisation-caption { padding: 11px 10px 6px; }
  .gallery-page [data-realisation-tile] .realisation-title { font-size: 13.2px; line-height: 1.45; }
  .gallery-page [data-realisation-tile] .realisation-metadata { padding-right: 0; }
  .gallery-page [data-realisation-tile] .realisation-credit { font-size: 11px; }
  .gallery-page [data-realisation-tile] .realisation-origin { display: none; }
  .gallery-page [data-realisation-tile] .realisation-series { position: static; margin-top: 4px; }
  .gallery-page [data-realisation-tile] .realisation-zoom { right: 6px; bottom: 6px; padding: 5px 8px; font-size: 11px; gap: 5px; }
  .gallery-page [data-realisation-tile] .realisation-caption-details { margin-top: 8px; }
  .gallery-page [data-realisation-tile] .realisation-caption-details summary { font-size: 12.1px; gap: 5px; }
  .gallery-page [data-realisation-tile] .realisation-post-link { font-size: 11px; }
  .gallery-page [data-realisation-tile] .realisation-full-caption { font-size: 12.1px; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-page [data-realisation-tile] { animation: none !important; transform: none !important; }
}
