/* ===================================
   RESPONSIVE.CSS - COMPOSANTS & RESPONSIVE
   Source unique de vérité pour :
   - Composants partagés (cards, héros, grilles)
   - Règles responsive/media queries
   =================================== */

/* ===================================
   1. PAGE CONTAINERS
   =================================== */

.beats-page,
.search-page {
    /* Padding fluide : jamais moins de 12px, jamais plus de 48px, proportionnel à l'espace */
    padding: clamp(12px, 3vw, 48px) clamp(12px, 3vw, 32px);
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* ===================================
   2. BEATS HERO (page principale)
   =================================== */

.beats-hero {
    position: relative;
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg,
        rgba(239, 68, 68, 0.15) 0%,
        rgba(220, 38, 38, 0.08) 100%
    );
    border: 1px solid var(--border-subtle);
    margin-bottom: var(--space-2xl);
    overflow: hidden;
}

.beats-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle,
        rgba(239, 68, 68, 0.1) 0%,
        transparent 70%
    );
    animation: pulse 4s ease-in-out infinite;
}

/* ===================================
   SEARCH HERO (champ de recherche — compact et neutre)
   Pas d'overflow:hidden → les suggestions dropdown doivent passer par-dessus
   =================================== */

.search-hero {
    position: relative;
    padding: clamp(12px, 2.5vw, 24px) clamp(12px, 3vw, 32px);
    border-radius: var(--radius-xl);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    margin-bottom: var(--space-lg);
    z-index: 1000;
}

.beats-hero-content,
.search-hero-content {
    position: relative;
    z-index: 1;
}

.beats-hero-title {
    font-size: 42px;
    font-weight: 700;
    background: linear-gradient(135deg, #FFFFFF 0%, var(--primary-300) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md);
}

.beats-hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 600px;
}

.beats-hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.beats-hero-btn {
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.beats-hero-btn-primary {
    background: var(--primary-500);
    color: white;
}

.beats-hero-btn-primary:hover {
    background: var(--primary-600);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.beats-hero-btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.beats-hero-btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
}

/* ===================================
   3. FILTER BAR (.beats-filters)
   =================================== */

.beats-filters {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding: var(--space-md);
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    overflow-x: auto;
    flex-wrap: wrap;
}

.beats-filter-chip {
    padding: 10px 20px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.beats-filter-chip:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.beats-filter-chip.active {
    background: var(--primary-500);
    color: white;
    border-color: var(--primary-500);
}

.beats-filter-chip i {
    margin-right: var(--space-xs);
}

/* ===================================
   4. SECTION HEADERS
   =================================== */

.beats-section {
    margin-bottom: var(--space-2xl);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.beats-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.beats-section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    min-width: 0;
    margin-bottom: 0;
}

.beats-section-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.beats-section-action {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: 4px;
    flex-shrink: 0;
}

.beats-section-action:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

/* ===================================
   5. TRACK CARDS GRID (.beats-grid)
   =================================== */

.beats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: calc(var(--space-lg) / 1.2);
    margin-bottom: var(--space-xl);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.beats-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 100%;
    box-sizing: border-box;
}

/* ===================================
   6. TRACK CARD (.track-card)
   Source de vérité unique — utilisée dans beats ET search
   =================================== */

.track-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    gap: var(--space-sm);
}

.track-card-cover {
    position: relative;
    width: 100%;
    padding-top: 100%; /* ratio carré */
    background-size: cover;
    background-position: center;
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition-normal, 250ms);
}

.track-card-cover:hover {
    transform: scale(1.02);
}

.track-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 56px;
    height: 56px;
    background: var(--primary-500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-fast);
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.4);
    z-index: 5;
}

.track-card-play i {
    color: white;
    font-size: 20px;
    margin-left: 3px;
}

