/* Styles pour la page profil */
.profile-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Header du profil */
.profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(142, 68, 173, 0.1);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #8e44ad;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 2rem;
    margin: 0 0 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-badge {
    display: inline-block;
    background: linear-gradient(135deg, #8e44ad 0%, #6a11cb 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 4px;
    vertical-align: middle;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #6a11cb;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.profile-actions {
    display: flex;
    gap: 15px;
}

.btn-edit-profile,
.btn-follow,
.btn-unfollow {
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-edit-profile {
    background: linear-gradient(135deg, #8e44ad 0%, #6a11cb 100%);
    color: white;
}

.btn-follow {
    background: linear-gradient(135deg, #8e44ad 0%, #6a11cb 100%);
    color: white;
}

.btn-unfollow {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.btn-edit-profile:hover,
.btn-follow:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(142, 68, 173, 0.3);
}

.btn-unfollow:hover {
    background: #e6e6e6;
}

/* Sections du profil */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
}

.view-all {
    color: #8e44ad;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.view-all:hover {
    color: #6a11cb;
}

/* Grille des chansons */
.songs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.song-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.song-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(142, 68, 173, 0.2);
}

.song-cover {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Ratio 1:1 */
    overflow: hidden;
}

.cover-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.song-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.song-cover:hover img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
}

.song-cover:hover .play-overlay {
    opacity: 1;
}

.play-button {
    background: rgba(106, 17, 203, 0.8);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.2rem;
}

.play-button:hover {
    background: rgba(106, 17, 203, 1);
    transform: scale(1.1);
}

.song-info-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 2;
}

.song-likes {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.song-info {
    padding: 15px;
}

.song-title {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 600;
}

.song-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.song-title a:hover {
    color: #6a11cb;
}

.song-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #666;
}

/* Grille des playlists */
.playlists-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.playlist-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.playlist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(142, 68, 173, 0.2);
}

.playlist-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.playlist-cover {
    position: relative;
    width: 100%;
    padding-top: 60%; /* Ratio 5:3 */
    overflow: hidden;
}

.playlist-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.playlist-card:hover .playlist-cover img {
    transform: scale(1.05);
}

.playlist-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.song-count {
    font-size: 0.8rem;
}

.play-icon {
    width: 30px;
    height: 30px;
    background: rgba(106, 17, 203, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
}

.playlist-card:hover .play-icon {
    opacity: 1;
    transform: scale(1.1);
}

.playlist-info {
    padding: 15px;
}

.playlist-name {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: #333;
}

.playlist-desc {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

/* Message quand le profil est vide */
.empty-profile {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(142, 68, 173, 0.1);
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #8e44ad 0%, #6a11cb 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.empty-profile h2 {
    margin: 0 0 10px;
    color: #333;
}

.empty-profile p {
    color: #666;
    max-width: 400px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 992px) {
    .songs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .playlists-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .profile-actions {
        justify-content: center;
    }
    
    .songs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .playlists-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .songs-grid {
        grid-template-columns: 1fr;
    }
}
/* Styles pour l'upload d'avatar */
.avatar-upload {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

.current-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #8e44ad;
}

.current-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-input {
    flex: 1;
}

.avatar-upload-btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #8e44ad 0%, #6a11cb 100%);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.avatar-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(142, 68, 173, 0.3);
}

.btn-remove-avatar {
    background: #f8f8f8;
    color: #e74c3c;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    margin-left: 10px;
}

.btn-remove-avatar:hover {
    background: #fff0f0;
}