/* =============================================================================
   VISIONNEUSE VIDÉO — Plein écran, charte AZL
   ============================================================================= */

body.azl-video-open {
	overflow: hidden;
}

.azl-video-lightbox,
.azl-video-lightbox *,
.azl-video-lightbox *::before,
.azl-video-lightbox *::after {
	box-sizing: border-box;
}

/* Neutralise les styles bouton injectés par Astra/WP (padding, bordures…) */
.azl-video-lightbox button {
	border: none !important;
	box-shadow: none !important;
	outline: none;
	cursor: pointer;
	padding: 0 !important;
	line-height: normal !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	font: inherit;
	-webkit-appearance: none;
	appearance: none;
}

.azl-video-lightbox svg {
	overflow: visible;
}

.azl-video-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.azl-video-lightbox[hidden] {
	display: none !important;
}

.azl-video-lightbox.is-open {
	animation: azl-video-fade-in 0.28s ease;
}

.azl-video-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgb(15 23 42 / 0.82);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.azl-video-lightbox__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: min(1120px, 100%);
	max-height: min(92vh, 900px);
	background: linear-gradient(165deg, #0f172a 0%, #111827 48%, #0b1220 100%);
	border: 1px solid rgb(255 255 255 / 0.08);
	border-radius: 20px;
	box-shadow:
		0 32px 64px rgb(0 0 0 / 0.45),
		0 0 0 1px rgb(255 255 255 / 0.04) inset;
	overflow: hidden;
	animation: azl-video-scale-in 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.azl-video-lightbox__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 20px 16px 24px;
	border-bottom: 1px solid rgb(255 255 255 / 0.06);
}

.azl-video-lightbox__meta {
	flex: 1 1 auto;
	min-width: 0;
}

.azl-video-lightbox__eyebrow {
	margin: 0 0 4px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #5db8cc;
}

.azl-video-lightbox__title {
	margin: 0;
	font-family: var(--azl-font-display);
	font-size: clamp(1.125rem, 2vw, 1.375rem);
	font-weight: 700;
	color: #f8fafc;
	line-height: 1.3;
	letter-spacing: -0.02em;
}

.azl-video-lightbox__close {
	flex: 0 0 auto;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 42px !important;
	height: 42px !important;
	min-width: 42px !important;
	max-width: 42px !important;
	padding: 0 !important;
	border: 1px solid rgb(255 255 255 / 0.22) !important;
	border-radius: 12px;
	background: rgb(255 255 255 / 0.14) !important;
	color: #ffffff !important;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.azl-video-lightbox__close:hover {
	background: rgb(255 255 255 / 0.24) !important;
	border-color: rgb(255 255 255 / 0.38) !important;
	color: #ffffff !important;
	transform: scale(1.04);
}

.azl-video-lightbox__close:focus-visible {
	outline: 2px solid #5db8cc;
	outline-offset: 2px;
}

.azl-video-lightbox__close svg {
	display: block !important;
	flex-shrink: 0;
	width: 20px !important;
	height: 20px !important;
	color: #ffffff !important;
	stroke: #ffffff !important;
}

.azl-video-lightbox__close svg path {
	stroke: #ffffff !important;
}

.azl-video-lightbox__stage {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	padding: 0 16px 16px;
}

.azl-video-lightbox__player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 14px;
	overflow: hidden;
	background: #000000;
	box-shadow: 0 16px 40px rgb(0 0 0 / 0.35);
}

.azl-video-lightbox__player iframe,
.azl-video-lightbox__player video {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: #000000;
}

.azl-video-lightbox__player video {
	object-fit: contain;
}

.azl-video-lightbox__player video::-webkit-media-controls-panel {
	background: linear-gradient(transparent, rgb(0 0 0 / 0.65));
}

.azl-video-lightbox__coming-soon {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 24px;
	box-sizing: border-box;
	background:
		radial-gradient(ellipse at center, rgba(30, 149, 176, 0.22) 0%, transparent 55%),
		#0a1520;
	text-align: center;
}

.azl-video-lightbox__coming-soon-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	padding-left: 4px;
}

.azl-video-lightbox__coming-soon-text {
	margin: 0;
	max-width: 22em;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.35;
	color: #fff;
	letter-spacing: 0.01em;
}

.azl-video-lightbox__loader {
	position: absolute;
	inset: 16px 16px 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 14px;
	background: rgb(0 0 0 / 0.35);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.azl-video-lightbox.is-loading .azl-video-lightbox__loader {
	opacity: 1;
}

.azl-video-lightbox__loader-ring {
	width: 44px;
	height: 44px;
	border: 3px solid rgb(255 255 255 / 0.15);
	border-top-color: #1e95b0;
	border-radius: 50%;
	animation: azl-video-spin 0.75s linear infinite;
}

/* ── Déclencheurs widget ─────────────────────────────────────────────────── */

body.azl-app [data-azl-video-trigger] {
	cursor: pointer;
}

body.azl-app .azl-widget__video[data-azl-video-trigger] {
	border: none;
	padding: 0;
	width: 100%;
	text-align: left;
	font: inherit;
	color: inherit;
}

body.azl-app .azl-widget__play {
	transition: background 0.2s ease;
}

body.azl-app [data-azl-video-trigger]:hover .azl-widget__play,
body.azl-app [data-azl-video-trigger]:focus-visible .azl-widget__play {
	background: rgb(15 23 42 / 0.38);
}

body.azl-app .azl-widget__play-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: rgb(255 255 255 / 0.94);
	color: #1e95b0;
	box-shadow: 0 12px 28px rgb(15 23 42 / 0.22);
}

body.azl-app .azl-widget__play-icon svg {
	width: 22px;
	height: 22px;
	margin-left: 3px;
}

body.azl-app [data-azl-video-trigger]:focus-visible {
	outline: none;
}

body.azl-app .azl-widget__video[data-azl-video-trigger]:focus-visible {
	box-shadow: var(--azl-shadow-focus);
}

@keyframes azl-video-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes azl-video-scale-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes azl-video-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
	.azl-video-lightbox {
		padding: 0;
		align-items: stretch;
	}

	.azl-video-lightbox__dialog {
		width: 100%;
		max-height: none;
		height: 100%;
		border-radius: 0;
		border: none;
	}

	.azl-video-lightbox__header {
		padding: max(16px, env(safe-area-inset-top)) 16px 12px;
	}

	.azl-video-lightbox__stage {
		flex: 1;
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding: 0 12px max(12px, env(safe-area-inset-bottom));
	}

	.azl-video-lightbox__player {
		border-radius: 12px;
	}

	.azl-video-lightbox__loader {
		inset: 0 12px max(12px, env(safe-area-inset-bottom));
	}
}
