/* --- Polices --- */
@font-face {
    font-family: 'prompt';
    src: url('./font/SVBasicManual.ttf');
    font-display: swap;
}

.hidden { display: none !important; }

/* --- Conteneur Principal (Site & Admin) --- */
.radio_container, #preview-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    min-height: 520px; 
    margin: 30px auto;
    background-size: cover;
    background-position: center;
    border-radius: 24px;
    overflow: hidden;
    padding: clamp(20px, 5vw, 40px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    font-family: 'prompt', sans-serif;
    color: white;
}

/* Glassmorphism Panels */
#track, #program, .preview-panel {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
    font-size: 1em;
}

h4, #preview-title-display {
    font-size: clamp(1.8em, 5vw, 2.5em);
    margin: 0;
    text-shadow: 0 4px 12px rgba(0,0,0,0.6);
    text-align: center;
    z-index: 2;
    font-weight: bold;
}

/* --- Sélecteur de stations --- */
.station-selector-container {
    z-index: 3;
    width: 100%;
}

#sr42-station-selector {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    cursor: pointer;
    font-size: 1rem;
    outline: none;
}

/* --- Player Central (Le Disque) --- */
#englobe, #preview-englobe {
    position: relative;
    width: 250px; 
    height: 250px;
    margin: 15px 0;
    flex-shrink: 0;
    display: flex; /* Force le centrage des enfants */
    align-items: center;
    justify-content: center;
    padding: 0 !important; /* Kill tout padding admin */
}

/* Base commune : on utilise plus inset ou top/left pour éviter les bugs admin */
#play_button, #pause_button, #round,
#preview-play-button, #preview-pause-button, #preview-round {
    position: absolute;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 !important; /* Kill toute marge admin */
}

/* --- LE DISQUE (ROUND) --- */
#round, #preview-round {
    z-index: 1; 
    background-size: 100% 100% !important; 
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.4));
    animation: rotate 20s infinite linear;
    animation-play-state: paused;
}

/* --- LES BOUTONS AVEC PULSATION --- */
#play_button, #preview-play-button { 
    background-size: 40% !important; 
    z-index: 10;
    animation: pulse-gold 2s infinite ease-in-out;
}

#pause_button, #preview-pause-button { 
    background-size: 35% !important; 
    z-index: 10;
}

#play_button:hover, #pause_button:hover,
#preview-play-button:hover, #preview-pause-button:hover { 
    transform: scale(1.1); 
}

/* --- Animations --- */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse-gold {
    0% { filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.3)); }
    50% { filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.7)); }
    100% { filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.3)); }
}

/* --- Infos Textes --- */
#track h5, #program h5, .preview-panel h5 {
    margin: 0 0 5px 0;
    font-size: 0.75em;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.7;
    color: #FFD700;
}

/* --- Volume Style Sabre Laser --- */
#volume-controls {
    width: 100%;
    max-width: 300px;
    margin-top: auto;
    display: flex;
    align-items: center;
    padding: 20px 0;
}

#volumeslider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    overflow: visible;
}

#volumeslider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: #fff;
    border: 3px solid #FFD700;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 15px #FFD700, 0 0 30px #FFD700; 
    margin-top: -7px;
    position: relative;
    z-index: 5;
}

#footer_cause {
    font-size: 0.8em;
    opacity: 0.6;
    margin-top: 10px;
    cursor: pointer;
    transition: opacity 0.2s;
}

#footer_cause:hover { opacity: 1; }

/* --- États (Messages) --- */
.center, #wait, #offline {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border-radius: 15px;
    z-index: 20;
    text-align: center;
    border: 1px solid #FFD700;
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
    .radio_container, #preview-container {
        max-width: 90%;
        min-height: auto;
        padding: 25px;
    }
    #englobe, #preview-englobe {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 400px) {
    #englobe, #preview-englobe {
        width: 160px;
        height: 160px;
    }
    h4, #preview-title-display { font-size: 1.5em; }
}