/* RGB 99.2 – Application · Charte graphique RGB 2025 « Citron frais » */
:root {
	/* Palette de la charte */
	--lemon: #F9E54E;        /* Gaieté */
	--orange: #F8981D;       /* Créativité, échange, vitalité */
	--pomegranate: #E12E4B;  /* Douceur, audace */
	--turquoise: #5BBDC8;    /* Changement, confiance */
	--bg: #231F20;           /* Fond du logo version sombre */

	--surface: color-mix(in srgb, var(--bg) 88%, #fff);
	--surface-2: color-mix(in srgb, var(--bg) 78%, #fff);
	--text: #faf8f5;
	--muted: #b4adaa;
	--ink: #231F20;
	--radius: 18px;
	--safe-b: env(safe-area-inset-bottom, 0px);
	--safe-t: env(safe-area-inset-top, 0px);
	--tabbar-h: 62px;
	--mini-h: 0px;

	/* Typographies de la charte */
	--f-title: "Fredoka", "Arial Rounded MT Bold", "Nunito", system-ui, sans-serif;
	--f-body: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--f-light: "Raleway", "Lato", system-ui, sans-serif;

	--stripe: linear-gradient(90deg, var(--lemon) 0 25%, var(--orange) 25% 50%, var(--pomegranate) 50% 75%, var(--turquoise) 75% 100%);
	color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
	font: 400 16px/1.5 var(--f-body);
	-webkit-font-smoothing: antialiased;
	overscroll-behavior-y: none;
}
h1, h2, h3, .view-title { font-family: var(--f-title); font-weight: 600; letter-spacing: .005em; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
[hidden] { display: none !important; }
svg { fill: currentColor; }

.app { min-height: 100dvh; display: flex; flex-direction: column; }
body.has-mini { --mini-h: 64px; }

/* Bande 4 couleurs de la palette */
.stripe { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--stripe); }

/* Barre du haut */
.topbar {
	position: sticky; top: 0; z-index: 20;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: calc(8px + var(--safe-t)) 16px 12px;
	background: color-mix(in srgb, var(--bg) 92%, transparent);
	backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { width: 40px; height: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font: 700 18px/1.1 var(--f-title); letter-spacing: .06em; }
.brand-freq { font: 400 13px/1.2 var(--f-light); color: var(--muted); letter-spacing: .04em; }
.install-btn { flex: none; padding: 8px 16px; border-radius: 999px; background: var(--lemon); color: var(--ink); font: 600 14px var(--f-title); }

main { flex: 1; padding: 0 16px calc(var(--tabbar-h) + var(--mini-h) + var(--safe-b) + 24px); max-width: 720px; width: 100%; margin: 0 auto; }

/* Écran Direct */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 0 6px; }
.hero-art {
	position: relative; width: min(66vw, 270px); aspect-ratio: 1; border-radius: 32px;
	background: #fff;
	display: grid; place-items: center; overflow: hidden;
	box-shadow: 0 18px 40px rgba(0,0,0,.4);
	transition: transform .4s cubic-bezier(.3,1.4,.5,1);
}
.hero-art img { width: 84%; height: auto; display: block; }
body.playing-live .hero-art { transform: scale(1.03); }

/* Vu-mètre aux couleurs de la palette */
.eq { display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 26px; margin-top: 16px; }
.eq i { width: 6px; height: 4px; border-radius: 3px; background: var(--lemon); transition: height .3s; }
.eq i:nth-child(4n+2) { background: var(--orange); }
.eq i:nth-child(4n+3) { background: var(--pomegranate); }
.eq i:nth-child(4n+4) { background: var(--turquoise); }
body.playing-live .eq i { animation: eq 1.1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.35s !important; } .eq i:nth-child(3) { animation-delay: -.7s !important; }
.eq i:nth-child(4) { animation-delay: -.15s !important; } .eq i:nth-child(5) { animation-delay: -.55s !important; }
.eq i:nth-child(6) { animation-delay: -.9s !important; } .eq i:nth-child(7) { animation-delay: -.25s !important; }
.eq i:nth-child(8) { animation-delay: -.65s !important; } .eq i:nth-child(9) { animation-delay: -.45s !important; }
.eq i:nth-child(10) { animation-delay: -.8s !important; } .eq i:nth-child(11) { animation-delay: -.1s !important; }
.eq i:nth-child(12) { animation-delay: -.6s !important; }
@keyframes eq { 0%,100% { height: 18%; } 50% { height: 100%; } }

.hero-meta { margin-top: 14px; }
.live-badge {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 3px 11px; border-radius: 999px; background: var(--pomegranate); color: #fff;
	font: 900 12px var(--f-body); letter-spacing: .1em;
}
.live-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; }
body.playing-live .live-badge .dot { animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.hero-title { margin: 10px 0 2px; font-size: 26px; }
.hero-sub { margin: 0; color: var(--muted); font: 300 16px var(--f-light); letter-spacing: .02em; }

.play-xl {
	position: relative; margin-top: 22px; width: 86px; height: 86px; border-radius: 50%;
	background: var(--orange); color: var(--ink); display: grid; place-items: center;
	box-shadow: 0 0 0 8px color-mix(in srgb, var(--orange) 18%, transparent), 0 12px 28px rgba(0,0,0,.35);
	transition: transform .12s;
}
.play-xl:active { transform: scale(.94); }
.play-xl svg { width: 38px; height: 38px; grid-area: 1 / 1; }
.i-pause, .spinner { display: none; }
.is-playing .i-play { display: none; }
.is-playing .i-pause { display: block; }
.is-loading .i-play, .is-loading .i-pause { display: none; }
.is-loading .spinner { display: block; }
.spinner { grid-area: 1 / 1; width: 34px; height: 34px; border-radius: 50%; border: 3px solid color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status { margin: 16px 0 0; min-height: 1.4em; color: var(--muted); font-size: 14px; }
.status.error { color: color-mix(in srgb, var(--pomegranate) 70%, #fff); }

.volume { display: flex; align-items: center; gap: 10px; width: min(100%, 280px); margin-top: 12px; color: var(--muted); }
.volume svg { width: 20px; height: 20px; flex: none; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: var(--surface-2); accent-color: var(--lemon); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--lemon); }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--lemon); }
/* iOS ne permet pas de régler le volume depuis une page web : on masque le curseur. */
.is-ios .volume { display: none; }

/* Titres de sections */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 34px 0 12px; }
.section-head h2 { margin: 0; font-size: 21px; }
.view-title { margin: 20px 0 16px; font-size: 28px; }
.view-title::after { content: ""; display: block; width: 64px; height: 4px; margin-top: 8px; border-radius: 2px; background: var(--stripe); }
.link { color: var(--turquoise); font-weight: 700; font-size: 14px; }

/* Cartes d'actus */
.cards { display: grid; gap: 14px; }
.cards-row { grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.cards-row::-webkit-scrollbar { display: none; }
.cards-row .card { scroll-snap-align: start; }
.card { position: relative; display: flex; flex-direction: column; text-align: left; border-radius: var(--radius); overflow: hidden; background: var(--surface); width: 100%; }
.card-img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--surface-2); display: block; }
.card-img.placeholder { display: grid; place-items: center; background: var(--lemon); }
.card-img.placeholder img { width: 46%; height: auto; }
.card-body { padding: 12px 14px 14px; }
.card-date { font-size: 12px; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: .06em; }
.card-title { margin: 4px 0 0; font: 700 16px/1.3 var(--f-body); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* Une couleur de la palette par carte */
.card::before { content: ""; position: absolute; z-index: 1; left: 0; top: 0; width: 100%; height: 4px; background: var(--accent, var(--lemon)); }
.card:nth-child(4n+2) { --accent: var(--orange); }
.card:nth-child(4n+3) { --accent: var(--pomegranate); }
.card:nth-child(4n+4) { --accent: var(--turquoise); }
#newsList .card { flex-direction: row; }
#newsList .card::before { width: 4px; height: 100%; }
#newsList .card-img { width: 112px; flex: none; aspect-ratio: 1; }
#newsList .card-img.placeholder img { width: 70%; }
#newsList .card-title { font-size: 15px; }

.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); min-height: 96px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { color: var(--muted); padding: 16px; background: var(--surface); border-radius: var(--radius); font-size: 15px; }

