/* ==========================================================================
   RTS Multi-Channel Theming System
   Each channel sets --channel-primary on <body> via a data attribute.
   All interactive/accent elements reference this variable.
   ========================================================================== */

/* --- Channel Color Tokens --- */
body[data-channel="rts1"] { --channel-primary: #c50705; --channel-primary-rgb: 197, 7, 5; }
body[data-channel="rts2"] { --channel-primary: #aa0188; --channel-primary-rgb: 170, 1, 136; }
body[data-channel="rts3"] { --channel-primary: #dc8204; --channel-primary-rgb: 220, 130, 4; }
body[data-channel="rts4"] { --channel-primary: #43ae01; --channel-primary-rgb: 67, 174, 1; }
body[data-channel="rsi"]  { --channel-primary: #0067b9; --channel-primary-rgb: 0, 103, 185; }

/* Fallback */
:root {
    --channel-primary: #c50705;
    --channel-primary-rgb: 197, 7, 5;
    --channel-dark:  #00031C;
    --channel-dark2: #01031A;
    --channel-dark3: #0d0f24;
    --channel-surface: #191C33;
    --channel-text: #CCCDD2;
    --channel-text-muted: #6C6F80;
    --channel-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base Layout — mirrors the homepage has-header-side structure
   ========================================================================== */

.ch-page {
    background-color: var(--channel-dark);
    color: var(--channel-text);
    font-family: "Metropolitano", sans-serif;
    min-height: 100vh;
}

/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */

/* --- Collapsed (default) --- */
.ch-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 70px;
    background: var(--channel-dark2);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    z-index: 200;
    border-right: 1px solid rgba(255,255,255,0.06);
    transition: width var(--channel-transition);
    overflow: visible; /* visible so the edge toggle button isn't clipped */
}

/* --- Expanded --- */
.ch-sidebar.is-expanded {
    width: 220px;
}

/* --- Toggle button --- */
.ch-sidebar-toggle {
    position: absolute;
    right: -14px;
    top: 76px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--channel-surface);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--channel-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    z-index: 10;
    flex-shrink: 0;
    transition: background var(--channel-transition),
                color var(--channel-transition),
                border-color var(--channel-transition);
}

.ch-sidebar-toggle:hover {
    background: var(--channel-primary);
    border-color: var(--channel-primary);
    color: #fff;
}

.ch-sidebar-toggle-icon {
    display: inline-block;
    transition: transform var(--channel-transition);
}

/* Collapsed: icon points right (expand hint) */
.ch-sidebar:not(.is-expanded) .ch-sidebar-toggle-icon {
    transform: rotate(180deg);
}

/* --- Brand header --- */
.ch-sidebar-header {
    padding: 20px 0 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.ch-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 0 0 16px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

.ch-sidebar-logo-wrap {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ch-sidebar-logo-wrap img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: brightness(1.1);
}

.ch-sidebar-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    white-space: nowrap;
    transition: max-width var(--channel-transition), opacity 0.2s ease;
}

.ch-sidebar.is-expanded .ch-sidebar-brand-text {
    max-width: 160px;
    opacity: 1;
}

.ch-sidebar-brand-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.04em;
}

.ch-sidebar-tagline {
    font-size: 9px;
    font-weight: 600;
    color: var(--channel-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.3;
    white-space: normal;
    max-width: 130px;
}

/* --- Main nav --- */
.ch-nav {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    width: 100%;
    flex: 1;
    overflow: hidden;
}

.ch-nav li {
    width: 100%;
}

.ch-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 0 13px 24px;
    color: var(--channel-text);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
    border-left: 3px solid transparent;
    transition: color var(--channel-transition),
                background var(--channel-transition),
                border-color var(--channel-transition);
}

.ch-nav a i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.ch-nav a span {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    white-space: nowrap;
    transition: max-width var(--channel-transition), opacity 0.2s ease;
}

.ch-sidebar.is-expanded .ch-nav a span {
    max-width: 140px;
    opacity: 1;
}

.ch-nav a:hover,
.ch-nav a.active {
    color: #fff;
    border-left-color: var(--channel-primary);
    background: rgba(var(--channel-primary-rgb), 0.08);
}

/* --- Channel switcher section --- */
.ch-sidebar-channels {
    width: 100%;
    padding: 10px 0 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.ch-sidebar-section-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--channel-text-muted);
    padding: 0 0 6px 24px;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    white-space: nowrap;
    transition: max-width var(--channel-transition), opacity 0.2s ease;
}

.ch-sidebar.is-expanded .ch-sidebar-section-label {
    max-width: 160px;
    opacity: 1;
}

.ch-sidebar-channel-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 0 7px 17px;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background var(--channel-transition),
                border-color var(--channel-transition),
                opacity var(--channel-transition);
    opacity: 0.5;
}

.ch-sidebar-channel-link:hover {
    opacity: 0.85;
    background: rgba(255,255,255,0.04);
}

.ch-sidebar-channel-link.active {
    opacity: 1;
    border-left-color: var(--channel-primary);
    background: rgba(var(--channel-primary-rgb), 0.08);
}

.ch-sidebar-ch-logo {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ch-sidebar-ch-logo img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.ch-sidebar-ch-name {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.04em;
    white-space: nowrap;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-width var(--channel-transition), opacity 0.2s ease;
}

.ch-sidebar.is-expanded .ch-sidebar-ch-name {
    max-width: 130px;
    opacity: 1;
}

/* --- Footer --- */
.ch-sidebar-footer {
    padding: 10px 0 14px 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.ch-sidebar-footer span {
    font-size: 10px;
    color: var(--channel-text-muted);
    white-space: nowrap;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    display: block;
    transition: max-width var(--channel-transition), opacity 0.2s ease;
}

.ch-sidebar.is-expanded .ch-sidebar-footer span {
    max-width: 180px;
    opacity: 1;
}

/* --- Top bar (mobile header) --- */
.ch-topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--channel-dark2);
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 200;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.ch-topbar-logo img {
    height: 32px;
    width: auto;
}

.ch-topbar-menu {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
}

/* --- Mobile bottom navigation bar --- */
.ch-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--channel-dark2);
    border-top: 1px solid rgba(255,255,255,0.08);
    z-index: 200;
    flex-direction: row;
    align-items: stretch;
}

