/* Lecteur audio persistant style Apple avec liquid glass */
.persistent-player {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    width: calc(100% - 40px);
    max-width: 800px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.7) 0%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.7) 100%
    );
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.1),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 0 rgba(255, 255, 255, 0.3);
    padding: 15px 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    pointer-events: auto;
    display: none; /* Masqué par défaut, affiché seulement si audio chargé */
}

.persistent-player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.8) 50%,
        transparent 100%
    );
    border-radius: 20px 20px 0 0;
    pointer-events: none;
}

.persistent-player::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at 30% 20%,
        rgba(255, 255, 255, 0.4) 0%,
        transparent 50%
    );
    border-radius: 20px;
    pointer-events: none;
    opacity: 0.6;
}

.persistent-player-container {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.player-track-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.player-thumbnail {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.player-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-placeholder {
    color: rgba(255, 255, 255, 0.9);
    width: 24px;
    height: 24px;
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-title {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #000;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.player-author {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    color: #666;
    margin: 2px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.player-btn {
    background: transparent;
    border: none;
    color: #000;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
}

.player-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.player-btn:active {
    transform: scale(0.95);
}

.player-play-pause {
    width: 48px;
    height: 48px;
    background: #000;
    color: #fff;
}

.player-play-pause:hover {
    background: #333;
    transform: scale(1.05);
}

.player-play-pause svg {
    width: 24px;
    height: 24px;
}

.player-progress-section {
    flex: 1;
    min-width: 0;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.player-time {
    display: flex;
    justify-content: space-between;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: #666;
    font-weight: 500;
}

.player-progress-bar {
    width: 100%;
}

.player-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: height 0.2s;
}

.player-progress-track:hover {
    height: 6px;
}

.player-progress-fill {
    height: 100%;
    background: #000;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.player-progress-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #000;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.player-progress-track:hover .player-progress-fill::after {
    opacity: 1;
}

.player-close {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .persistent-player {
        bottom: 10px;
        left: 10px !important;
        right: 10px !important;
        width: calc(100% - 20px) !important;
        max-width: none !important;
        padding: 12px;
        border-radius: 16px;
        transform: none !important;
        margin: 0 !important;
    }

    .persistent-player-container {
        flex-wrap: nowrap;
        gap: 10px;
        align-items: center;
    }

    .player-track-info {
        order: 1;
        flex: 1;
        min-width: 0;
        gap: 10px;
        display: flex;
        align-items: center;
    }

    .player-controls {
        order: 2;
        justify-content: flex-end;
        flex-shrink: 0;
        margin-left: auto;
    }

    .player-progress-section {
        order: 3;
        flex: 1 1 100%;
        max-width: none;
        margin-top: 8px;
    }

    .player-close {
        order: 0;
        position: absolute;
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        padding: 4px;
    }

    .player-thumbnail {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    .player-placeholder {
        width: 20px;
        height: 20px;
    }

    .player-info {
        min-width: 0;
        flex: 1;
    }

    .player-title {
        font-size: 13px;
        line-height: 1.3;
    }

    .player-author {
        font-size: 11px;
        margin-top: 2px;
    }

    .player-btn {
        width: 36px;
        height: 36px;
        padding: 6px;
    }

    .player-play-pause {
        width: 44px;
        height: 44px;
    }

    .player-play-pause svg {
        width: 20px;
        height: 20px;
    }

    .player-time {
        font-size: 10px;
    }

    .player-progress-track {
        height: 3px;
    }

    .player-progress-track:hover {
        height: 4px;
    }
}

@media (max-width: 480px) {
    .persistent-player {
        bottom: 8px;
        left: 8px;
        right: 8px;
        padding: 10px;
    }

    .player-thumbnail {
        width: 40px;
        height: 40px;
    }

    .player-title {
        font-size: 12px;
    }

    .player-author {
        font-size: 10px;
    }

    .player-btn {
        width: 32px;
        height: 32px;
    }

    .player-play-pause {
        width: 40px;
        height: 40px;
    }
}

