/* ===================================================================== */
/* RADIO POPUP - CSS ORGANISÉ ET OPTIMISÉ - PARTIE 1                   */
/* Variables, Structure de Base et Popup Principale                     */
/* ===================================================================== */

/* === VARIABLES GLOBALES === */
:root {
    /* Tailles des logos des stations */
    --logo-img-size-desktop: 80px;
    --logo-img-size-tablet: 60px;
    --logo-img-size-mobile: 55px;
}

/* === VARIABLES DE THÈMES === */

/* Thème Rouge (défaut) */
[data-theme="rouge"] {
    --primary-color: #940000;
    --primary-color-rgb: 148, 0, 0;
    --text-color: #333333;
    --text-secondary: #666666;
    --card-bg: #ffffff;
    --secondary-bg: #f8f9fa;
}

/* Thème Sombre */
[data-theme="dark"] {
    --primary-color: #212b7e;
    --primary-color-rgb: 255, 107, 107;
    --text-color: #e2e8f0;
    --text-secondary: #a0aec0;
    --card-bg: #2d3748;
    --secondary-bg: #1a202c;
}

/* Thème Bleu Ciel */
[data-theme="bleuciel"] {
    --primary-color: #17a2b8;
    --primary-color-rgb: 23, 162, 184;
    --text-color: #333333;
    --text-secondary: #5f6f7a;
    --card-bg: #ffffff;
    --secondary-bg: #f0f8ff;
}

/* Thème Violet */
[data-theme="light"] {
    --primary-color: #6f42c1;
    --primary-color-rgb: 111, 66, 193;
    --text-color: #333333;
    --text-secondary: #6c757d;
    --card-bg: #ffffff;
    --secondary-bg: #f8f9ff;
}

/* === STRUCTURE POPUP PRINCIPALE === */

/* Overlay principal */
.radio-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.radio-popup-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

/* Contenu de la popup */
.radio-popup-content {
    background: var(--card-bg);
    width: 90%;
    max-width: 600px;
    max-height: 80%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(30px) scale(0.95);
    transition: all 0.3s ease;
}

.radio-popup-overlay.active .radio-popup-content {
    transform: translateY(0) scale(1);
}