.ch-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--channel-text-muted);
    text-decoration: none;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-top: 2px solid transparent;
    transition: color var(--channel-transition), border-color var(--channel-transition);
}

.ch-bottom-nav-item i {
    font-size: 18px;
}

.ch-bottom-nav-item:hover,
.ch-bottom-nav-item.active {
    color: var(--channel-primary);
    border-top-color: var(--channel-primary);
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */

.ch-main {
    margin-left: 70px;
    min-height: 100vh;
    transition: margin-left var(--channel-transition);
}

.ch-sidebar.is-expanded ~ .ch-main {
    margin-left: 220px;
}

/* ==========================================================================
   Hero / Banner Section
   ========================================================================== */

.ch-hero {
    position: relative;
    background: linear-gradient(135deg,
        rgba(var(--channel-primary-rgb), 0.25) 0%,
        var(--channel-dark) 60%);
    border-bottom: 2px solid rgba(var(--channel-primary-rgb), 0.3);
    padding: 40px 40px 32px;
    overflow: hidden;
}

.ch-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 0% 50%, rgba(var(--channel-primary-rgb), 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.ch-hero-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.ch-hero-logo {
    width: 100px;
    height: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 16px rgba(var(--channel-primary-rgb), 0.5));
}

.ch-hero-info {
    flex: 1;
    min-width: 200px;
}

.ch-hero-name {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
}

.ch-hero-desc {
    font-size: 14px;
    color: var(--channel-text);
    margin: 0 0 12px;
}

.ch-hero-tagline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--channel-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ch-hero-tagline::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--channel-primary);
}

/* ==========================================================================
   LIVE Badge & Section
   ========================================================================== */

.ch-badge-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--channel-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 3px;
    vertical-align: middle;
}

.ch-badge-live::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #fff;
    border-radius: 50%;
    animation: ch-pulse 1.4s ease-in-out infinite;
}

@keyframes ch-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

.ch-live-section {
    padding: 32px 40px;
    background: var(--channel-dark);
}

.ch-live-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.ch-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ch-live-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}

.ch-player-wrap {
    position: relative;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 16/9;
    border: 1px solid rgba(var(--channel-primary-rgb), 0.2);
}

.ch-player-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.ch-player-overlay-label {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    pointer-events: none;
}

/* Now Playing card */
.ch-now-playing {
    background: var(--channel-surface);
    border-radius: 6px;
    padding: 20px;
    border: 1px solid rgba(var(--channel-primary-rgb), 0.15);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ch-now-playing-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--channel-text-muted);
    font-weight: 700;
}

