/* CSS pour la page Découverte - discover.css */

/* Layout de la page découverte */
.discover-layout {
    display: grid;
    grid-template-columns: 300px 1fr 360px;
    gap: 50px;
    margin-top: 40px;
}

/* Contenu principal de découverte */
.discover-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-width: 0;
}

/* Header de découverte */
.discover-header {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.search-section h1 {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

/* Container de recherche globale */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.global-search {
    flex: 1;
    background: #2a2d3a;
    border: 2px solid #3a3f4f;
    color: #e2e8f0;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.global-search:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.search-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.voice-search-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.voice-search-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Filtres de découverte */
.discover-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #aaa;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.25);
    color: #a5b4fc;
    transform: translateY(-1px);
}

/* Sections de découverte */
.discover-sections {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.discover-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.see-all-btn,
.refresh-recommendations {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
    background: none;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.see-all-btn:hover,
.refresh-recommendations:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    cursor: pointer;
}

/* Carousel de tendances */
.trending-carousel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 25px;
}

.trending-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.trending-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.trending-item.featured {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: rgba(102, 126, 234, 0.3);
}

.trending-cover {
    width: 100%;
    height: 200px;
    border-radius: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
}

.trending-item:not(.featured) .trending-cover {
    height: 120px;
}

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.trending-item:hover .play-overlay {
    opacity: 1;
}

.play-btn-large {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #333;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.play-btn-large:hover {
    background: white;
    transform: scale(1.1);
}

.trending-rank {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 15px;
    min-width: 35px;
    text-align: center;
}

.trending-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.trending-info p {
    font-size: 14px;
    color: #888;
    margin-bottom: 12px;
}

.trending-stats {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.trending-stats span {
    font-size: 12px;
    color: #b0b0b0;
}

/* Grille d'artistes */
.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.artist-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.artist-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.artist-avatar {
    position: relative;
    align-self: center;
}

.artist-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.artist-status {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid rgba(26, 26, 46, 1);
}

.artist-status.online {
    background: #4ade80;
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.6);
}

.artist-status.away {
    background: #facc15;
}

.artist-status.offline {
    background: #6b7280;
}

.artist-info {
    text-align: center;
}

.artist-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.artist-info p {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.artist-tags {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.tag {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 8px;
    font-weight: 500;
}

.artist-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.follow-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.follow-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.play-artist-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.play-artist-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Grille d'albums */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.album-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.album-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.album-cover {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    margin-bottom: 15px;
    overflow: hidden;
}

.play-btn-medium {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #333;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.play-btn-medium:hover {
    background: white;
    transform: scale(1.1);
}

.album-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.album-info p {
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
}

.album-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #b0b0b0;
}

.album-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stars {
    color: #facc15;
}

.rating-count {
    font-size: 11px;
    color: #666;
}

/* Grille de playlists */
.playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.playlist-discover-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
}

.playlist-discover-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.playlist-cover-discover {
    width: 100%;
    height: 160px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    margin-bottom: 15px;
    overflow: hidden;
}

.playlist-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.playlist-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.playlist-info p {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.playlist-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #b0b0b0;
}

.playlist-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.playlist-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.like-playlist-btn,
.save-playlist-btn,
.share-playlist-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.like-playlist-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.3);
}

.save-playlist-btn:hover {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.3);
}

.share-playlist-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    border-color: rgba(102, 126, 234, 0.3);
}

/* Recommandations */
.recommendations-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recommendation-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
}

