/* Visionneuse d'images du thème enfant (remplace WP Featherlight). */
.vmc-lb-open { overflow: hidden; }
.vmc-lb-open body { padding-right: var(--vmc-lb-scrollbar, 0); }

.vmc-lb {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(10, 10, 12, .92);
	-webkit-tap-highlight-color: transparent;
}
.vmc-lb.is-open { display: flex; animation: vmc-lb-fade .18s ease-out; }
@keyframes vmc-lb-fade { from { opacity: 0; } to { opacity: 1; } }

.vmc-lb__stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 56px 72px;
	box-sizing: border-box;
}
.vmc-lb__figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; }
.vmc-lb__img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 140px);
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 18px 60px rgba(0, 0, 0, .45);
	transition: opacity .15s ease;
}
.vmc-lb.is-loading .vmc-lb__img { opacity: .25; }
.vmc-lb__caption {
	margin-top: 12px;
	max-width: 900px;
	color: #f2f2f2;
	font-size: 15px;
	line-height: 1.45;
	text-align: center;
}

.vmc-lb__spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 36px;
	height: 36px;
	margin: -18px 0 0 -18px;
	border: 3px solid rgba(255, 255, 255, .25);
	border-top-color: #fff;
	border-radius: 50%;
	opacity: 0;
	pointer-events: none;
}
.vmc-lb.is-loading .vmc-lb__spinner { opacity: 1; animation: vmc-lb-spin .8s linear infinite; }
@keyframes vmc-lb-spin { to { transform: rotate(360deg); } }

.vmc-lb__btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .1);
	color: #fff;
	line-height: 0;
	cursor: pointer;
	transition: background .15s ease;
}
.vmc-lb__btn:hover, .vmc-lb__btn:focus-visible { background: rgba(255, 255, 255, .24); }
.vmc-lb__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vmc-lb__btn[hidden] { display: none; }
.vmc-lb__btn svg { display: block; width: 24px; height: 24px; pointer-events: none; }
.vmc-lb__close { top: 12px; right: 12px; }
.vmc-lb__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.vmc-lb__next { right: 12px; top: 50%; transform: translateY(-50%); }
.vmc-lb__counter {
	position: absolute;
	top: 24px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, .8);
	font: 500 14px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (max-width: 640px) {
	.vmc-lb__stage { padding: 56px 8px 24px; }
	.vmc-lb__img { max-height: calc(100vh - 120px); border-radius: 4px; }
	.vmc-lb__nav { top: auto; bottom: 14px; transform: none; width: 44px; height: 44px; }
	.vmc-lb__prev { left: 14px; }
	.vmc-lb__next { right: 14px; }
	.vmc-lb__caption { font-size: 14px; padding: 0 56px; }
}

@media (prefers-reduced-motion: reduce) {
	.vmc-lb.is-open { animation: none; }
	.vmc-lb.is-loading .vmc-lb__spinner { animation-duration: 2s; }
}
