/* ============================================================
   YAHIA PLAYER PRO - VERSION MASTER (V24.6)
   CETTE VERSION BLOQUE LA DÉFORMATION PAR LE ZOOM MOBILE
   ============================================================ */

:root {
    --primary: #3498db;
    --bg-dark: #0b0e11;
    --card-bg: #1a1d23;
    --text-light: #cccccc;
}

.yp-pro-player {
    width: 98%;
    max-width: 480px;
    margin: 25px auto;
    background: var(--bg-dark);
    border-radius: 15px;
    overflow: hidden;
    color: #ffffff;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    border: 1px solid #1f2329;
    direction: ltr;
    box-sizing: border-box;
    text-transform: none !important;

    /* --- LA SOLUTION POUR MOBILE --- */
    -webkit-text-size-adjust: none; /* Empêche Brave/Chrome mobile d'agrandir le texte */
    -moz-text-size-adjust: none;
    -ms-text-size-adjust: none;
    text-size-adjust: none;
}

.yp-pro-player * { box-sizing: border-box; }

/* --- 1. IMAGE D'EN-TÊTE --- */
.yp-cover {
    width: 100%;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #222;
}

.yp-cover img {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    display: block;
}

/* --- 2. INFORMATIONS --- */
.yp-info { padding: 15px; text-align: center; }
.yp-info h3 { 
    margin: 0; 
    font-size: 18px !important; 
    color: #ffffff; 
    text-transform: none !important; 
}
.yp-info p { 
    margin: 5px 0 0; 
    color: var(--primary); 
    font-weight: bold; 
    font-size: 14px !important; 
    text-transform: none !important; 
}

/* --- 3. SPECTROGRAMME --- */
.yp-viz-container {
    height: 90px;
    margin: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    position: relative;
    cursor: pointer;
}
.yp-canvas { width: 100%; height: 100%; display: block; }

.yp-tooltip {
    position: absolute;
    background: var(--primary);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px !important;
    font-weight: bold;
    pointer-events: none;
    display: none;
    transform: translateX(-50%);
    top: -25px;
    z-index: 100;
}

.yp-time-row {
    display: flex;
    justify-content: space-between;
    padding: 0 25px;
    font-size: 11px !important;
    color: var(--text-light);
    font-family: monospace;
}

/* --- 4. CONTRÔLES (FLUX BLOQUÉ) --- */
.yp-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap !important; /* INTERDIT le passage à la ligne */
    gap: 12px;
    padding: 20px 10px;
}

/* BOUTON PLAY GÉANT */
.yp-play-toggle {
    width: 65px !important;
    height: 65px !important;
    min-width: 65px !important;
    border-radius: 50% !important;
    background: var(--primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
    flex-shrink: 0; /* Empêche le bouton de s'écraser */
    padding: 0;
}

.yp-play-toggle svg {
    width: 65% !important; /* Ratio 65% parfait */
    height: 65% !important;
    fill: #ffffff;
    display: block;
}

/* BOUTONS DE SAUT */
.yp-jump {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0; /* Verrouille la largeur */
    width: 45px;
    padding: 0;
}

.yp-jump svg {
    width: 26px !important;
    height: 26px !important;
    fill: var(--primary);
}

.yp-jump span {
    font-size: 9px !important;
    font-weight: bold;
    color: #666;
    margin-top: 2px;
}

.yp-jump.small-jump svg { width: 20px !important; height: 20px !important; }
.yp-jump.small-jump span { font-size: 8px !important; }

/* BOUTON VITESSE */
.yp-speed {
    border: 1px solid #333;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    padding: 5px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px !important;
    font-weight: bold;
    min-width: 42px !important;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- 5. PLAYLIST & SCROLLBAR --- */
.yp-playlist-box {
    max-height: 180px;
    overflow-y: auto;
    border-top: 1px solid #1f2329;
    background: #080a0c;
}

.yp-playlist-box::-webkit-scrollbar { width: 5px; }
.yp-playlist-box::-webkit-scrollbar-track { background: #080a0c; }
.yp-playlist-box::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

.playlist-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 13px !important;
    color: #888;
    border-bottom: 1px solid #14171b;
}

.playlist-item.active {
    background: #11151a;
    color: var(--primary);
    border-left: 4px solid var(--primary);
    font-weight: bold;
}

.dur-t { font-size: 10px !important; color: #444; }

/* --- 6. FOOTER --- */
.yp-footer {
    padding: 15px;
    display: flex;
    gap: 10px;
}

.yp-dl-btn {
    flex: 1;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    border-radius: 10px;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: bold;
    text-transform: none !important;
}

.yp-dl-btn.orange { background: #d35400; }
.yp-dl-btn.green { background: #27ae60; }

/* ============================================================
   7. ADAPTATION MOBILE (MEDIA QUERIES)
   ============================================================ */

@media screen and (max-width: 420px) {
    .yp-controls {
        gap: 4px !important; /* Resserre les icônes au maximum */
    }

    .yp-play-toggle {
        width: 56px !important;
        height: 56px !important;
        min-width: 56px !important;
    }

    .yp-jump { width: 36px; }
    .yp-jump svg { width: 22px !important; height: 22px !important; }
    .yp-jump span { font-size: 8px !important; }
    
    .yp-speed {
        min-width: 38px !important;
        font-size: 10px !important;
    }
}