.track-card-cover:hover .track-card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Badge prix (payant) */
.track-card-price {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.track-card-price i {
    font-size: 11px;
    color: #10B981;
}

/* Badge gratuit */
.track-card-free {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(16, 185, 129, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(10px);
    z-index: 10;
}

/* Info sous la cover */
.track-card-info {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.track-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.track-card-artist {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    cursor: pointer;
    transition: color 0.15s;
}
.track-card-artist:hover {
    color: var(--text-primary);
}

.track-card-meta {
    display: flex;
    margin-top: var(--space-sm);
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.track-card-tag {
    padding: 4px 10px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--primary-400);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Pas de bordure rouge parasite */
.track-card,
.track-card-cover {
    border: none;
    outline: none;
}

/* ===================================
   7. TRACK LIST ITEM (.track-list-item)
   Utilisé dans Nouveautés et playlist
   =================================== */

.track-list-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.track-list-item:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.track-list-cover {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    background-color: var(--bg-elevated);
    flex-shrink: 0;
}

.track-list-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.track-list-item:hover .track-list-play {
    opacity: 1;
}

.track-list-info {
    flex: 1;
    min-width: 0;
}

.track-list-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-list-artist {
    font-size: 14px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s;
}
.track-list-artist:hover {
    color: var(--text-primary);
}

.track-list-meta {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.track-list-tag {
    font-size: 12px;
    padding: 4px 8px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.track-list-price {
    display: flex;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}

.track-price-badge {
    background: var(--primary-500);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.track-free-badge {
    background: #10b981;
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

/* ===================================
   8. CAROUSEL HORIZONTAL
   =================================== */

.beats-carousel {
    position: relative;
}

.beats-carousel-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.beats-carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.beats-carousel-track {
    display: flex;
    gap: var(--space-lg);
    padding-bottom: var(--space-md);
    max-width: 100%;
    box-sizing: border-box;
}

.beats-carousel-item,
.beats-carousel-track .track-card {
    min-width: 280px;
    max-width: 280px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.beats-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
}

.beats-carousel-nav:hover {
    background: var(--bg-card);
    border-color: var(--border-strong);
    transform: translateY(-50%) scale(1.1);
}

.beats-carousel-nav.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.beats-carousel-nav-prev { left: -20px; }
.beats-carousel-nav-next { right: -20px; }

/* ===================================
   9. CATEGORY GRID
   =================================== */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-lg);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.category-card {
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: transform var(--transition-base, 250ms);
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.9) 100%
    );
    transition: all var(--transition-base, 250ms);
}

.category-card:hover {
    transform: translateY(-8px);
}

.category-card:hover::before {
    background: linear-gradient(180deg,
        rgba(239, 68, 68, 0.2) 0%,
        rgba(239, 68, 68, 0.5) 50%,
        rgba(0, 0, 0, 0.95) 100%
    );
}

.category-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.category-icon {
    font-size: 32px;
    margin-bottom: var(--space-sm);
}

.category-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-xs);
}

.category-count {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* ===================================
   10. LOADING STATES
   =================================== */

.beats-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    gap: var(--space-md);
}

.beats-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--primary-500);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================
   11. EXPLORE FOOTER CARD
   =================================== */

.beats-explore-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin: 0 var(--space-lg);
    text-align: center;
}

.beats-explore-title {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-sm);
}

.beats-explore-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.beats-explore-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.beats-explore-button:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* ===================================
   12. SEARCH COMPONENTS (search.render.php)
   =================================== */

/* Wrapper du champ de recherche */
.search-input-wrapper {
    position: relative;
    margin-bottom: var(--space-md);
}

.search-input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 18px;
    z-index: 2;
    pointer-events: none;
}

.search-input-modern {
    width: 100%;
    padding: 14px 50px 14px 55px;
    font-size: 16px;
    background: var(--bg-card);
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
    position: relative;
    z-index: 1;
}

.search-input-modern:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.search-input-modern::placeholder {
    color: var(--text-tertiary);
}

.search-clear-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 3;
}

.search-clear-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.search-clear-btn.active {
    display: flex;
}

.search-stats {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: var(--space-sm);
}

