.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-container {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    position: relative;
}

.search-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23374151" stroke-width="0.5" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}

.search-results {
    min-height: 400px;
    position: relative;
}

.filter-chip {
    background: #374151;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    user-select: none;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.filter-chip:hover {
    background: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.filter-chip.active {
    background: #dc2626;
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.search-loading {
    display: none;
    animation: pulse 2s infinite;
}

.search-loading.active {
    display: block;
}

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

.content-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.content-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.content-card img {
    transition: transform 0.3s ease;
}

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

/* Animations d'entrée pour les résultats */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-card {
    animation: fadeInUp 0.5s ease forwards;
}

.content-card:nth-child(1) { animation-delay: 0.1s; }
.content-card:nth-child(2) { animation-delay: 0.2s; }
.content-card:nth-child(3) { animation-delay: 0.3s; }
.content-card:nth-child(4) { animation-delay: 0.4s; }
.content-card:nth-child(5) { animation-delay: 0.5s; }
.content-card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive design */
@media (max-width: 768px) {
    .search-container {
        padding: 1.5rem 0;
    }
    
    .filter-chip {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }
    
    .content-card:hover {
        transform: translateY(-2px) scale(1.01);
    }
}

/* Amélioration de l'accessibilité */
.filter-chip:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.content-card:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Scrollbar personnalisée */
.max-h-20::-webkit-scrollbar {
    width: 4px;
}

.max-h-20::-webkit-scrollbar-track {
    background: #374151;
    border-radius: 2px;
}

.max-h-20::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 2px;
}

.max-h-20::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}