/* CB Video Popup */
html.cbvp-noscroll,
html.cbvp-noscroll body {
	overflow: hidden;
}

.cbvp-overlay {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4vmin;
	background: var(--cbvp-overlay, rgba(0, 0, 0, 0.85));
	z-index: var(--cbvp-z, 999999);
	opacity: 0;
	transition: opacity 0.3s ease;
	-webkit-tap-highlight-color: transparent;
}

.cbvp-overlay.cbvp-visible {
	opacity: 1;
}

.cbvp-overlay[hidden] {
	display: none;
}

.cbvp-dialog {
	position: relative;
	width: 100%;
	max-width: min(var(--cbvp-max-width, 720px), 90vw);
	transform: scale(0.96);
	transition: transform 0.3s ease;
}

.cbvp-overlay.cbvp-visible .cbvp-dialog {
	transform: scale(1);
}

.cbvp-video-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: var(--cbvp-ratio, 16 / 9);
	background: #000;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cbvp-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
	background: #000;
}

.cbvp-close {
	position: absolute;
	top: -14px;
	right: -14px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	line-height: 1;
	color: #fff;
	background: #000;
	border: 2px solid #fff;
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
	z-index: 2;
	transition: transform 0.15s ease, background 0.15s ease;
}

.cbvp-close:hover,
.cbvp-close:focus {
	transform: scale(1.1);
	background: #333;
	outline: none;
}

/* Sur petit écran, on ramène la croix à l'intérieur pour ne pas la couper. */
@media (max-width: 560px) {
	.cbvp-close {
		top: 8px;
		right: 8px;
	}
}
