* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #0f2540;
    min-height: 100vh;
}

/* ---------- Barre du haut ---------- */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: #08182c;
}

.app-titre {
    color: #ffb400;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 2px;
}

.langues { display: flex; gap: 10px; }

.drapeau {
    font-size: 14px;
    padding: 7px 12px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #1c3a5e;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.img-drapeau {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
}

.drapeau.actif { border-color: #ffb400; background: #274a73; }

.deconnexion {
    color: #ffb4b4;
    text-decoration: none;
    font-size: 14px;
    padding: 7px 12px;
    cursor: pointer;
}

/* ---------- Popup confirmation déconnexion ---------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.actif { display: flex; }

.modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.modal-box h3 { margin: 0 0 10px; color: #0f2540; font-size: 17px; }
.modal-box p { margin: 0 0 16px; color: #555; font-size: 13px; }

.modal-box input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 10px;
    outline: none;
}

.modal-box input:focus { border-color: #ffb400; }

.modal-erreur {
    color: #d43a3a;
    font-weight: 600;
    font-size: 12px;
    min-height: 20px;
}

.modal-boutons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.modal-boutons button {
    flex: 1;
    padding: 14px;
    font-size: 14px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
}

/* ---------- Logo ---------- */
.logo-bar {
    display: flex;
    justify-content: center;
    padding: 18px 0 6px;
}

.logo-principal {
    max-width: 170px;
    max-height: 80px;
    width: auto;
    height: auto;
}

/* ---------- Formulaire principal ---------- */
.conteneur {
    max-width: 420px;
    margin: 24px auto;
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

h1 {
    text-align: center;
    font-size: 20px;
    color: #0f2540;
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin: 14px 0 6px;
    color: #0f2540;
}

input[type="date"],
input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    border: 2px solid #ccc;
    border-radius: 10px;
    outline: none;
}

input:focus { border-color: #ffb400; }

.boutons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-ok, .btn-reset {
    flex: 1;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
}

.btn-ok { background: #1fa14d; color: #fff; }
.btn-ok:active { background: #178a3f; }
.btn-ok:disabled { opacity: 0.6; }

.btn-reset { background: #e0e0e0; color: #333; }
.btn-reset:active { background: #c9c9c9; }

.message {
    text-align: center;
    font-size: 14px;
    margin-top: 16px;
    min-height: 22px;
    font-weight: 600;
}

.message.succes { color: #1fa14d; }
.message.erreur { color: #d43a3a; }

/* ---------- Page login ---------- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-box {
    background: #fff;
    padding: 36px;
    border-radius: 18px;
    text-align: center;
    width: 320px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.login-box .logo {
    max-width: 150px;
    max-height: 75px;
    width: auto;
    height: auto;
    margin-bottom: 8px;
}

.login-box .app-nom {
    margin: 0 0 4px;
    font-size: 18px;
    color: #ffb400;
    letter-spacing: 2px;
    font-weight: 800;
}

.login-box h2 { margin-top: 4px; font-weight: 400; color: #555; }

.login-box input {
    width: 100%;
    padding: 16px;
    font-size: 14px;
    margin-top: 16px;
    border: 2px solid #ccc;
    border-radius: 10px;
}

.login-box button {
    width: 100%;
    padding: 16px;
    margin-top: 24px;
    font-size: 14px;
    font-weight: bold;
    background: #0f2540;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.erreur-msg { color: #d43a3a; font-weight: 600; }
