/* Bandeau « Match en direct » : bande noire au-dessus du programme, étiquette rouge en biais comme le rouge des résultats.
   Couleurs et police reprises du thème AS Brecey quand il est actif (valeurs de secours sinon). */

.asbd {
	--asbd-rouge: var(--wp--preset--color--rouge, #DD0106);
	--asbd-rouge-fonce: var(--wp--preset--color--rouge-fonce, #A30004);
	--asbd-rouge-vif: var(--wp--preset--color--rouge-vif, #FF3B3F);
	--asbd-noir: var(--wp--preset--color--noir, #000);
	--asbd-pad-x: clamp(1rem, 3vw, 2rem);
	--asbd-hauteur: 3.5rem;
	--asbd-biais: 1rem;
	position: relative;
	overflow: hidden;
	overflow: clip;
	margin: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.18);
	background: var(--asbd-noir);
	color: #fff;
	font-family: var(--wp--preset--font-family--archivo, Archivo, "Arial Narrow", Arial, sans-serif);
	font-size: 0.9375rem;
	font-weight: 700;
	font-stretch: 82%;
	line-height: 1.2;
	text-transform: uppercase;
}

.asbd[hidden],
.asbd__annonce[hidden],
.asbd__pause[hidden] {
	display: none;
}

/* Collé à l'en-tête et au programme : pas de bande blanche */
.wp-site-blocks > .asb-main:has(> .asbd:not([hidden])) {
	margin-block-start: 0;
}

.asb-main > .asbd {
	margin-block-start: 0;
}

.asbd:not([hidden]) + .asbm-we {
	margin-block-start: 0;
}

.asbd__inner {
	box-sizing: border-box;
	display: flex;
	align-items: stretch;
	max-width: var(--wp--style--global--wide-size, 1240px);
	min-height: var(--asbd-hauteur);
	margin: 0 auto;
	padding-right: var(--asbd-pad-x);
}

/* Le rouge de l'étiquette file jusqu'au bord gauche de l'écran */
.asbd__etiquette {
	position: relative;
	z-index: 1;
	flex: none;
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0;
	padding: 0 calc(var(--asbd-biais) + 0.9rem) 0 var(--asbd-pad-x);
	font-weight: 800;
	letter-spacing: 0.05em;
	white-space: nowrap;
}

.asbd__etiquette::before {
	content: "";
	position: absolute;
	z-index: -1;
	top: 0;
	bottom: 0;
	right: 0;
	left: -100vw;
	background: var(--asbd-rouge);
	clip-path: polygon(0 0, 100% 0, calc(100% - var(--asbd-biais)) 100%, 0 100%);
}

.asbd__etiquette i {
	width: 0.7rem;
	height: 0.7rem;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
	animation: asbd-pouls 1.7s ease-out infinite;
}

@keyframes asbd-pouls {
	to { box-shadow: 0 0 0 0.6rem rgba(255, 255, 255, 0); }
}

.asbd__piste {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	overflow: hidden;
	overflow: clip;
}

.asbd--defile .asbd__piste {
	mask-image: linear-gradient(90deg, transparent, #000 1.5rem, #000 calc(100% - 1.5rem), transparent);
}

.asbd__defile {
	display: flex;
	flex: none;
	width: max-content;
}

.asbd--defile .asbd__defile {
	animation: asbd-defile linear infinite;
}

.asbd--defile .asbd__piste:hover .asbd__defile,
.asbd--defile.est-arrete .asbd__defile {
	animation-play-state: paused;
}

@keyframes asbd-defile {
	to { transform: translateX(var(--asbd-tour)); }
}

.asbd__liste {
	display: flex;
	flex: none;
	gap: 0;
	margin: 0;
	padding: 0 0 0 0.5rem;
	list-style: none;
}

.asbd__el {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
	padding: 0.5rem 1.5rem 0.5rem 1rem;
	border-right: 1px solid rgba(255, 255, 255, 0.22);
	white-space: nowrap;
}

.asbd__equipe {
	padding: 0.15rem 0.45rem;
	border-radius: 0.25rem;
	background: #fff;
	color: var(--asbd-noir);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.03em;
}

.asbd__affiche {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.asbd__affiche img {
	width: 1.5rem;
	height: 1.5rem;
	object-fit: contain;
}

.asbd__score {
	display: inline-flex;
	gap: 0.3rem;
	padding: 0.1rem 0.55rem;
	border-radius: 0.25rem;
	background: var(--asbd-rouge);
	font-size: 1.25rem;
	font-weight: 900;
	font-variant-numeric: tabular-nums;
}

.asbd__score i {
	font-style: normal;
	opacity: 0.75;
}

.asbd__contre {
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.75rem;
	text-transform: lowercase;
}

.asbd__moment {
	color: var(--asbd-rouge-vif);
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.asbd__el--pause .asbd__moment,
.asbd__el--mitemps .asbd__moment,
.asbd__el--termine .asbd__moment,
.asbd__el--prevu .asbd__moment {
	color: rgba(255, 255, 255, 0.78);
}

.asbd__faits {
	display: flex;
	gap: 0.75rem;
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.8125rem;
	font-weight: 600;
}

.asbd__fait {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.asbd__fait::before {
	content: "";
	width: 0.6rem;
	height: 0.6rem;
	border-radius: 50%;
	background: #fff;
}

.asbd__fait--contre::before {
	background: #8c8f94;
}

.asbd__fait--jaune::before,
.asbd__fait--rouge::before {
	width: 0.5rem;
	height: 0.72rem;
	border-radius: 1px;
	background: #f5c518;
}

.asbd__fait--rouge::before {
	background: var(--asbd-rouge-vif);
}

.asbd__fait--remplacement::before {
	content: "⇄";
	width: auto;
	height: auto;
	background: none;
}

.asbd__pause {
	flex: none;
	position: relative;
	align-self: center;
	width: 2.25rem;
	height: 2.25rem;
	margin-left: 0.5rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	cursor: pointer;
}

.asbd__pause::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0.6rem;
	height: 0.75rem;
	transform: translate(-50%, -50%);
	border-left: 0.2rem solid currentColor;
	border-right: 0.2rem solid currentColor;
	box-sizing: border-box;
}

.est-arrete .asbd__pause::before {
	width: 0;
	height: 0;
	margin-left: 0.1rem;
	border-style: solid;
	border-width: 0.4rem 0 0.4rem 0.65rem;
	border-color: transparent transparent transparent currentColor;
}

.asbd__pause:hover,
.asbd__pause:focus-visible {
	background: var(--asbd-rouge);
}

/* Annonce d'un fait : le rouge balaie la bande */
.asbd__annonce {
	position: absolute;
	z-index: 2;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	padding: 0 var(--asbd-pad-x);
	background: var(--asbd-rouge);
	animation: asbd-entree 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.asbd__annonce--jaune {
	background: #f5c518;
	color: #000;
}

.asbd__annonce--contre,
.asbd__annonce--remplacement {
	background: #fff;
	color: #000;
}

.asbd__annonce strong {
	font-size: 1.75rem;
	font-weight: 900;
	font-stretch: 72%;
	font-style: italic;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.asbd__annonce span {
	overflow: hidden;
	font-size: 1rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.asbd__annonce.est-sortie {
	animation: asbd-sortie 0.45s ease-in both;
}

@keyframes asbd-entree {
	from { clip-path: polygon(0 0, 0 0, -2rem 100%, 0 100%); }
	to { clip-path: polygon(0 0, 130% 0, 120% 100%, 0 100%); }
}

@keyframes asbd-sortie {
	from { clip-path: polygon(0 0, 130% 0, 120% 100%, 0 100%); }
	to { clip-path: polygon(130% 0, 130% 0, 120% 100%, 120% 100%); }
}

.asbd--test .asbd__etiquette::before {
	background: var(--wp--preset--color--anthracite, #3A3A3A);
}

/* Téléphone : l'étiquette passe au-dessus, les matchs défilent en dessous */
@media (max-width: 781px) {
	.asbd__inner {
		flex-wrap: wrap;
		padding-right: 0;
	}

	.asbd__etiquette {
		min-height: 2rem;
		font-size: 0.8125rem;
	}

	.asbd__piste {
		flex-basis: 100%;
		order: 3;
		min-height: 3rem;
	}

	.asbd__pause {
		order: 2;
		width: 1.75rem;
		height: 1.75rem;
		margin: 0.125rem var(--asbd-pad-x) 0.125rem auto;
	}

	.asbd__annonce {
		flex-direction: column;
		gap: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.asbd__etiquette i {
		animation: none;
	}

	.asbd__liste {
		flex-wrap: wrap;
	}

	.asbd__defile {
		flex: 1;
		width: auto;
	}

	.asbd__el {
		white-space: normal;
		flex-wrap: wrap;
	}
}
