/*
Theme Name: SYPEEM
Description: Thème enfant de Twenty Twenty-Four pour SYPEEM
Author: Hugo VIRICEL
Template: twentytwentyfour
Version: 1.0
Text Domain: sypeem
*/

:root :where(.is-layout-flow) > * {
    margin-block-start: 5px;
    margin-block-end: 5px;
}

main, footer {
    margin-block-start: 0;
}

/*.wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 100%;
    margin: auto;
}

.wp-block-column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    min-width: 24%;
}*/

.latest-posts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1400px; /* Largeur max du container */
    margin: 0 auto;
    align-items: flex-start; /* Alignement des items en haut */
}

.latest-post-item {
    width: calc(33.333% - 20px); /* 3 colonnes */
    max-width: 300px;
    min-width: 250px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.latest-post-item img {
    width: 100%;
    height: 200px; /* Hauteur uniforme */
    object-fit: cover;
    border-radius: 10px;
}

.latest-post-item a {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
}

.mh45 {
    min-height: 40px;
}

.mh120 {
    min-height: 125px;
}



/* Responsive */
@media (max-width: 1024px) {
    .latest-post-item {
        width: calc(50% - 20px); /* 2 colonnes sur tablette */
    }
}

@media (max-width: 768px) {
    .latest-post-item {
        width: 100%; /* 1 colonne sur mobile */
    }
    .mh45 {
        min-height: auto;
        margin-bottom: 10px;
    }

    .mh120 {
        min-height: auto;
        margin-bottom: 10px;
    }

}

@media (max-width: 1024px) {
    .wp-block-site-logo img {
        max-width: 50px;
    }
    .column-reverse {
        flex-direction: column-reverse;
    }
}