/* ============================================================
   Lecteur Musique — cohérent avec style_audio_player.css (Bible)
   Palette : #1e2a4a / #2c3e6b  — Accent : #6580B6
   ============================================================ */

/* ── Utilitaire ─────────────────────────────────────────── */
.hidden-playlist { display: none !important; }

/* ── Conteneur page ──────────────────────────────────────── */
.musique-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 16px 16px 32px;
    font-family: 'Karla', sans-serif;
    background-color: none;

}

/* ── Layout grille ───────────────────────────────────────── */
.musique-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    align-items: start;
}

/* ── Sidebar (fond blanc, style carte) ───────────────────── */
.musique-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.musique-selection {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(30,42,74,0.08);
    border: 1px solid #eaecf3;
}

.musique-selection-title {
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: #6580B6;
    margin: 0 0 14px;
}

.ms-field {
    margin-bottom: 12px;
}
.ms-field:last-child { margin-bottom: 0; }

.ms-label {
    display: block;
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #8a93a8;
    margin-bottom: 5px;
}

.ms-select {
    width: 100%;
    padding: 9px 28px 9px 10px;
    border: 1px solid #d4d8e8;
    border-radius: 8px;
    background: #f7f8fc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236580B6'/%3E%3C/svg%3E") no-repeat right 10px center;
    color: #1e2a4a;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: inherit;
}
.ms-select:hover  { border-color: #6580B6; }
.ms-select:focus  { border-color: #6580B6; box-shadow: 0 0 0 3px rgba(101,128,182,0.18); }
.ms-select:disabled { background: #f0f1f5; color: #b0b5c4; cursor: not-allowed; }

/* ── Playlist ─────────────────────────────────────────────── */
.musique-playlist {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(30,42,74,0.08);
    border: 1px solid #eaecf3;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    max-height: 480px;
}

.musique-playlist-title {
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: #6580B6;
    margin: 0 0 12px;
}

.playlist-items {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.playlist-items::-webkit-scrollbar { width: 4px; }
.playlist-items::-webkit-scrollbar-track { background: transparent; }
.playlist-items::-webkit-scrollbar-thumb { background: #d0d5e8; border-radius: 4px; }
.playlist-items::-webkit-scrollbar-thumb:hover { background: #6580B6; }

.playlist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-size: 0.87em;
    color: rgba(255,255,255,0.62);
    border-left: 2px solid transparent;
}
.playlist-item:hover {
    background: rgba(255,255,255,0.07);
    border-left-color: #6580B6;
    color: #fff;
}
.playlist-item.active {
    background: rgba(101,128,182,0.22);
    color: #ffffff;
    border-left-color: #6580B6;
    font-weight: 600;
}

.track-num {
    min-width: 20px;
    font-size: 0.78em;
    color: rgba(255,255,255,0.28);
    text-align: right;
    font-weight: 600;
    flex-shrink: 0;
}
.playlist-item.active .track-num { color: rgba(255,255,255,0.5); }
.track-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.empty-message {
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-style: italic;
    font-size: 0.87em;
    padding: 16px 0;
}

/* ── Bouton retour playlist (mobile) ────────────────────── */
#btnRetourPlaylist {
    display: none;
    width: 100%;
    background: #6580B6;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 0;
    font-size: 0.95em;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background 0.2s;
    margin-top: 4px;
}
#btnRetourPlaylist:hover { background: #5270a6; }

/* ── Sélecteurs intégrés (inside card) ──────────────────── */
.mp-selectors {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    position: relative;
}

.mp-sel-field { min-width: 0; }

.mp-sel-label {
    display: block;
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 5px;
}

.mp-sel-select {
    width: 100%;
    padding: 8px 26px 8px 10px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: rgba(255,255,255,0.07) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(255,255,255,0.5)'/%3E%3C/svg%3E") no-repeat right 8px center;
    color: rgba(255,255,255,0.85);
    font-size: 0.87em;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
    font-family: inherit;
}
.mp-sel-select option  { background: #1e2a4a; color: #fff; }
.mp-sel-select:hover   { border-color: rgba(101,128,182,0.6); background-color: rgba(255,255,255,0.11); }
.mp-sel-select:focus   { border-color: #6580B6; box-shadow: 0 0 0 3px rgba(101,128,182,0.22); }
.mp-sel-select:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Bouton toggle playlist ──────────────────────────────── */
.mp-playlist-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 0.87em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    white-space: nowrap;
    font-family: inherit;
    box-sizing: border-box;
}
.mp-playlist-toggle:hover { background: rgba(255,255,255,0.13); color: #fff; }
.mp-playlist-toggle.open  { background: rgba(101,128,182,0.22); border-color: rgba(101,128,182,0.5); color: #9bb0e8; }

/* ── Panneau playlist (flottant, par-dessus le lecteur) ────── */
.mp-playlist-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: calc((100% - 20px) / 3);
    z-index: 200;
    background: #ffffff;
    border: 1px solid rgba(101,128,182,0.3);
    border-radius: 10px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.18);
    max-height: 260px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-6px);
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    pointer-events: none;
}
.mp-playlist-panel.open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}
.mp-playlist-panel::-webkit-scrollbar       { width: 4px; }
.mp-playlist-panel::-webkit-scrollbar-track { background: transparent; }
.mp-playlist-panel::-webkit-scrollbar-thumb { background: rgba(101,128,182,0.4); border-radius: 4px; }
.mp-playlist-panel::-webkit-scrollbar-thumb:hover { background: #6580B6; }

.mp-playlist-items {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px 6px;
}

.mp-playlist-items .playlist-item {
    padding: 4px 8px;
    font-size: 0.82em;
    border-radius: 5px;
    border-left-width: 2px;
    border-left-style: solid;
    border-left-color: transparent;
    color: #1e2a4a;
}
.mp-playlist-items .playlist-item:hover {
    background: rgba(101,128,182,0.1);
    border-left-color: #6580B6;
    color: #1e2a4a;
}
.mp-playlist-items .playlist-item.active {
    background: rgba(101,128,182,0.15);
    border-left-color: #6580B6;
    color: #1e2a4a;
    font-weight: 600;
}
.mp-playlist-items .playlist-item + .playlist-item {
    border-top: 1px solid #d4d8e8;
    margin-top: 1px;
    padding-top: 5px;
}
.mp-playlist-items .track-num { color: rgba(30,42,74,0.35); }
.mp-playlist-items .track-title { color: #1e2a4a; }
.mp-playlist-items .empty-message { color: rgba(30,42,74,0.45); }

/* ── Carte lecteur (thème sombre comme Bible) ─────────────── */
.musique-player-card {
    background: linear-gradient(160deg, #1e2a4a 0%, #2c3e6b 60%, #1a2540 100%);
    border: 1px solid rgba(101,128,182,0.35);
    border-radius: 16px;
    padding: 24px 26px 20px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Vinyle + infos ───────────────────────────────────────── */
.mp-now-playing {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.mp-vinyl {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 38%, #3a4f80 0%, #1e2a4a 65%);
    border: 2px solid rgba(101,128,182,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.4s;
}
.mp-vinyl.spinning {
    animation: mp-vinyl-spin 5s linear infinite;
    border-color: #FFD700;
    box-shadow: 0 0 14px rgba(255,215,0,0.3);
}
@keyframes mp-vinyl-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.mp-vinyl-icon {
    font-size: 24px;
    color: rgba(255,215,0,0.8);
    position: absolute;
    animation: mp-vinyl-counter 5s linear infinite paused;
}
.mp-vinyl.spinning .mp-vinyl-icon {
    animation-play-state: running;
}
@keyframes mp-vinyl-counter {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}

.mp-track-info { flex: 1; min-width: 0; }
.mp-track-title {
    font-size: 1em;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    color: #ffffff;
}
.mp-track-sub {
    font-size: 0.78em;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Barre de progression ────────────────────────────────── */
.mp-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mp-time {
    font-size: 0.72em;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: rgba(255,255,255,0.55);
    min-width: 34px;
    text-align: center;
    flex-shrink: 0;
}

.mp-progress-track {
    flex: 1;
    height: 5px;
    background: rgba(255,255,255,0.12);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: height 0.15s;
    user-select: none;
}
.mp-progress-track:hover,
.mp-progress-track.dragging { height: 8px; }

.mp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6580B6, #9bb0e8);
    border-radius: 3px;
    width: 0%;
    pointer-events: none;
    transition: width 0.1s linear;
}

.mp-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 13px;
    height: 13px;
    background: #ffffff;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    box-shadow: 0 1px 5px rgba(0,0,0,0.5);
}
.mp-progress-track:hover .mp-progress-thumb,
.mp-progress-track.dragging .mp-progress-thumb { opacity: 1; }

/* ── Rangée de contrôles ─────────────────────────────────── */
.mp-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.mp-btn {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-size: 15px;
    flex-shrink: 0;
    transition: all 0.2s;
    outline: none;
}
.mp-btn:hover { background: rgba(255,255,255,0.14); color: #ffffff; transform: scale(1.08); }
.mp-btn:active { transform: scale(0.93); }

.mp-btn-main {
    width: 58px;
    height: 58px;
    font-size: 22px;
    background: #6580B6;
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(101,128,182,0.5);
}
.mp-btn-main:hover { background: #7590C6; box-shadow: 0 6px 22px rgba(101,128,182,0.65); transform: scale(1.07); }
.mp-btn-main.playing { background: #43A047; box-shadow: 0 4px 18px rgba(67,160,71,0.5); }
.mp-btn-main.playing:hover { background: #53B05A; box-shadow: 0 6px 22px rgba(67,160,71,0.65); }

/* ── Bas du lecteur : nav + shuffle/repeat + volume ─────── */
.mp-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.mp-nav-group { display: flex; gap: 8px; }
.mp-extra-group { display: flex; gap: 6px; }

.mp-preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72em;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 12px;
    background: rgba(255,215,0,0.12);
    color: #FFD700;
    border: 1px solid rgba(255,215,0,0.35);
    letter-spacing: 0.02em;
}
.mp-volume-group { display: flex; align-items: center; gap: 8px; }

.mp-nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 30px;
    color: rgba(255,255,255,0.8);
    font-size: 0.82em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    outline: none;
}
.mp-nav-btn:hover { background: rgba(255,255,255,0.13); color: #ffffff; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,0.25); }
.mp-nav-btn:active { transform: translateY(0); }

.mp-extra-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    width: 34px;
    height: 34px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    outline: none;
}
.mp-extra-btn:hover { background: rgba(255,255,255,0.13); color: #ffffff; }
.mp-extra-btn.active { background: rgba(255,215,0,0.12); border-color: rgba(255,215,0,0.4); color: #FFD700; }

.mp-vol-icon { font-size: 13px; color: rgba(255,255,255,0.45); }

.mp-vol-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.18);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.mp-vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 13px; height: 13px;
    border-radius: 50%;
    background: #6580B6;
    cursor: pointer;
}
.mp-vol-slider::-moz-range-thumb {
    width: 13px; height: 13px;
    border-radius: 50%;
    background: #6580B6;
    border: none;
    cursor: pointer;
}

/* ── Hint raccourcis ─────────────────────────────────────── */
.mp-keyboard-hint {
    text-align: center;
    font-size: 0.7em;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.02em;
    margin-top: -8px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
    .musique-page { padding: 10px 10px 24px; overflow-x: hidden; }

    /* Ligne 1 : Groupe + Album côte à côte — Ligne 2 : Playlist centré */
    .mp-selectors {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }
    /* Bouton Playlist : 3e enfant (le 4e est le panneau flottant) → 2e ligne, centré */
    .mp-sel-field:nth-child(3) {
        grid-column: 1 / -1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .mp-sel-field:nth-child(3) .mp-sel-label {
        text-align: center;
    }
    .mp-sel-field:nth-child(3) .mp-playlist-toggle {
        width: auto;
        min-width: 160px;
        max-width: 240px;
        padding: 9px 22px;
    }

    /* Panneau playlist : largeur réduite, centrée, fond blanc */
    .mp-playlist-panel {
        position: absolute;
        top: calc(100% + 6px);
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(-6px);
        width: 62%;
        max-width: 240px;
        max-height: 45vh;
        border-radius: 10px;
        background: #ffffff;
    }
    .mp-playlist-panel.open {
        transform: translateX(-50%) translateY(0);
    }

    /* Éléments de playlist : touch-friendly, largeur contenue */
    .mp-playlist-items {
        padding: 4px 8px;
        box-sizing: border-box;
        width: 100%;
    }
    .mp-playlist-items .playlist-item {
        padding: 9px 8px;
        width: 100%;
        box-sizing: border-box;
    }
    .mp-playlist-items .playlist-item .track-title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: block;
    }
}

@media (max-width: 480px) {
    .musique-player-card { padding: 14px 12px; gap: 14px; max-width: 100%; box-sizing: border-box; overflow-x: hidden; }
    .mp-btn-main { width: 52px; height: 52px; font-size: 20px; }
    .mp-btn { width: 38px; height: 38px; font-size: 13px; }
    .mp-controls { gap: 8px; }
    .mp-volume-group { display: none; }
    .mp-keyboard-hint { display: none; }
}


.track-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Boutons shuffle / repeat */
.extra-btn {
    padding: 10px 14px;
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}
.extra-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: white;
    transform: scale(1.08);
}
.extra-btn.active {
    background: rgba(255,255,255,0.9);
    border-color: white;
    color: #667eea;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}
.extra-btn.active.repeat-one {
    color: #764ba2;
}

/* Hint raccourcis clavier */
.keyboard-hint {
    text-align: center;
    font-size: 0.75em;
    color: rgba(255,255,255,0.55);
    margin: 8px 0 0;
    letter-spacing: 0.02em;
}

/* Bouton retour playlist */
#btnRetourPlaylist {
    display: none;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1.1em;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102,126,234,0.15);
    cursor: pointer;
    margin: 0 auto;
    transition: background 0.2s;
}
#btnRetourPlaylist:hover {
    background: #764ba2;
}

@media (max-width: 600px) {
    #btnRetourPlaylist {
        width: 100%;
        font-size: 1.2em;
        padding: 16px 0;
        margin-top: 18px;
    }
    .musique-main {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .musique-sidebar, .musique-player-section {
        width: 100%;
        min-width: 0;
    }
}
/* Styles pour le lecteur de musique */

.musique-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.musique-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.musique-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
}

.musique-header p {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
}

/* Layout principal */
.musique-main {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 25px;
    margin-top: 20px;
}

/* Barre latérale */
.musique-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Panneau de sélection */
.musique-selection {
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.musique-selection h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.2em;
}

.selection-group {
    margin-bottom: 15px;
}

.selection-group:last-child {
    margin-bottom: 0;
}

.selection-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 0.95em;
}

.selection-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95em;
    cursor: pointer;
    background-color: white;
    transition: all 0.3s;
    font-family: inherit;
}

.selection-group select:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.selection-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.selection-group select:disabled {
    background-color: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    border-color: #ddd;
}

/* Playlist */
.musique-playlist {
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.musique-playlist h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1em;
}

.playlist-items {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.playlist-item {
    padding: 12px 15px;
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95em;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.playlist-item:hover {
    background: #e8eaf6;
    transform: translateX(5px);
}

.playlist-item.active {
    background: #667eea;
    color: white;
    font-weight: 600;
    border-left-color: #764ba2;
}

.empty-message {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

/* Section lecteur */
.musique-player-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Infos de la chanson */
.player-info {
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.album-cover {
    min-width: 150px;
    width: 150px;
    height: 150px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.cover-placeholder {
    font-size: 4em;
    color: white;
}

.info-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-details h2 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.6em;
    word-wrap: break-word;
}

.album-name, .groupe-name {
    margin: 3px 0;
    color: #777;
    font-size: 0.95em;
}

/* Lecteur */
.musique-player {
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    color: white;
}

/* Barre de progression */
.player-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.time {
    min-width: 45px;
    text-align: center;
    font-size: 0.9em;
    font-weight: 500;
}

.progress-bar-container {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 100%;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-bar-container:hover .progress-fill {
    background: #ffdd57;
}

/* Contrôles du lecteur */
.player-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.player-btn {
    padding: 12px 18px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
    border-radius: 8px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    text-transform: none;
}

.player-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.player-btn:active {
    transform: scale(0.95);
}

.player-btn.play-btn {
    padding: 14px 22px;
    font-size: 1.1em;
    background: rgba(255,255,255,0.35);
    min-width: 70px;
}

.player-btn.play-btn.playing {
    background: rgba(255,100,100,0.6);
}

/* Volume */
.player-volume {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95em;
}

.player-volume input[type="range"] {
    flex: 1;
    max-width: 200px;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.player-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.player-volume input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* ────────────────────────────────────────────────────────── */
/* Dropdown personnalisé (lecteur musique)                    */
/* ────────────────────────────────────────────────────────── */
.mp-dropdown {
    position: relative;
    width: 100%;
}

.mp-dropdown-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.85);
    font-size: 0.87em;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
.mp-dropdown-btn:hover {
    border-color: rgba(101,128,182,0.6);
    background: rgba(255,255,255,0.11);
}
.mp-dropdown.open .mp-dropdown-btn {
    border-color: #6580B6;
    box-shadow: 0 0 0 3px rgba(101,128,182,0.22);
}
.mp-dropdown--disabled .mp-dropdown-btn {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.mp-dropdown-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255,255,255,0.4);
}
.mp-dropdown-label.has-value { color: rgba(255,255,255,0.9); }
.mp-dropdown-label.locked    { color: #e06060; }

.mp-dropdown-arrow {
    width: 10px;
    height: 6px;
    flex-shrink: 0;
    color: rgba(255,255,255,0.5);
    transition: transform 0.2s;
}
.mp-dropdown.open .mp-dropdown-arrow { transform: rotate(180deg); }

.mp-dropdown-list {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #1e2a4a;
    border: 1px solid rgba(101,128,182,0.35);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
    z-index: 200;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 0;
}
.mp-dropdown.open .mp-dropdown-list { display: block; }

.mp-dd-item {
    padding: 8px 12px;
    color: rgba(255,255,255,0.85);
    font-size: 0.87em;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mp-dd-item:hover           { background: rgba(101,128,182,0.28); color: #fff; }
.mp-dd-item.active          { background: rgba(101,128,182,0.45); color: #fff; }
.mp-dd-item.locked          { color: #e06060; cursor: default; }
.mp-dd-item[data-value=""]  { color: rgba(255,255,255,0.4); cursor: default; }

#volumePercent {
    min-width: 40px;
    text-align: right;
    font-weight: 500;
}

/* Navigation */
.player-nav {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 20px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 0.95em;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    flex: 1;
    max-width: 200px;
}

.nav-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.nav-btn:active {
    transform: translateY(0);
}

/* Scrollbar personnalisée */
.playlist-items::-webkit-scrollbar {
    width: 6px;
}

.playlist-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.playlist-items::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.playlist-items::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .musique-main {
        grid-template-columns: 280px 1fr;
        gap: 20px;
    }

    .player-info {
        padding: 20px;
        gap: 20px;
    }

    .album-cover {
        width: 120px;
        height: 120px;
        min-width: 120px;
    }

    .cover-placeholder {
        font-size: 3em;
    }
}

@media (max-width: 768px) {
    .musique-main {
        grid-template-columns: 1fr;
    }

    .musique-header h1 {
        font-size: 1.8em;
    }

    .player-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .album-cover {
        width: 150px;
        height: 150px;
        min-width: 150px;
    }

    .player-controls {
        flex-wrap: wrap;
        gap: 10px;
    }

    .player-btn {
        padding: 10px 14px;
        font-size: 0.85em;
    }

    .player-nav {
        flex-direction: column;
    }

    .nav-btn {
        max-width: none;
    }

    .musique-player {
        padding: 20px;
    }
}