.ch-now-playing-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin: 0;
}

.ch-now-playing-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--channel-primary);
    font-weight: 700;
}

.ch-progress-bar {
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.ch-progress-fill {
    height: 100%;
    background: var(--channel-primary);
    border-radius: 2px;
    width: 42%; /* placeholder, can be JS-driven */
    transition: width 1s linear;
}

.ch-now-playing-next {
    border-top: 1px solid rgba(255,255,255,0.07);
    padding-top: 14px;
}

.ch-next-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--channel-text-muted);
    margin-bottom: 4px;
}

.ch-next-title {
    font-size: 14px;
    color: var(--channel-text);
    font-weight: 600;
}

/* ==========================================================================
   EPG / Schedule Section
   ========================================================================== */

.ch-epg-section {
    padding: 32px 40px;
    background: var(--channel-dark3);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.ch-epg-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 20px;
}

.ch-epg-item {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
    border-radius: 4px;
    border-left: 3px solid transparent;
    transition: background var(--channel-transition), border-color var(--channel-transition);
}

.ch-epg-item:hover {
    background: rgba(255,255,255,0.04);
}

.ch-epg-item.is-live {
    background: rgba(var(--channel-primary-rgb), 0.08);
    border-left-color: var(--channel-primary);
}

.ch-epg-time {
    font-size: 13px;
    font-weight: 700;
    color: var(--channel-text-muted);
    font-variant-numeric: tabular-nums;
}

.ch-epg-item.is-live .ch-epg-time {
    color: var(--channel-primary);
}

.ch-epg-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.ch-epg-duration {
    font-size: 12px;
    color: var(--channel-text-muted);
    white-space: nowrap;
}

/* ==========================================================================
   Shows / Emissions Grid
   ========================================================================== */

.ch-shows-section {
    padding: 32px 40px;
    background: var(--channel-dark);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.ch-filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 16px 0 24px;
}

.ch-filter-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--channel-text);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--channel-transition);
    font-family: "Metropolitano", sans-serif;
}

.ch-filter-btn:hover,
.ch-filter-btn.active {
    background: var(--channel-primary);
    border-color: var(--channel-primary);
    color: #fff;
}

/* ── Format poster (2:3) — style Netflix/RTS ────────────────────────────── */

.ch-shows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.ch-show-card {
    background: var(--channel-surface);
    border-radius: 10px;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform var(--channel-transition), box-shadow var(--channel-transition);
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.07);
    position: relative;
}

.ch-show-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0,0,0,0.55),
                0 0 0 1px rgba(var(--channel-primary-rgb), 0.4);
}

.ch-show-card[hidden] {
    display: none;
}

/* Thumbnail portrait 2:3 */
.ch-show-thumb {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0a0c1a;
}

.ch-show-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ch-show-card:hover .ch-show-thumb img {
    transform: scale(1.07);
}

/* Dégradé fort en bas pour lisibilité du titre */
.ch-show-thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.85) 0%,
        rgba(0,0,0,0.3)  40%,
        transparent      65%
    );
}

/* Bouton play centré au hover */
.ch-show-thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--channel-transition);
    background: rgba(0,0,0,0.2);
}

.ch-show-card:hover .ch-show-thumb-play {
    opacity: 1;
}

.ch-play-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--channel-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 4px 20px rgba(var(--channel-primary-rgb), 0.6);
}

/* Badge catégorie en haut à gauche */
.ch-show-cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(var(--channel-primary-rgb), 0.9);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* Titre intégré EN BAS de l'image (overlay) */
.ch-show-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px 14px;
    z-index: 2;
}

.ch-show-title {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 3px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.ch-show-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    color: rgba(255,255,255,0.55);
}

.ch-show-duration {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ==========================================================================
   Replay Section
   ========================================================================== */

.ch-replay-section {
    padding: 32px 40px 48px;
    background: var(--channel-dark3);
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* ── Replay — format poster 2:3 (identique aux émissions) ─────────────── */

.ch-replay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.ch-replay-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--channel-surface);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.07);
    position: relative;
    cursor: pointer;
    transition: transform var(--channel-transition), box-shadow var(--channel-transition);
}

.ch-replay-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0,0,0,0.55),
                0 0 0 1px rgba(var(--channel-primary-rgb), 0.4);
}

