/* ==========================================================================
   SYSTÈME DE RECHERCHE AVANCÉE
   ========================================================================== */

/* Conteneur des résultats de recherche */
.search-results-container {
    padding: 2rem 0;
}

/* En-tête des résultats */
.search-results-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid #e74c3c;
}

.search-results-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-results-title i {
    color: #e74c3c;
}

.search-query {
    color: #e74c3c;
    font-weight: 700;
}

.search-results-count {
    color: #7f8c8d;
    font-size: 1rem;
    margin: 0;
}

/* Filtres de recherche */
.search-results-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #2c3e50;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover {
    border-color: #e74c3c;
}

.filter-select:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.filter-reset {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.filter-reset:hover {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

/* Grille des résultats */
.search-results-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Carte de résultat */
.search-result-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.search-result-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.result-image {
    position: relative;
    height: 100%;
    min-height: 180px;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-category {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.35rem 0.75rem;
    background-color: #e74c3c;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.result-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.result-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.4rem;
    line-height: 1.3;
}

.result-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.result-title a:hover {
    color: #e74c3c;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #ecf0f1;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.result-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.result-meta i {
    color: #bdc3c7;
}

.result-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.result-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #e74c3c;
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.result-link:hover {
    gap: 0.75rem;
}

/* Pagination de recherche */
.search-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e74c3c;
    color: #e74c3c;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn:hover {
    background: #e74c3c;
    color: white;
}

.pagination-info {
    color: #7f8c8d;
    font-weight: 500;
}

/* Aucun résultat */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.no-results i {
    font-size: 4rem;
    color: #bdc3c7;
    margin-bottom: 1.5rem;
}

.no-results h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.no-results p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.no-results .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.no-results .btn-primary:hover {
    background: #c0392b;
}

/* Loader de recherche */
.search-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    min-height: 400px;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e74c3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.search-loader p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 350px;
}

.notification.show {
    transform: translateX(0);
}

.notification-info {
    border-left: 4px solid #3498db;
}

.notification-success {
    border-left: 4px solid #27ae60;
}

.notification-warning {
    border-left: 4px solid #f39c12;
}

.notification-error {
    border-left: 4px solid #e74c3c;
}

.notification i {
    font-size: 1.25rem;
}

.notification-info i { color: #3498db; }
.notification-success i { color: #27ae60; }
.notification-warning i { color: #f39c12; }
.notification-error i { color: #e74c3c; }

/* Responsive */
@media (max-width: 768px) {
    .search-result-card {
        grid-template-columns: 1fr;
    }
    
    .result-image {
        height: 200px;
    }
    
    .search-results-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .search-pagination {
        flex-direction: column;
    }
    
    .result-meta {
        gap: 0.5rem;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