/* Header */
.radio-popup-header {
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.radio-popup-header h2 {
    margin: 0;
    font-size: 18px;
}

.radio-popup-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.radio-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Corps de la popup */
.radio-popup-body {
    padding: 20px;
    overflow-y: auto;
    max-height: 700px;
}

/* Footer */
.radio-popup-footer {
    background: var(--secondary-bg);
    padding: 10px 20px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
}

/* === CONTRÔLE DU SCROLL === */
body.radio-popup-open {
    overflow: hidden !important;
}

@media (max-width: 768px) {
    body.radio-popup-open {
        position: fixed !important;
        width: 100% !important;
    }
}

/* === ANIMATIONS DE BASE === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes slideUpQuick {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseIndicator {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes timerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* === ANIMATIONS ÉGALISEURS === */
@keyframes equalizerGlow {
    0% {
        box-shadow: 0 0 5px rgba(var(--primary-color-rgb, 148, 0, 0), 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(var(--primary-color-rgb, 148, 0, 0), 0.5);
    }
    100% {
        box-shadow: 0 0 5px rgba(var(--primary-color-rgb, 148, 0, 0), 0.3);
    }
}

/* Animation quand la radio joue */
.radio-player-section:has(.equalizer-bar) {
    animation: equalizerGlow 3s ease-in-out infinite;
}

/* Effet de réflexion pour les barres */
@supports (-webkit-box-reflect: below) {
    .equalizer-container {
        -webkit-box-reflect: below 2px linear-gradient(transparent, rgba(255, 255, 255, 0.1));
    }
}

/* ===================================================================== */
/* RADIO POPUP - CSS ORGANISÉ - PARTIE 2                               */
/* Grille des Stations et Cartes Radio                                  */
/* ===================================================================== */

/* === GRILLE DES STATIONS === */
.radio-stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* === CARTES DE STATIONS === */
.radio-station-card {
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.radio-station-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(148, 0, 0, 0.2);
}

.radio-station-card.active {
    border-color: var(--primary-color);
    background: rgba(148, 0, 0, 0.1);
    box-shadow: 0 6px 20px rgba(148, 0, 0, 0.3);
}

.radio-station-card.playing {
    border-color: #28a745;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.3);
}

.radio-station-card.playing .station-name {
    color: #28a745;
    font-weight: bold;
}

/* === ÉTATS SPÉCIFIQUES DES CARTES === */

/* Station sélectionnée ET en lecture */
.radio-station-card.active.playing {
    border: 3px solid #28a745;
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.4);
}

.radio-station-card.active.playing .play-overlay {
    opacity: 1 !important;
    background: rgba(40, 167, 69, 0.9) !important;
}

.radio-station-card.active.playing .play-overlay .material-icons {
    font-size: 32px;
}

/* Station sélectionnée MAIS en pause */
.radio-station-card.active.paused,
.radio-station-card.active:not(.playing) {
    border: 3px solid #ffc107;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.4);
}

.radio-station-card.active.paused .play-overlay,
.radio-station-card.active:not(.playing) .play-overlay {
    opacity: 1 !important;
    background: rgba(255, 193, 7, 0.9) !important;
}

/* === CONTENEUR LOGO === */
.station-logo-container {
    position: relative;
    margin-bottom: 8px;
    width: var(--logo-img-size-desktop);
    height: var(--logo-img-size-desktop);
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === IMAGES DES STATIONS === */
.station-logo-container img.station-logo {
    width: var(--logo-img-size-desktop) !important;
    height: var(--logo-img-size-desktop) !important;
    min-width: var(--logo-img-size-desktop) !important;
    min-height: var(--logo-img-size-desktop) !important;
    max-width: var(--logo-img-size-desktop) !important;
    max-height: var(--logo-img-size-desktop) !important;
    border-radius: 8px;
    object-fit: contain;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    padding: 3px;
    display: block;
}

/* Fallback quand pas d'image */
.logo-fallback {
    width: var(--logo-img-size-desktop);
    height: var(--logo-img-size-desktop);
    background: var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* === OVERLAY DE LECTURE === */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.radio-station-card:hover .play-overlay {
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.7);
}

.play-overlay .material-icons {
    color: white;
    font-size: 28px;
    transition: transform 0.2s ease;
}

.radio-station-card:hover .play-overlay .material-icons {
    transform: scale(1.2);
}

/* === INFORMATIONS DE LA STATION === */
.station-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.station-name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

.station-description {
    font-size: 10px;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.1;
}

/* === AJUSTEMENTS SPÉCIFIQUES PAR LOGO === */
.station-logo[alt*="RTL"],
.station-logo[alt*="Europe 1"] {
    padding: 4px;
}

.station-logo[alt*="NRJ"],
.station-logo[alt*="FIP"] {
    object-fit: cover;
}

/* === SUPPORT THÈME SOMBRE POUR LOGOS === */
[data-theme="dark"] .station-logo,
[data-theme="dark"] .logo-fallback {
    background: #4a5568;
}

/* === RESPONSIVE POUR STATIONS === */

/* === TABLETTE 8.4 POUCES SPÉCIFIQUE (600x841) === */
@media screen and (min-width: 600px) and (max-width: 600px) and (min-height: 800px) {
    /* Widget compact radio AGRANDI */
    .radio-compact-widget {
        bottom: 20px;
        left: 15px;
        max-width: 450px;
        min-width: 400px;
    }
    
    .compact-widget-content {
        padding: 15px;
        gap: 15px;
    }
    
    .compact-logo {
        width: 60px;
        height: 60px;
    }
    
    .compact-btn {
        width: 48px;
        height: 48px;
    }
    
    .compact-btn .material-icons {
        font-size: 26px;
    }
    
    /* Texte plus grand */
    .compact-details div:first-child {
        font-size: 18px;
        font-weight: 700;
    }
    
    .compact-details div:last-child {
        font-size: 15px;
    }
    
    /* Popup radio */
    .radio-popup-content {
        width: 90%;
        max-width: 520px;
    }
    
    /* Grille des stations - 3 colonnes pour tablette */
    .radio-stations-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .radio-station-card {
        min-height: 130px;
        padding: 12px;
    }
    
    /* Logos des stations plus grands */
    .station-logo-container {
        width: 75px;
        height: 75px;
    }
    
    .station-logo-container img.station-logo {
        width: 75px !important;
        height: 75px !important;
        min-width: 75px !important;
        min-height: 75px !important;
        max-width: 75px !important;
        max-height: 75px !important;
    }
    
    .logo-fallback {
        width: 75px;
        height: 75px;
    }
    
    .station-name {
        font-size: 16px;
    }
    
    .station-description {
        font-size: 13px;
    }    
	
    /* Contrôles du lecteur */
    .current-station-logo {
        width: 65px;
        height: 65px;
    }
    
    /* Menu minuteur */
    .quick-timer-menu {
        width: 220px;
        bottom: 140px !important;
    }
}

/* Tablettes */
@media (max-width: 768px) {
    .radio-stations-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .radio-station-card {
        min-height: 100px;
        padding: 10px;
    }
    
    .station-logo-container {
        width: var(--logo-img-size-tablet);
        height: var(--logo-img-size-tablet);
    }
    
    .station-logo-container img.station-logo {
        width: var(--logo-img-size-tablet) !important;
        height: var(--logo-img-size-tablet) !important;
        min-width: var(--logo-img-size-tablet) !important;
        min-height: var(--logo-img-size-tablet) !important;
        max-width: var(--logo-img-size-tablet) !important;
        max-height: var(--logo-img-size-tablet) !important;
    }
    
    .logo-fallback {
        width: var(--logo-img-size-tablet);
        height: var(--logo-img-size-tablet);
    }
    
    .station-name {
        font-size: 14px;
    }
    
    .station-description {
        font-size: 12px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .station-logo-container {
        width: var(--logo-img-size-mobile);
        height: var(--logo-img-size-mobile);
    }
    
    .station-logo-container img.station-logo {
        width: var(--logo-img-size-mobile) !important;
        height: var(--logo-img-size-mobile) !important;
        min-width: var(--logo-img-size-mobile) !important;
        min-height: var(--logo-img-size-mobile) !important;
        max-width: var(--logo-img-size-mobile) !important;
        max-height: var(--logo-img-size-mobile) !important;
    }
    
    .logo-fallback {
        width: var(--logo-img-size-mobile);
        height: var(--logo-img-size-mobile);
    }
}

/* Petits écrans */
@media (max-height: 600px) {
    .station-logo-container {
        width: 35px;
        height: 35px;
    }
}

/* === RESPONSIVE POPUP === */
@media (max-width: 768px) {
    .radio-popup-content {
        width: 95%;
        max-height: 90%;
    }
    
    .radio-popup-body {
        max-height: 400px;
    }
}

@media (max-height: 600px) {
    .radio-popup-body {
        max-height: 300px;
    }
}

/* ===================================================================== */
/* RADIO POPUP - CSS ORGANISÉ - PARTIE 3                               */
/* Section Lecteur, Contrôles et Égaliseur                             */
/* ===================================================================== */

/* === SECTION LECTEUR === */
.radio-player-section {
    background: rgba(148, 0, 0, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.current-station-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.current-station-logo {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: contain;
    background: white;
    padding: 3px;
    border: 2px solid var(--primary-color);
}

.current-station-details h3 {
    margin: 0 0 5px 0;
    color: var(--text-color);
    font-size: 18px;
    font-weight: 700;
}

.current-station-details p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 15px;
    display: inline-block;
}

/* === CLASSES DE STATUT === */

.status-paused {
    background: rgba(255, 193, 7, 0.2) !important;
    color: #ff9800 !important;
}

.status-error {
    background: rgba(220, 53, 69, 0.2) !important;
    color: #dc3545 !important;
}

.status-connecting {
    background: rgba(23, 162, 184, 0.2) !important;
    color: #17a2b8 !important;
}

/* === CONTRÔLE DU VOLUME === */
.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider {
    flex: 1;
    height: 4px;
    background: #FFC107;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.volume-percentage {
    font-size: 14px;
    font-weight: bold;
    min-width: 35px;
    text-align: right;
}

/* === ÉGALISEUR VISUEL AMÉLIORÉ === */
.equalizer-section {
    margin: 15px 0;
    display: flex;
    justify-content: center;
}

.equalizer-container {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 50px;
    padding: 10px 20px;
    background: linear-gradient(135deg, 
        rgba(var(--primary-color-rgb, 148, 0, 0), 0.05) 0%, 
        rgba(var(--primary-color-rgb, 148, 0, 0), 0.1) 100%);
    border-radius: 25px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.equalizer-container::before {
    content: '♪';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--primary-color, #940000);
    opacity: 0.6;
}

.equalizer-container::after {
    content: '♫';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--primary-color, #940000);
    opacity: 0.6;
}

.equalizer-bar {
    width: 6px;
    height: 20%;
    background: linear-gradient(to top, 
        var(--primary-color, #940000) 0%, 
        #ff6b6b 50%,
        #ffd700 100%);
    border-radius: 3px 3px 0 0;
    transition: height 0.15s ease;
    box-shadow: 0 -2px 10px rgba(255, 107, 107, 0.3);
    position: relative;
}

.equalizer-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.8), transparent);
    border-radius: 50%;
    animation: glow 1s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.equalizer-bar:nth-child(1) { animation-delay: 0ms; }
.equalizer-bar:nth-child(2) { animation-delay: 100ms; }
.equalizer-bar:nth-child(3) { animation-delay: 200ms; }
.equalizer-bar:nth-child(4) { animation-delay: 300ms; }
.equalizer-bar:nth-child(5) { animation-delay: 400ms; }

/* Animation de pulsation quand actif */
.radio-station-card.playing ~ .radio-player-section .equalizer-bar {
    animation: pulse 0.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

/* === TOAST DE NOTIFICATION === */
.radio-toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.radio-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* === RESPONSIVE SECTION LECTEUR === */
@media (max-width: 768px) {
    .current-station-info {
        flex-direction: column;
        text-align: center;
    }
    
    .current-station-logo {
        width: 50px;
        height: 50px;
    }
    
    .equalizer-container {
        height: 30px;
    }
    
    .equalizer-bar {
        width: 3px;
    }
}

/* === SUPPORT THÈME SOMBRE POUR LECTEUR === */
[data-theme="dark"] .current-station-logo {
    background: #4a5568;
}

/* === ÉGALISEUR THÈME SOMBRE === */
[data-theme="dark"] .equalizer-container {
    background: linear-gradient(135deg, 
        rgba(255, 107, 107, 0.1) 0%, 
        rgba(255, 107, 107, 0.2) 100%);
}

/* Notes de musique plus visibles en mode sombre */
[data-theme="dark"] .equalizer-container::before,
[data-theme="dark"] .equalizer-container::after {
    color: #FFD700;  /* Doré brillant */
    opacity: 0.9;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    font-weight: bold;
}

[data-theme="dark"] .equalizer-bar {
    background: linear-gradient(to top, 
        #2196F3 0%, 
        #00BCD4 50%,
        #00E676 100%);
    box-shadow: 0 -2px 10px rgba(33, 150, 243, 0.5);
}

[data-theme="dark"] .mini-bar {
    background: linear-gradient(to top, 
        #2196F3 0%, 
        #4FC3F7 60%,
        #81C784 100%);
    box-shadow: 0 -1px 3px rgba(33, 150, 243, 0.6);
}

/* Thème Rouge (défaut) */
[data-theme="rouge"] .equalizer-container::before,
[data-theme="rouge"] .equalizer-container::after {
    color: #940000;
    opacity: 0.7;
    text-shadow: 0 0 3px rgba(148, 0, 0, 0.3);
}

/* Thème Bleu Ciel */
[data-theme="bleuciel"] .equalizer-container::before,
[data-theme="bleuciel"] .equalizer-container::after {
    color: #0288D1;  /* Bleu foncé */
    opacity: 0.8;
    text-shadow: 0 0 4px rgba(2, 136, 209, 0.4);
    font-weight: bold;
}

/* Barres égaliseur bleu ciel */
[data-theme="bleuciel"] .equalizer-bar {
    background: linear-gradient(to top, 
        #0288D1 0%, 
        #4FC3F7 50%,
        #81D4FA 100%);
    box-shadow: 0 -2px 10px rgba(79, 195, 247, 0.4);
}

[data-theme="bleuciel"] .mini-bar {
    background: linear-gradient(to top, 
        #0288D1 0%, 
        #29B6F6 60%,
        #4FC3F7 100%);
}

/* Thème Violet (light) */
[data-theme="light"] .equalizer-container::before,
[data-theme="light"] .equalizer-container::after {
    color: #7B1FA2;  /* Violet foncé */
    opacity: 0.8;
    text-shadow: 0 0 4px rgba(123, 31, 162, 0.3);
    font-weight: bold;
}

/* Barres égaliseur violet */
[data-theme="light"] .equalizer-bar {
    background: linear-gradient(to top, 
        #6f42c1 0%, 
        #AB47BC 50%,
        #CE93D8 100%);
    box-shadow: 0 -2px 10px rgba(171, 71, 188, 0.4);
}

[data-theme="light"] .mini-bar {
    background: linear-gradient(to top, 
        #6f42c1 0%, 
        #9C27B0 60%,
        #BA68C8 100%);
}

/* === ÉGALISEUR COMPACT PAR THÈME === */

/* Rouge */
[data-theme="rouge"] .compact-equalizer {
    background: linear-gradient(90deg, 
        rgba(148, 0, 0, 0.1) 0%, 
        rgba(148, 0, 0, 0.2) 100%);
}

/* Bleu ciel */
[data-theme="bleuciel"] .compact-equalizer {
    background: linear-gradient(90deg, 
        rgba(23, 162, 184, 0.1) 0%, 
        rgba(23, 162, 184, 0.2) 100%);
}

/* Violet */
[data-theme="light"] .compact-equalizer {
    background: linear-gradient(90deg, 
        rgba(111, 66, 193, 0.1) 0%, 
        rgba(111, 66, 193, 0.2) 100%);
}

/* ===================================================================== */
/* RADIO POPUP - CSS ORGANISÉ - PARTIE 4                               */
/* Minuteur d'Arrêt et Tuile Radio                                     */
/* ===================================================================== */

/* === SECTION MINUTEUR D'ARRÊT === */
.sleep-timer-section {
    margin: 15px 0;
    padding: 10px;
    background: rgba(var(--primary-color-rgb, 148, 0, 0), 0.05);
    border-radius: 8px;
}

/* === BOUTONS DE MODE MINUTEUR === */
.sleep-timer-mode-toggle {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    background: rgba(var(--primary-color-rgb, 148, 0, 0), 0.1);
    border-radius: 8px;
    padding: 3px;
}

.timer-mode-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-color, #333);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timer-mode-btn.active {
    background: var(--primary-color, #940000);
    color: white;
    box-shadow: 0 2px 5px rgba(148, 0, 0, 0.3);
}

.timer-mode-btn:hover:not(.active) {
    background: rgba(var(--primary-color-rgb, 148, 0, 0), 0.15);
}

/* === CONTRÔLES MINUTEUR === */
.sleep-timer-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.sleep-timer-controls .material-icons {
    font-size: 20px;
}

.sleep-timer-select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(var(--primary-color-rgb, 148, 0, 0), 0.3);
    border-radius: 6px;
    background: var(--card-bg, white);
    color: var(--text-color, #333);
    font-size: 14px;
}

/* === ZONE HORAIRE CLIQUABLE === */
#timeControls {
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#timeControls:hover {
    background-color: rgba(var(--primary-color-rgb, 148, 0, 0), 0.05);
}

#timeControls .material-icons {
    pointer-events: none;
}

/* === CHAMP HEURE PRÉCISE === */
.sleep-time-input {
    width: 120px;
    min-width: 120px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid rgba(var(--primary-color-rgb, 148, 0, 0), 0.3);
    border-radius: 6px;
    background: var(--card-bg, white);
    color: var(--text-color, #333);
    font-size: 16px;
    font-family: monospace;
    cursor: pointer;
    font-weight: 600;
    pointer-events: auto;
}

.sleep-time-input:hover {
    border-color: var(--primary-color, #940000);
}

.sleep-time-input:focus {
    outline: none;
    border-color: var(--primary-color, #940000);
    box-shadow: 0 0 8px rgba(148, 0, 0, 0.3);
}

/* === BOUTONS MINUTEUR === */
.set-time-btn, .cancel-time-btn {
    padding: 8px 12px;
    border: 1px solid var(--primary-color, #940000);
    border-radius: 6px;
    background: var(--primary-color, #940000);
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.set-time-btn:hover {
    background: #a50000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cancel-time-btn {
    background: #dc3545;
    border-color: #dc3545;
    margin-left: 5px;
}

.cancel-time-btn:hover {
    background: #c82333;
}

/* === AFFICHAGE MINUTEUR === */
.sleep-timer-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 193, 7, 0.2);
    border-radius: 6px;
    font-weight: 600;
}

.sleep-timer-display .material-icons {
    color: #ff9800;
    font-size: 18px;
}

.cancel-timer-btn {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
    border-radius: 4px;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.cancel-timer-btn:hover {
    background: rgba(220, 53, 69, 0.2);
}

/* === TUILE RADIO === */
.tile.radio-app-tile {
    position: relative;
}

/* Indicateur de lecture */
.radio-tile-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    background: #ff4444;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
    animation: pulseIndicator 2s infinite;
    z-index: 10;
}

/* Texte d'état sur la tuile */
.radio-tile-status {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 68, 68, 0.9);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: bold;
    white-space: nowrap;
    z-index: 10;
}

/* === RESPONSIVE MINUTEUR === */
@media (max-width: 768px) {
    .timer-mode-btn {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .sleep-time-input {
        font-size: 13px;
        padding: 6px 8px;
    }
    
    .set-time-btn, .cancel-time-btn {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .sleep-timer-select {
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* === THÈMES MINUTEUR === */
[data-theme="dark"] .timer-mode-btn,
[data-theme="dark"] .sleep-time-input {
    color: #e2e8f0;
}

[data-theme="dark"] .timer-mode-btn.active {
    background: #ff6b6b;
}

[data-theme="dark"] .sleep-time-input {
    background: #4a5568;
    border-color: rgba(255, 107, 107, 0.3);
}

[data-theme="dark"] .set-time-btn {
    background: #ff6b6b;
    border-color: #ff6b6b;
}

[data-theme="dark"] .set-time-btn:hover {
    background: #ff5252;
}

[data-theme="bleuciel"] .timer-mode-btn.active,
[data-theme="bleuciel"] .set-time-btn {
    background: #17a2b8;
    border-color: #17a2b8;
}

[data-theme="light"] .timer-mode-btn.active,
[data-theme="light"] .set-time-btn {
    background: #6f42c1;
    border-color: #6f42c1;
}

/* ===================================================================== */
/* RADIO POPUP - CSS ORGANISÉ - PARTIE 5                               */
/* Widget Compact et Mini-Égaliseur                                     */
/* ===================================================================== */

/* === WIDGET COMPACT PRINCIPAL === */
.radio-compact-widget {
    position: fixed;
    bottom: 110px; 
    left: 10px;
    background: var(--card-bg, white);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
    max-width: 400px;
    animation: slideInLeft 0.3s ease;
}

.radio-compact-widget.playing {
    border-color: #28a745;
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
}

.compact-widget-content {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 10px;
}

/* === BOUTON DE FERMETURE === */
.compact-close-btn {
    /*position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;*/
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: 2px solid white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.compact-close-btn:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.compact-close-btn .material-icons {
    font-size: 14px;
}

/* === INFORMATIONS STATION COMPACT === */
.compact-station-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.compact-logo-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.compact-logo {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: contain;
    background: white;
    padding: 2px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.compact-details {
    flex: 1;
    min-width: 0;
}

.compact-details div:first-child {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color, #333);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compact-details div:last-child {
    font-size: 15px;
    color: var(--text-secondary, #666);
}

.compact-details .status-live {
    color: #4CAF50; /* Un vert matériel et agréable */
    font-weight: bold;
    /* Animation de pulsation */
    animation: pulseLive 2s infinite ease-in-out;
}

/* Définition de l'animation */
@keyframes pulseLive {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

.compact-details .status-paused {
    color: #ff9800 !important;
}

/* === MINI-ÉGALISEUR COMPACT AMÉLIORÉ === */
.compact-equalizer {
    display: none;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
    padding: 2px 4px;
    background: linear-gradient(90deg, 
        rgba(var(--primary-color-rgb, 148, 0, 0), 0.1) 0%, 
        rgba(var(--primary-color-rgb, 148, 0, 0), 0.2) 100%);
    border-radius: 6px;
    position: relative;
    margin-top: 2px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.compact-equalizer::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1));
}

.mini-bar {
    width: 3px;
    height: 30%;
    background: linear-gradient(to top, 
        var(--primary-color, #940000) 0%, 
        #ff8a80 60%,
        #ffeb3b 100%);
    border-radius: 2px 2px 0 0;
    transition: height 0.2s ease;
    position: relative;
    box-shadow: 0 -1px 3px rgba(255, 107, 107, 0.4);
}

.mini-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 235, 59, 0.8);
    border-radius: 50%;
    filter: blur(1px);
}

/* Animation des barres quand actif */
.radio-compact-widget.playing .mini-bar {
    animation: miniPulse 0.3s ease-in-out infinite alternate;
}

@keyframes miniPulse {
    from { 
        opacity: 0.7;
        transform: scaleY(0.95);
    }
    to { 
        opacity: 1;
        transform: scaleY(1);
    }
}

/* Effet de lueur quand en lecture */
.radio-compact-widget.playing .compact-equalizer {
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.1),
        0 0 10px rgba(var(--primary-color-rgb, 148, 0, 0), 0.2);
}

/* === INDICATEUR MINUTEUR COMPACT === */
.compact-timer {
    font-size: 10px;
    color: #ff9800;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 2px;
}

/* === CONTRÔLES COMPACT === */
.compact-controls {
    display: flex;
    gap: 5px;
}

.compact-btn {
    background: rgba(var(--primary-color-rgb, 148, 0, 0), 0.1);
    border: 1px solid rgba(var(--primary-color-rgb, 148, 0, 0), 0.2);
    color: var(--primary-color, #940000);
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: all 0.2s ease;
}

.compact-btn:hover {
    background: rgba(var(--primary-color-rgb, 148, 0, 0), 0.2);
    transform: scale(1.05);
}

.compact-btn .material-icons {
    font-size: 18px;
}

/* === BOUTON MINUTEUR ACTIF === */
.compact-timer-btn.active-timer {
    background: #FFEB3B !important;
    border-color: #E91E63 !important;
    color: #3466a8 !important;
}

.compact-timer-btn.active-timer .material-icons {
    animation: timerPulse 2s infinite;
}

/* === RESPONSIVE WIDGET COMPACT === */
@media (max-width: 768px) {
    .radio-compact-widget {
        left: 10px;
        bottom: 70px;
        max-width: 250px;
    }
    
    .compact-widget-content {
        padding: 8px;
    }
    
    .compact-logo {
        width: 35px;
        height: 35px;
    }
    
    .compact-btn {
        width: 38px;
        height: 38px;
    }
    
    .compact-btn .material-icons {
        font-size: 25px;
    }
    
    .compact-equalizer {
        height: 6px;
    }
    
    .mini-bar {
        width: 1.5px;
    }
    
    .compact-timer {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
     .radio-compact-widget {
        left: 20px;
        bottom: 110px;
        max-width: 395px;
        margin: 5px;
    }
    
    .compact-logo {
        width: 42px;
        height: 42px;
    }
    
    .compact-equalizer {
        height: 5px;
        padding: 1px 2px;
    }
    
    .mini-bar {
        width: 2px;
    }
    
    .compact-close-btn {
        width: 20px;
        height: 20px;
    }
    
    .compact-close-btn .material-icons {
        font-size: 12px;
    }
}

/* === THÈMES WIDGET COMPACT === */
[data-theme="dark"] .radio-compact-widget {
    background: #2d3748;
    border: 2px solid #4a5568;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .radio-compact-widget.playing {
    border-color: #68d391;
    box-shadow: 0 0 20px rgba(104, 211, 145, 0.4);
}

[data-theme="dark"] .compact-btn {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #e2e8f0 !important;
}

[data-theme="dark"] .compact-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

[data-theme="dark"] .compact-timer-btn.active-timer {
    background: rgba(255, 193, 7, 0.3) !important;
    border-color: rgba(255, 193, 7, 0.6) !important;
    color: #ffd93d !important;
}

[data-theme="dark"] .compact-logo {
    background: #4a5568;
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .compact-details div:first-child {
    color: #e2e8f0;
}

[data-theme="dark"] .compact-details div:last-child {
    color: #FFEB3B;
}

[data-theme="dark"] .compact-timer {
    color: #ffd93d;
}

[data-theme="dark"] .compact-close-btn {
    background: rgba(239, 68, 68, 0.9);
    border-color: #4a5568;
}

[data-theme="dark"] .compact-close-btn:hover {
    background: #ef4444;
}

[data-theme="bleuciel"] .radio-compact-widget {
    --primary-color-rgb: 23, 162, 184;
    --primary-color: #17a2b8;
}

[data-theme="light"] .radio-compact-widget {
    --primary-color-rgb: 111, 66, 193;
    --primary-color: #6f42c1;
}

/* ===================================================================== */
/* RADIO POPUP - CSS ORGANISÉ - PARTIE 6 FINALE                        */
/* Menu Minuteur Rapide et Finitions                                    */
/* ===================================================================== */

/* === MENU MINUTEUR RAPIDE === */
.quick-timer-menu {
    background: var(--card-bg, white);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    padding: 8px;
    animation: slideUpQuick 0.2s ease;
    width: 160px;
    min-height: 200px;
}

.quick-timer-options {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 120px;
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.quick-timer-options::-webkit-scrollbar {
    display: none;
}

/* === HEADER MODE MINUTEUR === */
.timer-mode-header {
    display: flex;
    gap: 3px;
    margin-bottom: 8px;
    background: rgba(var(--primary-color-rgb, 148, 0, 0), 0.1);
    border-radius: 6px;
    padding: 2px;
}

.quick-mode-btn {
    flex: 1;
    padding: 6px 8px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-color, #333);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-mode-btn.active {
    background: var(--primary-color, #940000);
    color: white;
}

.quick-mode-btn:hover:not(.active) {
    background: rgba(var(--primary-color-rgb, 148, 0, 0), 0.15);
}

/* === OPTIONS DURÉE === */
.timer-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: var(--text-color, #333);
    min-height: 35px;
    box-sizing: border-box;
}

.timer-option:hover {
    background: rgba(var(--primary-color-rgb, 148, 0, 0), 0.1);
}

.timer-option .material-icons {
    font-size: 16px;
    color: var(--primary-color, #940000);
}

.timer-option[data-minutes="0"] .material-icons {
    color: #dc3545;
}

.timer-option[data-minutes="0"]:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* === OPTIONS HEURE PRÉCISE === */
.quick-time-input {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px;
    background: rgba(var(--primary-color-rgb, 148, 0, 0), 0.05);
    border-radius: 6px;
}

.quick-time-field {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid rgba(var(--primary-color-rgb, 148, 0, 0), 0.3);
    border-radius: 4px;
    background: var(--card-bg, white);
    color: var(--text-color, #333);
    font-size: 13px;
    font-family: monospace;
}

.quick-set-btn {
    padding: 6px 12px;
    border: 1px solid var(--primary-color, #940000);
    border-radius: 4px;
    background: var(--primary-color, #940000);
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-set-btn:hover {
    background: #a50000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* === PRESETS TEMPS === */
.quick-time-presets {
    display: flex;
    gap: 5px;
    justify-content: space-between;
}

.time-preset {
    flex: 1;
    padding: 6px 8px;
    background: rgba(var(--primary-color-rgb, 148, 0, 0), 0.1);
    border: 1px solid rgba(var(--primary-color-rgb, 148, 0, 0), 0.2);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.time-preset:hover {
    background: rgba(var(--primary-color-rgb, 148, 0, 0), 0.2);
}

/* === RESPONSIVE MENU MINUTEUR === */

/* Mobile optimisé */
@media (max-width: 480px) {
    .quick-timer-menu {
        width: 280px;
        max-width: calc(100vw - 20px);
        left: 10px !important;
        bottom: 160px !important;
        min-height: 200px;
        font-size: 16px;
    }
    
    .timer-mode-header {
        margin-bottom: 10px;
    }
    
    .quick-mode-btn {
        padding: 10px 12px;
        font-size: 14px;
        font-weight: 600;
    }
    
    .timer-option {
        min-height: 45px;
        padding: 10px 15px;
        font-size: 16px;
        border: 1px solid rgba(var(--primary-color-rgb, 148, 0, 0), 0.1);
        margin-bottom: 2px;
        border-radius: 8px;
    }
    
    .timer-option:hover,
    .timer-option:active {
        background: rgba(var(--primary-color-rgb, 148, 0, 0), 0.15);
        border-color: rgba(var(--primary-color-rgb, 148, 0, 0), 0.3);
    }
    
    .timer-option .material-icons {
        font-size: 20px;
    }
    
    .timer-option span:last-child {
        margin-left: 5px;
    }
    
    .quick-time-input {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .quick-time-field {
        font-size: 16px;
        padding: 10px 12px;
        height: 44px;
    }
    
    .quick-set-btn {
        padding: 10px 16px;
        font-size: 14px;
        font-weight: 600;
        min-width: 60px;
    }
    
    .quick-time-presets {
        gap: 8px;
    }
    
    .time-preset {
        min-height: 40px;
        font-size: 14px;
        padding: 8px 10px;
        font-weight: 600;
    }
    
    .quick-timer-options {
        max-height: 200px;
    }
    
    /* Feedback tactile */
    .timer-option:active,
    .time-preset:active,
    .quick-set-btn:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }
}

/* Très petits écrans */
@media (max-width: 360px) {
    .quick-timer-menu {
        width: 260px;
        left: 5px !important;
    }
    
    .timer-option {
        font-size: 15px;
        min-height: 42px;
    }
    
    .time-preset {
        font-size: 13px;
        min-height: 38px;
    }
}

/* === THÈMES POUR MENU MINUTEUR === */
[data-theme="dark"] .quick-timer-menu {
    background: #2d3748;
    border: 1px solid #4a5568;
}

[data-theme="dark"] .quick-mode-btn {
    color: #e2e8f0;
}

[data-theme="dark"] .quick-mode-btn.active {
    background: #ff6b6b;
}

[data-theme="dark"] .quick-time-field {
    background: #4a5568;
    border-color: rgba(255, 107, 107, 0.3);
    color: #e2e8f0;
}

[data-theme="dark"] .quick-set-btn {
    background: #ff6b6b;
    border-color: #ff6b6b;
}

[data-theme="dark"] .quick-set-btn:hover {
    background: #ff5252;
}

[data-theme="dark"] .timer-option {
    color: #e2e8f0;
}

[data-theme="dark"] .timer-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .timer-option .material-icons {
    color: #68d391;
}

[data-theme="bleuciel"] .quick-mode-btn.active,
[data-theme="bleuciel"] .quick-set-btn {
    background: #17a2b8;
    border-color: #17a2b8;
}

[data-theme="bleuciel"] .time-preset {
    color: #17a2b8;
    border-color: rgba(23, 162, 184, 0.2);
}

[data-theme="light"] .quick-mode-btn.active,
[data-theme="light"] .quick-set-btn {
    background: #6f42c1;
    border-color: #6f42c1;
}

[data-theme="light"] .time-preset {
    color: #6f42c1;
    border-color: rgba(111, 66, 193, 0.2);
}

/* === AMÉLIORATIONS ACCESSIBILITÉ === */
.timer-option:focus,
.time-preset:focus,
.quick-set-btn:focus {
    outline: 2px solid var(--primary-color, #940000);
    outline-offset: 2px;
}

/* ===================================================================== */
/* FIN DU CSS RADIO ORGANISÉ                                            */
/* ===================================================================== */