/* Bandeau événement — accueil du hub (cf. includes/event-spotlight.php).
   CSS autonome : output.css (Tailwind) est pré-compilé hors serveur. */

.f3e-spot {
	--spot-accent: var(--Primary-600, #E20041);
	--spot-bg: #0e1013;
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: grid;
	grid-template-columns: minmax(0, 600px) auto;
	justify-content: space-evenly;
	align-items: center;
	gap: clamp(24px, 6vw, 120px);
	margin: 0 0 clamp(32px, 4vw, 56px);
	padding: clamp(28px, 4vw, 56px) clamp(24px, 5vw, 72px);
	background: var(--spot-bg);
	color: #fff;
}

/* Fond d'ambiance : l'image d'aperçu floutée, teintée de la couleur du site */
.f3e-spot__ambient {
	position: absolute;
	inset: -40px;
	z-index: -2;
	background-size: cover;
	background-position: center;
	filter: blur(40px) saturate(1.2);
	opacity: .45;
	transform: scale(1.1);
}
.f3e-spot::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(120% 90% at 0% 100%, color-mix(in srgb, var(--spot-accent) 38%, transparent), transparent 60%),
		linear-gradient(90deg, var(--spot-bg) 25%, color-mix(in srgb, var(--spot-bg) 55%, transparent) 75%, transparent);
}

/* ---- Texte ---- */
.f3e-spot__body { max-width: 620px; }

.f3e-spot__badge {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 7px 14px;
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 999px;
	background: rgba(255, 255, 255, .06);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.f3e-spot__dot {
	position: relative;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--spot-accent);
}
.f3e-spot__dot::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--spot-accent);
	animation: f3e-spot-pulse 1.8s ease-out infinite;
}
@keyframes f3e-spot-pulse {
	from { transform: scale(1); opacity: .8; }
	to   { transform: scale(3); opacity: 0; }
}

.f3e-spot .f3e-spot__title {
	margin: 20px 0 0;
	color: #fff;
	font-size: clamp(30px, 4.2vw, 56px);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -.02em;
}
.f3e-spot__subtitle {
	margin: 12px 0 0;
	color: var(--spot-accent);
	font-size: clamp(15px, 1.4vw, 18px);
	font-weight: 600;
	/* l'accent rouge peut manquer de contraste sur le noir : on l'éclaircit */
	filter: brightness(1.35);
}
.f3e-spot__text {
	margin: 18px 0 0;
	color: rgba(255, 255, 255, .78);
	font-size: clamp(15px, 1.25vw, 18px);
	font-weight: 300;
	line-height: 1.55;
}

/* ---- Boutons ---- */
.f3e-spot__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 30px;
}
.f3e-spot__btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 22px;
	border: 1px solid transparent;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.f3e-spot__btn:hover { transform: translateY(-1px); }
