/* corps */
body {
    background-color: #f0f0f0;
    font-family: Lato, sans-serif;
    font-size: 0.875rem;
    overflow-x: auto;
    width: 100%;
}

.affichage {
    box-sizing: content-box;
    display: flex;
    gap: 30px;
    height: 1000px;
    justify-content: center;
    margin: 0 auto;
    padding: 30px;
    width: 940px;
}

html {
    background-color: #f0f0f0;
}

/* BIO */
.photo-profil {
    border-radius: 50%;
    display: block;
    height: 160px;
    margin: 0 auto 10px;
    object-fit: cover;
    width: 160px;
}

hr {
    background-color: #e2e2e2;
    border: none;
    height: 1px;
}

.biographie-texte {
    align-items: center;
    padding-left: 10px;
    padding-right: 10px;
    width: 168px;
}

.biographie {
    background-color: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    box-sizing: content-box;
    height: 560px;
    padding: 10px;
    width: 168px;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    text-align: center;
}

/* Article */
.paragraphe-groupe {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.paragraphe1, .paragraphe2, .paragraphe3, .paragraphe4 {
    background-color: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    box-sizing: content-box;
    display: flex;
    flex-direction: column;
    height: 219px;
    padding: 20px ;
    width: 658px;
}

.texte-article {
    flex: 1;
    overflow: hidden;
}

.article {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    margin-top: -20px;
}

.article p {
    margin-bottom: 0;
}

.contenu-article {
    align-items: flex-start;
    display: flex;
    gap: 20px;
    width: 100%;
}


h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

h2 {
    font-size: 1.375rem;
}

.paragraphe4, .paragraphe3, .paragraphe2, .paragraphe1, .biographie {
    line-height: 1.45;
}

.date-categorie {
    color: #777;
    margin-bottom: 10px;
    margin-top: -10px;
}

.separator {
    color: #000;
}

.image-paragraphe1 {
    border-radius: 5px;
    flex-shrink: 0;
    height: 180px;
    margin-bottom: 0;
    object-fit: cover;
    width: 180px;
}


.lire-suite {
    align-self: flex-start;
    color: #666;
    cursor: pointer;
    font-weight: 700;
    text-decoration: underline;
}

.lire-suite:hover {
    color: #000;
}

/* Tête */
header {
    background-color: #fff;
    border-bottom: 1px solid #e2e2e2;
    padding: 13px;
    width: 100%;
}

.header-contain {
    align-items: center;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    width: 940px;
}

h1 {
    font-size: 1.5rem;
    font-width: 700;
    margin-left: 12px;
}

header nav {
    display: flex;
    list-style: none;
    margin-right: -12px;
    padding: 0;
}

.menu-autres-pages {
    cursor: pointer;
    display: inline-block;
    margin-left: 30px;
    padding-right: 20px;
    position: relative;
}

header nav a,
header nav .menu-autres-pages{
    color: #666;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
}

header nav a:hover,
header nav .menu-autres-pages:hover{
    color: #000;
    text-decoration: underline;
}

/* Menu deroulant */
.menu-autres-pages .sous-menu {
    background-color: transparent;
    border: none;
    box-sizing: border-box;
    display: none;
    flex-direction: column;
    list-style: none;
    margin: 0;
   padding: 20px 0 0;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1000;
}

.menu-autres-pages .sous-menu li {
    background-color: #fff;
    border: 1px solid #e2e2e2;
    border-bottom: none;
    margin: 0;
    padding: 0;
}

.menu-autres-pages .sous-menu li a {
    box-sizing: border-box;
    color: #777;
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    white-space: nowrap;
    width: 100%;
}

.menu-autres-pages .sous-menu li a:hover {
    background-color: #f0f0f0;
    color: #000;
}

.menu-autres-pages:hover .sous-menu,
.menu-autres-pages:focus-within .sous-menu {
    display: block;
}

/* Pied */
footer {
    background-color: #000;
    box-sizing: border-box;
    color: #fff;
    font-size: 0.875rem;
    height: 16px;
    margin: 0 auto;
    padding: 30px;
    text-align: center;
}

/* Variante Tablette : ≤999px et ≥769px */
@media (width >= 769px) and (width <= 999px) {
    .affichage {
        box-sizing: border-box;
        display: flex;
        flex-direction: row;
        gap: 20px;
        height: auto;
        margin: 0 auto;
        max-width: 940px;
        width: 100%;
    }

    body {
        display: flex;
        flex-direction: column;
        margin: 0;
        min-height: auto;
        overflow: hidden auto; /* seulement horizontal bloqué et vertical scroll autorisé */
        padding: 0;
    }

    main{
        box-sizing: border-box;
        display: flex;
        flex: 1;
        flex-direction: column;
        margin: 0;
        width: 100%;
    }

    footer {
        margin: auto 0 0;
        width: 100vw;
    }

    header{
        margin: 0;
        padding: 13px 0;
        position: relative;
        width: 100vw;

    }


    .header-contain {
        margin: 0 auto;
        max-width: 940px;
        padding: 0 20px;
        width: 100%;
    }

    .biographie {
        flex: 0 0 22%;
        height: auto;
        max-width: 180px;
        min-width: 140px;
    }

    .paragraphe-groupe{
        display:flex;
        flex: 1;
        flex-direction: column;
        gap: 20px;
        min-width: 0; /* empèche apparament le débordement, merci internet! */
    }

    .paragraphe1, .paragraphe2, .paragraphe3, .paragraphe4 {
        box-sizing: border-box;
        display: flex;
        flex: 1 1 auto;
        flex-direction: row;
        gap: 0;
        height:auto;
        width: 100%;

    }

    .contenu-article {
        flex-direction: column;
        gap: 15px;
    }

    .image-paragraphe1 {
        border-radius: 5px;
        height:auto;
        max-height: 150px;
        max-width: 100%;
        object-fit: cover;
        width: 100%;
    }

    .article {
        display: flex;
        flex: 0;
        flex-direction:column;
        justify-content: flex-start;
        margin: 0;
    }

    .menu-autres-pages .sous-menu {
        top: 30px;
    }
}

/* Variante Smartphone paysage : ≤768px et ≥481px */
@media (width <= 768px) and (width >= 481px) {
    /* Corps principal */
    body {
        display: flex;
        flex-direction: column;
        margin: 0;
        min-height: 100vh;
        overflow: hidden auto;
        padding: 0;
    }

    main {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        margin: 0;
        padding: 0;
        width: 100%;
    }

    /* Header */
    header {
        margin-bottom: 20px;
        padding: 13px 0;
        width: 100%;
    }

    .header-contain {
        margin: 0 auto;
        max-width: 940px;
        padding: 0 10px;
        width: 100%;
    }

    /* Affichage général donc articles */
    .affichage {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 20px;
        height: auto;
        margin: 0 auto;
        max-width: 768px;
        padding: 0 20px;
        width: 100%;
    }

    .paragraphe-groupe {
        display: flex;
        flex-direction: column;
        gap: 20px;
        order: 1;
    }

    .paragraphe1, .paragraphe2, .paragraphe3, .paragraphe4 {
        box-sizing: border-box;
        display: flex;
        flex-direction: row;
        gap: 15px;
        height: auto;
        padding: 15px;
        width: 100%;
    }

    .contenu-article {
        display: flex;
        flex-direction: row;
        gap: 15px;
        width: 100%;
    }

    .article {
        display: flex;
        flex: 1;
        flex-direction: column;
        justify-content: flex-start;
    }

    .image-paragraphe1 {
        border-radius: 5px;
        flex-shrink: 0;
        height: 180px;
        object-fit: cover;
        width: 180px;
    }

    /* Bio */
    .biographie {
        align-items: flex-start;
        background-color: #fff;
        border: 1px solid #e2e2e2;
        border-radius: 5px;
        box-sizing: border-box;
        display: flex;
        flex-direction: row;
        gap: 5px;
        height: auto;
        margin: 0 auto 20px;
        max-width: 760px;
        order: 2;
        padding: 10px 15px;
        width: 100%;
    }

    .photo-profil {
        border-radius: 50%;
        box-sizing: border-box;
        flex-shrink: 0;
        height: 160px;
        margin: 10px;
        object-fit: cover;
        width: 160px;
    }

    .biographie-texte {
        display: flex;
        flex: 1;
        flex-direction: column;
        gap: 10px;
        max-width: 600px;
        min-width: 0;
        text-align: left;
        width: 100%;
    }

    .biographie h3 {
        box-sizing: border-box;
        font-size: 1.25rem;
        margin: 0;
        text-align: left;
    }

    .biographie-texte p {
        line-height: 1.4;
        margin: 0;
        overflow-wrap: break-word;
    }

    .biographie-texte hr {
        background-color: #e2e2e2;
        border: none;
        height: 1px;
        margin: 5px 0;
        width: 100%;
    }

    /* Footer */
    footer {
        box-sizing: border-box;
        margin-top: 20px;
        padding: 20px 10px;
        width: 100%;
    }

    h1 {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1.125rem;
    }

    .date-categorie {
        font-size: 0.75rem;
    }

    .lire-suite {
        font-size: 0.75rem;
    }

    /* Menu déroulant */
    .menu-autres-pages .sous-menu {
        right: 0;
        top: 30px;
    }
}

/* Smartphone portrait : ≤480px */
@media (width <= 480px) {
    body {
        display: flex;
        flex-direction: column;
        margin: 0;
        min-height: 100vh;
        overflow: hidden auto;
        padding: 0;
        width: 100vw;
    }

    main {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        margin: 0;
        padding: 0;
        width: 100%;
    }

  
    header {
        box-sizing: border-box;
        padding: 13px 0;
        text-align: center;
        width: 100%;
    }

    .header-contain {
        align-items: center;
        flex-direction:column;
        max-width: 460px;
        padding: 0;
        width: 100%;
    }

    header h1 {
        font-size: 1.4rem;
        margin: 0 0 10px;
        padding-bottom: 20px;
        text-align:center;
    }

    header nav {
        display:flex;
        justify-content: center;
        padding: 0 20px;
        width: 100%;
    }

    header nav a {
        padding-right: 10px;
    }

    header nav .menu-autres-pages {
        padding-left: 10px;
    }

    header nav a,
    header nav .menu-autres-pages {
        font-size: 0.9rem;
        margin: 0;
    }

    .menu-autres-pages .sous-menu {
        right: 0;
        top: 22px;
        
    }
    
    
    .affichage {
        box-sizing: border-box;
        flex-direction: column;
        gap: 25px;
        height: auto;
        max-width: 460px;
        padding: 15px;
        width: 100%;
    }
    
    .paragraphe-groupe {
        gap: 25px;
        order: 1;
        width: 100%;
    }

    .paragraphe1, .paragraphe2, .paragraphe3, .paragraphe4 {
        box-sizing: border-box;
        flex-direction: column;
        height: auto;
        padding: 15px;
        width: 100%;
    }

    .contenu-article {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .image-paragraphe1 {
        border-radius: 5px;
        height:auto;
        max-height: 200px;
        object-fit: cover;
        width: 100%;
        
    }

    .article h2 {
        font-size: 1.15rem;
    }

    .date-categorie {
        font-size: 0.75rem;
        
    }

    .lire-suite {
        font-size: 0.8rem;
    }

    .biographie {
        align-items: center;
        box-sizing: border-box;
        flex-direction: column;
        gap: 10px;
        height: auto;
        max-width: 460px;
        order: 2;
        padding: 15px;
        width: 100%;
    }

    .photo-profil {
        height: 140px;
        margin: 0 auto 10px;
        width: 140px;
    }

    .biographie-smartphone {
        text-align: left;
        width: 100%;
    }

    .biographie-smartphone h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
        text-align: center;
    }

    .biographie-texte {
        padding: 0;
        text-align: center;
        width: 100%;
    }

    .biographie-texte p {
        margin-bottom: 10px;
        width: 100%;
    }

    .biographie-texte hr {
        margin: 10px 0;
        width: 100%;
    }

    /* FOOTER */
    footer {
        font-size: 0.75rem;
        overflow: hidden;
        padding: 20px 10px;
        text-align: center;
        text-overflow: ellipsis;
        white-space: nowrap;
        width: 100%;
    }
}

