/* Only the individual project galleries on Nos réalisations. */
.project.section .mt-gallery{--gallery-ratio:.75;max-width:min(100%,calc(72svh * var(--gallery-ratio)),calc(760px * var(--gallery-ratio)));margin:32px auto 0;color:var(--ink)}
.project.section .mt-gallery .mt-gallery-track{display:flex;gap:0;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:none;aspect-ratio:var(--gallery-ratio);background:#242625;border:1px solid #33353225;align-items:stretch;position:relative;isolation:isolate}
.mt-gallery-track::-webkit-scrollbar{display:none}
.project.section .mt-gallery .mt-gallery-track>figure{flex:0 0 100%;min-width:0;margin:0;position:relative;scroll-snap-align:start;scroll-snap-stop:always;height:100%;background:#242625}
.mt-gallery-photo{display:block;width:100%;height:100%;cursor:zoom-in}
.project.section .mt-gallery .mt-gallery-track figure img{display:block;width:100%;height:100%;max-height:none;aspect-ratio:auto;object-fit:contain;object-position:var(--photo-position,50% 50%);padding:0;margin:0;background:none;transform:none}
.project.section .mt-gallery .mt-gallery-track figcaption{position:absolute;left:14px;bottom:14px;width:auto;max-width:calc(100% - 28px);padding:7px 11px;margin:0;border:1px solid #ffffff30;background:#242625ed;color:#f2eee7;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:.015em;pointer-events:none}
.mt-gallery-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;min-height:48px}
.mt-gallery-navigation{display:flex;flex:1;align-items:center;justify-content:space-between;gap:12px}
.mt-gallery-button,.mt-photo-dialog button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:48px;height:48px;padding:0;border:1px solid #777671;background:transparent;color:#333532;cursor:pointer;transition:background-color .18s,color .18s,border-color .18s}
.mt-gallery-button svg,.mt-photo-dialog button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.5}
.mt-gallery-button:disabled,.mt-photo-dialog button:disabled{opacity:.35;cursor:default}
.mt-gallery-counter{font-variant-numeric:tabular-nums;font-size:12px;letter-spacing:.1em;white-space:nowrap}
.mt-gallery-enlarge{border:0;width:48px;height:48px;color:#333532}
.mt-gallery-track:focus-visible,.mt-gallery-button:focus-visible,.mt-gallery-photo:focus-visible{outline:2px solid var(--red);outline-offset:3px}
.mt-gallery-status{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.mt-new-project .project-heading{max-width:1080px;margin-inline:auto}
.mt-new-project .project-heading h2{font-size:clamp(28px,3vw,44px);line-height:1.15;margin-bottom:0}
.mt-photo-dialog{max-width:100vw;max-height:100dvh;width:100vw;height:100dvh;padding:20px;border:0;margin:auto;background:#242625;color:#f2eee7;box-sizing:border-box}
.mt-photo-dialog::backdrop{background:#242625f5}
.mt-photo-dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:12px}
.mt-photo-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.mt-photo-dialog h2{font-family:var(--mt-body);font-size:16px;line-height:1.5;letter-spacing:normal;margin:0;color:#f2eee7}
.mt-photo-dialog img{display:block;width:100%;height:100%;min-height:0;object-fit:contain;object-position:center}
.mt-photo-dialog .mt-photo-footer{display:flex;align-items:center;justify-content:space-between;gap:12px}
.mt-photo-dialog .mt-photo-caption{font-size:13px;line-height:1.5;text-align:center;margin:0}
.mt-photo-dialog button{color:#f2eee7;border-color:#a7a39b}
.mt-gallery-button[hidden],.mt-photo-dialog button[hidden]{display:none}
.mt-photo-dialog button:focus-visible{outline:2px solid #f2eee7;outline-offset:3px}
@media(hover:hover) and (pointer:fine){.mt-gallery-button:not(:disabled):hover{background:#333532;color:#f2eee7;border-color:#333532}.mt-photo-dialog button:not(:disabled):hover{background:#f2eee7;color:#242625}}
@media(max-width:800px){.project.section .mt-gallery{max-width:100%;margin-top:24px}.project.section .mt-gallery .mt-gallery-track{aspect-ratio:var(--gallery-mobile-ratio,var(--gallery-ratio))}.mt-gallery-navigation{gap:8px}.mt-photo-dialog{padding:12px 12px max(16px,env(safe-area-inset-bottom));gap:8px}.mt-photo-dialog h2{font-size:14px}.mt-gallery-bar{margin-top:10px}.project.section .mt-gallery .mt-gallery-track figcaption{left:10px;bottom:10px;max-width:calc(100% - 20px);font-size:11px}}
@media(prefers-reduced-motion:reduce){.mt-gallery-button,.mt-photo-dialog button{transition:none}}
/* Only Bures-sur-Yvette and the Fontenay zinc project: override their legacy
   ID-specific image heights and resolve the complete slide/anchor/image chain.
   The viewport follows each original photo ratio instead of letterboxing it. */
#bures-sur-yvette .mt-gallery-track,
#fontenay-aux-roses .mt-gallery-track{width:100%;max-width:none;aspect-ratio:var(--gallery-active-ratio,var(--gallery-ratio));transition:aspect-ratio .24s ease}
#bures-sur-yvette .mt-gallery-track>figure,
#fontenay-aux-roses .mt-gallery-track>figure{height:auto;align-self:stretch}
#bures-sur-yvette .mt-gallery-photo,
#fontenay-aux-roses .mt-gallery-photo{position:absolute;inset:0;width:auto;height:auto}
#bures-sur-yvette .mt-gallery-track figure img,
#fontenay-aux-roses .mt-gallery-track figure img{display:block;width:100%;height:100%;aspect-ratio:auto;object-fit:contain;object-position:50% 50%;padding:0;margin:0;max-height:none;transform:none}
@media(prefers-reduced-motion:reduce){
 #bures-sur-yvette .mt-gallery-track,
 #fontenay-aux-roses .mt-gallery-track{transition:none}
}