/* Suggestions dropdown — z-index élevé pour passer au-dessus du contenu */
.search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    max-height: 380px;
    overflow-y: auto;
    display: none;
    z-index: 9999;
}

.search-suggestions.active {
    display: block;
    animation: fadeIn 0.15s ease;
}

.suggestions-section {
    padding: var(--space-sm) var(--space-md);
}

.suggestions-section + .suggestions-section {
    border-top: 1px solid var(--border-subtle);
}

.suggestions-header {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-tertiary);
    font-weight: 600;
    margin-bottom: var(--space-xs);
    letter-spacing: 0.5px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: var(--space-sm) var(--space-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.suggestion-item:hover,
.suggestion-item.active {
    background: var(--bg-card-hover);
}

.suggestion-cover {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background-size: cover;
    background-position: center;
    background-color: var(--bg-card);
    margin-right: var(--space-md);
    flex-shrink: 0;
}

.suggestion-info { flex: 1; min-width: 0; }

.suggestion-name {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-meta {
    font-size: 12px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Barre de filtres rapides */
.search-filters {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding: clamp(8px, 1.5vw, 16px) clamp(8px, 2vw, 24px);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    min-width: 0;
    overflow: hidden;
}

/* Premier filter-group (genres + pills) prend l'espace disponible */
.filter-group {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
    max-width: 100%;
}

.filter-group:first-child {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.filter-label {
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Pills : scroll horizontal — jamais de retour à la ligne */
.filter-pills {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    min-width: 0;
    padding-bottom: 2px; /* évite de couper les ombres */
}

.filter-pills::-webkit-scrollbar { display: none; }

.filter-pill {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-pill:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.filter-pill.active {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: white;
}

.filter-pill-more {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: transparent;
    border: 1px dashed var(--border-medium);
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-pill-more:hover {
    border-color: var(--primary-500);
    color: var(--primary-500);
}

.sort-select {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-500);
}

.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    padding: 4px;
    border-radius: var(--radius-sm);
    margin-left: auto;
}

.view-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.view-btn:hover { color: var(--text-primary); }

.view-btn.active {
    background: var(--primary-500);
    color: white;
}

/* Grilles de résultats — fluide, z-index bas pour que suggestions passent devant */
.search-results-grid {
    display: grid;
    /* auto-fill + clamp : jamais moins de 140px, jamais plus de 220px,
       ~22% du conteneur au milieu → naturellement 2 à 7 colonnes selon l'espace */
    grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 22%, 220px), 1fr));
    gap: clamp(8px, 2vw, 24px);
    margin-bottom: var(--space-xl);
    position: relative;
    z-index: 1;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    position: relative;
    z-index: 1;
}

.search-results-grid.hidden,
.search-results-list.hidden {
    display: none;
}

/* Loading spinner search */
.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    color: var(--text-tertiary);
}

.search-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-medium);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* État vide */
.search-empty {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.search-empty i {
    font-size: 56px;
    color: var(--text-tertiary);
    margin-bottom: var(--space-md);
    opacity: 0.4;
    display: block;
}

.search-empty h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.search-empty p {
    font-size: 14px;
    color: var(--text-tertiary);
}

/* Drawer filtres avancés
   Le player (inline z-index: 2000) est toujours présent en bas (96px).
   On monte le drawer à z-index 2100 et on réduit sa hauteur en conséquence. */
.filters-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 380px;
    height: calc(100vh - (var(--space-md) * 2 + 64px));
    background: var(--bg-elevated);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
    z-index: 2100;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.filters-drawer.active { right: 0; }

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2099;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-medium);
}

.drawer-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.drawer-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.drawer-close:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
}

.filter-section { margin-bottom: var(--space-xl); }

.filter-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.genre-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.genre-chip {
    display: flex;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 13px;
    color: var(--text-secondary);
}

.genre-chip input { margin-right: var(--space-sm); }

.genre-chip:has(input:checked) {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: white;
}

