html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Force la hauteur minimale à la hauteur de la fenêtre */
}

main {
    flex: 1 0 auto; /* Empêche le main de se réduire à zéro */
    width: 100%;
}

footer {
    flex-shrink: 0; /* Empêche le footer de se faire écraser */
}

#header { border: 2px solid red; }
#main { border: 2px solid blue; }
#footer { border: 2px solid green; }


/* Mode Dark global */
body {
    background-color: #121212;
    color: #ffffff;
    font-family: Arial, sans-serif;
    margin: 0;
}

/* En-tête Flexbox */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: #1e1e1e;
    border-bottom: 2px solid #333;
}

.navbar .logo img {
    height: 50px; /* Ajustez la taille selon votre besoin */
    width: auto;
}

.navbar .titre {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.navbar .titre h1 {
    margin: 0;
    font-size: 24px;
    white-space: nowrap;
}

/* Espaceur pour garder le logo à gauche */
.spacer {
    width: 50px; 
}

/* Style du footer */
.footer {
    display: flex;
    justify-content: center; /* Centre horizontalement */
    align-items: center;     /* Centre verticalement */
    padding: 20px;
    background-color: #1e1e1e;
    border-top: 1px solid #333;
    margin-top: 40px;
}

.footer p {
    color: #888888;          /* Gris moins agressif que le blanc */
    font-size: 0.9rem;
    margin: 0;
}


.login-container {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 70vh;
        background-color: #121212;
        color: #ffffff;
    }
    .login-box {
        background: #1e1e1e;
        padding: 30px;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.5);
        width: 100%;
        max-width: 350px;
        text-align: center;
    }
    input {
        width: 100%;
        padding: 10px;
        margin: 10px 0;
        background: #2c2c2c;
        border: 1px solid #444;
        color: white;
        border-radius: 4px;
        box-sizing: border-box;
    }
    button {
        width: 100%;
        padding: 10px;
        background: #007bff;
        border: none;
        color: white;
        border-radius: 4px;
        cursor: pointer;
        margin-top: 10px;
    }
    button:disabled { background: #555; }
    .error { color: #ff5555; font-size: 0.9em; margin-bottom: 10px; }

    .menu-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 40px;
        background-color: #121212;
        color: #ffffff;
        min-height: 80vh;
    }
    .grid-menu {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        max-width: 600px;
        width: 100%;
    }
    .btn-menu {
        padding: 15px;
        border: none;
        border-radius: 8px;
        color: white;
        font-weight: bold;
        cursor: pointer;
        text-align: center;
        text-decoration: none;
        transition: transform 0.2s, opacity 0.2s;
    }
    .btn-menu:hover { opacity: 0.8; transform: translateY(-2px); }
    
    /* Couleurs */
    .blue { background-color: #007bff; }
    .green { background-color: #28a745; }
    .purple { background-color: #6f42c1; }
    .red { background-color: #dc3545; }


    input, select { background: #2c2c2c !important; color: white !important; border: 1px solid #444 !important; padding: 5px; }
    input[readonly] { background: #3a3a3a !important; color: #aaa !important; cursor: not-allowed; }
    th { padding: 10px; border-bottom: 1px solid #444; }
    td { padding: 8px; border-bottom: 1px solid #333; }