.blog-sidebar__title {
    font-size:20px;
}

.homepage-blog .main-content {
    order: 3; /* L'article en deuxième */
}

.highlight {
    background-color: #FECD36;
}

.main-content {
    width: 100%;
}

/*SIDEBAR FAQ*/

.homepage-blog #blog-sidebar {
    display: contents;
}

#blog-sidebar {
    width: 100%;
}
.homepage-blog #blog-sidebar .primary-sidebar {
    order: 1; /* La recherche en premier */
}

#blog-sidebar .primary-sidebar {
    background-color: #fecd36;
    width: 100vw;
    margin-left: calc(-1 * ((100vw - 100%) / 2));
    padding-top: calc(var(--bs-gutter-x) * .5);
    padding-bottom: calc(var(--bs-gutter-x) * .5);
}

.homepage-blog #blog-sidebar .secondary-sidebar {
    order: 4; /* Les catégories en dernier */
}

#blog-sidebar .blog-sidebar__section--most-viewed {
    border: 5px solid #fecd36;
}

.secondary-sidebar .blog-sidebar__post-header {
    background-color: #fecd36;
    min-height:70px;
    padding: 0.5rem 1rem;
}

.secondary-sidebar .blog-sidebar__section--most-viewed h2 {
    margin-bottom:0;
}

.secondary-sidebar .blog-sidebar__section--most-viewed .blog-sidebar__post-link {
    /*position: relative;*/
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: black;
    /*border-bottom:2px solid black;*/
    /*margin-bottom: 10px;*/
    padding: 0.5rem 1rem;
}


.secondary-sidebar .blog-sidebar__section--most-viewed .blog-sidebar__post-link h3 {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}

/*.secondary-sidebar .blog-sidebar__section--most-viewed .blog-sidebar__post-link::after {*/
/*    padding-bottom:20px;*/
/*content:'';*/
/*    display: block; !* ou inline-block selon le besoin *!*/
/*    width: 100%;*/
/*    border-bottom: 2px solid black;*/

/*}*/

.secondary-sidebar .blog-sidebar__section--most-viewed .blog-sidebar__post-link:hover {
    background-color: #fecd36;
    /*margin-left: -1rem;*/
    /*margin-right: -1rem;*/
    /*padding: 0 1rem;*/
}

.secondary-sidebar .blog-sidebar__section--most-viewed .blog-sidebar__post-link:first-child {
    padding-top: 10px;
}

.secondary-sidebar .blog-sidebar__section--most-viewed .blog-sidebar__post-link:last-child {
    padding-bottom: 10px;
    margin-bottom: 0;
}

.secondary-sidebar .blog-sidebar__section--most-viewed .blog-sidebar__post-link:last-child::after {
    display: none;
}

.secondary-sidebar .blog-sidebar__section--most-viewed .separator-line {
    display: block;
    border:1px solid black;
    margin: 0 1rem;
}



.default-sidebar__section--search {
    #SearchInputSidebar {
        max-width: 370px;
        height: 70px!important;
    }

    #SearchButtonSidebar {
        height: 70px!important;
        width: 80px!important;
    }
}

#home_featured_posts_desktop {
    display: none;
}

#home_featured_posts_mobile {
    display: block;
    order: 2;
}



@media (max-width: 992px) {
    #blog-sidebar .secondary-sidebar {
        margin-top:30px;
    }
}

@media (min-width: 576px) {

}

@media (min-width: 992px) {

    #home_featured_posts_desktop {
        display: block;
    }

    #home_featured_posts_mobile {
        display: none;
    }

    /* On remet l'ordre par défaut (celui du fichier HTML) */
    .homepage-blog .main-content {
        order: 1; /* L'article à gauche */
    }

    .main-content {
        flex: 1;
    }

    #blog-sidebar {
        display: flex!important; /* On utilise flexbox pour organiser les widgets à l'intérieur */
        flex-direction: column;
        gap: 1.5rem;
        width: 350px;
        flex-shrink: 0;
    }
    .homepage-blog  #blog-sidebar {
        order: 2; /* La sidebar complète à droite */
    }


    #blog-sidebar .primary-sidebar {
        width: 100%;
        margin-left: 0;

    }

    .secondary-sidebar .blog-sidebar__post-header {
        background-color: transparent;
    }

    .secondary-sidebar .blog-sidebar__section--most-viewed .separator-line {
        margin: 0.5rem 1rem;
    }

}

@media (min-width: 1400px) {
    #blog-sidebar {
        width: 450px;
    }
}




/*Articles*/
/* ---- STYLES DE BASE POUR LES CARTES ---- */
.article-card {
    background-color: #ffffff;
    overflow: hidden; /* Assure que les coins arrondis de l'image fonctionnent */
    display: flex;
    flex-direction: column;
}

.article-img {
    height:200px;
    display:block;
    background-size: cover;
    background-position: center;
    position: relative;
}

.article-content {
    padding: 0.5rem 2rem;
    flex-grow: 1; /* Permet au contenu de pousser le footer en bas */
}

/* ---- META-INFORMATIONS (Catégorie, temps de lecture) ---- */
.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.article-meta .category, .article-meta .details {
    font-size: 14px;
    font-weight: 500;
    color:#000;
}

/* ---- TITRE ET TEXTE ---- */
.article-title {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.article-text {
    font-size:14px;
    color:#000;
}

/* ---- FOOTER DE L'ARTICLE (Lien "Lire plus") ---- */
.article-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 2rem 2rem 2rem;
}

.read-more {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #000;
    font-weight: 700;
    font-size: 13px;
}

.read-more .plus-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    border: 3px solid #000;
    font-size: 30px;
    font-weight: 700;
    margin-left: 0.75rem;
    transition: background-color 0.3s, color 0.3s;
    background-color:white;
}

.read-more:hover .plus-icon {
    background-color: #000;
    color: #fff;
}

.plus-icon.hovered {
    background-color: #000;
    color: #fff;
}

/* ---- SPÉCIFIQUE À L'ARTICLE 2 (Titre superposé) ---- */
.article-vertical-card .article-image-container {
    position: relative;
}

/*.article-title-overlay {*/
/*    position: absolute;*/
/*    bottom: 0;*/
/*    left: 0;*/
/*    background-color: #fff;*/
/*    color: #000;*/
/*    padding: 0.75rem 1.5rem;*/
/*    font-size: 1.2rem;*/
/*    font-weight: 900;*/
/*    margin: 0 0 -1px 0; !* Le -1px permet de masquer la bordure de l'image en dessous *!*/
/*}*/


.article-title-overlay {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    padding-right: 1rem;
}

.article-title-overlay h2 {
    display: inline;
    background-color: white;
    font-size: 17px;
    font-weight: 900;
    color: #000000;
    padding: 5px 10px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}



/* ---- AJUSTEMENTS RESPONSIVES ---- */
@media (max-width: 576px) {

    .article-meta {
        display: block;
    }
    .article-meta a {
        display: block;
    }
    .article-meta .details {
        display: block;
    }
}
@media (min-width: 576px) {
    .article-img {
        height:240px;
    }
}

@media (min-width: 768px) {
    .article-img {
        height:280px;
    }

    .article-title-overlay {
        bottom: 2rem;
        left: 2rem;
    }
}

@media (min-width: 992px) {
    .article-img {
        height:280px;
    }
    .article-content {
        padding: 2rem 2rem 0.5rem 2rem;
    }
}

@media (min-width: 1400px) {
    .article-img {
        height:300px;
    }
}