/* Styles pour le contenu d'article w-richtext */
/* Basé sur src/assets/css/old-css.css */

/* c-680: max-width 680px sur desktop, margin auto, padding 0px sur desktop, 20px sur tablet et mobile */
/* Cette classe est utilisée uniquement dans les pages d'articles pour le contenu */
.c-680 {
    width: 100%;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Desktop: pas de padding */
@media screen and (min-width: 768px) {
    .c-680 {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Tablet et mobile: padding 20px */
@media screen and (max-width: 767px) {
    .c-680 {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* _w-article: align-items flex-start, margin-top 50px, margin-bottom 50px, display flex */
._w-article {
    align-items: flex-start;
    margin-top: 50px;
    margin-bottom: 50px;
    display: flex;
    gap: 20px; /* Espace entre le texte et les boutons de partage */
}

/* Desktop: s'assurer que le texte prend l'espace disponible et les boutons restent à côté */
@media screen and (min-width: 768px) {
    ._w-article__texte {
        flex: 1;
        min-width: 0; /* Permet au texte de se rétrécir si nécessaire */
    }
}

/* _w-article__texte: font-size 1rem, line-height 1.5rem */
._w-article__texte {
    font-size: 1rem;
    line-height: 1.5rem;
}

/* _w-article p: font-size 18px */
._w-article p {
    font-size: 18px;
}

/* w-richtext: clearfix */
.w-richtext:before,
.w-richtext:after {
    content: " ";
    grid-area: 1/1/2/2;
    display: table;
}

.w-richtext:after {
    clear: both;
}

/* w-richtext p: styles par défaut (sera surchargé par _w-article p) */
.w-richtext p {
    margin-top: 0;
    margin-bottom: 10px;
    color: #000;
    font-family: PT Sans, sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.5;
}

/* w-richtext h2: color #000, margin-top 0, margin-bottom 16px, font PT Serif 2rem, font-weight 400, line-height 1.5 */
.w-richtext h2 {
    color: #000;
    margin-top: 0;
    margin-bottom: 16px;
    font-family: PT Serif, serif;
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.5;
}

/* w-richtext ul, ol: margin-top 0, margin-bottom 10px, padding-left 40px */
/* Styles généraux pour ul, ol (s'appliquent aussi dans w-richtext) */
.w-richtext ul,
.w-richtext ol {
    margin-top: 0;
    margin-bottom: 10px;
    padding-left: 40px;
}

/* w-richtext li: color #000, border 1px solid transparent, font PT Sans 18px, line-height 1.5 */
/* Styles généraux pour li (s'appliquent aussi dans w-richtext) */
.w-richtext li {
    color: #000;
    border: 1px solid transparent;
    font-family: PT Sans, sans-serif;
    font-size: 18px;
    line-height: 1.5;
}

/* _w-article ul, ol: héritent des styles généraux mais peuvent être surchargés */
._w-article ul,
._w-article ol {
    margin-top: 0;
    margin-bottom: 10px;
    padding-left: 40px;
}

/* _w-article li: hérite des styles généraux */
._w-article li {
    color: #000;
    border: 1px solid transparent;
    font-family: PT Sans, sans-serif;
    font-size: 18px;
    line-height: 1.5;
}

/* w-richtext a: color #2980b9, cursor pointer, text-decoration underline */
.w-richtext a {
    color: #2980b9;
    cursor: pointer;
    text-decoration: underline;
}

.w-richtext a:hover {
    color: #0f5e92;
}

/* w-richtext strong: font-weight 700 */
.w-richtext strong {
    font-weight: 700;
}

/* w-richtext figure: max-width 60%, position relative */
.w-richtext figure {
    max-width: 60%;
    position: relative;
}

/* w-richtext figure img: width 100% */
.w-richtext figure img {
    width: 100%;
}

/* w-richtext figure.w-richtext-align-fullwidth: width 100%, max-width 100%, text-align center */
.w-richtext figure.w-richtext-align-fullwidth {
    text-align: center;
    clear: both;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* article__title: largeur 645px sur desktop */
.article__title {
    width: 100%;
    max-width: 100%;
}

/* Desktop: largeur 645px pour le h1 de l'article */
@media screen and (min-width: 768px) {
    .article__title {
        max-width: 645px;
    }
}

/* _w-share: boutons de partage verticaux sur desktop avec position sticky */
._w-share {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Desktop: style rond restauré avec margin-bottom 10px entre les boutons */
@media screen and (min-width: 768px) {
    ._w-share-box {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 10px;
    }
    
    ._w-share-box:last-child {
        margin-bottom: 0;
    }
    
    /* Position sticky à partir du texte de l'article */
    ._w-share {
        position: sticky;
        top: 120px;
        align-self: flex-start;
        flex-shrink: 0; /* Empêche les boutons de se rétrécir */
    }
}

/* Mobile: les boutons sont rectangulaires avec border-radius 5px et largeur pleine */
@media screen and (max-width: 767px) {
    ._w-share {
        flex-direction: row;
        align-items: stretch; /* Permet aux boutons de prendre toute la largeur */
        gap: 10px; /* Espace entre les boutons */
        margin-top: 30px;
        margin-bottom: 30px;
        margin-left: 0;
        padding: 10px;
        position: relative;
        width: 100%;
    }
    
    ._w-share-box {
        flex: 1; /* Chaque bouton prend une largeur égale */
        width: 100%;
        border-radius: 5px;
        padding: 10px;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 0;
    }
}

/* Responsive: mobile (max-width:767px) */
@media screen and (max-width: 767px) {
    /* _w-article: padding-left 0, padding-right 0, display block */
    ._w-article {
        padding-left: 0;
        padding-right: 0;
        display: block;
    }
    
    /* _w-article p: margin-bottom 24px */
    ._w-article p {
        margin-bottom: 24px;
    }
    
    /* h2: font-size 24px */
    .w-richtext h2 {
        font-size: 24px;
        margin-bottom: 8px;
    }
}

