﻿/* Styles pour le système de recherche d'articles */

.article-search {
    margin: 2rem 0;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.05);
}

.search-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.search-input-group {
    flex: 1;
    min-width: 25rem;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 0.125rem solid #e1e8ed;
    border-radius: 0.5rem;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color, #2c5aa0);
    box-shadow: 0 0 0 0.1875rem rgba(44, 90, 160, 0.1);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.25rem;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: rgba(44, 90, 160, 0.1);
}

.search-icon {
    font-size: 1.2rem;
    color: var(--primary-color, #2c5aa0);
}

.filter-group {
    min-width: 15rem;
}

.category-filter {
    width: 100%;
    padding: 0.75rem;
    border: 0.125rem solid #e1e8ed;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.category-filter:focus {
    outline: none;
    border-color: var(--primary-color, #2c5aa0);
}

.search-stats {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18.75rem, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.article-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 10.3125rem rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 0.0625rem solid #f0f0f0;
}

.article-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 0.5rem 20.3125rem rgba(0, 0, 0, 0.12);
}

.article-image {
    height: 15rem;
    overflow: hidden;
    background: var(--bg-secondary, #f8f9fa);
    position: relative;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 3rem;
    color: #ccc;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.article-content {
    padding: 1.25rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.article-category {
    background: var(--primary-color, #2c5aa0);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.0.3125rem;
}

.article-date {
    color: #6c757d;
    font-weight: 500;
}

.article-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    color: #2c3e50;
    line-height: 1.4;
}

.article-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
}

.article-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.btn-read-more {
    background: var(--primary-color, #2c5aa0);
    color: white;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-read-more:hover {
    background: var(--primary-dark, #1e3d6f);
    transform: translateY(-0.0625rem);
}

.member-badge {
    background: #ffc107;
    color: #000;
    padding: 0.25rem 0.75rem;
    border-radius: 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    background: white;
    border-radius: 0.75rem;
    border: 0.125rem dashed #e1e8ed;
}

.no-results-content {
    max-width: 25rem;
    margin: 0 auto;
}

.no-results-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h3 {
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.no-results p {
    color: #6c757d;
    margin: 0;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 48rem) {
    .article-search {
        margin: 1rem 0;
        padding: 1rem;
    }
    
    .search-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .search-input-group {
        min-width: unset;
    }
    
    .filter-group {
        min-width: unset;
    }
    
    .search-results {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .article-card {
        margin: 0;
    }
    
    .article-image {
        height: 9.375rem;
    }
    
    .article-content {
        padding: 1rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .search-stats {
        text-align: center;
        margin-top: 0.5rem;
    }
}

@media (max-width: 45rem) {
    .article-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .btn-read-more {
        width: 100%;
        text-align: center;
    }
    
    .member-badge {
        text-align: center;
    }
}

/* Animation d'apparition des résultats */
.article-card {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1.25rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style pour les pages catégories existantes */
.category-articles {
    margin-top: 1rem;
}

/* Amélioration de l'intégration avec les styles existants */
.search-input:placeholder-shown {
    color: #adb5bd;
}

.search-input::placeholder {
    color: #6c757d;
    opacity: 0.8;
}
