/* Centris Listings — visionneuse de galerie.
 *
 * Ne style QUE la visionneuse ouverte. La galerie de la fiche garde son
 * apparence d'origine : ce fichier ne touche pas a .gallery, .stw ni
 * .prettyPhoto_container, dont la mise en page vient du theme.
 *
 * CSS de positionnement uniquement, comme sur latkey : le fond sombre et le
 * centrage sont fonctionnels (une visionneuse sans eux est inutilisable).
 * Couleurs et typographie se surchargent dans le theme enfant.
 */

.cl-gallery-item {
	cursor: pointer;
}

.cl-gallery-item:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* ---------- Visionneuse ---------- */

.cl-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .88);
}

.cl-lightbox.is-open {
	display: flex;
}

.cl-lb-img {
	max-width: 92vw;
	max-height: 86vh;
	object-fit: contain;
}

.cl-lightbox button {
	position: absolute;
	background: none;
	border: 0;
	color: #fff;
	cursor: pointer;
	line-height: 1;
	padding: 10px 14px;
	opacity: .8;
	transition: opacity .15s ease;
}

.cl-lightbox button:hover,
.cl-lightbox button:focus-visible {
	opacity: 1;
}

.cl-lightbox button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.cl-lb-close {
	top: 10px;
	right: 14px;
	font-size: 34px;
}

.cl-lb-prev,
.cl-lb-next {
	top: 50%;
	transform: translateY(-50%);
	font-size: 48px;
}

.cl-lb-prev { left: 8px; }
.cl-lb-next { right: 8px; }

.cl-lb-counter {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	color: #fff;
	font-size: 13px;
	letter-spacing: .04em;
	opacity: .75;
}

body.cl-lb-open {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.cl-lightbox button {
		transition: none;
	}
}
