/* ============================================================
   YWebsite — Galerie front (grille + lightbox)
   Utilise les variables CSS du thème actif.
   ============================================================ */
.yw-photos-album { margin-bottom: 34px; }
.yw-photos-title { margin: 0 0 14px; }
.yw-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.yw-photo { margin: 0; background: var(--color-surface, #f6f7f9); border: 1px solid var(--color-border, #e2e6ed);
            border-radius: var(--radius, 12px); overflow: hidden; cursor: zoom-in; }
.yw-photo img { width: 100%; height: 200px; object-fit: cover; display: block; transition: transform .3s; }
.yw-photo:hover img { transform: scale(1.04); }
.yw-photo figcaption { padding: 10px 12px; font-size: .9rem; display: flex; flex-direction: column; gap: 2px; }
.yw-photo figcaption em { color: var(--color-accent, #c47a30); font-style: italic; }
.yw-photo figcaption small { color: var(--color-muted, #888); font-size: .78rem; }
.yw-credit { opacity: .85; }

/* Lightbox */
.yw-lb { position: fixed; inset: 0; background: rgba(8, 10, 16, .92); display: none; align-items: center;
         justify-content: center; z-index: 9999; opacity: 0; transition: opacity .2s; overflow: auto; }
.yw-lb.open { opacity: 1; }
.yw-lb img { max-width: 90vw; max-height: 78vh; object-fit: contain; border-radius: 6px;
             box-shadow: 0 10px 40px rgba(0, 0, 0, .5); cursor: zoom-in; }
.yw-lb img.zoomed { max-width: none; max-height: none; cursor: zoom-out; }
.yw-lb-cap { position: fixed; bottom: 0; left: 0; right: 0; padding: 18px 22px; color: #fff;
             background: linear-gradient(transparent, rgba(0, 0, 0, .72)); text-align: center; pointer-events: none; }
.yw-lb-cap strong { font-size: 1.1rem; }
.yw-lb-cap em { color: #e0a93b; font-style: italic; margin-left: 6px; }
.yw-lb-cap span { display: block; margin-top: 4px; opacity: .92; }
.yw-lb-cap small { display: block; opacity: .7; margin-top: 6px; font-size: .8rem; }
.yw-lb-nav { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .12);
             color: #fff; border: none; font-size: 2rem; width: 54px; height: 54px; border-radius: 50%; cursor: pointer; line-height: 1; }
.yw-lb-nav:hover { background: rgba(255, 255, 255, .25); }
.yw-lb-prev { left: 18px; } .yw-lb-next { right: 18px; }
.yw-lb-close { position: fixed; top: 16px; right: 20px; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; }
@media (max-width: 600px) { .yw-lb-nav { width: 42px; height: 42px; font-size: 1.5rem; } }

/* ===== Galerie « tous les albums » : filtres + infos en survol ===== */
.yw-photos-tabs { display: flex; flex-wrap: wrap; gap: 26px; justify-content: center;
                  padding: 14px 10px; margin-bottom: 26px;
                  border-top: 1px solid var(--color-border, #e2e6ed);
                  border-bottom: 1px solid var(--color-border, #e2e6ed); }
.yw-photos-tabs button { background: none; border: none; cursor: pointer; padding: 6px 2px;
                         font-family: var(--font-title, inherit); font-size: .8rem;
                         letter-spacing: .18em; text-transform: uppercase;
                         color: var(--color-muted, #777); border-bottom: 2px solid transparent;
                         transition: color .3s, border-color .3s; }
.yw-photos-tabs button:hover { color: var(--color-primary, #333); }
.yw-photos-tabs button.active { color: var(--color-primary, #333); border-bottom-color: var(--color-accent, #b8960b); }
.yw-photos-tabs .count { font-size: .68rem; color: var(--color-accent, #b8960b); margin-left: 4px; }

.yw-photos-serie-head { text-align: center; margin-bottom: 26px; }
.yw-photos-serie-head h2 { margin: 0 0 4px; }
.yw-photos-serie-head p { margin: 0; color: var(--color-muted, #777); font-style: italic; }
.yw-photos-serie-head p:empty { display: none; }

/* Infos en survol (au lieu des légendes sous la photo) */
.yw-photos-flow .yw-photo { position: relative; overflow: hidden; }
.yw-photos-flow .yw-photo figcaption { position: absolute; inset: 0; display: flex;
    flex-direction: column; align-items: center; justify-content: center; text-align: center;
    gap: 6px; padding: 16px; opacity: 0; transition: opacity .35s ease;
    background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.35) 100%); }
.yw-photos-flow .yw-photo:hover figcaption { opacity: 1; }
.yw-photos-flow .yw-photo figcaption strong { font-family: var(--font-title, inherit);
    color: var(--color-accent, #d8b25c); font-size: 1.15rem; letter-spacing: .12em; text-transform: uppercase; }
.yw-photos-flow .yw-photo figcaption em { color: #ccc; font-size: .82rem; }
.yw-photos-flow .yw-photo figcaption span { color: #ddd; font-size: .85rem; }
.yw-photos-flow .yw-photo figcaption small { color: #bbb; font-size: .72rem; letter-spacing: .04em; }
.yw-photos-flow .yw-photo img { transition: transform .6s ease; }
.yw-photos-flow .yw-photo:hover img { transform: scale(1.04); }

/* Maçonnerie : chaque photo garde son format naturel (comme l'ancien site) */
.yw-photos.yw-photos-flow { display: block; column-count: 3; column-gap: 14px; }
.yw-photos-flow .yw-photo { break-inside: avoid; margin: 0 0 14px; display: block;
                            border: none; border-radius: 0; background: transparent; }
.yw-photos-flow .yw-photo img { height: auto; aspect-ratio: auto; object-fit: unset; }
@media (max-width: 900px) { .yw-photos.yw-photos-flow { column-count: 2; } }
@media (max-width: 560px) { .yw-photos.yw-photos-flow { column-count: 1; } }

/* Agrandissement désactivé (option lightbox:false du bloc) */
.yw-photos-nolb .yw-photo { cursor: default; }
