/**
 * Styles pour les filtres et archives des formations
 *
 * @package Evofia
 * @since 1.0.0
 */

/* ==========================================================================
   Section des filtres
   ========================================================================== */

.formations-filters-section2 {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.evofia-formation-filters2 {
    max-width: 1200px;
    margin: 0 auto;
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group:last-of-type {
    margin-bottom: 0;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.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;
    background-color: #ffffff !important;
    border-color: #004052 !important;
    color: #004052 !important;
}

.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;
}

.filter-btn:hover::before {
    width: 300px;
    height: 300px;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: #46B370 !important;
    border-color: #004052 !important;
    color: #FFFFFF !important;
}

.filter-btn.active {
    background-color: #D98622 !important;
    border-color: #D98622 !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(234, 164, 58, 0.4);
}

.filter-btn:focus {
    /*outline: 3px solid #46B370;
    outline-offset: 2px;*/
}

.filter-actions {
    padding-top: 1.5rem;
}

.clear-filters-btn {
    padding: 0.625rem 2rem;
    font-weight: 600;
    border-radius: 2rem;
    transition: all 0.3s ease;
}

.clear-filters-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 64, 82, 0.4);
}

/* ==========================================================================
   Grille des formations
   ========================================================================== */

.formations-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

.formation-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.formation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.formation-card .card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.formation-card:hover .card-img-top {
    transform: scale(1.05);
}

.formation-card .card-body {
    padding: 1.5rem;
}

.formation-card .card-title {
    margin-bottom: 1rem;
}

.formation-card .card-title a {
    transition: color 0.3s ease;
}

.formation-card .card-title a:hover {
    color: #46B370 !important;
}

.formation-niveau .badge {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.bg-evofia-teal {
    background-color: #004052 !important;
    color: white;
}

/* ==========================================================================
   Compteur de résultats
   ========================================================================== */

.formation-count {
    margin-top: 2rem;
}

.formation-count p {
    font-size: 1rem;
    margin: 0;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.formations-pagination {
    margin-top: 3rem;
}

.formations-pagination .pagination {
    gap: 0.5rem;
}

.formations-pagination .page-item .page-link {
    border-radius: 0.5rem;
    border: 2px solid #004052;
    color: #004052;
    font-weight: 600;
    padding: 0.625rem 1rem;
    transition: all 0.3s ease;
}

.formations-pagination .page-item .page-link:hover {
    background-color: #46B370;
    border-color: #46B370;
    color: white;
    transform: translateY(-2px);
}

.formations-pagination .page-item.active .page-link {
    background-color: #D98622;
    border-color: #D98622;
    color: white;
}

.formations-pagination .page-item.disabled .page-link {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

/* ==========================================================================
   Loader
   ========================================================================== */

#formations-loader {
    padding: 3rem 0;
}

#formations-loader .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* ==========================================================================
   Bannière
   ========================================================================== */

.formation-banniere {
    position: relative;
    overflow: hidden;
}

.formation-banniere img {
    width: 100%;
    height: 550px;
    object-fit: cover;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 991px) {
    .filter-buttons {
        justify-content: center;
    }

    .filter-btn {
        font-size: 0.875rem;
        padding: 0.5rem 1.25rem;
    }

    .formation-card .card-img-top {
        height: 180px;
    }

    .formation-card .card-title {
        font-size: 1.25rem;
    }

    .formation-card .card-body {
        padding: 1.25rem;
    }
}

@media (max-width: 767px) {
    .formations-filters-section2 {
        padding: 2rem 0 !important;
    }

    .filter-group {
        margin-bottom: 1.5rem;
    }

    .filter-btn {
        font-size: 0.8125rem;
        padding: 0.5rem 1rem;
    }

    .clear-filters-btn {
        font-size: 0.875rem;
        padding: 0.5rem 1.5rem;
    }

    .formation-card .card-body {
        padding: 1rem;
    }

    .formation-card .card-title {
        font-size: 1.125rem;
    }

    .formation-banniere img {
        height: 350px;
    }

    .formations-pagination .page-item .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 575px) {
    .filter-btn {
        width: 100%;
        justify-content: center;
    }

    .formation-card .card-img-top {
        height: 150px;
    }

    .formations-pagination .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }

    .formations-pagination .page-item {
        margin: 0.125rem;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.formation-card {
    animation: fadeIn 0.5s ease-out;
}

/* Délai progressif pour chaque carte */
.formation-card:nth-child(1) { animation-delay: 0.1s; }
.formation-card:nth-child(2) { animation-delay: 0.2s; }
.formation-card:nth-child(3) { animation-delay: 0.3s; }
.formation-card:nth-child(4) { animation-delay: 0.4s; }
.formation-card:nth-child(5) { animation-delay: 0.5s; }
.formation-card:nth-child(6) { animation-delay: 0.6s; }

