/* Widget Elementor : Vidéo Google Drive */

.dj-drive-video {
	--dj-dv-ratio: 1.77777;
	position: relative;
	width: 100%;
	margin-inline: auto;
	aspect-ratio: var(--dj-dv-ratio);
	background-color: #0a0a0a;
	overflow: hidden;
	line-height: 0;
	isolation: isolate;
}

/* Repli pour les navigateurs sans aspect-ratio */
@supports not (aspect-ratio: 16 / 9) {
	.dj-drive-video::before {
		content: "";
		display: block;
		padding-top: calc(100% / var(--dj-dv-ratio));
	}
}

.dj-drive-video__player,
.dj-drive-video__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	border: 0;
	object-fit: cover;
}

.dj-drive-video__player {
	z-index: 2;
	background-color: transparent;
	/* Vidéo décorative : aucune interaction possible sur l'élément. */
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.35s ease;
}

.dj-drive-video__player.is-visible {
	opacity: 1;
}

.dj-drive-video__poster {
	z-index: 1;
}

/* Voile de couleur optionnel, réglé depuis l'onglet Style */
.dj-drive-video::after {
	position: absolute;
	inset: 0;
	z-index: 3;
	pointer-events: none;
}

/* Placeholder pendant la mise en cache */
.dj-drive-video__skeleton {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(100deg, #141414 20%, #262626 40%, #141414 60%);
	background-size: 200% 100%;
	animation: dj-dv-shimmer 1.4s linear infinite;
}

@keyframes dj-dv-shimmer {
	0% {
		background-position: 150% 0;
	}
	100% {
		background-position: -50% 0;
	}
}

/* Message affiché uniquement dans l'éditeur Elementor */
.dj-drive-video__notice {
	position: absolute;
	inset: auto 12px 12px 12px;
	z-index: 4;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 14px;
	border-radius: 6px;
	background-color: rgba(0, 0, 0, 0.78);
	color: #fff;
	font-size: 12px;
	line-height: 1.45;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	text-align: left;
}

.dj-drive-video__notice strong {
	font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
	.dj-drive-video__skeleton {
		animation: none;
	}
	.dj-drive-video__player {
		transition: none;
	}
}
