/* ================================================================
   RigarduMás Player Cards — CSS v1.2.0
   Design : player-like premium (inspiré myCanal)
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Barlow:wght@300;400;500;600&display=swap');

:root {
    --rgd-red:     #E8000D;
    --rgd-gold:    #C8A84B;
    --rgd-dark:    #0A0A0A;
    --rgd-s1:      #111111;
    --rgd-s2:      #1A1A1A;
    --rgd-s3:      #222222;
    --rgd-border:  rgba(255,255,255,0.08);
    --rgd-text:    #F0F0F0;
    --rgd-muted:   #888888;
    --rgd-fc:      'Barlow Condensed', sans-serif;
    --rgd-fb:      'Barlow', sans-serif;
}

/* ── WRAPPER GLOBAL ─────────────────────────────────────────────── */
.rk-channel-wrapper {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto 48px;
    font-family: var(--rgd-fb);
    color: var(--rgd-text);
    -webkit-font-smoothing: antialiased;
}

/* ── ZONE PLAYER-LIKE ───────────────────────────────────────────── */
.rk-player-zone {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 72vh;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    background: #000;
}

/* Image programme (cachée visuellement, utilisée comme bg par rgd-player-card-ui) */
.rk-program-img {
    display: none !important;
}

/* Fallback bg si pas d'image */
.rk-player-zone:not([style*="background-image"]) {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a0808 50%, #080d1a 100%);
}

/* Zoom subtil au hover */
.rk-player-zone .rk-player-overlay-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top,  rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.25) 55%, rgba(0,0,0,0.55) 100%);
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1;
}

/* Grain cinéma */
.rk-player-grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.45;
    z-index: 2;
}

/* Hover hint pill */
.rk-player-hover-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s;
    z-index: 5;
    pointer-events: none;
}
.rk-player-zone:hover .rk-player-hover-hint { opacity: 1; }

.rk-hint-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(232,0,13,0.88);
    backdrop-filter: blur(8px);
    border-radius: 40px;
    padding: 12px 24px;
    font-family: var(--rgd-fc);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    box-shadow: 0 4px 24px rgba(232,0,13,0.45);
}

/* UI structure */
.rk-player-ui {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 3;
    pointer-events: none;
}

/* Logo centré */
.rk-player-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}
.rk-player-logo-wrap {
    background: rgba(232,0,13,0.88);
    backdrop-filter: blur(6px);
    border-radius: 14px;
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.12);
    overflow: hidden;
}
.rk-player-logo-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}
.rk-player-logo-text {
    font-family: var(--rgd-fc);
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: #fff;
    text-align: center;
    line-height: 1.15;
}

/* Bottom bar */
.rk-player-bottom {
    padding: 0 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rk-player-meta-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}
.rk-player-prog-title {
    font-family: var(--rgd-fc);
    font-weight: 700;
    font-size: clamp(16px, 2.2vw, 24px);
    letter-spacing: 0.02em;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 3px;
}
.rk-player-prog-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

/* Badge LIVE */
.rk-live-badge {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--rgd-red);
    color: #fff;
    font-family: var(--rgd-fc);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.12em;
    padding: 4px 9px;
    border-radius: 3px;
    text-transform: uppercase;
    align-self: flex-start;
    margin-top: 4px;
}
.rk-live-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: rgd-blink 1.4s ease-in-out infinite;
}
@keyframes rgd-blink { 0%,100%{opacity:1} 50%{opacity:0.25} }

/* Barre de progression */
.rk-progress-wrap {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.rk-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.18);
    border-radius: 2px;
    position: relative;
}
.rk-progress-fill {
    height: 100%;
    background: var(--rgd-red);
    border-radius: 2px;
    position: relative;
    transition: width 0.3s linear;
    min-width: 0;
}
.rk-progress-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 8px rgba(0,0,0,0.6);
}
.rk-progress-times {
    display: flex;
    justify-content: space-between;
    font-family: var(--rgd-fc);
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.04em;
    position: relative;
}
.rk-time-start { color: rgba(255,255,255,0.75); font-weight: 600; }
.rk-time-now {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: rgba(255,255,255,0.35);
}
.rk-time-end {}

/* ── CONTENU PAGE ───────────────────────────────────────────────── */
.rk-page-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    padding: 36px 0 0;
}

/* Colonne principale */
.rk-now-playing-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}
.rk-logo-pill {
    background: var(--rgd-red);
    border-radius: 8px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 52px;
    min-height: 36px;
}
.rk-logo-pill img {
    height: 28px;
    width: auto;
    max-width: 72px;
    object-fit: contain;
}
.rk-logo-pill span {
    font-family: var(--rgd-fc);
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: #fff;
}
.rk-now-label {
    font-family: var(--rgd-fc);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rgd-gold);
    display: block;
    margin-bottom: 3px;
}
.rk-now-show {
    font-family: var(--rgd-fc);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.02em;
    color: var(--rgd-text);
}

/* Section à propos */
.rk-about-section { margin-bottom: 28px; }
.rk-section-label {
    font-family: var(--rgd-fc);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--rgd-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.rk-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rgd-border);
}
.rk-about-text {
    font-size: 14px;
    line-height: 1.75;
    color: rgba(255,255,255,0.62);
}

