/* Galerie : page publique (la grille elle-même est dans gallery-grid.css) */
* { margin: 0; padding: 0; box-sizing: border-box; }
body.page-galerie { background: var(--green-dk); color: var(--cream); overflow-x: hidden; }

.gal { max-width: 1400px; margin: 0 auto; padding: 0 var(--gutter) clamp(70px, 10vw, 130px); }
.gal-hero { padding: 150px 0 clamp(30px, 5vw, 56px); display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.gal-title { font-size: clamp(64px, 14vw, 210px); line-height: .88; }
.gal-title .char { display: inline-block; }
.gal-desc { max-width: 26em; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; color: var(--muted); }

/* tuile cliquable */
.gal-tile { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: none; cursor: zoom-in; overflow: hidden; border-radius: inherit; }
.gal-tile img { transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .5s; will-change: transform; }
.gal-tile:hover img, .gal-tile:focus-visible img { transform: scale(1.06); }
.gal-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 30, 28, .85), transparent 55%); opacity: 0; transition: opacity .4s; }
.gal-cap {
    position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; text-align: left;
    color: #fff; font-weight: 700; font-size: 14px; line-height: 1.3;
    opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.gal-tile:hover::after, .gal-tile:focus-visible::after { opacity: 1; }
.gal-tile:hover .gal-cap, .gal-tile:focus-visible .gal-cap { opacity: 1; transform: none; }
.gal-tile:focus-visible { outline: 3px solid var(--beige); outline-offset: -3px; }

/* visionneuse */
.lb { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 20px; background: rgba(6, 18, 16, .94); }
.lb[hidden] { display: none; }
.lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; height: 100%; justify-content: center; }
.lb-img { max-width: 100%; max-height: calc(100svh - 120px); object-fit: contain; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); user-select: none; -webkit-user-drag: none; touch-action: pan-y; }
.lb-cap { display: flex; gap: 14px; align-items: baseline; color: var(--cream); font-size: 15px; text-align: center; }
.lb-count { font-family: var(--display); color: var(--red); font-size: 18px; }
.lb-nav, .lb-close { border: 0; cursor: pointer; color: var(--cream); background: rgba(246, 243, 238, .12); border-radius: 50%; display: grid; place-items: center; transition: background .2s, transform .2s; }
.lb-nav { width: 54px; height: 54px; font-size: 34px; line-height: 1; }
.lb-nav:hover, .lb-close:hover { background: var(--red); transform: scale(1.06); }
.lb-close { position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; font-size: 30px; z-index: 2; }
@media (max-width: 700px) {
    .lb { grid-template-columns: 1fr; padding: 70px 10px 20px; }
    .lb-nav { position: absolute; bottom: 22px; width: 50px; height: 50px; }
    .lb-prev { left: 20px; } .lb-next { right: 20px; }
    .lb-img { max-height: calc(100svh - 190px); }
    .lb-cap { padding: 0 70px; font-size: 13px; flex-direction: column; gap: 4px; }
    .gal-cap { display: none; }
}
