/**
 * Styles pour la page d'archives des articles
 *
 * @package Evofia
 * @since 1.0.0
 */

/* ==========================================================================
   Page d'archives des articles
   ========================================================================== */

.articles-archive-page .hero-articles {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.articles-archive-page .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.articles-archive-page .hero-content {
    z-index: 2;
}

.articles-archive-page .articles-filters-section {
    border-bottom: 1px solid #dee2e6;
}

.articles-archive-page .articles-grid {
    animation: fadeInUp 0.6s ease-out;
}

/* ==========================================================================
   Filtres
   ========================================================================== */

.evofia-article-filters {
    padding: 1rem 0;
}

.evofia-article-filters .filter-group {
    margin-bottom: 0;
}

.evofia-article-filters .filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.evofia-article-filters .filter-btn {
    transition: all 0.3s ease;
    border-radius: 2rem;
    padding: 0.625rem 1.5rem;
    font-weight: 400;
    font-size: 0.9375rem;
    border-width: 1px;
    position: relative;
    overflow: hidden;
}

.evofia-article-filters .filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.evofia-article-filters .filter-btn:hover::before {
    width: 300px;
    height: 300px;
}

.evofia-article-filters .filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.evofia-article-filters .filter-btn.active {
    background-color: #D98622 !important;
    border-color: #D98622 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(234, 164, 58, 0.4);
}

.evofia-article-filters .filter-btn .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.evofia-article-filters .btn-outline-primary.filter-btn {
    background-color: #ffffff !important;
    border-color: #004052 !important;
    color: #004052 !important;
}

.evofia-article-filters .btn-outline-primary.filter-btn:hover {
    background-color: #46B370 !important;
    border-color: #46B370 !important;
    color: #FFFFFF !important;
}

.evofia-article-filters .btn-outline-primary.filter-btn.active {
    background-color: #D98622 !important;
    border-color: #D98622 !important;
    color: #FFFFFF !important;
}

/* ==========================================================================
   Cards d'articles
   ========================================================================== */

.article-card {
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-radius: 1rem;
    overflow: hidden;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.article-card .article-image {
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image {
    transform: scale(1.05);
}

.article-card .article-image-link {
    display: block;
    overflow: hidden;
}

.article-card .card-body {
    padding: 1.5rem;
}

.article-card .entry-title {
    margin-bottom: 0.75rem;
}

.article-card .entry-title a {
    color: #004052;
    font-weight: 700;
    transition: color 0.3s ease;
}

.article-card .entry-title a:hover {
    color: #46B370;
}

.article-card .entry-meta {
    font-size: 0.875rem;
    line-height: 1.5;
}

.article-card .entry-meta i {
    opacity: 0.7;
}

.article-card .article-categories .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    font-weight: 600;
}

.article-card .entry-summary {
    color: #6c757d;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.article-card .entry-summary p {
    margin-bottom: 0;
}

.article-card .btn {
    border-radius: 2rem;
    padding: 0.625rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.article-card .btn:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(70, 179, 112, 0.4);
}

.article-card .btn i {
    transition: transform 0.3s ease;
}

.article-card .btn:hover i {
    transform: translateX(5px);
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.articles-archive-page .article-card {
    animation: fadeInUp 0.5s ease-out;
}

.articles-archive-page .article-card:nth-child(1) {
    animation-delay: 0.1s;
}

.articles-archive-page .article-card:nth-child(2) {
    animation-delay: 0.2s;
}

.articles-archive-page .article-card:nth-child(3) {
    animation-delay: 0.3s;
}

.articles-archive-page .article-card:nth-child(4) {
    animation-delay: 0.4s;
}

.articles-archive-page .article-card:nth-child(5) {
    animation-delay: 0.5s;
}

.articles-archive-page .article-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* ==========================================================================
   Compteur de résultats
   ========================================================================== */

.article-count {
    margin-bottom: 2rem;
}

.article-count p {
    font-size: 1rem;
    margin: 0;
}

/* ==========================================================================
   Pagination (Style Bootstrap personnalisé)
   ========================================================================== */

.articles-archive-page .pagination-wrapper {
    display: flex;
    justify-content: center;
}

.articles-archive-page .pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.articles-archive-page .pagination .page-item {
    margin: 0;
}

.articles-archive-page .pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0.5rem 1rem;
    border: 2px solid #004052;
    border-radius: 8px;
    color: #004052;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    background-color: white;
    position: relative;
    overflow: hidden;
}

.articles-archive-page .pagination .page-link:hover {
    background-color: #46B370;
    border-color: #46B370;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(70, 179, 112, 0.4);
}

.articles-archive-page .pagination .page-link:focus {
    box-shadow: 0 0 0 0.25rem rgba(70, 179, 112, 0.25);
    outline: none;
}

.articles-archive-page .pagination .page-item.active .page-link {
    background-color: #D98622;
    border-color: #D98622;
    color: white;
    box-shadow: 0 4px 12px rgba(234, 164, 58, 0.4);
    cursor: default;
}

.articles-archive-page .pagination .page-item.active .page-link:hover {
    transform: none;
}

.articles-archive-page .pagination .page-item.disabled .page-link {
    border: none;
    cursor: default;
    background-color: transparent;
    color: #6c757d;
}

.articles-archive-page .pagination .page-item.disabled .page-link:hover {
    background-color: transparent;
    transform: none;
    box-shadow: none;
    color: #6c757d;
}

.articles-archive-page .pagination .page-link .bi {
    font-size: 14px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .articles-archive-page .hero-articles {
        min-height: 250px;
    }

    .articles-archive-page .hero-articles .display-4 {
        font-size: 2rem;
    }

    .articles-archive-page .hero-articles .lead {
        font-size: 1rem;
    }

    .evofia-article-filters {
        padding: 1.5rem 1rem;
    }

    .evofia-article-filters .filter-buttons {
        justify-content: center;
    }

    .evofia-article-filters .filter-btn {
        font-size: 0.875rem;
        padding: 0.5rem 1.25rem;
    }

    .article-card .article-image {
        height: 200px;
    }

    .article-card .card-title {
        font-size: 1.125rem;
    }

    .articles-archive-page .pagination .page-link {
        min-width: 40px;
        height: 40px;
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }

    .articles-archive-page .pagination {
        gap: 0.375rem;
    }
}

@media (max-width: 600px) {
    .evofia-article-filters {
        padding: 1rem;
    }

    .evofia-article-filters .filter-btn {
        font-size: 0.8125rem;
        padding: 0.5rem 1rem;
    }

    .article-card .article-image {
        height: 180px;
    }

    .article-card .card-body {
        padding: 1.25rem;
    }

    .articles-archive-page .pagination .page-link {
        min-width: 36px;
        height: 36px;
        padding: 0.25rem 0.5rem;
        font-size: 0.8125rem;
        border-width: 1px;
    }

    .articles-archive-page .pagination .page-link .bi {
        font-size: 12px;
    }

    .articles-archive-page .pagination {
        gap: 0.25rem;
    }
    
    /* Masquer le texte "Précédent" et "Suivant" sur mobile, garder juste les icônes */
    .articles-archive-page .pagination .page-link {
        font-size: 0;
    }
    
    .articles-archive-page .pagination .page-link .bi {
        font-size: 16px;
    }
}

/* ==========================================================================
   Accessibilité
   ========================================================================== */

.evofia-article-filters .filter-btn:focus {
    /*outline: 3px solid #46B370;
    outline-offset: 2px;*/
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
    .articles-filters-section,
    .pagination-wrapper {
        display: none !important;
    }

    .article-card {
        box-shadow: none;
        border: 1px solid #dee2e6;
        page-break-inside: avoid;
    }

    .hero-articles {
        background: #004052 !important;
        min-height: 150px !important;
    }
}

