/* ---------------------------------------------
   CSS COMPLET — Desktop & Mobile Responsive v2.0.4
---------------------------------------------- */

/* ----------- POLICE GLOBALE ----------- */
body,
.dropbtn,
.dropdown-content a,
.footer {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ----------- NAVBAR (Desktop) ----------- */
.navbar {
    margin-top: 50px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-list {
    display: flex;
    gap: 20px;
    list-style: none;
    padding-left: 0;
}

.dropdown {
    position: relative;
}

.dropbtn {
    /* Barre principale des menus (sans survol)  */
    background-color: #ffffff; /* couleur de fond des menus  */
    text-decoration: none; /* supprime le soulignement */
    color: rgb(112, 110, 110); /* couleur de la police des menus  */
    padding: 10px 20px;
    font-size: 20px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.dropbtn:hover {
    /* Survol de la barre principale des menus  */
    background-color: #868684b0;
    color: rgb(238, 236, 236);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dropdowns Desktop */
.dropdown-content {
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    padding: 10px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    list-style: none; /* supprime les puces */
    padding-left: 0; /* supprime le retrait par défaut des <ul> */
}

.dropdown-content li {
    list-style: none; /* supprime le retrait par défaut des <li> */
}

.dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-content a {
    color: black;
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    font-family: inherit;
}

.dropdown-content a:hover {
    background-color: #e6e4e7;
    color: rgb(46, 45, 45);
}

/* ----------- IMAGE PRINCIPALE ----------- */
.content {
    display: flex;
    justify-content: center;
    margin-top: 20px; /* <--- ajuste cette valeur selon l’espace souhaité */
    width: 100%;
}

.content img {
    display: block;
    margin: 0 auto;
    max-width: 80%;
    height: auto;
}

/* ----------- FOOTER ----------- */
.footer {
    margin-top: 10px;
    width: 80%;
    max-width: 80%;
    text-align: left;
    font-size: 14px;
    color: #bbbcbe;
    border-top: 1px solid #ddd;
    padding-top: 10px;
    margin-left: auto;
    margin-right: auto;
    display: block;
    font-family: inherit;
}

/* ----------- LOGIN PAGE ----------- */
body.login-page {
    background-color: #3c498f;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    background-color: white;
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2);
    width: 320px;
    text-align: center;
}

.login-container h2 {
    color: #3c498f;
    margin-bottom: 20px;
    font-weight: 700;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.login-container button {
    width: 100%;
    padding: 10px;
    background-color: #3c498f;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.login-container button:hover {
    background-color: #5c6bc0;
}

.login-container .error {
    color: red;
    margin-top: 10px;
    font-size: 14px;
}

/* ==========================================================
   MEDIA QUERIES POUR MOBILE (<768px)
========================================================== */
@media (max-width: 768px) {

    /* Menu hamburger visible */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        padding: 10px;
        margin-bottom: 10px;
    }

    .menu-toggle .bar {
        height: 3px;
        width: 25px;
        background-color: #333;
        margin: 4px 0;
        transition: all 0.3s ease;
    }

    /* Animation hamburger → croix */
    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Nav list vertical et cachée par défaut */
    .nav-list {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background-color: #333;
    }

    .nav-list.active {
        display: flex;
    }

    .nav-list li {
        width: 100%;
        text-align: left;
    }

    /* Dropdowns mobile */
    .dropdown-content {
        position: relative;
        transform: translateY(0);
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        background-color: #444;
    }

    .dropdown-content a {
        color: white;
        padding: 10px;
    }

    .dropdown-content a:hover {
        background-color: #3c498f;
        color: #fff;
    }

    .dropbtn {
        width: 100%;
        text-align: left;
        padding: 12px 20px;
    }
}