/* ============================================================
   Styles communs à tout le site
   ============================================================ */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #222;
    background: #fafafa;
    line-height: 1.4;
}

.conteneur-principal {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

h1 {
    font-size: 1.4rem;
    margin: 1rem 0;
}

a {
    color: #2e7d32;
}

/* --- Formulaires génériques (login, inscription) --- */
.page-auth {
    max-width: 400px;
    margin: 2rem auto;
}

.page-auth form label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
}

.page-auth form input {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.6rem;
    font-size: 1rem;
}

.page-auth button {
    width: 100%;
    padding: 0.75rem;
    background: #2e7d32;
    color: #fff;
    border: none;
    font-size: 1rem;
    cursor: pointer;
}

.message-erreur {
    background: #fdecea;
    color: #c0392b;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* ============================================================
   Navigation
   ============================================================ */

.barre-navigation {
    background: #1b5e20;
}

.barre-navigation-contenu {
    max-width: 800px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.logo-app {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    font-size: 1.1rem;
}

.liens-navigation {
    list-style: none;
    display: flex;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
}

.liens-navigation a {
    color: #fff;
    text-decoration: none;
}

.lien-utilisateur {
    color: #cfd8cf;
    font-size: 0.9rem;
}

.bascule-menu-mobile,
.bouton-menu-mobile {
    display: none;
}

/* --- Adaptation mobile : menu en accordéon derrière une case à cocher --- */
@media (max-width: 600px) {
    .bouton-menu-mobile {
        display: block;
        color: #fff;
        font-size: 1.4rem;
        cursor: pointer;
    }

    .liens-navigation {
        display: none;
        flex-direction: column;
        gap: 0.75rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1b5e20;
        padding: 1rem;
        z-index: 10;
    }

    /* Astuce CSS pur (sans JS) : la case à cocher pilote l'affichage du menu */
    .bascule-menu-mobile:checked ~ .liens-navigation {
        display: flex;
    }
}

/* ============================================================
   Pied de page
   ============================================================ */

.pied-de-page {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    padding: 1.5rem 1rem;
}
