:root { --bleu: #1f4e79; --gris: #f3f5f8; --bord: #d9dee5; --texte: #1d2733; }
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--texte); background: #fff; }
main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 60px; }
.menu { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; background: var(--bleu); color: #fff; padding: 10px 16px; }
.menu a { color: #dbe7f3; text-decoration: none; padding: 4px 2px; }
.menu a.actif, .menu a:hover { color: #fff; border-bottom: 2px solid #fff; }
.menu .droite { margin-left: auto; }
h1 { font-size: 22px; margin: 8px 0 16px; }
h2 { font-size: 17px; margin: 24px 0 10px; }
table { border-collapse: collapse; width: 100%; margin: 8px 0 16px; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--bord); text-align: left; vertical-align: top; }
th { background: var(--gris); font-weight: 600; white-space: nowrap; }
td.n, th.n { text-align: right; white-space: nowrap; }
tr.total td { font-weight: 700; border-top: 2px solid var(--texte); }
.table-scroll { overflow-x: auto; }
form.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 20px; }
fieldset { border: 1px solid var(--bord); border-radius: 6px; padding: 12px 14px; margin: 0 0 16px; }
legend { font-weight: 600; padding: 0 6px; }
label { display: block; margin: 6px 0; }
label span { display: block; font-size: 12px; color: #5a6676; margin-bottom: 2px; }
input[type=text], input[type=number], input[type=password], select, textarea { width: 100%; padding: 6px 8px; border: 1px solid var(--bord); border-radius: 4px; font: inherit; }
button, .bouton { display: inline-block; background: var(--bleu); color: #fff; border: 0; border-radius: 4px; padding: 8px 14px; font: inherit; cursor: pointer; text-decoration: none; }
.bouton.secondaire { background: #e6ebf1; color: var(--texte); }
.flash { padding: 10px 12px; border-radius: 4px; margin-bottom: 12px; background: #e7f4ea; border: 1px solid #b6dcc0; }
.flash.erreur { background: #fbeaea; border-color: #e7b9b9; }
.aide { color: #5a6676; font-size: 13px; }
.badge { display: inline-block; font-size: 12px; padding: 1px 6px; border-radius: 10px; background: #e6ebf1; }
.badge.illimite { background: #dcefe1; } .badge.compteur { background: #fdf0d5; } .badge.aucun { background: #eee; color: #888; }
.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.carte { border: 1px solid var(--bord); border-radius: 6px; padding: 12px; }
.carte b { display: block; font-size: 20px; }
.facture { max-width: 800px; }
.facture .entete { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
@media print { .no-print { display: none !important; } main { padding: 0; } body { font-size: 12px; } }
form fieldset { max-width: 760px; }
td.nom-client { white-space: nowrap; }
td.nom-client a.oeil { color: #5a6676; vertical-align: -4px; margin-right: 4px; }
td.nom-client a.oeil:hover { color: var(--bleu); }
.ligne-montant { display: flex; justify-content: space-between; gap: 10px; white-space: nowrap; }
.ligne-montant span { color: #5a6676; font-size: 12px; }
.total-montant { border-top: 1px solid var(--bord); margin-top: 2px; padding-top: 2px; }
.nav-client { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 2fr) minmax(0, 1fr); align-items: stretch;
  border: 1px solid var(--bord); border-radius: 10px; background: var(--gris); margin: 8px 0 20px; overflow: hidden; }
.nav-fleche { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--texte); text-decoration: none; min-width: 0; transition: background .15s; }
.nav-fleche:hover { background: #e3e9f0; }
.nav-fleche.droite { justify-content: flex-end; text-align: right; }
.nav-fleche.inactif { opacity: .35; }
.nav-fleche.inactif:hover { background: none; }
.nav-icone { font-size: 30px; line-height: 1; color: var(--bleu); flex: none; }
.nav-texte { display: flex; flex-direction: column; min-width: 0; font-weight: 500; }
.nav-texte, .nav-texte small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-texte small { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #5a6676; font-weight: 400; }
.nav-centre { background: #fff; border-left: 1px solid var(--bord); border-right: 1px solid var(--bord); padding: 8px 14px; text-align: center; }
.nav-liste { appearance: none; -webkit-appearance: none; border: 1px solid transparent; border-radius: 6px; width: 100%;
  font-family: inherit; font-size: 20px; font-weight: 600; color: var(--texte); text-align: center; text-align-last: center; cursor: pointer;
  padding: 4px 30px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231f4e79' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 10px center; }
.nav-liste:hover, .nav-liste:focus { border-color: var(--bord); background-color: var(--gris); outline: none; }
.nav-info { font-size: 12px; color: #5a6676; margin-top: 2px; }
@media (max-width: 700px) {
  .nav-client { grid-template-columns: 1fr 1fr; }
  .nav-centre { grid-column: 1 / -1; grid-row: 1; border: 0; border-bottom: 1px solid var(--bord); }
}
.badge { white-space: nowrap; }
/* Tri et filtres des tableaux */
th.tri { cursor: pointer; user-select: none; }
th.tri::after { content: "\2195"; margin-left: 4px; color: #9aa5b1; font-size: .85em; }
th.tri.tri-asc::after { content: "\25B2"; color: var(--bleu); }
th.tri.tri-desc::after { content: "\25BC"; color: var(--bleu); }
th.tri:hover { background: #e3e8ee; }
tr.filtres th { background: #fff; padding: 4px 6px; font-weight: normal; }
tr.filtres input { width: 100%; min-width: 60px; padding: 3px 6px; border: 1px solid var(--bord); border-radius: 4px; font: inherit; font-size: .85em; }
tr.filtres th.n input { text-align: right; }
.compteur-filtre { margin-top: -8px; }