/* Podcasts */
.show { margin-bottom: 28px; }
.show-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.show-head img { width: 58px; height: 58px; border-radius: 14px; object-fit: cover; background: var(--surface-2); }
.show-head h3 { margin: 0; font-size: 18px; line-height: 1.25; }
.episodes { display: grid; gap: 8px; }
.ep { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface); text-align: left; width: 100%; }
.ep-btn { flex: none; width: 42px; height: 42px; border-radius: 50%; background: color-mix(in srgb, var(--turquoise) 20%, transparent); color: var(--turquoise); display: grid; place-items: center; }
.ep-btn svg { width: 20px; height: 20px; grid-area: 1 / 1; }
.ep-btn .spinner { width: 20px; height: 20px; border-width: 2px; }
.ep.current { box-shadow: inset 0 0 0 2px var(--turquoise); }
.ep.current .ep-btn { background: var(--turquoise); color: var(--ink); }
.ep-info { min-width: 0; flex: 1; }
.ep-title { font-weight: 700; font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.more { margin-top: 10px; width: 100%; padding: 11px; border-radius: 12px; background: var(--surface); color: var(--turquoise); font-weight: 700; }

/* Mini lecteur */
.mini {
	position: fixed; left: 8px; right: 8px; z-index: 30;
	bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px);
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	padding: 8px 8px 8px 16px; border-radius: 16px; overflow: hidden;
	background: var(--surface-2); box-shadow: 0 8px 24px rgba(0,0,0,.45);
	max-width: 704px; margin: 0 auto;
}
.mini::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, var(--lemon) 0 25%, var(--orange) 25% 50%, var(--pomegranate) 50% 75%, var(--turquoise) 75% 100%); }
.mini-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.mini-kind { flex: none; padding: 2px 7px; border-radius: 999px; background: var(--pomegranate); color: #fff; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.mini-kind.pod { background: var(--turquoise); color: var(--ink); }
.mini-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-play { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--orange); color: var(--ink); display: grid; place-items: center; }
.mini-play svg { width: 22px; height: 22px; grid-area: 1 / 1; }
.mini-play .spinner { width: 22px; height: 22px; border-width: 2px; }
.mini-btn { flex: none; width: 38px; height: 38px; border-radius: 50%; background: color-mix(in srgb, var(--bg) 60%, transparent); font-size: 12px; font-weight: 700; color: var(--muted); }
.mini-progress { order: 10; flex-basis: 100%; display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; padding: 2px 6px 2px 0; }
.mini-progress input[type=range] { accent-color: var(--turquoise); }
.mini-progress input[type=range]::-webkit-slider-thumb { background: var(--turquoise); }
.mini-progress input[type=range]::-moz-range-thumb { background: var(--turquoise); }
body.mini-pod { --mini-h: 96px; }
/* Sur l'écran Direct, le grand lecteur suffit : pas de mini lecteur pour le direct. */
body.on-direct:not(.mini-pod):not(.reader-open) .mini { display: none; }
body.on-direct:not(.mini-pod) { --mini-h: 0px; }

