/* ============ Réglages communs galerie ============ */
.gallery-page { --gallery-w: 1200px; }

/* Grille de miniatures */
.gallery-page .michel-gallery { width: min(100%, var(--gallery-w));
margin: 16px auto 24px auto;
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 12px; }
@media (max-width:1100px){ .gallery-page .michel-gallery { grid-template-columns: repeat(3,1fr); } }
@media (max-width:780px){ .gallery-page .michel-gallery { grid-template-columns: repeat(2,1fr); } }
@media (max-width:480px){ .gallery-page .michel-gallery { grid-template-columns: 1fr; } }

/* Vignettes robustes (ratio 3:2) */
.gallery-page .michel-gallery .thumb { position: relative;
display: block;
overflow: hidden;
border-radius: 8px;
background: #eee;
border: 1px solid var(--bordure, #ddd); }
.gallery-page .michel-gallery .thumb::before { content: "";
display: block;
padding-top: 66.6667%; }
.gallery-page .michel-gallery .thumb img { position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
display: block;
transition: transform .2s ease; }
.gallery-page .michel-gallery .thumb:hover img { transform: scale(1.03); }

/* Bandeau titre + note alignés sur la grille */
.gallery-page .g1418-band,
.gallery-page .michel-note { width: min(100%, var(--gallery-w));
margin-left: auto;
margin-right: auto; }
.gallery-page .michel-note { margin-bottom: 40px;
font-size: .95rem;
color: #444; }

/* ============ Lightbox ============ */
.gallery-page .lightbox { position: fixed;
inset: 0;
background: rgba(0,0,0,.9);
z-index: 10000;
display: none;

/* Réglages faciles */
--lb-top: 24px;

/* bande noire AU-DESSUS du bandeau */
--lb-bottom: 14px;

/* bande noire EN DESSOUS de la photo */
--lb-banner-h: 56px;

/* hauteur du bandeau bleu-vert */
--lb-banner-bg: #096b72; }
.gallery-page .lightbox.is-open { display: flex;
justify-content: center;

/* centre horizontalement */
align-items: flex-start;

/* colle en haut */
padding-top: var(--lb-top);
padding-bottom: var(--lb-bottom); }

/* Cadre (bandeau + image) */
.gallery-page .lightbox__frame { display: inline-flex;
flex-direction: column;
align-items: stretch;
max-width: min(98vw, var(--content-width, 1400px));
border-radius: 6px;
overflow: hidden;
box-shadow: 0 10px 30px rgba(0,0,0,.6);
line-height: 0;
margin: 0 auto;

/* sécurité anti-décalage */ }

/* Bandeau bleu-vert + boutons */
.gallery-page .lightbox__banner { height: var(--lb-banner-h);
background: var(--lb-banner-bg);
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 12px; }
.gallery-page .lb-actions { display: flex;
gap: 8px; }
.gallery-page .lb-btn { appearance: none;
border: 1px solid rgba(255,255,255,.35);
background: transparent;
color: #fff;
padding: 6px 10px;
border-radius: 6px;
cursor: pointer;
font-size: .95rem;
line-height: 1; }
.gallery-page .lb-btn.is-icon { width: 40px;
padding: 6px 0;
font-size: 18px; }
.gallery-page .lb-btn:hover { background: rgba(255,255,255,.12); }
.gallery-page .lb-btn:focus { outline: 2px solid #fff;
outline-offset: 2px; }

/* Image : entière, non tronquée */
.gallery-page .lightbox__img { display: block;
width: 100%;
height: auto;
border-radius: 0;
max-height: calc(100vh - var(--lb-banner-h) - var(--lb-top) - var(--lb-bottom));
box-shadow: none; }

/* Légende (affichée seulement si présente) */
.gallery-page .lightbox__caption { display: none;
position: absolute;
left: 20px;
right: 20px;
bottom: 18px;
text-align: center;
color: #fff;
font-size: clamp(1.15rem, 1.8vw, 1.6rem);
line-height: 1.35;
font-weight: 500;
opacity: .95;
text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.gallery-page .lightbox.has-caption .lightbox__caption { display: block; }

/* (Compat) on cache d’anciens boutons éventuels */
.gallery-page .lightbox__btn { display: none !important; }
