h2>span{
    text-decoration: underline;
    text-decoration-color: var(--wp--preset--color--sucess) !important; 
    text-decoration-thickness: 4px !important;
}

div.filtered-posts {
    display: flex;
    margin: auto;
    flex-wrap: wrap;
    align-content: stretch;
    justify-content: space-evenly;
    gap: 5%;
    box-sizing: border-box;
}

div.filtered-posts article{
    flex: 1 1 calc(33.333% - 5%);
    max-width: 33.333%;
    box-sizing: border-box;
    margin-bottom: 20px;
}

div.filtered-posts article img{
    width: 100%;
    min-height: 220px;
    object-fit: cover;
    overflow: hidden;
    border-radius: var(--border-radius);
}

div.filtered-posts article div.text{
    padding: 0px var(--border-radius);
}

div.filtered-posts article h3 a{
    text-decoration: none;
    color: inherit;
    margin-bottom: 5px;
    font-weight: 600;
}

div.filtered-posts article p{
	margin-bottom: 10px;
    padding-bottom: 10px;
	font-size: 16px;
}

div.filtered-posts div.read-article {
    display: flex;
    align-items: flex-end;
    align-content: flex-end;
    justify-content: flex-end;
    margin-top: -16px !important;
}

div.filtered-posts div.read-article a{
    display: flex;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    padding-top: 5px;
    text-align: right;
    color: var(--wp--preset--color--primary);
    text-decoration: none;
}

div.filtered-posts div.read-article a::after {
    content: url('../img/book.svg');
    width: 10px;
    height: 10px;
    margin-left: 4px;
}

div.filtered-posts div.read-article a:hover{
    text-decoration: underline;
}

/*
    Date & Auteur
*/
div.filtered-posts div.post-meta{
    font-size: 12px;
    line-height: 16px;
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

span.post-date{
    color: var(--wp--preset--color--lighttext);
}

span.post-author>span{
    font-weight: 600;
    color: var(--wp--preset--color--primary);
}

div.post-category a{
    border-radius: var(--border-radius);
    font-size: 12px;
    padding: 4px;
    font-weight: 500;
    line-height: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--wp--preset--color--lightprimary);
    background-color: var(--wp--preset--color--secondary);
}

/*
    Bandeau des filtres
*/
#categoryFilterForm {
    display: flex;
    flex-wrap: wrap;
    align-content: stretch;
    margin: auto;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#categoryFilterForm button {
    min-width: 74px;
    height: 28px;
    border-radius: var(--border-radius);
    margin-right: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0px;
    transition: .3s ease-in-out;
    padding: 2px 8px;
}

button.categoryButton{
    background-color: var(--wp--preset--color--lightborder);
    color: var(--wp--preset--color--lighttext);
}

#categoryFilterForm button.selected-category, #categoryFilterForm button.categoryButton:hover, #categoryFilterForm select:hover{
    color: var(--wp--preset--color--white);
    background-color: var(--wp--preset--color--primary);
}

#categoryFilterForm select{
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--wp--preset--color--primary);
    background-color: var(--wp--preset--color--white);
    color: var(--wp--preset--color--primary);
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    letter-spacing: 0px;
    padding-left: 5px;
    cursor: pointer;
    transition: .3s ease-in-out;
}

#categoryFilterForm select>option{
    height: 28px;
    padding: 8px 16px 8px 16px;
    border-radius: 10px 10px 0px 0px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    line-height: 18px;
    text-align: left;
    background-color: var(--wp--preset--color--white);
    color: var(--wp--preset--color--lighttext);
}

/*
    Pagination
*/
div.pagination{
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    align-content: center;
    margin: 20px 0;
}

div.pagination span, div.pagination a.page-numbers{
    width: 34px;
    height: 34px;
    padding: 2px;
    margin: 10px 5px;
    display: flex;
    font-weight: 700;
    font-size: 14px;
    align-content: flex-start;
    justify-content: center;
    align-items: center;
    color:  var(--wp--preset--color--primary);
    border-radius: var(--border-radius);
    border: 1px solid var(--wp--preset--color--lightinfo);
    background: var(--wp--preset--color--white);
}

