/* Onja Radio - lecteur radio persistant */
.hec-radio {
	--hec-navy: #01274E;
	--hec-navy-dark: #071C40;
	--hec-muted: #C9D4E8;
	--hec-red: #C8102E;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9990;
	background: var(--hec-navy);
	color: #fff;
	border-top: 1px solid rgba(255, 255, 255, .18);
	box-shadow: 0 -10px 30px rgba(7, 28, 64, .25);
	font-size: 15px;
	line-height: 1.4;
}
.hec-radio * { box-sizing: border-box; }
.hec-radio__inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 12px 24px;
	display: flex;
	align-items: center;
	gap: 20px;
}
.hec-radio__info { display: flex; align-items: center; gap: 14px; flex: 1 1 0; min-width: 0; }
.hec-radio__logo {
	width: 52px;
	height: 52px;
	flex-shrink: 0;
	border-radius: 4px;
	background: #fff;
	color: var(--hec-navy);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 19px;
	letter-spacing: .04em;
	overflow: hidden;
}
.hec-radio__logo.has-img { background: var(--hec-navy); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.hec-radio__logo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hec-radio__text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hec-radio__top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hec-radio__live {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	padding: 1px 8px;
	border-radius: 999px;
	background: #fff;
	color: var(--r261-accent-text, var(--hec-red));
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	line-height: 1.7;
}
.hec-radio__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hec-red); }
.hec-radio[data-state="playing"] .hec-radio__dot { animation: hecPulse 1.8s infinite; }
.hec-radio__name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hec-radio__now { font-size: 13px; color: var(--hec-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hec-radio[data-state="error"] .hec-radio__now { color: #FFD3D9; }

.hec-radio__controls { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.hec-radio__eq { display: flex; align-items: flex-end; gap: 3px; height: 22px; width: 30px; }
.hec-radio__eq span { display: block; width: 4px; height: 5px; border-radius: 2px; background: rgba(255, 255, 255, .35); }
.hec-radio[data-state="playing"] .hec-radio__eq span { background: #fff; animation: hecEq .9s ease-in-out infinite alternate; }
.hec-radio__eq span:nth-child(2) { animation-delay: .2s; }
.hec-radio__eq span:nth-child(3) { animation-delay: .45s; }
.hec-radio__eq span:nth-child(4) { animation-delay: .1s; }
.hec-radio__eq span:nth-child(5) { animation-delay: .3s; }

/* Boutons : on neutralise les styles par défaut de Hello Elementor */
.hec-radio .hec-radio__play,
.hec-radio .hec-radio__play:hover,
.hec-radio .hec-radio__play:focus {
	width: 54px;
	height: 54px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--hec-navy);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform .15s ease;
}
.hec-radio .hec-radio__play:hover { transform: scale(1.06); }
.hec-radio .hec-radio__mute,
.hec-radio .hec-radio__mute:focus {
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--hec-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.hec-radio .hec-radio__mute:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.hec-radio button:focus-visible,
.hec-radio input:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.hec-radio .hec-icon { display: none; }
.hec-radio[data-state="idle"] .hec-icon--play,
.hec-radio[data-state="error"] .hec-icon--play { display: block; margin-left: 2px; }
.hec-radio[data-state="playing"] .hec-icon--pause { display: block; }
.hec-radio[data-state="loading"] .hec-icon--spin { display: block; animation: hecSpin .8s linear infinite; }
.hec-radio .hec-icon-muted { display: none; }
.hec-radio.is-muted .hec-icon-vol { display: none; }
.hec-radio.is-muted .hec-icon-muted { display: block; }

.hec-radio__volume { flex: 1 1 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.hec-radio__slider { width: 130px; margin: 0; accent-color: #fff; cursor: pointer; }

/* Espace réservé pour que le pied de page ne soit pas caché */
body.has-hec-radio { padding-bottom: 78px; }

/* Transition légère entre les pages */
.transition-fade { transition: opacity .2s ease; }
html.is-animating .transition-fade { opacity: 0; }

@keyframes hecEq { 0% { height: 5px; } 50% { height: 22px; } 100% { height: 9px; } }
@keyframes hecSpin { to { transform: rotate(360deg); } }
@keyframes hecPulse {
	0% { box-shadow: 0 0 0 0 rgba(200, 16, 46, .55); }
	70% { box-shadow: 0 0 0 7px rgba(200, 16, 46, 0); }
	100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0); }
}

@media (max-width: 640px) {
	.hec-radio__inner { padding: 10px 14px; gap: 12px; }
	.hec-radio__volume, .hec-radio__eq { display: none; }
	.hec-radio__logo { width: 44px; height: 44px; font-size: 16px; }
	.hec-radio .hec-radio__play,
	.hec-radio .hec-radio__play:hover,
	.hec-radio .hec-radio__play:focus { width: 48px; height: 48px; }
	body.has-hec-radio { padding-bottom: 70px; }
}

@media (prefers-reduced-motion: reduce) {
	.hec-radio *, .transition-fade { animation: none !important; transition: none !important; }
}

/* ---------- v1.2 : couleurs du tableau de bord, podcasts, bouton Direct ---------- */
.hec-radio { --hec-navy: var(--r261-primary, #01274E); --hec-red: var(--r261-accent, #C8102E); }
.hec-radio [hidden] { display: none !important; }
.hec-radio__inner { flex-wrap: wrap; row-gap: 8px; }
.hec-radio .hec-radio__golive,
.hec-radio .hec-radio__golive:hover,
.hec-radio .hec-radio__golive:focus {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 36px;
	padding: 0 12px;
	border: 1px solid rgba(255, 255, 255, .4);
	border-radius: 999px;
	background: transparent;
	color: #fff;
	font: 700 12px/1 inherit;
	letter-spacing: .08em;
	text-transform: uppercase;
	cursor: pointer;
}
.hec-radio .hec-radio__golive:hover { background: rgba(255, 255, 255, .12); }
.hec-radio__golive-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hec-red); }
.hec-radio[data-mode="track"] .hec-radio__live { color: var(--hec-navy); }
.hec-radio[data-mode="track"] .hec-radio__dot { background: var(--hec-navy); }
.hec-radio__progress { flex: 1 0 100%; display: flex; align-items: center; gap: 12px; color: var(--hec-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.hec-radio__seek { flex: 1; min-width: 0; margin: 0; accent-color: #fff; cursor: pointer; }
body.has-hec-radio { padding-bottom: var(--hec-radio-h, 78px); }

/* ---------- v1.4 : badge en couleur d’accent, contraste automatique ---------- */
.hec-radio__live { background: var(--hec-red); color: var(--r261-on-accent, #fff); }
.hec-radio .hec-radio__dot { background: currentColor; }
.hec-radio[data-mode="track"] .hec-radio__live { background: #fff; color: var(--hec-navy); }

/* ---------- v1.5 : lecteur compact + visualiseur ---------- */
.hec-radio__inner { min-height: 60px; padding: 8px 20px; gap: 18px; }
.hec-radio__info { gap: 12px; }
.hec-radio__logo { width: 44px; height: 44px; border-radius: 8px; font-size: 15px; }
.hec-radio__text { gap: 2px; }
.hec-radio__top { gap: 8px; }
.hec-radio__name { font-size: 15px; }
.hec-radio__now { font-size: 13px; }
.hec-radio__live { padding: 0 7px; font-size: 10px; line-height: 1.8; }
.hec-radio__controls { gap: 14px; }
.hec-radio .hec-radio__play,
.hec-radio .hec-radio__play:hover,
.hec-radio .hec-radio__play:focus { width: 44px; height: 44px; }
.hec-radio .hec-icon { width: 20px; height: 20px; }
.hec-radio .hec-radio__mute,
.hec-radio .hec-radio__mute:focus { width: 38px; height: 38px; }
.hec-radio .hec-radio__golive,
.hec-radio .hec-radio__golive:hover,
.hec-radio .hec-radio__golive:focus { height: 30px; }
.hec-radio__viz { display: block; width: 128px; height: 32px; }
.hec-radio__progress { padding-bottom: 2px; }
body.has-hec-radio { padding-bottom: var(--hec-radio-h, 60px); }
@media (max-width: 640px) {
	.hec-radio__inner { min-height: 56px; padding: 6px 12px; gap: 10px; }
	.hec-radio__logo { width: 40px; height: 40px; }
	.hec-radio .hec-radio__play,
	.hec-radio .hec-radio__play:hover,
	.hec-radio .hec-radio__play:focus { width: 42px; height: 42px; }
	.hec-radio__controls { gap: 8px; }
	.hec-radio__viz--r { display: none; }
	.hec-radio__viz--l { width: 56px; height: 26px; }
	.hec-radio[data-mode="track"] .hec-radio__viz--l { display: none; }
}

/* ---------- v1.9 : réseaux sociaux dans le lecteur ---------- */
.hec-radio .hec-radio__social { display: flex; align-items: center; gap: 2px; margin: 0 6px 0 0; padding: 0 12px 0 0; list-style: none; border-right: 1px solid rgba(255, 255, 255, .16); }
.hec-radio .hec-radio__social a { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: var(--hec-muted); transition: color .2s ease, background .2s ease; }
.hec-radio .hec-radio__social a:hover,
.hec-radio .hec-radio__social a:focus-visible { background: rgba(255, 255, 255, .1); color: var(--hec-red); text-decoration: none; }
.hec-radio .hec-radio__social .r261-icon { width: 17px; height: 17px; }
@media (max-width: 900px) { .hec-radio .hec-radio__social { display: none; } }

/* ---------- v1.10 : options d'écoute (minuterie, qualité, derniers titres) ---------- */
.hec-radio .hec-radio__more,
.hec-radio .hec-radio__more:focus {
	position: relative;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--hec-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.hec-radio .hec-radio__more:hover,
.hec-radio .hec-radio__more[aria-expanded="true"] { background: rgba(255, 255, 255, .1); color: #fff; }
.hec-radio .hec-radio__more.has-timer { color: var(--hec-red); }
.hec-radio__timerbadge {
	position: absolute;
	top: -3px;
	right: -5px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 9px;
	background: var(--hec-red);
	color: var(--r261-on-accent, #fff);
	font-size: 10px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}
.hec-radio__eco {
	flex-shrink: 0;
	padding: 0 6px;
	border: 1px solid rgba(255, 255, 255, .4);
	border-radius: 999px;
	color: var(--hec-muted);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
	line-height: 1.7;
}
.hec-radio__panel {
	position: absolute;
	right: 16px;
	bottom: calc(100% + 10px);
	width: min(340px, calc(100vw - 24px));
	max-height: calc(100vh - 120px);
	overflow-y: auto;
	padding: 6px 18px;
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 14px;
	background: var(--hec-navy);
	color: #fff;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
	animation: hecPanelIn .18s ease-out;
}
.hec-radio__sec { padding: 14px 0; }
.hec-radio__sec + .hec-radio__sec { border-top: 1px solid rgba(255, 255, 255, .12); }
.hec-radio .hec-radio__sec-title { margin: 0 0 10px; color: var(--hec-muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; line-height: 1.3; font-family: inherit; }
.hec-radio__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hec-radio .hec-radio__chip,
.hec-radio .hec-radio__chip:focus {
	padding: 6px 12px;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 999px;
	background: transparent;
	color: #fff;
	font: 600 13px/1.2 inherit;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}
.hec-radio .hec-radio__chip:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .45); color: #fff; }
.hec-radio .hec-radio__chip[aria-pressed="true"] { background: var(--hec-red); border-color: var(--hec-red); color: var(--r261-on-accent, #fff); }
.hec-radio__hint { margin: 10px 0 0; color: var(--hec-muted); font-size: 12px; line-height: 1.45; }
.hec-radio__history { margin: 0; padding: 0; list-style: none; max-height: 230px; overflow-y: auto; }
.hec-radio__history li { display: flex; gap: 12px; padding: 7px 0; font-size: 13px; line-height: 1.35; }
.hec-radio__history li + li { border-top: 1px solid rgba(255, 255, 255, .07); }
.hec-radio__history-time { flex: 0 0 58px; color: var(--hec-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.hec-radio__history .is-now .hec-radio__history-time { color: var(--hec-red); font-weight: 700; }
.hec-radio__history .is-now .hec-radio__history-title { font-weight: 700; }
.hec-radio__history-title { min-width: 0; overflow-wrap: anywhere; }
.hec-radio__history-empty { color: var(--hec-muted); }
@keyframes hecPanelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
	.hec-radio__panel { right: 8px; left: 8px; width: auto; }
	.hec-radio .hec-radio__more, .hec-radio .hec-radio__more:focus { width: 34px; height: 34px; }
}
/* ---------- v1.11 : invitation à lancer le direct (raccourci de l'application) ---------- */
.hec-radio.is-invite[data-state="idle"] .hec-radio__play { animation: hecInvite 1.6s ease-in-out infinite; }
@keyframes hecInvite { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--hec-red) 70%, transparent); } 50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--hec-red) 0%, transparent); } }
.hec-radio { padding-bottom: env(safe-area-inset-bottom); }
/* v1.16 - texte du lecteur qui défile */
.hec-radio__nowclip { max-width: 100%; }
.hec-radio__nowclip > .hec-radio__now { overflow: visible; text-overflow: clip; }
@media (prefers-reduced-motion: reduce) {
	.hec-radio .r261-marquee.is-scrolling > .hec-radio__now { animation: r261Marquee var(--r261-mq-dur, 10s) linear 1.2s infinite !important; }
}