.drawer-footer {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-top: 1px solid var(--border-medium);
}

.btn-reset,
.btn-apply {
    flex: 1;
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.btn-reset {
    background: var(--bg-card);
    color: var(--text-secondary);
}

.btn-reset:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-apply {
    background: var(--primary-500);
    color: white;
}

.btn-apply:hover { background: var(--primary-600); }

/* ===================================
   Drawer — nouveaux éléments de filtre
   =================================== */

.filter-select-full {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.filter-select-full:focus {
    outline: none;
    border-color: var(--primary-500);
}

.filter-range-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.filter-range-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-range-field label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-range-input {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color var(--transition-fast);
}

.filter-range-input:focus {
    outline: none;
    border-color: var(--primary-500);
}

.filter-range-sep {
    color: var(--text-tertiary);
    margin-top: 18px;
    flex-shrink: 0;
}

.filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.filter-checkbox-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 10px var(--space-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
    user-select: none;
}

.filter-checkbox-item:hover { background: var(--bg-card); }

/* Cacher la checkbox native */
.filter-checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.filter-checkbox-label {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    transition: color var(--transition-fast);
}

.filter-checkbox-label i {
    font-size: 13px;
    color: var(--text-tertiary);
    width: 16px;
    text-align: center;
}

.filter-checkbox-item:has(input:checked) .filter-checkbox-label {
    color: var(--text-primary);
}

/* Toggle switch */
.filter-toggle {
    flex-shrink: 0;
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: var(--border-medium);
    position: relative;
    transition: background var(--transition-fast);
    display: block;
}

.filter-checkbox-item:has(input:checked) .filter-toggle {
    background: var(--primary-500);
}

.filter-toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    transition: left var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    display: block;
}

.filter-checkbox-item:has(input:checked) .filter-toggle-knob {
    left: 21px;
}

/* ===================================
   Titre de section résultats
   =================================== */

.search-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-tertiary);
    margin-bottom: var(--space-md);
    padding-left: 2px;
}

/* ===================================
   Section utilisateurs (scroll horizontal)
   =================================== */

.search-users-section {
    margin-bottom: var(--space-xl);
    overflow: hidden;
}

/* Grid : 1fr est borné par la grid, jamais par le contenu.
   Impossible de déborder contrairement à flex:1. */
.search-users-scroll-wrapper {
    display: grid;
    grid-template-columns: 28px 1fr 28px;
    gap: var(--space-sm);
    align-items: center;
    overflow: hidden;
}

.users-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all var(--transition-fast);
}

.users-arrow:hover:not(.disabled) {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.users-arrow.disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

.search-users-list {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: var(--space-xs) 0;
    font-size: 0;
}

.search-users-list::-webkit-scrollbar { display: none; }

.search-user-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    vertical-align: top;
    gap: 6px;
    width: 64px;
    cursor: pointer;
    margin-right: var(--space-md);
    transition: transform var(--transition-fast);
    white-space: normal;
    font-size: 11px;
}

.search-user-item:last-child { margin-right: 0; }
.search-user-item:hover { transform: translateY(-3px); }

.search-user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-elevated);
    flex-shrink: 0;
}

.search-user-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 64px;
}

/* Icons suggestions artistes */
.suggestion-avatar { border-radius: 50%; }

.suggestion-user-icon {
    font-size: 12px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.suggestion-genre-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--space-md);
    flex-shrink: 0;
    color: var(--primary-400);
    font-size: 16px;
}

