/**
 * Blog Archive Widget - CSS
 * 
 * Styles pour le widget Blog Archive
 */

/* Structure générale */
.blog-archive-widget {
    position: relative;
    text-align: center;
}

.blog-content {
    position: relative;
}

.blog-content.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 10;
}

.blog-content.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #93A823;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Filtres */

.filter-group {
    margin-bottom: 15px;
}

.filter-group h4 {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.blog-filter {
    width: auto;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    background-image: url('../blog-archive/filters-bg.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    padding: 40px;
}

.filter-label {
    color: #1C4F5A;
    text-align: right;
    font-family: "Poppins", sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: 12px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-top: auto;
    margin-bottom: auto;
}

.filter-options {
    margin-top: auto;
    margin-bottom: auto;
    row-gap: 10px;
    flex-direction: row;
}

.filter-option {
    display: inline-block;
}

/* Cacher les checkboxes et radios */
.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Style pour le span (label) */
.filter-option span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 6px;
    background-color: white;
    color: #1C4F5A;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Poppins", sans-serif;
    font-size: 9px;
    font-style: normal;
    font-weight: 600;
    line-height: 12px;
    letter-spacing: 0.45px;
    text-transform: uppercase;
}

/* Style pour le span quand l'input est coché */
.filter-option input[type="checkbox"]:checked+span,
.filter-option input[type="radio"]:checked+span {
    background-color: #93A823;
    color: #fff;
}

/* Style au survol */
.filter-option span:hover {
    background-color: #93A823;
    color: white;
}

.filter-search-btn:hover {
    cursor: pointer;
}

/* Grille d'animaux */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
}

@media (min-width: 576px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Carte blog */
.blog-card {
    position: relative;
    margin-bottom: 30px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.blog-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-image {
    position: relative;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
}

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

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

.blog-category {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-block;
    border-radius: 100px;
    padding: 3px 6px;
    background: #FFF;
    color: #1C4F5A;
    font-family: "Poppins", sans-serif;
    font-size: 9px;
    font-style: normal;
    font-weight: 600 !important;
    line-height: 12px;
    letter-spacing: 0.45px;
    text-transform: uppercase;
}

.blog-info {
    padding: 10px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    position: relative;
}

.blog-meta {
    text-align: left;
}

.blog-date {
    display: block;
    margin-bottom: 5px;
}

.blog-title {
    font-size: 18px;
    font-weight: 600;
}

.blog-excerpt {
    font-size: 14px;
    line-height: 1.4;
    color: #666;
    margin-bottom: 10px;
    overflow: hidden;
}

.blog-read-more {
    display: inline-block;
    color: #1C4F5A;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
    pointer-events: none;
    /* Désactive les événements de clic sur le texte */
}

.blog-card-link:hover .blog-read-more {
    color: #93A823;
}





/* Pagination */
.blog-pagination {
    border-top: dashed 1px #1C4F5A26;
    border-bottom: dashed 1px #1C4F5A26;
    padding: 15px 0px;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.pagination-numbers {
    display: flex;
    gap: 50px;
}

.page-number,
.prev-page,
.next-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.3s;
    color: rgba(28, 79, 90, 0.50) !important;
    text-align: center;
    font-family: "Brother 1816", sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 12px;
    text-transform: uppercase;
}

.page-number.active {
    color: #1C4F5A !important;
    font-family: "Brother 1816", sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
    line-height: 12px;
    text-transform: uppercase;
}

.page-number:hover,
.prev-page:hover,
.next-page:hover {
    color: #1C4F5A !important;

}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: #93A823;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 30px;
    position: relative;
}

.load-more-btn:hover {
    background-color: #93A823;
}

.load-more-btn.loading {
    padding-right: 40px;
}

.load-more-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}









/* Positionnement relatif à la carte */
.blog-card {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* Style pour indiquer que la carte est cliquable */
.blog-card.clickable:hover {
    transform: translateY(-5px);
}

/* Ajouter un effet de zoom sur l'image au survol */
.blog-card.clickable:hover .blog-image img {
    transform: scale(1.05);
}

/* Transition douce pour l'image */
.blog-card .blog-image img {
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .blog-filter {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
}