/* Variables */
:root {
    --vefa-primary: #0d6efd;
    --vefa-secondary: #6c757d;
    --vefa-bg-light: #f8f9fa;
    --vefa-card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --vefa-card-hover-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --vefa-border-radius: 0.5rem;
}

/* Layout General */
.vefa-article-container {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* Sticky Sidebar (Desktop) */
@media (min-width: 992px) {
    .vefa-sidebar-sticky {
        position: sticky;
        top: 2rem; /* Ajustez selon la hauteur de votre navbar */
        z-index: 100;
        height: calc(100vh - 4rem);
        overflow-y: auto;
        padding-right: 1rem; /* Espace pour la scrollbar si nécessaire */
    }
}

/* Mobile Filters Trigger */
.vefa-mobile-filters-btn {
    display: none; /* Caché sur desktop */
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1040;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .vefa-mobile-filters-btn {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    /* Masquer la sidebar desktop standard sur mobile */
    .vefa-desktop-sidebar {
        display: none;
    }
}

/* Offcanvas Styling (Mobile Filters) */
.offcanvas-start.vefa-filters-offcanvas {
    max-width: 85vw;
}

/* Article Card Styling */
.vefa-article-card {
    border: none;
    border-radius: var(--vefa-border-radius);
    box-shadow: var(--vefa-card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    overflow: hidden;
}

.vefa-article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--vefa-card-hover-shadow);
}

.vefa-article-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* Ratio 3:2 */
    overflow: hidden;
    background-color: #e9ecef;
}

.vefa-article-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.vefa-article-image-wrapper.fit-contain .vefa-article-image {
    object-fit: contain;
}

.vefa-article-image-wrapper.fit-cover .vefa-article-image {
    object-fit: cover;
}

.vefa-article-card:hover .vefa-article-image {
    transform: scale(1.05);
}

.vefa-article-body {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.vefa-article-meta {
    font-size: 0.85rem;
    color: var(--vefa-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.vefa-article-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.vefa-article-title a {
    color: inherit;
    text-decoration: none;
}

.vefa-article-title a:hover {
    color: var(--vefa-primary);
}

.vefa-article-summary {
    font-size: 0.95rem;
    color: #495057;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vefa-article-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vefa-category-badge {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--vefa-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.vefa-category-badge:hover {
    background-color: var(--vefa-primary);
    color: #fff;
}

/* Pagination Styling */
.vefa-pagination .page-item.active .page-link {
    background-color: var(--vefa-primary);
    border-color: var(--vefa-primary);
}

.vefa-pagination .page-link {
    color: var(--vefa-primary);
    border-radius: 0.25rem;
    margin: 0 0.125rem;
}

/* Tag Cloud */
.vefa-tag-cloud .badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.vefa-tag-cloud .badge:hover {
    background-color: var(--vefa-secondary) !important;
    color: white !important;
    transform: translateY(-1px);
}

/* Mobile Horizontal Scroll (Pills) */
.vefa-horizontal-scroll-container {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling sur iOS */
    padding-bottom: 5px; /* Espace pour la scrollbar invisible */
    margin-right: -0.75rem; /* Compenser le padding du container parent */
    margin-left: -0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    scrollbar-width: none; /* Firefox */
}

.vefa-horizontal-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.vefa-horizontal-scroll-container .badge {
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vefa-horizontal-scroll-container .badge:active {
    transform: scale(0.95);
}

/* Premium Mobile Search Bar */
.vefa-mobile-search-wrapper {
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* Ombre douce */
    border-radius: 50px;
    background-color: white;
    transition: box-shadow 0.3s ease;
    border: 1px solid #eee;
}

.vefa-mobile-search-wrapper:focus-within {
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.15); /* Ombre colorée au focus */
    border-color: rgba(13, 110, 253, 0.3);
}

.vefa-search-input {
    border: none !important;
    background: transparent !important;
    padding-left: 3rem; /* Espace pour l'icône */
    padding-right: 2.5rem; /* Espace pour le bouton clear */
    height: 3.2rem;
    border-radius: 50px !important;
    box-shadow: none !important; /* Enlever le shadow par défaut de Bootstrap */
    font-size: 1rem;
}

.vefa-search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    pointer-events: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.vefa-mobile-search-wrapper:focus-within .vefa-search-icon {
    color: var(--vefa-primary);
}

.vefa-search-clear {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #ced4da;
    cursor: pointer;
    font-size: 1.1rem;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vefa-search-clear:hover {
    color: #dc3545; /* Rouge au survol */
}

/* Wrapper pour éviter le débordement horizontal global */
.vefa-article-container {
    overflow-x: hidden;
}

