/* Réinitialisation des styles par défaut */
body, h1, h2, p, img, ul, li {
    margin: 0;
    padding: 0;
    border: none;
}

main {
    width: 100%;        /* Changement de la largeur fixe en pourcentage */
    max-width: 960px;  /* Largeur maximale */
    margin: 0 auto;
    padding: 10px;
}
/*   ----------Fin de @Media pour mobile */

/* Styles de base */
body {
    overflow-x: hidden;  /* Ajout pour éviter le scroll horizontal */
    width: 100%;
}

main {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 10px;
    box-sizing: border-box;  /* Ajout important */
}

/* Tablette en mode portrait (vertical) */
@media screen and (min-width: 481px) and (max-width: 768px) and (orientation: portrait) {
    main {
        width: 100%;
        max-width: 100%;
        padding: 10px;
        box-sizing: border-box;
    }

    .image-with-text {
        width: 100%;
        box-sizing: border-box;
        padding: 0 10px;
    }

    .image-with-text img {
        width: 100%;
        height: auto;
        max-width: 300px;
        display: block;
        margin: 0 auto 15px auto;
        float: none;
    }

    .image-caption {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Ajustement spécifique pour Chrome sur tablettes */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-width: 481px) and (max-width: 768px) {
    body, main {
        width: 100%;
        overflow-x: hidden;
    }

    .image-with-text {
        width: 100%;
        box-sizing: border-box;
        padding: 0 10px;
    }
    
    .image-with-text img {
        width: 100%;
        max-width: 300px;
        margin: 0 auto 15px auto;
        display: block;
        float: none;
    }
}

/* Téléphones */
@media (max-width: 480px) {
    main {
        padding: 5px;
    }

    h1 {
        font-size: 24px;
    }

    .signature {
        font-size: 24px;
    }

}
/*   ------------------------- Fin de @Media pour mobile */

@font-face {
    font-family: 'Signature';
    src: url('../fonts/GreatVibes-Regular.ttf') format('truetype');
}

p {
    line-height: 1.5;
}

/* Styles généraux */
body {
    font-family: Arial, sans-serif;
}

h1 {
    text-align: center;
    margin-top: 10px;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

nav li {
    margin-right: 20px;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

article {
    margin-bottom: 40px;
}

article h2 {
    margin-bottom: 10px;
}

article time {
    font-style: italic;
}

article img {
    max-width: 25%;
    margin-right: 10px;
}

.image-with-text {
   overflow: hidden;
   margin: 20px;
}

.image-with-text img {
    float: left;
    max-width: 300px;
    margin: 0 10px 10px 0;
    border-radius: 10px;
}

.image-caption {
    flex-grow: 3;
}

.image-caption p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.image-with-text::after {
    content: "";
    display: table;
    clear: both;
}

article p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.signature {
    font-family: 'Signature', cursive;
    font-size: 28px;
}

article a {
    color: #333;
    font-weight: bold;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: #f2f2f2;
    color: #888;
}
