/* « Pour vous inspirer » : le carnet d'une sortie passée (dev2-galerie.js). Hauteur fixe sur grand écran :
   la photo remplit la fenêtre, les vignettes sont collées dessous, seul le texte défile. */
.gal-dlg { width: min(1100px, 94vw); height: min(720px, 92svh); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 22px; background: #FBF8F2; color: #1C2621; overflow: hidden; }
.gal-dlg::backdrop { background: rgba(14, 22, 18, .82); }
.gal-dlg svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gal { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); height: 100%; }
.gal > * { min-width: 0; min-height: 0; }
.gal-x { position: absolute; top: 14px; right: 14px; z-index: 5; display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #1F3F35; color: #fff; cursor: pointer; }
.gal-ph { position: relative; display: flex; flex-direction: column; height: 100%; background: #1C2621; }
.gal-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.gal-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity .6s ease, transform 6s linear; }
.gal-stage img.on { opacity: 1; transform: scale(1); }
/* vidéo dans le carnet : en premier, sans effet de zoom ; vignette et tirage marqués d'un ▶ */
.gal-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #1C2621; opacity: 0; transition: opacity .6s ease; }
.gal-stage video.on { opacity: 1; z-index: 1; }
.gal-th-v { position: relative; }
.gal-th-v::after, .sa-play { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(28, 38, 33, .55)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='%23fff'/%3E%3C/svg%3E") 55% 50% / 60% no-repeat;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); pointer-events: none; }
.gal-th-v::after { content: ""; width: 24px; height: 24px; margin: -12px 0 0 -12px; }
.gal-nav { position: absolute; top: calc(50% - 35px); z-index: 3; display: grid; place-items: center; width: 46px; height: 46px; margin-top: -23px; border: 0; border-radius: 50%; background: rgba(251, 248, 242, .92); color: #1C2621; cursor: pointer; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .5); transition: transform .3s; }
.gal-nav:hover { transform: scale(1.08); }
.gal-prev { left: 14px; } .gal-next { right: 14px; }
.gal-th { flex: none; display: flex; justify-content: safe center; gap: 6px; padding: 8px; overflow-x: auto; scrollbar-width: none; }
.gal-th::-webkit-scrollbar { display: none; }
.gal-th button { flex: none; width: 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; opacity: .6; cursor: pointer; transition: opacity .3s, border-color .3s; }
.gal-th button.on { opacity: 1; border-color: #F2B544; }
.gal-th img { width: 100%; height: 100%; object-fit: cover; }
.gal-tx { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 2rem 1.8rem 1.5rem; }
.gal-tx h2 { margin: 0 3rem .4rem 0; font-size: clamp(1.4rem, 2.6vw, 2rem); }
.gal-meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: 0 0 .9rem; font-size: .85rem; font-weight: 600; color: var(--accent, #B4532E); }
.gal-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.gal-meta svg { width: 15px; height: 15px; }
.gal-prose p { margin: 0 0 .8rem; line-height: 1.6; color: #3B4640; }
/* tablette en portrait et téléphone : photo en haut au format 4/3, le texte dessous, la fenêtre défile en entier */
@media (max-width: 800px) {
  .gal-dlg { height: auto; max-height: 92svh; overflow: auto; }
  .gal { grid-template-columns: minmax(0, 1fr); height: auto; }
  .gal-ph { height: auto; }
  .gal-stage { flex: none; aspect-ratio: 4 / 3; }
  .gal-th { justify-content: flex-start; }
  .gal-tx { height: auto; overflow: visible; }
  .gal-x { position: sticky; top: 12px; float: right; margin: 12px 12px -54px 0; }
}
@media (max-width: 600px) {
  .gal-dlg { width: 100vw; max-height: 100svh; border-radius: 0; }
  .gal-nav { width: 40px; height: 40px; margin-top: -20px; }
}
@media (prefers-reduced-motion: reduce) { .gal-stage img { transition: none; } }

/* tirages : le mois et l'année sous le titre (demande de Caroline) */
.sa-strip .sa-when { display: block; margin-top: .15rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent, #B4532E); }
.sa-strip .sa-lieu { display: inline-flex; align-items: center; gap: .25rem; margin-top: .1rem; font-size: .74rem; font-weight: 600; color: #55605A; }
.sa-strip .sa-lieu svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
/* « Pour vous inspirer » à 8 tirages : 5 en haut, 3 en bas plutôt que 6 + 2 (demande du 26 octobre 2026) */
@media (min-width: 1000px) { [data-so="past"].sa-strip:has(> li:nth-child(8):last-child) { max-width: 980px; margin-inline: auto; } }
