/* Listenable Video Facade — style de la thumbnail cliquable.
   Aspect ratio 16:9 natif, look YouTube pour être immédiatement compris. */

.lvf-facade {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	overflow: hidden;
	cursor: pointer;
	border: 0;
	padding: 0;
	margin: 0;
}

/* Dans un wrapper WPBakery (.wpb_video_wrapper utilise le trick
   padding-top: 56.25% + height: 0 pour créer le ratio 16:9 côté parent).
   Notre facade doit s'y comporter comme l'iframe originale :
   position: absolute pour remplir l'espace du padding, sans ajouter
   sa propre hauteur en plus. */
.wpb_video_wrapper .lvf-facade {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
}

.lvf-facade__thumb {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: opacity 0.25s ease, transform 0.4s ease;
}

.lvf-facade:hover .lvf-facade__thumb,
.lvf-facade:focus-visible .lvf-facade__thumb {
	opacity: 0.85;
	transform: scale(1.03);
}

.lvf-facade__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 68px;
	height: 48px;
	padding: 0;
	background: transparent;
	border: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: inherit;
}

.lvf-facade__play svg {
	width: 100%;
	height: 100%;
	display: block;
}

.lvf-facade__play-bg {
	fill: #212121;
	fill-opacity: 0.82;
	transition: fill 0.2s ease, fill-opacity 0.2s ease;
}

.lvf-facade:hover .lvf-facade__play-bg,
.lvf-facade:focus-visible .lvf-facade__play-bg {
	fill: #f00;
	fill-opacity: 1;
}

.lvf-facade__play:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 4px;
	border-radius: 14%;
}

/* Iframe de remplacement (injectée par le JS au clic).
   Reçoit les mêmes dimensions que la facade pour un swap invisible. */
.lvf-facade__iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	display: block;
	background: #000;
}

/* Dans un wrapper WPBakery, mêmes règles que pour la facade. */
.wpb_video_wrapper .lvf-facade__iframe {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
}
