* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #f4f6f8;
    color: #1f2937;
}
.topbar {
    background: #0f4c81;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar-titre { font-weight: 600; font-size: 1.05rem; }
.burger { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; display: none; }

.menu {
    display: flex;
    gap: 4px;
    background: #123a5e;
    padding: 8px 12px;
    flex-wrap: wrap;
}
.menu a {
    color: #e5edf5;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.92rem;
}
.menu a:hover, .menu a:active { background: #1e5f96; }
.menu .deconnexion { margin-left: auto; color: #ffb4b4; }

.contenu { max-width: 900px; margin: 0 auto; padding: 16px; }

.carte {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 16px;
}

h1 { font-size: 1.4rem; margin-top: 0; }
h2 { font-size: 1.15rem; }

label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 0.92rem; }
input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}
textarea { resize: vertical; min-height: 60px; }

button, .bouton {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 18px;
    background: #0f4c81;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
button:hover, .bouton:hover { background: #0d3f6b; }
.bouton-danger { background: #b91c1c; }
.bouton-danger:hover { background: #991616; }
.bouton-secondaire { background: #64748b; }

.bouton-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    background: #0f4c81;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.bouton-icone:hover { background: #0d3f6b; }
.bouton-icone-danger { background: #b91c1c; }
.bouton-icone-danger:hover { background: #991616; }

.alerte { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 0.92rem; }
.alerte-succes { background: #dcfce7; color: #166534; }
.alerte-erreur { background: #fee2e2; color: #991b1b; }
.alerte-attention { background: #fef9c3; color: #854d0e; }

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { padding: 8px 6px; text-align: left; border-bottom: 1px solid #e5e7eb; }
th { background: #f1f5f9; }

.badge { padding: 3px 8px; border-radius: 12px; font-size: 0.78rem; font-weight: 600; }
.badge-attente { background: #fef9c3; color: #854d0e; }
.badge-validee { background: #dcfce7; color: #166534; }
.badge-rejetee { background: #fee2e2; color: #991b1b; }

.stats-grille { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-carte { background: #fff; border-radius: 10px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); display: flex; align-items: center; gap: 12px; border-left: 4px solid transparent; }
.stat-icone { width: 44px; height: 44px; min-width: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.stat-valeur { font-size: 1.5rem; font-weight: 700; color: #0f4c81; }
.stat-separateur { color: #94a3b8; font-weight: 400; }
.stat-label { font-size: 0.82rem; color: #6b7280; }

.stat-verte { border-left-color: #16a34a; }
.stat-verte .stat-icone { background: #dcfce7; color: #16a34a; }
.stat-bleue { border-left-color: #0f4c81; }
.stat-bleue .stat-icone { background: #e0edff; color: #0f4c81; }
.stat-ambre { border-left-color: #f59e0b; }
.stat-ambre .stat-icone { background: #fef3c7; color: #b45309; }
.stat-rouge { border-left-color: #b91c1c; }
.stat-rouge .stat-icone { background: #fee2e2; color: #b91c1c; }

.onglets { display: flex; gap: 8px; margin-bottom: 14px; }
.onglets a {
    padding: 8px 14px; border-radius: 8px; text-decoration: none;
    background: #e5edf5; color: #0f4c81; font-size: 0.9rem;
}
.onglets a.actif { background: #0f4c81; color: #fff; }

.tableau-scroll { overflow-x: auto; }

.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.login-carte { max-width: 380px; width: 100%; }

/* Mobile */
@media (max-width: 640px) {
    .burger { display: block; }
    .menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 89px;
        left: 0;
        right: 0;
    }
    .menu.ouvert { display: flex; }
    .menu .deconnexion { margin-left: 0; }
    .stats-grille { grid-template-columns: 1fr; }
    th, td { font-size: 0.8rem; }
}