/* ============================================
   Radio Clásica Player — player.css
   v1.1 — inherits theme design tokens
   ============================================ */

/*
   On hérite au maximum du thème :
   - Couleurs : --cc-color-accent (#FF4500), --cc-color-primary (#1F364D)
   - Font : "HK Grotesk" (body du thème)
   - Border-radius : --cc-radius (12px)
   - Transitions : cohérentes avec .cc-card
   Les vars RCP restent pour les surcharges locales (fond sombre, opacités).
*/

:root {
    /* Fond & chrome du player — valeurs propres au composant */
    --rcp-bg: #0d0d0d;
    --rcp-border: rgba(255, 255, 255, 0.08);
    --rcp-text: #ffffff;
    --rcp-sub: rgba(255, 255, 255, 0.45);
    --rcp-height: 68px;
    --rcp-z: 99999;
    --rcp-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Couleurs héritées du thème via alias — changer ici si la charte évolue */
    --rcp-accent: #FF4500;
    /* = --cc-color-accent */
    --rcp-play-bg: #FF4500;
    /* = --cc-color-accent */
    --rcp-play-hover: #cc3700;
    /* assombri -20% pour le hover */
    --rcp-radius: 12px;
    /* = --cc-radius */
}

/* ================================================
   STICKY BAR
   ================================================ */
.rcp-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--rcp-height);
    background: var(--rcp-bg);
    border-top: 1px solid var(--rcp-border);
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 24px;
    z-index: var(--rcp-z);
    transform: translateY(0);
    transition: transform var(--rcp-transition), opacity var(--rcp-transition);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.rcp-bar.rcp-hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

/* ------------------------------------------------
   LEFT — indicateur EN VIVO
   ------------------------------------------------ */
.rcp-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.rcp-live-dot {
    width: 8px;
    height: 8px;
    background: var(--rcp-accent);
    /* orange thème */
    border-radius: 50%;
    animation: rcp-pulse 1.8s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes rcp-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.rcp-live-label {
    /* Hérite HK Grotesk + style rc-meta du thème */
    font-family: "HK Grotesk", Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--rcp-accent);
    text-transform: uppercase;
}

.rcp-sub-label {
    font-family: "HK Grotesk", Arial, sans-serif;
    font-size: 12px;
    color: var(--rcp-sub);
    white-space: nowrap;
}

/* ------------------------------------------------
   CENTER — bouton Play / Stop
   ------------------------------------------------ */
.rcp-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rcp-play-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--rcp-play-bg);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background var(--rcp-transition), transform 0.15s ease;
    flex-shrink: 0;
}

.rcp-play-btn:hover {
    background: var(--rcp-play-hover);
    transform: scale(1.06);
}

.rcp-play-btn:active {
    transform: scale(0.96);
}

/* Icônes agrandies — proportion confortable dans le cercle */
.rcp-play-btn svg {
    width: 30px;
    height: 30px;
}

/* ------------------------------------------------
   META — nom + tagline
   ------------------------------------------------ */
.rcp-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.rcp-station-name {
    font-family: "HK Grotesk", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    /* bold comme les titres du thème */
    color: var(--rcp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rcp-tagline {
    font-family: "HK Grotesk", Arial, sans-serif;
    font-size: 11px;
    color: var(--rcp-sub);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ------------------------------------------------
   VOLUME — slider flat, zéro effet 3D
   ------------------------------------------------ */
.rcp-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    color: var(--rcp-sub);
}

#rcp-volume {
    -webkit-appearance: none;
    appearance: none;
    width: 90px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    border: none;
    box-shadow: none;
}

/* Track — Chrome / Safari */
#rcp-volume::-webkit-slider-runnable-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    border: none;
    box-shadow: none;
}

/* Track — Firefox */
#rcp-volume::-moz-range-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    border: none;
    box-shadow: none;
}

/* Thumb — Chrome / Safari */
#rcp-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--rcp-accent);
    cursor: pointer;
    margin-top: -5.5px;
    /* recentre le thumb sur la track */
    border: none;
    box-shadow: none;
    transition: transform 0.15s ease;
}

#rcp-volume::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

/* Thumb — Firefox */
#rcp-volume::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--rcp-accent);
    border: none;
    box-shadow: none;
    cursor: pointer;
}

/* ------------------------------------------------
   BOUTON FERMER
   ------------------------------------------------ */
.rcp-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--rcp-sub);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 6px;
    transition: color var(--rcp-transition), background var(--rcp-transition);
    flex-shrink: 0;
}

.rcp-close-btn:hover {
    color: var(--rcp-text);
    background: rgba(255, 255, 255, 0.08);
}

/* ================================================
   MINI BAR FLOTTANTE
   ================================================ */
.rcp-mini {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--rcp-bg);
    border: 1px solid var(--rcp-border);
    border-radius: var(--rcp-radius);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    z-index: var(--rcp-z);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: transform var(--rcp-transition), opacity var(--rcp-transition);
    cursor: default;
}

.rcp-mini.rcp-mini-hidden {
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
}

.rcp-mini-play-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--rcp-play-bg);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background var(--rcp-transition), transform 0.15s ease;
    flex-shrink: 0;
}

.rcp-mini-play-btn:hover {
    background: var(--rcp-play-hover);
    transform: scale(1.06);
}

.rcp-mini-play-btn svg {
    width: 18px;
    height: 18px;
}

.rcp-mini-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.rcp-mini-name {
    font-family: "HK Grotesk", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--rcp-text);
    white-space: nowrap;
}

.rcp-mini-status {
    font-family: "HK Grotesk", Arial, sans-serif;
    font-size: 10px;
    color: var(--rcp-accent);
    /* orange thème au lieu de vert */
    white-space: nowrap;
}

.rcp-expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--rcp-sub);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: color var(--rcp-transition);
    flex-shrink: 0;
}

.rcp-expand-btn:hover {
    color: var(--rcp-text);
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 600px) {
    .rcp-bar {
        gap: 12px;
        padding: 0 16px;
    }

    .rcp-sub-label,
    .rcp-tagline {
        display: none;
    }

    .rcp-meta {
        flex: 1;
    }

    #rcp-volume {
        width: 60px;
    }
}

/* ================================================
   REDUCED MOTION
   ================================================ */
@media (prefers-reduced-motion: reduce) {
    .rcp-live-dot {
        animation: none;
    }

    .rcp-bar,
    .rcp-mini {
        transition: none;
    }
}

.rcp-mini-play-btn svg {
    width: 18px;
    height: 18px;
    fill: #ffffff !important;
}