/* Styles pour les filtres de catégories - Page Blog */

.categories-filter {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.categories-filter h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.categories-filter h4 {
    margin: 0 0 10px 0;
    color: #555;
    font-size: 16px;
}

/* Catégories principales */
.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.category-tag {
    display: inline-block;
    padding: 8px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-tag:hover {
    background: #2c5282;
    color: white;
    border-color: #2c5282;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(44, 82, 130, 0.2);
}

.category-tag.active {
    background: #2c5282;
    color: white;
    border-color: #2c5282;
    font-weight: bold;
}

/* Container des sous-catégories */
.subcategories-container {
    margin-top: 15px;
    padding: 12px;
    background: white;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header des sous-catégories */
.subcategory-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.subcategory-header strong {
    color: #2c5282;
    font-size: 16px;
}

.back-to-main {
    padding: 5px 12px;
    background: #f0f0f0;
    border-radius: 15px;
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.back-to-main:hover {
    background: #2c5282;
    color: white;
}

/* Tags de sous-catégories */
.subcategory-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tag.subcategory {
    background: #f7f7f7;
    font-size: 13px;
    padding: 6px 14px;
    border-color: #d0d0d0;
}

.category-tag.subcategory:hover {
    background: #4a7c7e;
    color: white;
    border-color: #4a7c7e;
}

.category-tag.subcategory.active {
    background: #4a7c7e;
    color: white;
    border-color: #4a7c7e;
    font-weight: bold;
}

.category-tag.subcategory.show-all {
    background: #e8f4f8;
    border-color: #2c5282;
    color: #2c5282;
    font-weight: 500;
}

.category-tag.subcategory.show-all:hover,
.category-tag.subcategory.show-all.active {
    background: #2c5282;
    color: white;
}

/* Compteur d'articles */
.articles-count {
    margin: 15px 0;
    padding: 10px 15px;
    background: white;
    border-left: 4px solid #2c5282;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.articles-count span {
    font-weight: 600;
}

/* Animation de filtrage des articles */
.article-card {
    transition: all 0.3s ease;
}

.article-card[style*="display: none"] {
    opacity: 0;
    transform: scale(0.95);
}

/* Responsive */
@media (max-width: 768px) {
    .categories-filter {
        padding: 15px;
    }
    
    .category-tag {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .subcategory-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .subcategory-tags {
        gap: 6px;
    }
    
    .category-tag.subcategory {
        font-size: 11px;
        padding: 5px 10px;
    }
}