/* Thumbnail portrait 2:3 */
.ch-replay-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0a0c1a;
    flex-shrink: unset;
    height: unset;
    border-radius: 0;
}

.ch-replay-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.ch-replay-card:hover .ch-replay-thumb img {
    transform: scale(1.07);
}

/* Dégradé bas pour lisibilité du titre */
.ch-replay-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.85) 0%,
        rgba(0,0,0,0.25) 40%,
        transparent      65%
    );
    pointer-events: none;
}

/* Titre en overlay bas */
.ch-replay-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px 14px;
    z-index: 2;
    min-width: unset;
    flex: unset;
}

.ch-replay-title {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 3px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ch-replay-meta {
    font-size: 10px;
    color: rgba(255,255,255,0.55);
}

.ch-replay-accent {
    color: var(--channel-primary);
    font-weight: 700;
}

/* ==========================================================================
   Section Header Row
   ========================================================================== */

.ch-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

.ch-section-accent-line {
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--channel-primary);
    border-radius: 2px;
    margin-right: 10px;
    vertical-align: middle;
}

.ch-view-all {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--channel-primary);
    text-decoration: none;
    transition: opacity var(--channel-transition);
}

.ch-view-all:hover {
    opacity: 0.75;
}

/* ==========================================================================
   Channel Switcher Bar (below hero)
   ========================================================================== */

.ch-switcher {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--channel-dark2);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    overflow-x: auto;
    scrollbar-width: none;
}

.ch-switcher::-webkit-scrollbar { display: none; }

.ch-switcher-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    text-decoration: none;
    opacity: 0.45;
    transition: opacity var(--channel-transition), border-bottom var(--channel-transition);
    border-bottom: 2px solid transparent;
    flex-shrink: 0;
}

.ch-switcher-item img {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.ch-switcher-item:hover { opacity: 0.8; }

.ch-switcher-item.active {
    opacity: 1;
    border-bottom-color: var(--channel-primary);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .ch-live-grid {
        grid-template-columns: 1fr;
    }

    .ch-now-playing {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .ch-sidebar {
        display: none;
    }

    .ch-topbar {
        display: flex;
    }

    .ch-bottom-nav {
        display: flex;
    }

    .ch-main {
        margin-left: 0;
        margin-top: 56px;
        margin-bottom: 60px;
    }

    /* Override expanded margin on mobile */
    .ch-sidebar.is-expanded ~ .ch-main {
        margin-left: 0;
    }

    .ch-hero,
    .ch-live-section,
    .ch-epg-section,
    .ch-shows-section,
    .ch-replay-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .ch-hero-name {
        font-size: 26px;
    }

    .ch-shows-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }

    .ch-now-playing {
        display: flex;
        flex-direction: column;
    }

    .ch-replay-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .ch-shows-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

/* ─── Replay — bouton play centré au hover ─────────────────────────────── */
.ch-replay-poster {
    position: relative;
    cursor: pointer;
}

.ch-replay-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.2);
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 3;
}

.ch-replay-play-btn svg {
    width: 46px;
    height: 46px;
    background: var(--channel-primary);
    border-radius: 50%;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(var(--channel-primary-rgb), 0.6);
    filter: none;
}

.ch-replay-card:hover .ch-replay-play-btn,
.ch-replay-card:focus .ch-replay-play-btn {
    opacity: 1;
}

/* ═════════════════════════════════════════════════════════════════════
   BANNIERE PROMOTIONNELLE
═════════════════════════════════════════════════════════════════════ */
.ch-promo {
    padding: 20px 60px 10px;
    background: var(--channel-dark);
}

.ch-promo-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(var(--channel-primary-rgb), 0.3);
    background: #e6e7e9;
    box-shadow: 0 16px 36px rgba(0,0,0,.35);
}

.ch-promo-card img {
    width: 100%;
    height: 220px;
    display: block;
    object-fit: contain;
    object-position: center;
}

.ch-promo-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,.58);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    backdrop-filter: blur(4px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ch-promo { padding: 16px 28px 8px; }
    .ch-promo-card img { height: 160px; }
    .ch-promo-card { border-radius: 10px; }
    .ch-promo-tag { top: 10px; left: 10px; }
}

@media (max-width: 480px) {
    .ch-promo { padding: 10px 16px 6px; }
    .ch-promo-card img { height: 120px; }
    .ch-promo-tag { top: 8px; left: 8px; font-size: 9px; }
}
