:root {
    --bleu: #1d3557;
    --bleu-clair: #e8eef6;
    --or: #b8860b;
    --texte: #1b1f24;
    --fond: #f6f7f9;
    --bord: #d5dae1;
    --erreur: #9b1c1c;
    --erreur-fond: #fdecec;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--texte); background: var(--fond); line-height: 1.5; }
.conteneur { width: min(1080px, 100% - 2rem); margin-inline: auto; }
.entete { background: var(--bleu); color: #fff; border-bottom: 4px solid var(--or); }
.entete__ligne { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; justify-content: space-between; padding: .9rem 0; }
.marque { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.05rem; }
.entete__deconnexion { display: flex; align-items: center; gap: .75rem; margin: 0; }
.entete__nom { font-size: .9rem; opacity: .9; }
.principal { padding: 1.5rem 0 2.5rem; }
h1 { font-size: 1.6rem; color: var(--bleu); margin: 0 0 1rem; }
h2 { font-size: 1.2rem; color: var(--bleu); margin: 0 0 .75rem; }
.carte { background: #fff; border: 1px solid var(--bord); border-radius: 10px; padding: 1.25rem; margin-bottom: 1.25rem; }
.carte--etroite { max-width: 420px; margin-inline: auto; }
.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.grille .carte { margin: 0; }
.stat { display: flex; flex-direction: column; }
.stat__valeur { font-size: 1.9rem; font-weight: 700; color: var(--bleu); }
.stat__libelle { font-size: .9rem; color: #4a5461; }
label { display: block; font-weight: 600; margin: .9rem 0 .3rem; }
input[type=text], input[type=password], input[type=number] { width: 100%; padding: .65rem .75rem; border: 1px solid var(--bord); border-radius: 8px; font: inherit; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
.bouton { display: inline-block; margin-top: 1.1rem; padding: .7rem 1.2rem; border: 0; border-radius: 8px; background: var(--bleu); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.bouton:hover { background: #14263f; }
.bouton--discret { margin: 0; padding: .4rem .8rem; background: transparent; border: 1px solid rgba(255,255,255,.6); }
.bouton--discret:hover { background: rgba(255,255,255,.12); }
.alerte { padding: .7rem .9rem; border-radius: 8px; margin: 0 0 .5rem; }
.alerte--erreur { background: var(--erreur-fond); color: var(--erreur); border: 1px solid #f1b8b8; }
.defilement { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--bord); }
th { background: var(--bleu-clair); color: var(--bleu); font-size: .9rem; }
.note { color: #4a5461; font-size: .9rem; }
.pied { padding: 1rem 0 2rem; color: #5b6572; }

/* ---- Étape 2 : navigation, formulaires, tableaux ---- */
.menu { display: flex; flex-wrap: wrap; gap: .25rem; padding-bottom: .6rem; }
.menu a { color: #fff; text-decoration: none; padding: .4rem .8rem; border-radius: 6px; font-size: .95rem; }
.menu a:hover { background: rgba(255,255,255,.14); }
.menu a.actif { background: #fff; color: var(--bleu); font-weight: 600; }
.alerte--succes { background: #e9f7ee; color: #14532d; border: 1px solid #b7e1c4; }
.carte--etroite-gauche { max-width: 520px; }
input[type=number], select { width: 100%; padding: .65rem .75rem; border: 1px solid var(--bord); border-radius: 8px; font: inherit; background: #fff; }
.case { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; margin: 1rem 0 0; }
.case input { margin-top: .3rem; }
.aide, .discret { color: #5b6572; font-size: .875rem; }
.aide { margin: .25rem 0 0; }
.bouton--petit { margin: 0; padding: .35rem .7rem; font-size: .875rem; text-decoration: none; }
.bouton--secondaire { background: #fff; color: var(--bleu); border: 1px solid var(--bleu); }
.bouton--secondaire:hover { background: var(--bleu-clair); }
.bouton--danger { background: #fff; color: var(--erreur); border: 1px solid var(--erreur); }
.bouton--danger:hover { background: var(--erreur-fond); }
.bouton[disabled] { opacity: .4; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.actions form, .ligne-form { margin: 0; display: inline-flex; gap: .4rem; align-items: center; }
.ligne-form input { min-width: 14rem; }
.barre-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 0 0 1rem; }
.lien-retour { margin-left: 1rem; }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; background: #e5e8ec; color: #3b4450; font-size: .8rem; }
.badge--ok { background: #e1f3e7; color: #14532d; }
.badge--attention { background: #fff1d6; color: #7a4b00; }
.filtres { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem 1rem; align-items: end; }
.filtres label { margin-top: 0; }
.filtres__action .bouton { margin-top: 0; }
.col-case { width: 2.5rem; }
label.sans-style { font-weight: 400; margin: 0; }
