/* Academy H5P Lightbox — overlay plein écran (v3.36.0)
 * Copyright (c) 2024-2026 Entreprises Miron & Co.
 */

body.aca-h5p-lb-locked {
	overflow: hidden;
}

.aca-h5p-lb {
	position: fixed; inset: 0;
	display: none;
	font-family: inherit;
}
.aca-h5p-lb.is-open { display: block; }

.aca-h5p-lb__backdrop {
	position: absolute; inset: 0;
	background: rgba(15, 18, 30, 0.78);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	animation: acaH5pLbFadeIn 180ms ease-out;
}

.aca-h5p-lb__frame {
	position: absolute;
	inset: 4vh 4vw;
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	display: flex; flex-direction: column;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
	animation: acaH5pLbScaleIn 220ms cubic-bezier(.2, .8, .25, 1.05);
}

.aca-h5p-lb__head {
	display: flex; align-items: center; gap: 8px;
	padding: 12px 14px;
	background: linear-gradient(135deg, #fef3ff 0%, #fffaf0 100%);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.aca-h5p-lb__title {
	flex: 1;
	font-size: 17px;
	font-weight: 700;
	color: #1a1a2e;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.aca-h5p-lb__nav-prev,
.aca-h5p-lb__nav-next,
.aca-h5p-lb__close {
	background: rgba(0, 0, 0, 0.06);
	border: none;
	width: 38px; height: 38px;
	border-radius: 10px;
	cursor: pointer;
	font-size: 22px;
	color: #1a1a2e;
	transition: all 120ms ease;
	font-weight: bold;
	line-height: 1;
}
.aca-h5p-lb__nav-prev:hover:not(:disabled),
.aca-h5p-lb__nav-next:hover:not(:disabled),
.aca-h5p-lb__close:hover {
	background: rgba(0, 0, 0, 0.14);
	transform: scale(1.06);
}
.aca-h5p-lb__nav-prev:disabled,
.aca-h5p-lb__nav-next:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}
.aca-h5p-lb__close {
	background: #ff4f6e;
	color: #fff;
	font-size: 16px;
}
.aca-h5p-lb__close:hover {
	background: #e63b58;
}

.aca-h5p-lb__body {
	flex: 1;
	overflow: auto;
	padding: 16px;
	background: #f8fafc;
	display: block;
	position: relative;
}

.aca-h5p-lb__body iframe {
	width: 100% !important;
	min-height: 480px;
	border: none;
	border-radius: 8px;
	background: #fff;
}

/* v3.36.1 — iframe principal lightbox (frame route Plugin) */
.aca-h5p-lb__body .aca-h5p-lb__iframe {
	width: 100%;
	height: 100%;
	min-height: calc(92vh - 140px); /* full height - head - footer */
	display: block;
	background: #fff;
	border: none;
	border-radius: 8px;
}
@media (max-width: 720px) {
	.aca-h5p-lb__body .aca-h5p-lb__iframe {
		min-height: calc(100vh - 120px);
		border-radius: 0;
	}
}

.aca-h5p-lb__loading,
.aca-h5p-lb__error {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 240px;
	font-size: 16px;
	color: #6b7280;
}

.aca-h5p-lb__error {
	color: #b91c1c;
}

.aca-h5p-lb__footer {
	padding: 10px 14px;
	background: rgba(0, 0, 0, 0.04);
	border-top: 1px solid rgba(0, 0, 0, 0.06);
	font-size: 13px;
	color: #6b7280;
	text-align: center;
}

.aca-h5p-lb__counter {
	font-variant-numeric: tabular-nums;
}

@keyframes acaH5pLbFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}
@keyframes acaH5pLbScaleIn {
	from { opacity: 0; transform: scale(0.94) translateY(8px); }
	to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Mobile : full-screen sans marges */
@media (max-width: 720px) {
	.aca-h5p-lb__frame {
		inset: 0;
		border-radius: 0;
	}
	.aca-h5p-lb__title {
		font-size: 15px;
	}
	.aca-h5p-lb__nav-prev,
	.aca-h5p-lb__nav-next,
	.aca-h5p-lb__close {
		width: 34px; height: 34px;
		font-size: 18px;
	}
}
