*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    background: #f4f6f9;
    color: #222;
}

/* ── Navigation ── */
nav {
    background: #1a3a5c;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}
nav a {
    color: #cde;
    text-decoration: none;
    padding: 0.6rem 1rem;
    display: inline-block;
    font-size: 13px;
    font-weight: bold;
    border-bottom: 3px solid transparent;
}
nav a:hover, nav a.active { color: #fff; border-bottom-color: #4fc3f7; }
nav .sep { color: #445; padding: 0 0.25rem; }

/* ── Page ── */
.page { max-width: 1100px; margin: 1.5rem auto; padding: 0 1rem; }

h1 { font-size: 1.4rem; color: #1a3a5c; margin-bottom: 1rem; }
h2 { font-size: 1.1rem; color: #1a3a5c; margin-bottom: 0.75rem; }

/* ── Cards ── */
.card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

/* ── Dashboard grid ── */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.grid a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #1a3a5c;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    padding: 1.5rem 1rem;
    font-weight: bold;
    font-size: 13px;
    text-align: center;
    transition: background .2s;
}
.grid a:hover { background: #2563a8; }
.grid a span.ico { font-size: 2rem; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead tr { background: #1a3a5c; color: #fff; }
thead th { padding: 0.5rem 0.75rem; text-align: left; position: sticky; top: 0; z-index: 2; background: #1a3a5c; color: #fff; }
tbody tr:nth-child(even) { background: #eef3fb; }
tbody tr:hover { background: #dde8f7; }
td { padding: 0.45rem 0.75rem; border-bottom: 1px solid #dde; }

/* Ligne de filtre sous l'entête */
thead tr.filter-row th { background: #f0f4fa; padding: 0.3rem 0.4rem; top: 35px; }
thead tr.filter-row input {
    width: 100%; padding: 3px 6px; border: 1px solid #bcc; border-radius: 3px;
    font-size: 12px; color: #222; background: #fff;
}
tbody tr.row-hidden { display: none; }

/* ── Forms ── */
.form-group { margin-bottom: 0.75rem; }
label { display: block; font-weight: bold; margin-bottom: 0.25rem; font-size: 13px; }
input[type=text], input[type=password], input[type=number],
input[type=date], select, textarea {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid #bcc;
    border-radius: 4px;
    font-size: 13px;
}
input[type=text]:focus, input[type=password]:focus,
input[type=number]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #2563a8;
    box-shadow: 0 0 0 2px rgba(37,99,168,.2);
}
input[type=checkbox] { width: auto; }
input.small { width: 5rem; }

/* ── Buttons ── */
.btn {
    display: inline-block;
    padding: 0.45rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
}
.btn-primary   { background: #1a3a5c; color: #fff; }
.btn-primary:hover { background: #2563a8; }
.btn-success   { background: #2e7d32; color: #fff; }
.btn-success:hover { background: #388e3c; }
.btn-danger    { background: #c62828; color: #fff; }
.btn-danger:hover  { background: #e53935; }
.btn-sm { padding: 0.25rem 0.6rem; font-size: 12px; }

/* ── Alerts ── */
.alert { padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 1rem; }
.alert-ok  { background: #e8f5e9; border: 1px solid #a5d6a7; color: #2e7d32; }
.alert-err { background: #ffebee; border: 1px solid #ef9a9a; color: #c62828; }

/* ── Commande table ── */
.cmd-row td { vertical-align: middle; }
.cmd-row td:first-child { font-weight: bold; }
.badge-promo { background: #e53935; color: #fff; padding: 1px 5px; border-radius: 3px; font-size: 11px; }
.badge-promop { background: #f57c00; color: #fff; padding: 1px 5px; border-radius: 3px; font-size: 11px; }

/* ── Login ── */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a3a5c;
}
.login-box {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    width: 320px;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.login-box h1 { text-align: center; margin-bottom: 1.5rem; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .grid { grid-template-columns: 1fr 1fr; }
}

/* ── Indicateur force mot de passe ── */
.pr-bar { display:flex; flex-wrap:wrap; gap:.3rem; margin-top:.4rem; }
.pr-rule {
    font-size:11px; padding:2px 7px; border-radius:3px;
    background:#ffebee; color:#c62828; border:1px solid #ef9a9a;
}
.pr-rule.pr-ok {
    background:#e8f5e9; color:#2e7d32; border-color:#a5d6a7;
}