/* Fiche chaîne — chargé uniquement sur les pages rgd_channel. */

/* ── Bandeau « en direct » ──────────────────────────────── */
.ch-hero { position: relative; overflow: hidden; background: #0a0b0d; border-bottom: 1px solid var(--line); isolation: isolate; }
.ch-hero__media { position: absolute; inset: 0 0 0 auto; width: 62%; z-index: -1; }
.ch-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.ch-hero__media::after { content: ''; position: absolute; inset: 0; background:
	linear-gradient(90deg, #0a0b0d 0%, #0a0b0dcc 22%, #0a0b0d33 60%, #0a0b0d00 100%),
	linear-gradient(0deg, #0a0b0d 0%, #0a0b0d00 35%); }
.ch-hero__inner { padding: 22px 0 40px; min-height: 520px; display: flex; flex-direction: column; }
.ch-hero .breadcrumbs { padding-top: 0; margin-bottom: 26px; }

.ch-id { display: flex; align-items: center; gap: 16px; margin-bottom: 34px; }
.ch-id__logo { width: 88px; height: 56px; flex: none; display: grid; place-items: center; background: #fff; border-radius: 8px; padding: 7px 10px; overflow: hidden; box-shadow: 0 4px 18px #0006; }
.ch-id__logo img { max-width: 100%; max-height: 42px; width: auto; height: auto; }
.ch-id h1 { font-size: clamp(22px, 2.4vw, 30px); margin: 0 0 6px; }
.ch-id__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; color: var(--muted); font-size: 14px; }

.ch-now { max-width: 600px; margin-top: auto; }
.ch-now__label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 14px; color: #d7dbdf; font-variant-numeric: tabular-nums; }
.ch-now__title { font-size: clamp(28px, 3.6vw, 46px); font-weight: 800; margin: 0 0 6px; text-wrap: balance; }
.ch-now__sub { margin: 0 0 10px; color: #d7dbdf; font-size: 17px; }
.ch-now__progress { display: flex; align-items: center; gap: 12px; margin: 14px 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ch-now__progress .progress { max-width: 260px; height: 4px; }
.ch-now__desc { color: #c9ced3; max-width: 56ch; margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ch-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.ch-hint { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.ch-next { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid #ffffff1a; font-size: 14px; color: #c9ced3; max-width: 520px; }
.ch-next span { color: var(--gold); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: .14em; margin-right: 6px; }
.ch-hero--plain { background: radial-gradient(900px 380px at 85% 10%, #ddbd7024, transparent 70%), radial-gradient(700px 300px at 10% 100%, #ffffff0a, transparent 70%), #0a0b0d; }
.ch-hero--plain .ch-hero__inner { min-height: 0; padding-bottom: 46px; }
.ch-hero--plain .ch-now__title { font-size: clamp(24px, 2.8vw, 34px); }

/* ── Corps ─────────────────────────────────────────────── */
.ch-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; padding-top: 34px; align-items: start; }
.ch-side__sticky { position: sticky; top: calc(var(--header) + 20px); }
.ch-side .ad-slot { margin-top: 0; }

/* Ce soir */
.ch-tonight { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 34px; }
.ch-tonight img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ch-tonight > div { padding: 16px 20px 16px 0; }
.ch-tonight h2.eyebrow { font-size: 11px; margin: 0 0 6px; }
.ch-tonight__title { font-size: 20px; font-weight: 750; margin: 0 0 4px; }
.ch-tonight__meta { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.ch-tonight__desc { color: #c9ced3; font-size: 14px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ch-tonight:not(:has(img)) { grid-template-columns: 1fr; padding-left: 20px; }

/* Dernières vidéos YouTube */
.ch-now__title--yt { font-size: clamp(24px, 2.6vw, 34px); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ch-now__link { text-decoration: none; }
.ch-now__link:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.ch-videos { margin-bottom: 38px; }
.ch-videos .section-head h2 { font-size: 22px; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px 14px; }
.vcard { display: flex; flex-direction: column; gap: 6px; text-decoration: none; min-width: 0; }
.vcard__img { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--panel2); border: 1px solid var(--line); }
.vcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.vcard__play { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #000a; color: #fff; font-size: 16px; padding-left: 3px; opacity: 0; transition: opacity .2s; }
.vcard:hover .vcard__img img { transform: scale(1.04); }
.vcard:hover .vcard__play, .vcard:focus-visible .vcard__play { opacity: 1; }
.vcard__title { font-weight: 600; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vcard__meta { font-size: 12px; color: var(--muted); }

/* Lecteur YouTube à la demande */
.ytbox { padding: 0; border: 0; background: transparent; max-width: min(1100px, 94vw); width: 100%; color: var(--text); }
.ytbox::backdrop { background: #000d; backdrop-filter: blur(4px); }
.ytbox__inner { position: relative; background: #000; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 60px #000c; }
.ytbox__frame { aspect-ratio: 16 / 9; background: #000; }
.ytbox__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.ytbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; background: #111316; }
.ytbox__title { margin: 0; font-weight: 600; font-size: 14px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ytbox__yt { flex: none; font-size: 13px; color: var(--gold); text-decoration: none; }
.ytbox__close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #000b; color: #fff; font-size: 16px; cursor: pointer; }
.ytbox__close:hover { background: #000; }
.ytbox.is-live .ytbox__bar::before { content: '● EN DIRECT'; color: #171710; background: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .08em; padding: 3px 7px; border-radius: 3px; flex: none; }
.vcard[data-yt] .vcard__play { opacity: .9; }
.ytbox__consent { aspect-ratio: 16 / 9; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 6% 8%; background: radial-gradient(600px 300px at 80% 0%, #ddbd7022, transparent 70%), #0d0f12; }
.ytbox__consent[hidden], .ytbox__frame[hidden] { display: none; }
.ytbox__consent-title { font-size: clamp(18px, 2.2vw, 24px); font-weight: 750; margin: 0; }
.ytbox__consent p { margin: 0; color: #c9ced3; max-width: 60ch; }
.ytbox__consent a { color: var(--gold); }
.ytbox__always { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #c9ced3; cursor: pointer; }
.ytbox__always input { width: 18px; height: 18px; accent-color: var(--gold); }
.ytbox__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
@media (max-width: 650px) { .ytbox__consent { aspect-ratio: auto; padding: 46px 18px 18px; } }
.btn-play::before { content: '▶'; font-size: .8em; }

/* Programme du jour */
.ch-sched .section-head h2 { font-size: 22px; }
.ch-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ch-list li { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.ch-list time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }
.ch-list .t { font-weight: 600; min-width: 0; }
.ch-list .t span { overflow-wrap: anywhere; }
.ch-list .t small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 2px; }
.ch-list .c { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.ch-list li.is-now { background: linear-gradient(90deg, #ddbd701f, transparent 70%); box-shadow: inset 3px 0 0 var(--gold); padding-left: 12px; }
.ch-list li.is-now time { color: var(--gold); font-weight: 700; }
.ch-list.is-past li { opacity: .55; }
.ch-sched__past summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 8px 6px; list-style: none; }
.ch-sched__past summary::-webkit-details-marker { display: none; }
.ch-sched__past summary::before { content: '▸ '; color: var(--gold); }
.ch-sched__past[open] summary::before { content: '▾ '; }

/* Sur les autres chaînes */
.ch-related { padding-top: 44px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; scrollbar-color: #3a3f45 transparent; }
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: #3a3f45; border-radius: 3px; }
.rail-card { scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; text-decoration: none; min-width: 0; }
.rail-card__img { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--panel2); border: 1px solid var(--line); }
.rail-card__img > img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.rail-card:hover .rail-card__img > img { transform: scale(1.04); }
.rail-card__logo { position: absolute; left: 8px; bottom: 8px; background: #fff; border-radius: 4px; padding: 3px 6px; height: 26px; display: grid; place-items: center; }
.rail-card__logo img { max-height: 20px; max-width: 56px; width: auto; height: auto; }
.rail-card__ch { font-size: 12px; color: var(--muted); }
.rail-card__title { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-card .progress { height: 3px; max-width: none; }

/* À propos */
.ch-about { padding: 44px 0 20px; }
.ch-about h2 { font-size: 20px; }
.ch-about .about-channel { color: #aeb4bc; font-size: 15px; max-width: 72ch; }

/* Bouton fixe (mobile) */
.ch-sticky { display: none; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
	.ch-body { grid-template-columns: 1fr; }
	.ch-side__sticky { position: static; }
}
@media (max-width: 860px) {
	.ch-hero__media { position: relative; inset: auto; width: 100%; aspect-ratio: 16 / 9; }
	.ch-hero__media::after { background: linear-gradient(0deg, #0a0b0d 0%, #0a0b0d00 55%); }
	.ch-hero { display: flex; flex-direction: column; }
	.ch-hero__inner { min-height: 0; padding: 0 0 26px; }
	.ch-hero .breadcrumbs { display: none; }
	.ch-id { margin: -34px 0 18px; position: relative; }
	.ch-hero--plain .ch-id { margin-top: 18px; }
	.ch-id__logo { width: 72px; height: 48px; }
	.ch-id__logo img { max-height: 34px; }
	.ch-id h1 { font-size: 20px; }
	.ch-now__title { font-size: 26px; }
	.ch-actions .btn { flex: 1 1 auto; }
	.ch-actions .btn-primary { flex-basis: 100%; }
	.ch-body { padding-top: 24px; }
	.ch-tonight { grid-template-columns: 130px 1fr; gap: 14px; }
	.ch-tonight > div { padding: 12px 12px 12px 0; }
	.ch-tonight__title { font-size: 16px; }
	.ch-tonight__desc { display: none; }
	.ch-list li { grid-template-columns: 50px minmax(0, 1fr); }
	.ch-list .c { display: none; }
	.ch-list li.is-now .c { display: block; grid-column: 2; text-align: left; }
	.rail { grid-auto-columns: 62%; }
	.vgrid { grid-template-columns: 1fr 1fr; gap: 14px 10px; }
	.vcard__title { font-size: 13px; }

	.ch-sticky { display: flex; align-items: center; gap: 10px; position: fixed; z-index: 55; left: 10px; right: 10px; bottom: calc(66px + env(safe-area-inset-bottom)); padding: 8px 8px 8px 10px; background: #15181cf5; backdrop-filter: blur(10px); border: 1px solid #ffffff1f; border-radius: 12px; box-shadow: 0 10px 30px #000a; transform: translateY(140%); opacity: 0; transition: transform .25s, opacity .25s; pointer-events: none; }
	.ch-sticky.is-visible { transform: none; opacity: 1; pointer-events: auto; }
	.ch-sticky__logo { width: 44px; height: 30px; flex: none; background: #fff; border-radius: 4px; display: grid; place-items: center; padding: 3px; }
	.ch-sticky__logo img { max-height: 24px; max-width: 38px; width: auto; height: auto; }
	.ch-sticky__txt { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.25; font-size: 13px; }
	.ch-sticky__txt small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.ch-sticky .btn { min-height: 40px; padding: 0 14px; font-size: 13px; white-space: nowrap; }
}
