/* Ajax Posts Filter - Styles */

.ajax-posts-filter-wrapper {
    width: 100%;
    margin: 40px 0;
}

/* Filtre de catégories */
.apf-filter-wrapper {
    margin-bottom: 30px;
    text-align: center;
}

.apf-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.apf-filter-list li {
    margin: 0;
    list-style: none;
}

.apf-filter-btn {
    padding: 8px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;

    font-family: Days One;
    font-size: 15px;
    line-height: 16px;
    font-weight: 400;
    background-color: transparent;
    color: #FFF;
    border: none;
}

.apf-filter-btn:hover {
    color: #FD850C;
}

.apf-filter-btn.active {
    color: #FD850C;
}

.apf-filter-btn.active:hover {
    color: #FD850C;
}

/* Indicateur de chargement */
.apf-loading {
    text-align: center;
    padding: 40px 0;
}

.apf-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #333;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: apf-spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes apf-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Grille d'articles */
.apf-posts-grid {
    display: grid;
    gap: 30px;
    margin-top: 20px;
}

.apf-posts-grid.apf-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.apf-posts-grid.apf-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.apf-posts-grid.apf-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Article individuel */
.apf-post-item {
    background: #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    border: 3px solid #FFF;
}

.apf-post-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    /*transform: translateY(-5px);*/
}

.apf-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.apf-post-thumbnail {
    position: relative;
    overflow: hidden;
    padding-bottom: 66.67%; /* Ratio 3:2 */
    background: #f0f0f0;
}

.apf-post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.apf-post-item:hover .apf-post-thumbnail img {
    transform: scale(1.05);
}

.apf-post-content {
    padding: 20px;
}

.apf-post-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.4;
    color: #C83D16!important;
    transition: color 0.3s ease;
}

.apf-post-item:hover .apf-post-title {
    color: #C83D16!important;
}

.apf-post-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #000;
    margin: 0;
}

.apf-no-posts {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.apf-no-posts p {
    font-size: 16px;
    color: #999;
    margin: 0;
}

/* Animation de fondu */
.apf-fade-in {
    animation: apf-fadeIn 0.5s ease;
}

@keyframes apf-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .apf-posts-grid.apf-columns-4,
    .apf-posts-grid.apf-columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .apf-filter-list {
        gap: 8px;
    }
    
    .apf-filter-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .apf-posts-grid.apf-columns-4,
    .apf-posts-grid.apf-columns-3,
    .apf-posts-grid.apf-columns-2 {
        grid-template-columns: 1fr;
    }
    
    .apf-post-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .ajax-posts-filter-wrapper {
        margin: 30px 0;
    }
    
    .apf-filter-wrapper {
        margin-bottom: 20px;
    }
    
    .apf-posts-grid {
        gap: 20px;
    }
    
    .apf-post-content {
        padding: 15px;
    }
}

.page-id-4170 .blog-recent {
    display: none !important;
}