div.pagination span, div.pagination a:hover, div.pagination a.next:hover, div.pagination a.prev:hover{
    background-color: var(--wp--preset--color--lightinfo);
}

div.pagination .next, div.pagination .prev{
    background: var(--wp--preset--color--white);
}

div.pagination .page-numbers-disabled{
    color: var(--wp--preset--color--secondary);
}

div.pagination  a.page-numbers{
    text-decoration: none; 
}

div.pagination .next{
    padding: 0 0 1.5px 1px;
}

div.pagination .prev{
    padding: 0 1px 1.5px 0;
}

/*
    Deux premier articles
*/
div.filtered-posts article.two-main{
    flex: 1 1 calc(50% - 5%);
    max-width: 50%;
    box-sizing: border-box;
    position: relative;
}

div.filtered-posts article.two-main img{
    min-height: 300px !important;
}

div.filtered-posts article.two-main div.read-article a
{
	position: absolute;
    bottom: 0;
    padding: 10px 0;
}

div.filtered-posts article.two-main .text{
    position: absolute;
    overflow: hidden;
    width: 88%;
    background-color: var(--wp--preset--color--white) !important;
    margin-top: -16%;
    padding: 15px 20px 20px !important;
    border-radius: 16px;
    box-shadow: 0px 4px 14px 0px #EDF1FB;
    left: 50%;
    transform: translate(-50%, -10%);
}

.filtered-posts .text {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

.read-article {
    margin-top: auto !important;
    text-align: left !important; /* Aligne le lien à gauche, peut être modifié selon les besoins */
}

article.basic-article h3{
    margin-bottom: 0;
}

/*
    Responsive 
*/
@media screen and (max-width: 1024px){
    div.filtered-posts {
        gap: 5%;
    }
    
    div.filtered-posts article{
        flex: 1 1 calc(50% - 5%);
        max-width: 50%;
        margin-bottom: 40px;
    }
}

/*
@media screen and (min-width: 704px){
    div.filtered-posts article.two-main img{
        min-height: 324px !important;
    }
}
*/

@media screen and (min-width: 900px){
    div.filtered-posts article.two-main img {
    	height: 40vh !important;
		min-height: 300px !important;
    }
}

@media screen and (max-width: 704px){
    div.filtered-posts article.two-main img {
        width: 100% !important;
    }

    div.filtered-posts article, div.filtered-posts article.two-main{
        flex: 1 1 100%;
        max-width: 100%;
    }

    #categoryFilterForm select {
        margin-top: 15px;
    }
    #categoryFilterForm {
        align-items: baseline;
        justify-content: center;
    }
    article.two-main {
        width: 95%;
    }
    #categoryFilterForm button {
        margin-bottom: 8px;
    }
    div.category {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }

    article.basic-article {
        min-width: 95%;
    }

    /*
    article.basic-article img{
        width: 200px;
        height: auto;
    }*/

    div.filtered-posts article.basic-article img {
        width: revert-layer;
        max-width: 200px;
        min-height: 40vh;
        max-height: 300px;
    }
    
    div.filtered-posts article img {
        width: revert-layer;
    }
    article.basic-article div.post-thumbnail {
        display: flex;
        align-items: center;
    }
    article.basic-article  div.post-thumbnail .text{
        margin-left: 15px;
    }
    article.basic-article hr{
        border-top: 1px solid #C7CBD0;
        margin: 15px 0 15px;
    }
}

@media screen and (max-width: 480px) {
    div.filtered-posts article img {
        width: 150px !important;
		height: 112px !important;
        min-height: 112px !important;
    }
	
	div.filtered-posts article.two-main .text{
		width: 82%;align-content
	}
	
	article.basic-article div.text, article.basic-article div.post-content{
		min-height: none !important;
	}
	
	article.basic-article div.post-thumbnail .text{
		margin-top: -8px !important;
		margin-left: 4px !important;
	}
	
    div.filtered-posts article.basic-article p{
        display: none;
    }

    div.filtered-posts h3{
        margin: 0;
		min-height: none !important;
    }

    div.filtered-posts div.read-article{
        justify-content: flex-start;
		margin-top: 0 !important;
    }
}