/* Prix en vue liste */
.track-list-price {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.track-list-price i { font-size: 11px; color: #10B981; }
.track-list-price-free { color: #10B981; }

/* ===================================
   13. UTILITY ANIMATIONS
   =================================== */

.fade-in  { animation: fadeIn  0.4s ease-out; }
.slide-up { animation: slideInUp 0.4s ease-out; }

/* ===================================
   RESPONSIVE MEDIA QUERIES
   =================================== */

/* === MOBILE FIRST - Très petits écrans === */
@media (max-width: 480px) {
    :root {
        --space-2xl: 32px;
        --space-xl: 24px;
    }

    .beats-page {
        padding: var(--space-lg) var(--space-md);
    }

    .beats-hero {
        padding: var(--space-lg);
    }

    .beats-hero-title {
        font-size: 28px;
    }

    .beats-hero-subtitle {
        font-size: 14px;
    }

    .beats-hero-actions {
        flex-direction: column;
    }

    .beats-hero-btn {
        width: 100%;
        justify-content: center;
    }

    .beats-section-title {
        font-size: 20px;
    }

    .beats-section-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .beats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .category-title {
        font-size: 16px;
    }
}

/* === MOBILE (<= 768px) === */
@media (max-width: 768px) {
    body {
        padding-bottom: 80px;
    }

    .beats-page {
        padding: var(--space-lg) var(--space-md);
    }

    .beats-hero {
        padding: var(--space-lg);
    }

    .beats-hero-title {
        font-size: 32px;
    }

    .beats-hero-subtitle {
        font-size: 16px;
    }

    .beats-section-title {
        font-size: 22px;
    }

    .beats-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--space-md);
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .beats-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .beats-filters::-webkit-scrollbar {
        display: none;
    }

    .beats-filter-chip {
        flex-shrink: 0;
    }

    .beats-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }

    .beats-section-action {
        width: 100%;
        justify-content: center;
        font-size: 12px;
        padding: 8px 12px;
    }

    .beats-section-action span {
        display: none;
    }

    .beats-section-action i {
        margin: 0;
    }

    .beats-carousel-nav {
        display: none;
    }

    .track-list-item {
        gap: var(--space-sm);
        padding: var(--space-sm);
    }

    .track-list-cover {
        width: 50px;
        height: 50px;
    }

    .beats-explore-title {
        font-size: 20px;
    }

    .beats-explore-text {
        font-size: 14px;
    }

    /* Search mobile */
    .search-filters {
        flex-direction: row; /* reste en ligne, les pills scrollent */
    }

    .view-toggle {
        flex-shrink: 0;
    }

    .filters-drawer {
        width: 100%;
    }
}

/* === TABLET (481px - 768px) === */
@media (min-width: 481px) and (max-width: 768px) {
    .beats-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === DESKTOP SMALL (769px - 1024px) === */
@media (min-width: 769px) and (max-width: 1024px) {
    .beats-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* === DESKTOP LARGE (>= 1025px) === */
@media (min-width: 1025px) {
    .beats-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (min-width: 1400px) {
    .category-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* === ULTRA WIDE (>= 1920px) === */
@media (min-width: 1920px) {
    .beats-page,
    .search-page {
        max-width: 1400px;
    }

    .beats-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* === LANDSCAPE MOBILE === */
@media (max-width: 768px) and (orientation: landscape) {
    .beats-hero,
    .search-hero {
        padding: var(--space-md);
    }

    .beats-hero-title {
        font-size: 24px;
    }

    .beats-section {
        margin-bottom: var(--space-lg);
    }
}

/* === TOUCH DEVICES === */
@media (hover: none) and (pointer: coarse) {
    .track-card:hover {
        transform: none;
    }

    .beats-filter-chip {
        padding: 12px 24px;
    }

    /* Toujours montrer le bouton play sur tactile */
    .track-card-play {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

/* === SMALL HEIGHT === */
@media (max-height: 600px) {
    .sidenav-content {
        padding: var(--space-sm);
    }

    .sidenav-section {
        margin-bottom: var(--space-md);
    }

    .sidenav-section-title {
        display: none;
    }
}

/* === iOS SAFE AREA === */
@supports (-webkit-touch-callout: none) {
    .sidenav {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .main-content {
        padding-bottom: calc(env(safe-area-inset-bottom) + 20px);
    }

    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* === ANDROID === */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .beats-carousel-wrapper,
    .sidenav-content {
        -webkit-overflow-scrolling: touch;
    }
}

/* === HIGH DPI === */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .track-cover,
    .sidenav-logo-img,
    .sidenav-user-avatar {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === FOCUS KEYBOARD === */
@media (prefers-reduced-motion: no-preference) {
    *:focus-visible {
        outline: 2px solid var(--primary-500);
        outline-offset: 2px;
        transition: outline-offset 0.1s ease;
    }
}

/* === LIGHT MODE === */
@media (prefers-color-scheme: light) {
    :root {
        --bg-app: #F5F5F5;
        --bg-elevated: #FFFFFF;
        --bg-card: #FAFAFA;
        --bg-card-hover: #F0F0F0;
        --text-primary: #1A1A1A;
        --text-secondary: #525252;
        --text-tertiary: #737373;
        --border-subtle: rgba(0, 0, 0, 0.08);
        --border-medium: rgba(0, 0, 0, 0.12);
    }
}

/* === PRINT === */
@media print {
    .sidenav,
    .beats-filters,
    .beats-hero-actions {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .track-card {
        break-inside: avoid;
    }
}

/* ═══════════════════════════════════════════════════════
   VITRINE — Profile page
   ═══════════════════════════════════════════════════════ */

.vitrine-page {
    max-width: 860px;
    margin: 0 auto;
    padding-bottom: 60px;
}

/* ── Hero cover ── */
.vitrine-hero {
    position: relative;
    height: 220px;
    border-radius: var(--radius-lg, 16px);
    overflow: hidden;
    margin-bottom: 0;
}
.vitrine-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}
.vitrine-hero-bg-default {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #533483 100%);
}
.vitrine-hero:hover .vitrine-hero-bg {
    transform: scale(1.03);
}
.vitrine-hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.7) 100%);
}

/* ── Profile header ── */
.vitrine-header {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    padding: 0 8px 0 8px;
    margin-top: -52px;
    position: relative;
    z-index: 2;
}
.vitrine-avatar-wrap {
    flex-shrink: 0;
}
.vitrine-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 3px solid var(--bg-app, #0a0a0a);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.vitrine-header-info {
    flex: 1;
    min-width: 0;
    padding-bottom: 6px;
}
.vitrine-username-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.vitrine-username {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vitrine-account-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    background: var(--bg-elevated, #1a1a1a);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2px 9px;
    white-space: nowrap;
}

/* Badges */
.vitrine-badges {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.vitrine-badges div.ir-badge {
    border: 1px solid var(--border-subtle);
}

/* Actions */
.vitrine-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.vit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    white-space: nowrap;
    font-family: 'Poppins', sans-serif;
}
.vit-btn:active { transform: scale(0.96); }
.vit-btn-primary {
    background: var(--primary-500, #7c3aed);
    color: #fff;
}
.vit-btn-primary:hover { opacity: 0.88; }
.vit-btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border-medium, rgba(255,255,255,0.15));
}
.vit-btn-outline:hover { background: var(--bg-elevated, #1a1a1a); }
.vit-btn-ghost {
    background: var(--bg-elevated, #1a1a1a);
    color: var(--text-secondary);
    padding: 7px 12px;
}
.vit-btn-ghost:hover { color: var(--text-primary); }

/* ── Stats bar ── */
.vitrine-stats-bar {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-card, #111);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 14px 0;
    margin: 16px 0;
    overflow: hidden;
}
.vitrine-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.vitrine-stat strong {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
}
.vitrine-stat span {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
}
.vitrine-stat-sep {
    width: 1px;
    height: 36px;
    background: var(--border-subtle);
    flex-shrink: 0;
}

/* ── Bio box ── */
.vitrine-bio-box {
    background: var(--bg-card, #111);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.vitrine-bio-text {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 10px 0;
    white-space: pre-wrap;
}
.vitrine-bio-text:last-child { margin-bottom: 0; }
.vitrine-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.vit-social {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    background: var(--bg-elevated, #1a1a1a);
    border-radius: 20px;
    padding: 4px 12px;
    transition: color 0.15s, background 0.15s;
}
.vit-social:hover {
    color: var(--text-primary);
    background: var(--bg-hover, #222);
    text-decoration: none;
}

/* ── Sections ── */
.vitrine-section {
    margin-bottom: 40px;
}
.vitrine-section-hdr {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.vitrine-section-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.vitrine-section-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
}
.vitrine-section-sub {
    font-size: 11px;
    color: var(--text-tertiary);
    margin: 2px 0 0 0;
}

/* ── Popular grid (5 cards, reuses .track-card) ── */
.vitrine-pop-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    align-items: start;
}
.vitrine-pop-grid .track-card {
    margin: 0;
    min-width: 0; /* empêche le grid item de dépasser sa colonne */
}
.vitrine-pop-grid .track-card-info {
    overflow: hidden;
    min-width: 0;
    width: 100%;
}
.vitrine-pop-grid .track-card-title {
    /* line-clamp : garantit exactement 1 ligne quelle que soit la longueur */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
}

/* ── Track list (infinite scroll) ── */
.vitrine-track-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.vit-track-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    background: var(--bg-card, #111);
    border: 1px solid var(--border-subtle);
    transition: background 0.15s, border-color 0.15s;
    margin-bottom: 4px;
}
.vit-track-row:hover {
    background: var(--bg-elevated, #1a1a1a);
    border-color: var(--border-medium);
}
.vit-track-num {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.vit-track-cover {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    overflow: hidden;
}
.vit-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.15s;
    cursor: pointer;
    border-radius: 8px;
}
.vit-track-row:hover .vit-play-btn { opacity: 1; }
.vit-track-info {
    flex: 1;
    min-width: 0;
}
.vit-track-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vit-track-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--text-tertiary);
    margin-top: 2px;
    flex-wrap: wrap;
}
.vit-dot {
    opacity: 0.4;
}
.vit-track-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.vit-licence-badge {
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    padding: 3px 9px;
    white-space: nowrap;
}
.vit-free {
    background: rgba(16,185,129,0.15);
    color: #10b981;
    border: 1px solid rgba(16,185,129,0.25);
}
.vit-paid {
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.22);
}
.vit-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated, #1a1a1a);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    transition: background 0.15s, color 0.15s;
    opacity: 0;
}
.vit-track-row:hover .vit-action-btn {
    opacity: 1;
}
.vit-action-btn:hover {
    background: var(--primary-500, #7c3aed);
    color: #fff;
    border-color: transparent;
}

/* ── Load more / sentinel ── */
.vit-sentinel {
    display: flex;
    justify-content: center;
    padding: 20px 0 8px;
}
.vit-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-card, #111);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 9px 22px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: 'Poppins', sans-serif;
}
.vit-load-more-btn:hover {
    background: var(--bg-elevated, #1a1a1a);
    color: var(--text-primary);
}

/* ── Empty state ── */
.vitrine-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 0;
    color: var(--text-tertiary);
    font-size: 14px;
}
.vitrine-empty i {
    font-size: 36px;
    opacity: 0.3;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .vitrine-hero { height: 160px; }
    .vitrine-avatar { width: 78px; height: 78px; }
    .vitrine-header { margin-top: -40px; gap: 12px; }
    .vitrine-pop-grid { grid-template-columns: repeat(3, 1fr); }
    .vitrine-username { font-size: 18px; }
}
@media (max-width: 480px) {
    .vitrine-hero { height: 130px; border-radius: 10px; }
    .vitrine-avatar { width: 64px; height: 64px; }
    .vitrine-header { margin-top: -34px; }
    .vitrine-pop-grid { grid-template-columns: repeat(2, 1fr); }
    .vitrine-stats-bar { padding: 10px 0; }
    .vitrine-stat strong { font-size: 15px; }
    .vit-track-num { display: none; }
    .vit-track-right { gap: 4px; }
}
