/* Lightbox commune — template-parts/page/lightbox.php + scripts/apose-lightbox.js.
   Chargée par apose_lightbox_enqueue() (inc/apose-pages.php) : L'histoire, Galerie, cadrans de la fiche montre. */
/* Plein écran, image centrée : tout clic hors de l'image tombe sur le <dialog> = fermeture */
.apose-lightbox { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden; }
.apose-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.apose-lightbox::backdrop { background: rgba(17, 17, 17, .92); }
.apose-lightbox[open] { animation: apose-lightbox-in .2s ease; }
.apose-lightbox__img { display: block; width: auto; max-width: calc(100vw - 160px); height: auto; max-height: calc(100dvh - 104px); /* place des flèches et du compteur */ object-fit: contain; background: var(--apose-white); }
.apose-lightbox__fermer {
	position: fixed; top: 16px; right: 16px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
	border: 1px solid rgba(255, 255, 255, .6); border-radius: 50%; background: transparent; color: var(--apose-white);
	font: 300 26px/1 var(--apose-font); cursor: pointer;
}
.apose-lightbox__fermer:is(:hover, :focus-visible) { border-color: var(--apose-white); background: rgba(255, 255, 255, .12); outline: none; }
/* Défilement : flèches sur les côtés, compteur en bas */
.apose-lightbox__nav {
	position: fixed; top: 50%; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; transform: translateY(-50%);
	border: 1px solid rgba(255, 255, 255, .6); border-radius: 50%; background: rgba(17, 17, 17, .35); color: var(--apose-white); cursor: pointer;
}
.apose-lightbox__nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.apose-lightbox__nav--prec { left: 16px; }
.apose-lightbox__nav--suiv { right: 16px; }
.apose-lightbox__nav:is(:hover, :focus-visible) { border-color: var(--apose-white); background: rgba(255, 255, 255, .12); outline: none; }
.apose-lightbox__compteur { position: fixed; bottom: 16px; left: 0; right: 0; margin: 0; text-align: center; font: 400 var(--apose-fs-label)/1.3 var(--apose-font); letter-spacing: .05em; color: var(--apose-white); }
.apose-lightbox.is-seule :is(.apose-lightbox__nav, .apose-lightbox__compteur) { display: none; }
@media (max-width: 767px) {
	.apose-lightbox__nav { top: auto; bottom: 8px; width: 40px; height: 40px; transform: none; } /* en bas, de part et d'autre du compteur */
	.apose-lightbox__compteur { bottom: 20px; }
	.apose-lightbox__img { max-width: calc(100vw - 24px); max-height: calc(100dvh - 140px); }
}
@keyframes apose-lightbox-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) { .apose-lightbox[open] { animation: none; } }
