/* UFT – Bandeau RBN en direct
 * Couleurs modifiables depuis Apparence > Personnaliser > CSS additionnel, par ex. :
 * .uftrb { --uftrb-fond: #12181c; --uftrb-accent: #f0a500; }
 * Habillages fournis : sombre (défaut) et uft (charte uft.net) via theme="uft".
 *
 * Toutes les règles sont préfixées par .uftrb et remettent à zéro la typographie :
 * les thèmes appliquent souvent de grandes tailles de police et interlignes aux
 * div/span/a/p, ce qui débordait de la hauteur fixe de la première version.
 */
.uftrb {
	--uftrb-fond: #1b2228;
	--uftrb-texte: #e8e4da;
	--uftrb-discret: #9aa3a8;
	--uftrb-accent: #f0a500;
	--uftrb-neuf: #8fd97a;
	--uftrb-freq: var(--uftrb-accent);
	--uftrb-titre-fond: var(--uftrb-accent);
	--uftrb-titre-texte: #1b1b1b;
	--uftrb-led: #c62828;
	--uftrb-bordure-haut: rgba(255, 255, 255, .06);
	--uftrb-bordure-bas: var(--uftrb-accent);
	--uftrb-separateur: rgba(255, 255, 255, .15);
	--uftrb-police: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	display: flex !important;
	flex-wrap: nowrap;
	align-items: stretch;
	width: 100%;
	max-width: 100%;
	min-height: 40px;
	margin: 0;
	padding: 0;
	background: var(--uftrb-fond);
	color: var(--uftrb-texte);
	font-family: var(--uftrb-police);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	overflow: hidden;
	box-sizing: border-box;
	border-top: 1px solid var(--uftrb-bordure-haut);
	border-bottom: 2px solid var(--uftrb-bordure-bas);
}
.uftrb *,
.uftrb *::before,
.uftrb *::after {
	box-sizing: border-box;
	line-height: inherit;
	margin: 0;
	max-width: none;
}
/* Si un <p> ou un <br> a tout de même été injecté, on le neutralise. */
.uftrb p { display: contents; font: inherit; color: inherit; letter-spacing: inherit; }
.uftrb br { display: none; }

.uftrb.uftrb--cache { display: none !important; }

/* Libellé à gauche */
.uftrb .uftrb__titre {
	flex: 0 0 auto;
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 8px;
	padding: 0 14px;
	position: relative;
	background: var(--uftrb-titre-fond);
	color: var(--uftrb-titre-texte);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	white-space: nowrap;
}
.uftrb .uftrb__titre-texte {
	display: inline;
	font: inherit;
	color: inherit;
	white-space: nowrap;
}
.uftrb .uftrb__led {
	flex: 0 0 8px;
	display: block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--uftrb-led);
	box-shadow: 0 0 0 2px rgba(0, 0, 0, .15);
	animation: uftrb-led 1.6s ease-in-out infinite;
}
@keyframes uftrb-led { 50% { opacity: .35; } }

/* Zone défilante */
.uftrb .uftrb__fenetre {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	overflow: hidden;
	position: relative;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}
.uftrb .uftrb__piste,
.uftrb .uftrb__double {
	display: inline-flex;
	flex-wrap: nowrap;
	align-items: center;
	flex: 0 0 auto;
	white-space: nowrap;
}
.uftrb .uftrb__piste { padding-left: 12px; }

.uftrb .uftrb__piste--defile {
	animation-name: uftrb-defile;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}
.uftrb:hover .uftrb__piste--defile,
.uftrb:focus-within .uftrb__piste--defile { animation-play-state: paused; }
@keyframes uftrb-defile {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

/* Un spot */
.uftrb a.uftrb__spot {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: baseline;
	gap: 8px;
	padding: 0 16px 0 0;
	margin: 0 16px 0 0;
	font-size: 14px;
	color: var(--uftrb-texte) !important;
	text-decoration: none !important;
	border: 0;
	border-right: 1px solid var(--uftrb-separateur);
	background: none;
	box-shadow: none;
	white-space: nowrap;
}
.uftrb a.uftrb__spot:hover .uftrb__call,
.uftrb a.uftrb__spot:focus .uftrb__call { color: var(--uftrb-accent); }
.uftrb .uftrb__call {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .03em;
}
.uftrb .uftrb__freq {
	font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	font-size: 14px;
	color: var(--uftrb-freq);
}
.uftrb .uftrb__wpm {
	font-size: 12px;
	color: var(--uftrb-discret);
}
.uftrb .uftrb__spot--neuf .uftrb__call::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-right: 6px;
	border-radius: 50%;
	background: var(--uftrb-neuf);
	vertical-align: middle;
}
.uftrb .uftrb__vide {
	display: inline-block;
	padding-right: 24px;
	font-size: 13px;
	font-style: italic;
	color: var(--uftrb-discret);
	white-space: nowrap;
}

/* Crédit à droite */
.uftrb a.uftrb__source {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	padding: 0 12px;
	font-size: 11px;
	color: var(--uftrb-discret) !important;
	text-decoration: none !important;
	white-space: nowrap;
}
.uftrb a.uftrb__source:hover { color: var(--uftrb-texte) !important; }

/* -------------------------------------------------------------------------
 * Habillage « uft » : [uft_rbn_bandeau theme="uft"]
 * Reprend la charte de uft.net : fond clair, bleu marine des titres,
 * bleu des liens, police Poppins du site et liseré tricolore du logo.
 * ---------------------------------------------------------------------- */
.uftrb.uftrb--uft {
	--uftrb-fond: #f3f5f8;
	--uftrb-texte: #1c244b;
	--uftrb-discret: #5c6378;
	--uftrb-accent: #1535a9;
	--uftrb-freq: #1535a9;
	--uftrb-neuf: #0fb36c;
	--uftrb-titre-fond: #1c244b;
	--uftrb-titre-texte: #ffffff;
	--uftrb-led: #ef4135;
	--uftrb-bordure-haut: #e3e7ef;
	--uftrb-bordure-bas: #e3e7ef;
	--uftrb-separateur: #d5dae4;
	--uftrb-police: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	border-bottom-width: 1px;
}
.uftrb.uftrb--uft .uftrb__titre {
	font-weight: 600;
	letter-spacing: .05em;
}
/* Liseré bleu-blanc-rouge sous le libellé, comme sur le logo UFT. */
.uftrb.uftrb--uft .uftrb__titre::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: linear-gradient(90deg, #0055a4 0 33.34%, #ffffff 33.34% 66.67%, #ef4135 66.67% 100%);
}
.uftrb.uftrb--uft .uftrb__led { box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.uftrb.uftrb--uft .uftrb__call { font-weight: 600; }
.uftrb.uftrb--uft .uftrb__freq { font-weight: 500; }

/* Mobile : libellé plus compact, sans crédit ni vitesse */
@media (max-width: 600px) {
	.uftrb .uftrb__titre { padding: 0 10px; gap: 6px; font-size: 11px; }
	.uftrb a.uftrb__source,
	.uftrb .uftrb__wpm { display: none; }
	.uftrb a.uftrb__spot { margin-right: 12px; padding-right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.uftrb .uftrb__led { animation: none; }
	.uftrb .uftrb__fenetre { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}
