* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; margin: 0; background: #f4f6f8; color: #222; }
header { background: linear-gradient(135deg, #1b5e20, #2e7d32); color: #fff; padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.15); flex-wrap: wrap; gap: 10px; }
header a { color: #fff; text-decoration: none; font-weight: bold; }
.logo-nav { font-size: 17px; }
.lien-nav { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; transition: background .15s ease; }
.lien-nav:hover { background: rgba(255,255,255,.18); }
.lien-nav.actif { background: #fff; color: #1b5e20; }
.icone-nav { font-size: 15px; }
.pastille-utilisateur { background: rgba(255,255,255,.15); padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; }
main { max-width: 1600px; width: 97%; margin: 20px auto; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; background: #fff; margin: 12px 0; }
th, td { padding: 8px 10px; border-bottom: 1px solid #e0e0e0; text-align: left; }
th { background: #eef2ee; }
tbody tr:nth-child(even) { background: #f6f9f6; }
tbody tr:hover { background: #e3eee3; }
.card { background: #fff; border-radius: 6px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
input, select, button { padding: 7px 10px; font-size: 14px; border: 1px solid #ccc; border-radius: 4px; }
button { background: #1b5e20; color: #fff; border: none; cursor: pointer; }
button:hover { background: #164a1a; }
button.secondaire { background: #888; }
.statut { padding: 2px 8px; border-radius: 10px; font-size: 12px; color: #fff; }
.statut.OUVERTE { background: #1976d2; }
.statut.VALIDEE { background: #7b1fa2; }
.statut.RECU { background: #f9a825; }
.statut.FERMEE { background: #616161; }
.pos { color: #1b5e20; font-weight: bold; }
.neg { color: #c62828; font-weight: bold; }
#toasts { position: fixed; top: 16px; right: 16px; z-index: 999; }
.toast { background: #333; color: #fff; padding: 10px 14px; border-radius: 4px; margin-bottom: 8px; }
.toast.erreur { background: #c62828; }
.ligne-form { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.onglet { font-weight: bold; }
.toolbar-recherche { position: relative; margin: 12px 0; }
.toolbar-recherche input[type=search] { width: min(520px, 100%); }
#resultats-produit { position: absolute; z-index: 20; background: #fff; border: 1px solid #ccc; border-radius: 6px; max-height: 320px; overflow-y: auto; min-width: min(520px, 92vw); box-shadow: 0 8px 24px rgba(0,0,0,.18); top: 100%; left: 0; }
#resultats-produit > div { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; gap: 10px; }
#resultats-produit > div:hover { background: #eef2ee; }
#resultats-produit > .muted { color: #888; cursor: default; }
#resultats-produit > .muted:hover { background: none; }
.muted { color: #888; }
