/* =========================================================
   STYLES MODERNES POUR LE PROFIL ARTISTE
   Inspiré de user-profile.css
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-color: #000000;
    --surface-color: #181818;
    --surface-hover: #282828;
    --accent-color: #3b82f6;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #717171;
    --border-color: #333333;
    --radius-lg: 50%;
    --radius-md: 8px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= BACK BUTTON ================= */
.page-section.spa-artist .back-button {
    position: fixed;
    top: 24px;
    left: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: #fff;
    transition: var(--transition);
    z-index: 1000;
    backdrop-filter: blur(10px);
    text-decoration: none;
}

.page-section.spa-artist .back-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.page-section.spa-artist .back-icon {
    width: 24px;
    height: 24px;
}

/* ================= ARTIST CONTAINER ================= */
.page-section.spa-artist .artist-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-bottom: 80px;
    animation: fadeIn 0.6s ease-out;
}

/* ================= ARTIST HEADER ================= */
.page-section.spa-artist .artist-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 60px 32px 32px;
    background: linear-gradient(to bottom, #2a2a2a, var(--bg-color));
}

.page-section.spa-artist .artist-avatar-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.page-section.spa-artist .artist-avatar {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    object-fit: cover;
    background: #333;
    box-shadow: 0 4px 60px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.artist-avatar-wrapper:hover .artist-avatar {
    transform: scale(1.02);
}

.page-section.spa-artist .artist-info {
    flex: 1;
    min-width: 0;
}

.page-section.spa-artist .artist-name {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    margin-bottom: 16px;
    line-height: 1.1;
    color: var(--text-primary);
}

.page-section.spa-artist .artist-socials {
    display: flex;
    gap: 12px;
}

.page-section.spa-artist .social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.social-btn:hover {
    background: #fff;
    color: #000;
    transform: scale(1.05);
}

.page-section.spa-artist .social-btn img {
    width: 20px;
    height: 20px;
    transition: var(--transition);
    filter: brightness(0) invert(1);
}

.social-btn:hover img {
    filter: brightness(0);
}

/* Instagram Hover Effect */
.page-section.spa-artist .social-btn.insta-btn:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    box-shadow: 0 0 25px rgba(214, 36, 159, 0.6);
}

.page-section.spa-artist .social-btn.insta-btn:hover img {
    filter: brightness(0) invert(1);
}

/* Wikipedia Hover Effect */
.page-section.spa-artist .social-btn.wiki-btn:hover {
    background: linear-gradient(135deg, #ffffff 0%, #a3a3a3 100%);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.page-section.spa-artist .social-btn.wiki-btn svg {
    width: 24px;
    height: 24px;
}

/* ================= NAVIGATION ================= */
.page-section.spa-artist .artist-nav {
    display: flex;
    gap: 32px;
    padding: 0 40px;
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
}

.page-section.spa-artist .nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    font-family: inherit;
}

.page-section.spa-artist .nav-btn:hover {
    color: var(--text-primary);
}

.page-section.spa-artist .nav-btn:focus {
    outline: none;
    color: var(--text-primary);
}

.page-section.spa-artist .nav-btn.active {
    color: #fff;
}

.page-section.spa-artist .nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 25%;
    width: 50%;
    height: 2px;
    background: var(--accent-color);
    border-radius: 2px;
}

.page-section.spa-artist .nav-icon {
    font-size: 1.2rem;
}

/* ================= SECTIONS ================= */
.page-section.spa-artist .artist-section {
    display: none;
    padding: 0 40px;
    animation: slideUp 0.4s ease-out;
}

.page-section.spa-artist .artist-section.active {
    display: block;
}

.page-section.spa-artist .section-header {
    margin-bottom: 24px;
}

.page-section.spa-artist .section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.page-section.spa-artist .section-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ================= TRACKS LIST ================= */
.page-section.spa-artist .tracks-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.page-section.spa-artist .track-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.page-section.spa-artist .track-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.page-section.spa-artist .track-rank {
    width: 24px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: center;
}

.page-section.spa-artist .track-info {
    flex: 1;
    min-width: 0;
}

.page-section.spa-artist .track-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-section.spa-artist .track-plays {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ================= ALBUMS GRID ================= */
.page-section.spa-artist .albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.page-section.spa-artist .album-card {
    background: var(--surface-color);
    padding: 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.page-section.spa-artist .album-card:hover {
    background: var(--surface-hover);
    transform: translateY(-4px);
}

.page-section.spa-artist .album-cover {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.page-section.spa-artist .album-card:hover .album-cover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.page-section.spa-artist .album-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.page-section.spa-artist .album-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ================= EMPTY STATE ================= */
.page-section.spa-artist .empty-state {
    padding: 60px 0;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

/* ================= ALBUM POPUP ================= */
.page-section.spa-artist .album-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.3s ease-out;
}

.page-section.spa-artist .album-popup {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease-out;
}

.page-section.spa-artist .album-popup-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    position: relative;
}

.page-section.spa-artist .album-popup-cover {
    width: 160px;
    height: 160px;
    border-radius: var(--radius-md);
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.page-section.spa-artist .album-popup-header-content h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.page-section.spa-artist .album-popup-header-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.page-section.spa-artist .album-popup-close {
    position: absolute;
    top: 0;
    right: 0;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.page-section.spa-artist .album-popup-close:hover {
    color: var(--text-primary);
}

.page-section.spa-artist .album-popup-tracks {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.page-section.spa-artist .album-popup-track-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.page-section.spa-artist .album-popup-track-item:hover {
    background: rgba(255, 255, 255, 0.05);
    padding-left: 8px;
}

.page-section.spa-artist .track-number {
    width: 24px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: center;
}

.page-section.spa-artist .track-title {
    flex: 1;
    font-size: 1rem;
    color: var(--text-primary);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .artist-header {
        padding: 80px 20px 20px;
        flex-direction: column;
        text-align: center;
    }

    .artist-avatar-wrapper {
        width: 150px;
        height: 150px;
    }

    .artist-name {
        font-size: 2.5rem;
    }

    .back-button {
        top: 16px;
        left: 16px;
    }

    .artist-nav {
        padding: 0 20px;
        overflow-x: auto;
    }

    .artist-section {
        padding: 0 20px;
    }

    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }
}

/* ================= SCROLLBAR ================= */
.artist-section::-webkit-scrollbar {
    width: 6px;
}

.artist-section::-webkit-scrollbar-track {
    background: transparent;
}

.artist-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}