/* Barre d'onglets */
.tabbar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
	display: flex; justify-content: space-around;
	padding: 6px 8px calc(6px + var(--safe-b));
	background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
	border-top: 1px solid rgba(255,255,255,.07);
}
.tabbar button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: var(--muted); font: 600 11px var(--f-title); letter-spacing: .02em; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar button.active { color: var(--lemon); }
.tabbar button[data-goto=actus].active { color: var(--orange); }
.tabbar button[data-goto=podcasts].active { color: var(--turquoise); }

/* Lecteur d'article */
.reader { position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; animation: slideup .22s ease-out; }
@keyframes slideup { from { transform: translateY(24px); opacity: 0; } }
.reader-bar { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: calc(12px + var(--safe-t)) 16px 14px; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-weight: 700; z-index: 2; }
.reader-bar a { color: var(--turquoise); font-size: 14px; }
.reader-body { max-width: 680px; margin: 0 auto; padding: 0 0 calc(var(--mini-h) + 40px + var(--safe-b)); }
.reader-body > #readerImg { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.reader-date, .reader-body h1, #readerContent { padding: 0 18px; }
.reader-date { margin: 18px 0 0; color: var(--orange); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.reader-body h1 { margin: 6px 0 16px; font-size: 26px; line-height: 1.2; }
#readerContent { font-size: 17px; line-height: 1.65; color: #ece8e4; overflow-wrap: anywhere; }
#readerContent img, #readerContent video, #readerContent iframe { max-width: 100% !important; height: auto; border-radius: 12px; }
#readerContent iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
#readerContent h2, #readerContent h3 { font-family: var(--f-title); font-weight: 600; line-height: 1.3; }
#readerContent figure { margin: 16px 0; }
#readerContent * { background: transparent !important; color: inherit; max-width: 100%; }
#readerContent a, #readerContent a * { color: var(--turquoise); }
body.reader-open { overflow: hidden; }
body.reader-open .tabbar { display: none; }
body.reader-open .mini { bottom: calc(var(--safe-b) + 8px); }

/* Aide iPhone */
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; padding: 12px 12px calc(12px + var(--safe-b)); }
.sheet-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 22px; padding: 20px; }
.sheet-card h3 { margin: 0 0 10px; font-size: 20px; }
.sheet-card ol { margin: 0 0 16px; padding-left: 20px; line-height: 1.8; }
.inline-ico { width: 18px; height: 18px; vertical-align: -3px; color: var(--turquoise); }
.sheet-close { width: 100%; padding: 12px; border-radius: 12px; background: var(--lemon); color: var(--ink); font: 600 16px var(--f-title); }

