/**
 * Animations Archive Widget - CSS
 * 
 * Styles pour le widget d'archives des animations
 */

/* Conteneur principal */
.animations-archive-widget {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Section des filtres */
.animations-filter,
.blog-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 30px;
    gap: 15px;
    background-image: url('../animations-archive/filters-bg.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    padding: 40px;
    border-radius: 10px;
}

.filter-label {
    font-weight: 600;
    margin-right: 15px;
}

.filter-options {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1;
}

.filter-option {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin-right: 10px;
    font-size: 14px;
}

.filter-option input {
    margin-right: 5px;
}

/* Style pour les boutons toggle */
/* .filter-option.toggle {
    background-color: #f5f5f5;
    border-radius: 20px;
    padding: 5px 15px;
    transition: all 0.3s ease;
} */

.filter-option.toggle input {
    display: none;
}

.filter-option.toggle input:checked + span {
    color: #93A823;
    font-weight: 600;
}

.filter-option.toggle:hover {
    background-color: #e9e9e9;
}

/* Bouton de recherche */
.filter-search-btn {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.filter-search-btn:hover {
    transform: scale(1.05);
}

/* Grille des animations */
.animations-content {
    position: relative;
    min-height: 200px;
}

.animations-content.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 1;
}

.animations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 30px;
    margin-bottom: 30px;
}

/* Cartes des animations */
.animation-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.animation-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.animation-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Image de la carte */
.animation-image {
    position: relative;
    overflow: hidden;
    padding-top: 60%; /* Ratio d'aspect 16:9 */
}

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

.animation-card:hover .animation-image img {
    transform: scale(1.05);
}

/* Étiquette de catégorie */
.animation-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #93A823;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

/* Informations de l'animation */
.animation-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.animation-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #93A823;
    font-size: 14px;
}

.animation-date {
    color: #93A823;
    font-weight: 500;
}

.animation-title {
    margin: 0 0 15px;
    font-size: 18px;
    font-weight: 600;
    color: #1C4F5A;
    line-height: 1.4;
}

.animation-excerpt {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.animation-read-more {
    color: #1C4F5A;
    font-weight: 600;
    text-decoration: none;
    margin-top: auto;
    display: inline-block;
    transition: color 0.3s ease;
}

.animation-read-more:hover {
    color: #93A823;
}

/* Pagination */
.animations-pagination {
    margin-top: 40px;
    text-align: center;
}

.animations-pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.animations-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.animations-pagination .page-numbers.current,
.animations-pagination .page-number.active {
    background-color: #1C4F5A;
    color: #fff;
}

.animations-pagination .prev-page,
.animations-pagination .next-page {
    background-color: transparent;
    width: auto;
}

.animations-pagination .pagination-dots {
    margin: 0 5px;
}

/* Bouton "Charger plus" */
.animations-load-more {
    background-color: #1C4F5A;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.animations-load-more:hover {
    background-color: #143942;
    transform: translateY(-2px);
}

/* Loader pour le défilement infini */
.infinite-scroll-loader {
    text-align: center;
    padding: 20px 0;
}

.loader-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(147, 168, 35, 0.3);
    border-radius: 50%;
    border-top-color: #93A823;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Styles spécifiques pour les filtres par mois */
.filter-option input[name="animations[]"] + span {
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
}

.filter-option input[name="animations[]"]:checked + span {
    color: #1C4F5A;
    font-weight: 600;
}

/* Étiquettes de dates sur les cartes */
.blog-category {
    background-color: rgba(147, 168, 35, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 1024px) {
    .animations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .animations-grid {
        grid-template-columns: 1fr;
    }
    
    .animations-filter,
    .blog-filter {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }
    
    .filter-options {
        margin-top: 10px;
        gap: 8px;
    }
    
    .filter-option input[name="animations[]"] + span {
        font-size: 12px;
    }
}

/* Message aucun résultat */
.no-animations-found {
    text-align: center;
    padding: 60px 20px;
    margin: 40px 0;
    font-size: 16px;
    font-weight: 500;
    color: #666;
}
