/* ===== RESET AND BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

/* ===== HEADER STYLES ===== */
.header {
    background-color: #e8f5e9;
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #c8e6c9;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 1.5rem;
}

.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #81c784;
}

.header-text h1 {
    color: #2e7d32;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.header-text p {
    color: #558b2f;
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.header-text div {
    margin-top: 1rem;
}

/* ===== NAVBAR STYLES ===== */
.navbar {
    background-color: #c8e6c9;
    padding: 0.8rem;
    text-align: center;
}

/* Bouton menu (visible UNIQUEMENT sur mobile) */
.menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #2e7d32;
    padding: 0.5rem;
    width: 100%;
    text-align: left;
}

/* Menu (caché par défaut sur mobile) */
.navbar .menu {
    display: none;
    list-style: none;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

/* Menu visible quand la classe 'active' est ajoutée (mobile) */
.navbar .menu.active {
    display: flex;
}

/* Liens du menu */
.navbar a {
    text-decoration: none;
    color: #2e7d32;
    font-weight: bold;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s;
    display: block;
    text-align: center;
}

.navbar a:hover {
    background-color: #a5d6a7;
    color: #1b5e20;
}

/* ===== MAIN CONTENT STYLES ===== */
main {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1rem;
}

.section {
    background-color: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section h2 {
    color: #2e7d32;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e4f1e5;
    padding-bottom: 0.5rem;
    font-size: 1.5rem;
}

.section .publication {
    display: flex;
    flex-direction: column;
    border: solid 2px #bfe8c0;
    padding: 10px;
    border-radius: 15px;
    margin: 0.5rem 0;
}

.section .publication img {
    width: 100%;
    max-width: 150px;
    height: auto;
    border-radius: 5px;
    align-self: center;
    margin-bottom: 10px;
}

.section .publication div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.publication p, .publication h3 {
    margin: 0.3rem 0;
    text-align: left;
}

/* ===== FOOTER STYLES ===== */
footer {
    background-color: #e8f5e9;
    text-align: center;
    padding: 1rem;
    margin-top: 1rem;
    color: #2e7d32;
    font-size: 0.9rem;
}

/* ===== OTHER STYLES ===== */
.myLink {
    font-weight: lighter;
    font-size: 1rem;
    color: #2e7d32;
}

.no-bullets {
    text-align: left;
    list-style-type: none;
    padding-left: 0;
    margin-left: 0;
}

/* ===== MEDIA QUERIES ===== */
/* Tablettes et écrans moyens (>= 768px) */
@media screen and (min-width: 768px) {
    .header-content {
        flex-direction: row;
        text-align: left;
    }

    .profile-img {
        width: 120px;
        height: 120px;
    }

    .header-text h1 {
        font-size: 2rem;
    }

    /* Cache le bouton menu sur PC */
    .menu-toggle {
        display: none;
    }

    /* Affiche le menu en horizontal sur PC */
    .navbar .menu {
        display: flex !important;
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
        padding: 0;
    }

    .navbar a {
        padding: 0.5rem 1rem;
    }

    .section .publication {
        flex-direction: row;
    }

    .section .publication img {
        width: 150px;
        height: 150px;
        margin-right: 15px;
        margin-bottom: 0;
    }

    .section .publication div {
        flex-direction: row;
        align-items: flex-start;
    }

    .publication p, .publication h3 {
        margin-left: 15px;
        margin-bottom: 0;
    }
}

/* Grands écrans (>= 1024px) */
@media screen and (min-width: 1024px) {
    .header {
        padding: 2rem;
    }

    .header-content {
        gap: 2rem;
    }

    .section {
        padding: 2rem;
        margin-bottom: 2rem;
    }

    .navbar {
        padding: 1rem;
    }
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background-color: #2e7d32;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, opacity 0.3s;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-to-top:hover {
    background-color: #1b5e20;
}

/* ===== SCROLL TO TOP BUTTON ===== MOBILE */
@media screen and (max-width: 767px) {
    .scroll-to-top {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
        bottom: 15px;
        left: 15px;
    }
}