/* --- Couleurs Officielles & Variables --- */
:root {
    --blue-navy: #002354;       /* Bleu Gendarmerie */
    --blue-light: #003a8c;      /* Bleu plus clair pour le hover */
    --gold: #c0a16b;            /* Doré pour les grades/bordures */
    --red-alert: #d63031;       /* Pour les avis de recherche */
    --green-success: #27ae60;   /* Pour les validations */
    --grey-bg: #f0f2f5;         /* Fond de page */
    --white: #ffffff;
    --sidebar-width: 260px;
}

/* --- Reset & Base --- */
body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--grey-bg);
    color: #333;
    display: flex;
}

a { text-decoration: none; color: inherit; }

/* --- Barre Latérale (Sidebar) --- */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--blue-navy);
    color: white;
    position: fixed;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    background: rgba(255,255,255,0.05);
    border-bottom: 2px solid var(--gold);
}

.sidebar-header h2 {
    font-size: 1.2rem;
    letter-spacing: 1px;
    margin: 10px 0 0;
}

.menu {
    flex-grow: 1;
    padding-top: 20px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #dfe6e9;
    transition: 0.3s;
    border-left: 4px solid transparent;
}

.menu-item:hover, .menu-item.active {
    background: var(--blue-light);
    color: white;
    border-left: 4px solid var(--gold);
}

/* --- Contenu Principal --- */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 40px;
    width: calc(100% - var(--sidebar-width));
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--blue-navy);
    padding-bottom: 10px;
}

/* --- Cartes et Tableaux --- */
.card {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th {
    background: var(--blue-navy);
    color: white;
    text-align: left;
    padding: 12px 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    font-size: 0.95rem;
}

tr:hover { background-color: #f9f9f9; }

/* --- Formulaires --- */
.form-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 5px; font-weight: bold; }
input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* --- Boutons --- */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.btn-primary { background: var(--blue-navy); color: white; }
.btn-primary:hover { background: var(--blue-light); }
.btn-danger { background: var(--red-alert); color: white; }
.btn-success { background: var(--green-success); color: white; }

/* --- Badges --- */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}
.badge-wanted { background: var(--red-alert); color: white; }
.badge-active { background: var(--green-success); color: white; }

/* --- Box Login/Register --- */
.auth-container {
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-navy);
}