@media (min-width: 720px) {
	.cards-row { grid-auto-columns: 40%; margin: 0; padding: 0 0 4px; }
	#newsList { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
.sheet-note { margin: -6px 0 16px; font-size: 14px; color: var(--muted); }

/* Journal d'informations locales (vidéos YouTube) */
.yt-player { margin: 0 -16px 18px; }
.yt-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-now { margin: 12px 16px 0; font-size: 18px; line-height: 1.3; }
.videos { display: grid; gap: 12px; }
.video { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; padding: 8px; border-radius: 16px; background: var(--surface); }
.video.current { box-shadow: inset 0 0 0 2px var(--pomegranate); }
.video-thumb { position: relative; flex: none; width: 132px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-play { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; background: var(--pomegranate); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.video-play svg { width: 18px; height: 18px; }
.video-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.video-date { font-size: 12px; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: .06em; }
.video-title { font-weight: 700; font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* Le dernier journal en grand */
.video-first { flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; }
.video-first .video-thumb { width: 100%; border-radius: 0; }
.video-first .video-play { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
.video-first .video-play svg { width: 30px; height: 30px; }
.video-first .video-info { padding: 4px 14px 14px; }
.video-first .video-title { font-size: 17px; }
.video-new { position: absolute; left: 10px; top: 10px; padding: 3px 9px; border-radius: 999px; background: var(--lemon); color: var(--ink); font-size: 11px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.more-link { display: block; text-align: center; text-decoration: none; margin-top: 16px; }

/* Instagram */
.ig-profile { display: inline-block; margin: -4px 0 14px; color: var(--turquoise); font-weight: 700; text-decoration: none; }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 0 -16px; }
.ig-grid .skeleton { min-height: 0; aspect-ratio: 1; border-radius: 0; }
.ig-grid .empty { grid-column: 1 / -1; margin: 0 16px; }
.ig-item { position: relative; aspect-ratio: 1; background: var(--surface-2); overflow: hidden; }
.ig-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-item.broken img { visibility: hidden; }
.ig-badge { position: absolute; right: 6px; top: 6px; color: #fff; font-size: 14px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.tabbar button[data-goto=journal].active { color: var(--pomegranate); }
.tabbar button[data-goto=instagram].active { color: var(--orange); }
.tabbar button span { white-space: nowrap; }
.wait-line { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; color: var(--muted); }
.wait-spinner { display: block; flex: none; width: 22px; height: 22px; border-width: 2px; color: var(--lemon); }
.install-now { background: var(--orange); }
.diag { margin: 14px 0 0; padding: 12px; border-radius: 12px; background: #000; color: #9f9; font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.diag strong { display: block; color: #fff; margin-bottom: 4px; }
.diag pre { margin: 8px 0 0; white-space: pre-wrap; font: inherit; }
.autoplay-opt { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--muted); cursor: pointer; }
.autoplay-opt input { width: 18px; height: 18px; accent-color: var(--orange); margin: 0; }

/* Agenda culturel */
.ag-filters { display: flex; gap: 8px; overflow-x: auto; margin: -4px -16px 10px; padding: 2px 16px 6px; scrollbar-width: none; }
.ag-filters::-webkit-scrollbar { display: none; }
.ag-pill { position: relative; flex: none; display: flex; flex-direction: column; justify-content: center; min-height: 48px; padding: 6px 30px 6px 12px; border-radius: 14px; background: var(--surface); cursor: pointer; }
.ag-pill > span { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ag-pill select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--text); font: 700 14px var(--f-body); padding: 0; margin: 0; max-width: 190px; cursor: pointer; }
.ag-pill select option { color: #000; }
.ag-pill::after { content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; margin-top: -2px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-50%) rotate(45deg); pointer-events: none; }
.ag-pill.ag-check { flex-direction: row; align-items: center; gap: 8px; padding-right: 14px; }
.ag-pill.ag-check::after { display: none; }
.ag-pill.ag-check > span { font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--text); font-weight: 700; }
.ag-pill.ag-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--lemon); }
.ag-count { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.ag-day { position: sticky; top: calc(64px + var(--safe-t)); z-index: 5; margin: 18px -16px 8px; padding: 8px 16px; font-size: 15px; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ag-day:first-child { margin-top: 4px; }
.ag-ev { --g: var(--muted); display: flex; gap: 12px; margin-bottom: 8px; padding: 12px 14px 12px 12px; border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; box-shadow: inset 4px 0 0 var(--g); }
.ag-ev:active { background: var(--surface-2); }
.ag-time { flex: none; width: 50px; font: 700 15px var(--f-title); color: var(--g); padding-top: 1px; }
.ag-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ag-title { font-weight: 700; font-size: 16px; line-height: 1.3; }
.ag-sub { font-size: 14px; color: #ddd8d4; }
.ag-place { font-size: 13px; color: var(--muted); }
.ag-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ag-tag { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.ag-style { background: color-mix(in srgb, var(--g) 22%, transparent); color: var(--text); }
.ag-jp { background: var(--lemon); color: var(--ink); }
/* Une couleur de la charte par famille de genres (le nom du genre est toujours écrit) */
.g-musique, .g-comedie-musicale, .g-tribute, .g-scene-ouverte { --g: var(--pomegranate); }
.g-theatre, .g-marionnettes { --g: var(--lemon); }
.g-humour, .g-cirque, .g-cabaret, .g-magie { --g: var(--orange); }
.g-danse, .g-conference, .g-exposition, .g-atelier { --g: var(--turquoise); }
.tabbar button[data-goto=agenda].active { color: var(--turquoise); }
/* Barre d'onglets : jusqu'à 6 onglets sur les petits écrans */
.tabbar button { min-width: 0; }
.tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 400px) { .tabbar button { font-size: 10px; } .tabbar svg { width: 22px; height: 22px; } }
.view-sub { margin: -8px 0 14px; color: var(--muted); font: 300 15px var(--f-light); }
/* Libellé sur deux lignes pour « Près de chez vous » */
.tabbar button[data-goto=agenda] span { white-space: normal; line-height: 1.05; text-align: center; overflow: visible; }
.tabbar button { justify-content: flex-start; }

/* « En ce moment » sur l'écran Direct */
.now-on { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 14px auto 0; padding: 10px 16px; max-width: 340px; border-radius: 14px; background: var(--surface); text-align: center; }
.now-label { font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--pomegranate); }
.now-title { font: 600 17px/1.25 var(--f-title); color: var(--text); }
.now-next { font-size: 12px; color: var(--muted); }

/* Programmation */
.pg-days { display: flex; gap: 8px; overflow-x: auto; margin: -4px -16px 14px; padding: 2px 16px 6px; scrollbar-width: none; position: sticky; top: calc(64px + var(--safe-t)); z-index: 6; background: var(--bg); }
.pg-days::-webkit-scrollbar { display: none; }
.pg-day { flex: none; padding: 9px 14px; border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 700; font-size: 14px; white-space: nowrap; }
.pg-day.active { background: var(--lemon); color: var(--ink); }
.pg-item { margin-bottom: 8px; border-radius: 14px; background: var(--surface); overflow: hidden; }
.pg-item summary { display: flex; gap: 14px; padding: 12px 14px; cursor: pointer; list-style: none; }
.pg-item summary::-webkit-details-marker { display: none; }
.pg-item.no-desc summary { cursor: default; }
.pg-time { flex: none; width: 52px; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.pg-time strong { font: 700 16px var(--f-title); color: var(--text); }
.pg-time span { font-size: 12px; color: var(--muted); }
.pg-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.pg-top { display: flex; gap: 6px; flex-wrap: wrap; }
.pg-top:empty { display: none; }
.pg-title { font-weight: 700; font-size: 16px; line-height: 1.3; }
.pg-tag { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.pg-direct { background: var(--pomegranate); color: #fff; }
.pg-rediff, .pg-rediffusion { background: var(--surface-2); color: var(--muted); }
.pg-onair { display: none; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 900; letter-spacing: .04em; background: var(--lemon); color: var(--ink); }
.pg-progress { display: none; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.pg-progress i { display: block; height: 100%; background: var(--lemon); }
.pg-item.on-air { box-shadow: inset 4px 0 0 var(--lemon); background: var(--surface-2); }
.pg-item.on-air .pg-onair, .pg-item.on-air .pg-progress { display: block; }
.pg-item.on-air .pg-onair { display: inline-block; }
.pg-item.past { opacity: .55; }
.pg-desc { margin: 0; padding: 0 14px 14px 80px; font-size: 14px; line-height: 1.5; color: #ddd8d4; white-space: pre-line; }
.tabbar button[data-goto=programmes].active { color: var(--lemon); }
/* Barre d'onglets défilante s'il y a beaucoup d'onglets */
.tabbar { overflow-x: auto; scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar button { flex: 1 0 58px; }
.tabbar button span { overflow: visible; text-overflow: clip; letter-spacing: 0; }
@media (max-width: 420px) { .tabbar button { font-size: 10px; padding-left: 1px; padding-right: 1px; } }

/* Recherche dans les podcasts */
.search { position: relative; display: flex; align-items: center; margin: -4px 0 8px; }
.search svg { position: absolute; left: 14px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 48px; padding: 0 44px; border: 2px solid transparent; border-radius: 14px; background: var(--surface); color: var(--text); font: 400 16px var(--f-body); -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--turquoise); }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear { position: absolute; right: 6px; width: 36px; height: 36px; border-radius: 50%; font-size: 24px; line-height: 1; color: var(--muted); }
#podCount:empty { display: none; }
.tabbar button[data-goto=video].active { color: var(--pomegranate); }
/* Barre d'onglets : tous les onglets tiennent à l'écran (libellés sur 2 lignes si besoin) */
.tabbar { justify-content: flex-start; padding-left: 2px; padding-right: 2px; }
.tabbar button { flex: 1 1 0; min-width: 50px; padding: 4px 1px; }
.tabbar button span { white-space: normal; line-height: 1.05; text-align: center; overflow-wrap: anywhere; hyphens: none; }
@media (max-width: 420px) { .tabbar button { font-size: 9.5px; } .tabbar svg { width: 22px; height: 22px; } }
.tabbar button { min-width: 44px; }
.tabbar button span { overflow-wrap: normal; word-break: normal; }
.tabbar button[data-goto=programmes] { flex-grow: 1.45; }
.tabbar button[data-goto=programmes] span { white-space: nowrap; letter-spacing: -.1px; }

/* Bouton d'appel à l'action vers la chaîne YouTube (page Podcasts et vidéos) */
.cta { display: flex; align-items: center; gap: 12px; margin: -2px 0 16px; padding: 12px 16px 12px 12px; border-radius: 16px; background: var(--pomegranate); color: #fff; text-decoration: none; font-weight: 800; font-size: 16px; line-height: 1.25; box-shadow: 0 8px 20px color-mix(in srgb, var(--pomegranate) 30%, transparent); }
.cta:active { transform: scale(.98); }
.cta-play { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--pomegranate); display: grid; place-items: center; }
.cta-play svg { width: 20px; height: 20px; margin-left: 2px; }
.cta-text { flex: 1; }
.cta-arrow { flex: none; font-size: 22px; }

/* Réseaux sociaux (écran Direct) */
.socials { width: 100%; margin-top: 22px; }
.socials-title { margin: 0 0 10px; font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.socials-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 360px; margin: 0 auto; }
.social { --c: var(--lemon); display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 12px; border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.social::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.social:active { background: var(--surface-2); }
.social-facebook { --c: var(--lemon); }
.social-youtube { --c: var(--pomegranate); }
.social-instagram { --c: var(--orange); }
.social-linkedin { --c: var(--turquoise); }
.rgb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tabbar button[data-goto=podcasts] span { white-space: normal; }
/* Logos des réseaux (fournis par la radio) à la place des pastilles */
.social { gap: 10px; justify-content: flex-start; padding-left: 16px; box-shadow: inset 0 -3px 0 var(--c), inset 0 0 0 1px rgba(255,255,255,.06); }
.social::before { display: none; }
.social-ico { width: 22px; height: 22px; flex: none; object-fit: contain; }