/* Chips */
.rk-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.rk-chip {
    background: var(--rgd-s2);
    border: 1px solid var(--rgd-border);
    border-radius: 4px;
    padding: 4px 10px;
    font-family: var(--rgd-fc);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rgd-muted);
}
.rk-chip--green { color: #4CAF82; border-color: rgba(76,175,130,0.25); }
.rk-chip--blue  { color: #5B8DD9; border-color: rgba(91,141,217,0.25); }
.rk-chip--gold  { color: var(--rgd-gold); border-color: rgba(200,168,75,0.25); }

/* CTAs */
.rk-cta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.rk-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--rgd-red);
    color: #fff;
    font-family: var(--rgd-fc);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 13px 24px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}
.rk-cta-primary:hover {
    background: #c4000b;
    transform: translateY(-1px);
    color: #fff;
}
.rk-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--rgd-s2);
    color: var(--rgd-text);
    border: 1px solid var(--rgd-border);
    font-family: var(--rgd-fc);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 12px 22px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
}
.rk-cta-secondary:hover { background: var(--rgd-s3); color: var(--rgd-text); }

/* Notice affiliation */
.rk-affil-notice {
    margin-top: 24px;
    padding: 12px 16px;
    background: rgba(200,168,75,0.05);
    border: 1px solid rgba(200,168,75,0.15);
    border-radius: 6px;
    font-size: 12px;
    color: rgba(200,168,75,0.7);
    line-height: 1.6;
}
.rk-affil-notice strong { color: var(--rgd-gold); }

/* ── SIDEBAR PROGRAMME ──────────────────────────────────────────── */
.rk-sidebar {}

.rk-sidebar-card {
    background: var(--rgd-s1);
    border: 1px solid var(--rgd-border);
    border-radius: 8px;
    overflow: hidden;
}
.rk-sidebar-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--rgd-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.rk-sidebar-title {
    font-family: var(--rgd-fc);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rgd-text);
}
.rk-sidebar-date {
    font-family: var(--rgd-fc);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--rgd-muted);
    text-transform: uppercase;
}

/* Items programme */
.rk-prog-item {
    display: flex;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--rgd-border);
    position: relative;
    transition: background 0.15s;
}
.rk-prog-item:last-child { border-bottom: none; }
.rk-prog-item:hover { background: var(--rgd-s2); }

.rk-prog-item--past { opacity: 0.42; }

.rk-prog-item--active {
    background: rgba(232,0,13,0.05);
    border-left: 3px solid var(--rgd-red);
    padding-left: 15px;
    opacity: 1;
}

.rk-prog-time {
    font-family: var(--rgd-fc);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--rgd-muted);
    white-space: nowrap;
    padding-top: 2px;
    min-width: 38px;
}
.rk-prog-item--active .rk-prog-time { color: var(--rgd-red); }

.rk-prog-info { flex: 1; }
.rk-prog-title {
    font-family: var(--rgd-fc);
    font-weight: 600;
    font-size: 14px;
    color: var(--rgd-text);
    line-height: 1.2;
    margin-bottom: 3px;
}
.rk-prog-genre { font-size: 12px; color: var(--rgd-muted); }

/* Mini barre de progression dans l'item actif */
.rk-prog-mini-bar {
    margin-top: 7px;
    height: 2px;
    background: rgba(255,255,255,0.12);
    border-radius: 1px;
    overflow: hidden;
}
.rk-prog-mini-fill {
    height: 100%;
    background: var(--rgd-red);
    border-radius: 1px;
}

/* Point live */
.rk-prog-live-dot {
    position: absolute;
    right: 18px;
    top: 16px;
    width: 6px;
    height: 6px;
    background: var(--rgd-red);
    border-radius: 50%;
    animation: rgd-blink 1.4s ease-in-out infinite;
}

/* Lien guide TV */
.rk-guide-link {
    margin-top: 14px;
    background: var(--rgd-s1);
    border: 1px solid var(--rgd-border);
    border-radius: 8px;
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
    gap: 12px;
}
.rk-guide-link:hover {
    background: var(--rgd-s2);
    border-color: rgba(200,168,75,0.3);
}
.rk-guide-link-label {
    font-family: var(--rgd-fc);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rgd-gold);
    display: block;
    margin-bottom: 2px;
}
.rk-guide-link-text {
    font-family: var(--rgd-fc);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--rgd-text);
    display: block;
}
.rk-guide-link svg { color: var(--rgd-muted); flex-shrink: 0; }

/* ── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .rk-page-content {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .rk-player-logo-wrap { width: 68px; height: 68px; }
    .rk-player-logo-img  { width: 54px; height: 54px; }
    .rk-player-prog-title { font-size: 16px; }
    .rk-player-bottom { padding: 0 16px 18px; }
    .rk-player-top    { padding: 16px 16px 0; }
}

@media (max-width: 600px) {
    .rk-channel-wrapper { margin-bottom: 28px; }
    .rk-cta-row {
        flex-direction: column;
        align-items: stretch;
    }
    .rk-cta-primary, .rk-cta-secondary {
        justify-content: center;
        text-align: center;
    }
    .rk-now-playing-header { flex-wrap: wrap; }
}

/* ── MASQUER LE BLOC À PROPOS GÉNÉRÉ PAR RIGARDUMAS-CORE ───────────
   Le contenu est déjà affiché dans la section .rk-about-section
   du player card — ce doublon est donc caché.
   ------------------------------------------------------------------ */
.rgd-about-channel {
    display: none !important;
}

/* Chips compte requis / sans inscription */
.rk-chip--account {
  background: rgba(232, 0, 13, 0.12);
  color: #E8000D;
  border: 1px solid rgba(232, 0, 13, 0.25);
}
.rk-chip--no-account {
  background: rgba(29, 158, 117, 0.12);
  color: #1D9E75;
  border: 1px solid rgba(29, 158, 117, 0.25);
}