.recommendation-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.rec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.rec-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.rec-confidence {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.rec-tracks {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.rec-track {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.rec-track:hover {
    background: rgba(255, 255, 255, 0.05);
}

.track-cover-small {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
}

.rec-track .track-details {
    flex: 1;
}

.rec-track .track-details h5 {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.rec-track .track-details p {
    font-size: 12px;
    color: #888;
}

.play-rec-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.play-rec-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

.explore-rec-btn {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.explore-rec-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

/* Activité des amis */
.friend-listening {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.friend-activity {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #b0b0b0;
}

.activity-track {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

/* Sidebar droite spécifique */
.daily-discovery {
    text-align: center;
    padding: 20px;
}

.discovery-cover {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin-bottom: 15px;
}

.discovery-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.discovery-info p {
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
}

.discover-genre-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.discover-genre-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* Statistiques utilisateur résumées */
.user-stats-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 13px;
    color: #888;
}

.stat-value {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

/* Tendances à venir */
.upcoming-trends {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trend-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.trend-preview:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(3px);
}

.trend-icon {
    font-size: 18px;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trend-info h5 {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.trend-info p {
    font-size: 11px;
    color: #4ade80;
}

/* Sessions Live */
.live-sessions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.live-session {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.live-session:hover {
    background: rgba(255, 255, 255, 0.05);
}

.live-indicator {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.live-indicator:contains("LIVE") {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.session-info {
    flex: 1;
}

.session-info h5 {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.session-info p {
    font-size: 11px;
    color: #888;
}

.join-live-btn,
.notify-live-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notify-live-btn {
    background: rgba(250, 204, 21, 0.2);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.join-live-btn:hover,
.notify-live-btn:hover {
    transform: scale(1.05);
}

/* Filtres de catégories et genres */
.filter-category.active,
.filter-genre.active {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
}

/* Modal de recherche avancée */
.advanced-search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.advanced-search-modal.active {
    display: flex;
}

.search-filters {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

.filter-select,
.year-range input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: #f0f0f0;
    font-size: 14px;
}

.year-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-range span {
    color: #888;
    font-size: 14px;
}

.apply-filters-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.apply-filters-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Responsive */
@media (max-width: 1200px) {
    .discover-layout {
        grid-template-columns: 280px 1fr 320px;
        gap: 40px;
    }
    
    .trending-carousel {
        grid-template-columns: 1fr 1fr;
    }
    
    .trending-item.featured {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1024px) {
    .discover-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .sidebar-left,
    .sidebar-right {
        display: none;
    }
    
    .trending-carousel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .discover-header {
        padding: 0 10px;
    }
    
    .search-section h1 {
        font-size: 28px;
    }
    
    .discover-filters {
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .filter-btn {
        white-space: nowrap;
    }
    
    .artists-grid,
    .albums-grid,
    .playlists-grid {
        grid-template-columns: 1fr;
    }
    
    .trending-cover {
        height: 150px;
    }
    
    .trending-item:not(.featured) .trending-cover {
        height: 120px;
    }
}
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --background-dark: radial-gradient(circle at 20% 50%, #1a1a2e 0%, #16213e 25%, #0f0f0f 100%);
    --surface-bg: rgba(255, 255, 255, 0.02);
    --surface-border: rgba(255, 255, 255, 0.05);
    --surface-hover: rgba(255, 255, 255, 0.05);
    --surface-active: rgba(102, 126, 234, 0.15);
    --text-primary: #f0f0f0;
    --text-secondary: #b0b0b0;
    --text-muted: #888;
    --accent-success: #4ade80;
    --accent-warning: #facc15;
    --accent-error: #ff6b6b;
}
* {
    max-width: 100%;
}

/* Assurer la cohérence des polices */
body, input, textarea, select, button {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Améliorer l'accessibilité */
:focus {
    outline: 2px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* Éviter les problèmes de z-index */
.header { z-index: 100; }
.rythm-notification { z-index: 10000; }
.page-loader { z-index: 10000; }

/* Assurer que tous les liens sont cliquables */
a {
    cursor: pointer;
}

/* Transitions fluides pour tous les éléments interactifs */
.header-btn,
.nav-item,
.page-card,
.widget,
.see-all-link,
.btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Éviter les problèmes de mise en page */
.main-layout,
.friends-layout,
.discover-layout,
.messages-layout {
    min-height: 0;
    overflow: hidden;
}

/* Assurer que le contenu ne déborde pas */
.content-area,
.discover-content,
.profile-content {
    min-width: 0;
    overflow-x: hidden;
}

/* ==================== NOUVEAUX STYLES POUR LA RECHERCHE DE THREADS ==================== */

/* Bouton ajouter tag - Design épuré */
.add-tag-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.add-tag-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.add-tag-btn:active {
    transform: translateY(0) scale(0.95);
}

/* Sélecteur de tags - Design moderne et épuré */
.tag-selector {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    background: #2a2d3a;
    border: 1px solid #3a3f4f;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-height: 380px;
    overflow-y: auto;
}

.tag-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #3a3f4f;
    background: #242731;
    border-radius: 12px 12px 0 0;
}

.tag-selector-header h4 {
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.close-tag-selector {
    background: none;
    border: none;
    color: #a0aec0;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-tag-selector:hover {
    background: #3a3f4f;
    color: #e2e8f0;
}

.selected-tags {
    padding: 12px 15px;
    border-bottom: 1px solid #3a3f4f;
    min-height: 45px;
}

.selected-tags .no-tags {
    color: #a0aec0;
    font-style: italic;
    margin: 0;
    font-size: 14px;
}

.selected-tag {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    margin: 4px 6px 4px 0;
    font-size: 13px;
    font-weight: 500;
    animation: tagAppear 0.3s ease;
}

.remove-tag-btn {
    background: none;
    border: none;
    color: white;
    margin-left: 8px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.remove-tag-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes tagAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Grille de tags améliorée */
.tag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 6px;
    padding: 15px;
}

.tag-option {
    background: #3a3f4f;
    color: #e2e8f0;
    border: 1px solid #4a5568;
    padding: 10px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-option:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.tag-option:active {
    transform: translateY(0);
}

/* Section des résultats de recherche */
.search-results {
    margin-bottom: 40px;
}

.search-results .section-header {
    margin-bottom: 25px;
}

.clear-search-btn {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: #ff6b6b;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    background: rgba(255, 107, 107, 0.3);
    transform: translateY(-2px);
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #888;
}

.loading-spinner {
    font-size: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Résultats de thread */
.search-thread-result {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.search-thread-result:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.search-thread-result .thread-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.search-thread-result .user-pic {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 16px;
    margin-right: 15px;
    flex-shrink: 0;
}

.search-thread-result .user-details {
    flex: 1;
}

.search-thread-result .user-details h3 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.search-thread-result .thread-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #888;
}

.search-thread-result .separator {
    color: #555;
}

.search-thread-result .genre-tag {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.search-thread-result .thread-actions {
    display: flex;
    gap: 8px;
}

.search-thread-result .action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.search-thread-result .action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: scale(1.05);
}

.search-thread-result .thread-content {
    margin-bottom: 15px;
}

.search-thread-result .thread-title h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.search-thread-result .thread-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.search-thread-result .thread-title a:hover {
    color: #667eea;
}

.search-thread-result .thread-text p {
    color: #ccc;
    line-height: 1.6;
    margin: 0;
}

.search-thread-result .thread-tags {
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-thread-result .thread-tag {
    background: rgba(255, 255, 255, 0.05);
    color: #aaa;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.search-thread-result .thread-engagement {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-thread-result .engagement-stats {
    display: flex;
    gap: 15px;
}

.search-thread-result .engagement-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.search-thread-result .engagement-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.search-thread-result .engagement-btn.liked {
    color: #ff6b6b;
}

.search-thread-result .engagement-btn.liked:hover {
    background: rgba(255, 107, 107, 0.1);
}

.search-thread-result .btn-icon {
    font-size: 16px;
}

.search-thread-result .btn-count {
    font-weight: 600;
}

.search-thread-result .btn-label {
    font-size: 13px;
}

/* Message d'absence de résultats */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.no-results h3 {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.no-results p {
    font-size: 16px;
    margin: 0;
}

/* Message d'erreur */
.error-message {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 15px;
    color: #ff6b6b;
}

.error-icon {
    font-size: 32px;
    margin-bottom: 15px;
}

.error-message p {
    margin: 0;
    font-size: 16px;
}

/* Responsive pour la recherche */
@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .tag-selector {
        position: fixed;
        top: 50%;
        left: 15px;
        right: 15px;
        width: auto;
        transform: translateY(-50%);
        max-height: 70vh;
    }

    .search-thread-result .thread-header {
        flex-direction: column;
        gap: 15px;
    }

    .search-thread-result .thread-actions {
        align-self: flex-start;
    }

    .search-thread-result .engagement-stats {
        flex-wrap: wrap;
        gap: 10px;
    }

    .search-thread-result .engagement-btn {
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* Styles pour les résultats de recherche de threads */
.thread-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.thread-result-item {
    background: #2a2d3a;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #3a3f4f;
    transition: all 0.3s ease;
    cursor: pointer;
}

.thread-result-item:hover {
    background: #2f3441;
    border-color: #4a5568;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.thread-result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.thread-result-header .user-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.thread-result-meta h4 {
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.thread-result-time {
    color: #a0aec0;
    font-size: 12px;
}

.thread-result-content {
    margin-bottom: 15px;
}

.thread-result-title {
    color: #f7fafc;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.thread-result-text {
    color: #cbd5e0;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.thread-result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.thread-result-tags .tag {
    background: #4a5568;
    color: #e2e8f0;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.thread-result-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #3a3f4f;
}

.thread-result-stats .stat {
    color: #a0aec0;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-thread-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-thread-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    text-decoration: none;
    color: white;
}

/* Styles pour "aucun résultat" */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #a0aec0;
}

.no-results h3 {
    color: #e2e8f0;
    font-size: 20px;
    margin-bottom: 10px;
}

.no-results p {
    font-size: 16px;
    margin-bottom: 25px;
}

.search-suggestions {
    background: #2a2d3a;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.search-suggestions h4 {
    color: #e2e8f0;
    font-size: 16px;
    margin-bottom: 12px;
}

.search-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-suggestions li {
    color: #cbd5e0;
    font-size: 14px;
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.search-suggestions li:before {
    content: "•";
    color: #667eea;
    position: absolute;
    left: 0;
}

/* Loading indicator pour la recherche */
#search-loading {
    display: none;
    text-align: center;
    padding: 40px;
    color: #a0aec0;
}

#search-loading:before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #4a5568;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive pour les résultats de threads */
@media (max-width: 768px) {
    .thread-result-item {
        padding: 15px;
    }
    
    .thread-result-title {
        font-size: 16px;
    }
    
    .thread-result-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .view-thread-btn {
        align-self: flex-end;
    }
}

/* Loading des tags */
.loading-tags {
    text-align: center;
    padding: 20px;
    color: #a0aec0;
}

.loading-tags p {
    margin: 0;
    font-size: 14px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ========================================
   RÉSULTATS UTILISATEURS
======================================== */

.user-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.user-result-item {
    background: linear-gradient(135deg, #2a2d3a 0%, #252836 100%);
    border: 1px solid #3a3f4f;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.user-result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.user-result-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.user-result-avatar,
.user-result-avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #667eea;
}

.user-result-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-weight: 700;
    font-size: 20px;
    color: white;
}

.user-result-info {
    flex: 1;
}

.user-result-name {
    font-size: 18px;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0 0 5px 0;
}

.user-result-mutual {
    font-size: 13px;
    color: #a0aec0;
    margin: 0;
}

.user-result-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.user-action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.user-action-btn.add-friend {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.user-action-btn.add-friend:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.user-action-btn.friend {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
}

.user-action-btn.pending {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    color: white;
}

.user-action-btn.view-profile {
    background: #3a3f4f;
    color: #e2e8f0;
}

.user-action-btn.view-profile:hover {
    background: #4a5568;
}

.user-action-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Responsive pour les résultats utilisateurs */
@media (max-width: 768px) {
    .user-results {
        grid-template-columns: 1fr;
    }
    
    .user-result-actions {
        flex-direction: column;
    }
    
    .user-action-btn {
        width: 100%;
        text-align: center;
    }
}