.f3e-spot__btn--play { background: #fff; color: #111; }
.f3e-spot__btn--play:hover { background: var(--spot-accent); color: #fff; }
.f3e-spot__btn--link { border-color: rgba(255, 255, 255, .35); color: #fff; }
.f3e-spot__btn--link:hover { border-color: #fff; background: rgba(255, 255, 255, .08); color: #fff; }
.f3e-spot__dur {
	padding: 3px 7px;
	border-radius: 4px;
	background: rgba(0, 0, 0, .08);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}
.f3e-spot__btn--play:hover .f3e-spot__dur { background: rgba(255, 255, 255, .2); }
.f3e-spot__btn:focus-visible,
.f3e-spot__frame:focus-visible,
.f3e-spot__close:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

/* ---- Pastilles (plusieurs vidéos) ---- */
.f3e-spot__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 26px;
}
.f3e-spot__chip {
	position: relative;
	overflow: hidden;
	min-height: 38px;
	padding: 0 16px;
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 999px;
	background: rgba(255, 255, 255, .06);
	color: rgba(255, 255, 255, .75);
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition: border-color .2s, color .2s, background-color .2s;
}
.f3e-spot__chip:hover { border-color: rgba(255, 255, 255, .5); color: #fff; }
.f3e-spot__chip.is-active { border-color: #fff; background: rgba(255, 255, 255, .12); color: #fff; }
.f3e-spot__chip:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.f3e-spot__chip-label { position: relative; }
/* La pastille active se remplit pendant que son aperçu est affiché */
.f3e-spot__chip-fill {
	position: absolute;
	inset: 0;
	width: 0;
	background: color-mix(in srgb, var(--spot-accent) 55%, transparent);
}
.f3e-spot__chip.is-active .f3e-spot__chip-fill {
	animation: f3e-spot-fill var(--f3e-rotate, 7s) linear forwards;
}
.f3e-spot.is-paused .f3e-spot__chip-fill { animation-play-state: paused; }
@keyframes f3e-spot-fill { from { width: 0; } to { width: 100%; } }

/* ---- Cadre vidéo « story » ---- */
.f3e-spot__frame {
	position: relative;
	display: block;
	width: clamp(220px, 22vw, 300px);
	aspect-ratio: 9 / 16;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 22px;
	background: #000;
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, .14),
		0 30px 60px -20px rgba(0, 0, 0, .8),
		0 0 80px -10px color-mix(in srgb, var(--spot-accent) 45%, transparent);
	cursor: pointer;
	transform: rotate(2deg);
	transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}
.f3e-spot__frame:hover { transform: rotate(0) scale(1.02); }
.f3e-spot--landscape .f3e-spot__frame {
	width: clamp(300px, 38vw, 560px);
	aspect-ratio: 16 / 9;
	transform: none;
}
.f3e-spot__teaser {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
}
.f3e-spot__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .55));
}
.f3e-spot__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 68px;
	height: 68px;
	margin: -34px 0 0 -34px;
	padding-left: 4px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: #111;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
	transition: transform .3s, background-color .3s, color .3s;
}
.f3e-spot__frame:hover .f3e-spot__play {
	transform: scale(1.1);
	background: var(--spot-accent);
	color: #fff;
}
.f3e-spot__sound {
	position: absolute;
	left: 50%;
	bottom: 16px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
	transform: translateX(-50%);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

/* ---- Fenêtre vidéo ---- */
/* Plein écran + centrage flex : les resets du thème annulent le centrage
   natif du <dialog> (margin:auto), la vidéo partait en haut à gauche. */
.f3e-spot__modal {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	background: transparent;
	color: #fff;
}
.f3e-spot__modal[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}
.f3e-spot__modal::backdrop {
	background: rgba(8, 9, 11, .88);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}
.f3e-spot__modal[open] { animation: f3e-spot-in .25s ease-out; }
@keyframes f3e-spot-in {
	from { opacity: 0; transform: scale(.96); }
	to   { opacity: 1; transform: none; }
}
.f3e-spot__player {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 92vw;
}
.f3e-spot__bars {
	display: flex;
	gap: 4px;
}
.f3e-spot__bars > span {
	flex: 1;
	height: 3px;
	overflow: hidden;
	border-radius: 2px;
	background: rgba(255, 255, 255, .28);
}
.f3e-spot__bars > span > i {
	display: block;
	width: 0;
	height: 100%;
	background: #fff;
}
.f3e-spot__meta {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	min-height: 20px;
	font-size: 15px;
	font-weight: 600;
}
.f3e-spot__meta[hidden] { display: none; }
.f3e-spot__meta-count {
	color: rgba(255, 255, 255, .6);
	font-size: 13px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.f3e-spot__full {
	display: block;
	width: auto !important;
	max-width: 92vw !important;
	height: auto !important;
	max-height: calc(88dvh - 40px);
	border-radius: 16px;
	background: #000;
	box-shadow: 0 40px 100px rgba(0, 0, 0, .6);
}
.f3e-spot--multi .f3e-spot__full { max-height: calc(88dvh - 70px); }
.f3e-spot__nav {
	display: grid;
	place-items: center;
	flex: none;
	width: 52px;
	height: 52px;
	margin: 0 clamp(8px, 2vw, 28px);
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 50%;
	background: rgba(0, 0, 0, .4);
	color: #fff;
	cursor: pointer;
	transition: background-color .2s, opacity .2s;
}
.f3e-spot__nav:hover { background: rgba(255, 255, 255, .15); }
.f3e-spot__nav:disabled { opacity: .25; cursor: default; }
.f3e-spot__nav:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.f3e-spot__close {
	position: fixed;
	top: 18px;
	right: 18px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 50%;
	background: rgba(0, 0, 0, .4);
	color: #fff;
	cursor: pointer;
	transition: background-color .2s;
}
.f3e-spot__close:hover { background: rgba(255, 255, 255, .15); }

/* ---- Mobile ---- */
@media (max-width: 767px) {
	.f3e-spot {
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
		text-align: center;
		gap: 28px;
		padding: 36px 20px 40px;
	}
	.f3e-spot::before {
		background:
			radial-gradient(120% 60% at 50% 100%, color-mix(in srgb, var(--spot-accent) 35%, transparent), transparent 70%),
			linear-gradient(180deg, var(--spot-bg) 30%, color-mix(in srgb, var(--spot-bg) 70%, transparent));
	}
	.f3e-spot__actions { justify-content: center; }
	.f3e-spot__btn { flex: 1 1 100%; justify-content: center; }
	/* la vidéo s'intercale entre le texte et les boutons */
	.f3e-spot__body { display: contents; }
	.f3e-spot__badge,
	.f3e-spot__title,
	.f3e-spot__subtitle,
	.f3e-spot__text { order: 1; }
	.f3e-spot__frame { order: 2; width: min(64vw, 260px); transform: none; }
	.f3e-spot--landscape .f3e-spot__frame { width: 100%; }
	.f3e-spot__actions { order: 4; width: 100%; margin-top: 0; }
	.f3e-spot .f3e-spot__title,
	.f3e-spot__subtitle,
	.f3e-spot__text { margin-top: 0; }
	.f3e-spot__badge { margin-bottom: -12px; }
	.f3e-spot__chips { order: 3; justify-content: center; margin-top: -8px; }
	.f3e-spot__player { max-width: 100vw; padding: 64px 12px 12px; }
	.f3e-spot__full { max-width: calc(100vw - 24px) !important; max-height: calc(100dvh - 120px); border-radius: 12px; }
	.f3e-spot--multi .f3e-spot__full { max-height: calc(100dvh - 140px); }
	.f3e-spot__nav {
		position: fixed;
		top: 50%;
		z-index: 2;
		width: 40px;
		height: 40px;
		margin: -20px 0 0;
	}
	.f3e-spot__nav--prev { left: 6px; }
	.f3e-spot__nav--next { right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
	.f3e-spot__dot::after,
	.f3e-spot__chip-fill,
	.f3e-spot__modal[open] { animation: none !important; }
	.f3e-spot__frame,
	.f3e-spot__frame:hover { transform: none; }
}
