:root{
    --outer-color-post : wheat;
}

/* Format mobile */
.posts {
    width: 100%;
    margin-top: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    &>*+*{
        margin-top: 4rem;
    }
}

.postItem {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.postImage{
    position: relative;
    display: flex;
    justify-content: center;
}

.postImage>img {
    height: auto;
    width: 90vw;
    object-fit: cover;
    border-radius: 50px;
    border: 3px solid var(--outer-color-post);
}

.postImage>.socialLinks {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 10px;
    right: 10px;

    svg {
        width: 2.8125rem;
        height: auto;
        color: #dee2e8;

        path {
            filter: drop-shadow(5px 5px 20px black);
        }
    }
}
div.postTexts{
    display: flex;
    width: 100%;
    flex-direction: column;
}
p.publishAt{
    font-size: smaller;
    align-self: flex-start;
}

div.pagination>a{
    border: 1px solid var(--title-color);
    padding: 0.812rem 1rem;
    text-decoration: none;
    color: var(--title-color);
}

/* Masquer le texte sur mobile*/
.postItem p.postContent {
    display: none;
}

@media (min-width: 500px) {
    .postImage>img {
        width: 400px;
    }
}

/* Format tablette */
@media (min-width: 768px) {
    .posts {
        width: 95%;
    }
    .postItem {
        text-align: start;
        flex-direction: row;
        justify-content: center;
        width: 100%;
        gap: 1.125rem;
        
        &:nth-child(even) {
            flex-direction: row-reverse;
        }

        &:nth-child(even) .socialLinks {
            left: 10px;
        }
    }
    .postImage{
        width: 34%;
        &>img {
            width: 100%;
        }
    }

    .postItem .postTexts {
       max-width: 60%;
        gap: 1rem;
    }

    /* Réafficher le texte */
    div.postItem p.postContent {
        display: flex;
        align-items: center;
        overflow: hidden;
    }

    p.publishAt{
        align-self: flex-end;
    }
}

/* Format desktop */
@media (min-width: 1024px) {
    .socialLinks svg{
        transition: all .3s ease-in-out;
    }
    .socialLinks a:hover>svg{
        color: var(--outer-color-post);
    }
    div.pagination{
        display: flex;
        justify-content: space-evenly;
        width: 100%;
        &>a:hover{
            text-decoration: none;
            color: black;
            background-color: var(--title-color);
            transition: background-color 0.3s ease;
        }
    }
}

@media (min-width: 1330px) {
    .posts {
        width: 80%;
    }
    .postImage{
        width: 25%;
    }
    .postItem:nth-child(odd) {
        padding-right: 20%
    }
    .postItem:nth-child(even) {
        padding-left: 20%;
    }
}

@media (min-width: 1800px) {
    .postImage{
        width: 15%;
    }
    .postItem .postTexts {
       max-width: 40%;
    }
}