/* DPP - feuille de style du back-office */
*{box-sizing:border-box}
html,body{margin:0}
body{background:#f4f5f6;color:#1c1f22;font:14px/1.45 Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
a{color:#1f4e5f}
a:hover{color:#163a47}
h1{margin:0;font-size:24px;line-height:1.2}
h2{margin:0;font-size:16px;font-weight:600}
[hidden]{display:none!important}
.masque{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* Structure : menu + contenu, une seule barre de defilement (celle de la page) */
.app{display:flex;flex-wrap:wrap;min-height:100vh}
.menu{flex:1 1 210px;background:#fff;border-right:1px solid #e3e5e8;padding:20px 14px;display:flex;flex-direction:column;gap:4px}
.menu-titre{font-size:16px;font-weight:700;padding:0 10px 16px}
.menu-lien{display:flex;align-items:center;min-height:44px;padding:0 10px;border-radius:8px;color:#1c1f22;text-decoration:none}
.menu-lien:hover{background:#f0f1f3;color:#1c1f22}
.menu-lien.actif{background:#e9ebed;font-weight:600}
.menu-pied{margin-top:auto;padding:16px 10px 0;font-size:12px;color:#4a5056;display:flex;flex-direction:column;gap:2px}
.menu-pied form{margin-top:10px}
.contenu{flex:999 1 560px;min-width:0;padding:24px 28px;display:flex;flex-direction:column;gap:18px}
#f-produit{min-width:0;display:flex;flex-direction:column;gap:18px}

.barre-haut{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between}
.fil{font-size:13px;color:#4a5056;margin-bottom:6px}
.titre-ligne{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.actions{display:flex;gap:8px;flex-wrap:wrap}
.colonnes{display:flex;flex-wrap:wrap;gap:18px;align-items:flex-start}
.colonne-large{flex:999 1 520px;min-width:0;display:flex;flex-direction:column;gap:18px}
.colonne-etroite{flex:1 1 300px;min-width:0;display:flex;flex-direction:column;gap:18px}

.carte{min-width:0;background:#fff;border-radius:12px;padding:20px;box-shadow:0 1px 3px rgba(0,0,0,.08);display:flex;flex-direction:column;gap:14px}
.carte-titre{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}
.carte.vide{align-items:flex-start}
.carte.vide p{margin:0;color:#4a5056}
.aide{font-size:13px;color:#4a5056}
.centre{text-align:center}

/* Boutons */
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 16px;border-radius:8px;border:1px solid #c9cdd2;background:#fff;color:#1c1f22;font:500 14px/1 inherit;font-family:inherit;text-decoration:none;cursor:pointer}
.btn:hover{background:#f0f1f3;color:#1c1f22}
.btn-principal{background:#1f4e5f;border-color:#1f4e5f;color:#fff;font-weight:600}
.btn-principal:hover{background:#163a47;color:#fff}
.btn-petit{min-height:36px;padding:0 12px;font-size:13px}
.btn:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:2px solid #1f4e5f;outline-offset:2px}

/* Champs */
.champs{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:#4a5056}
input[type=text],input[type=email],input[type=password],input[type=search],select{height:44px;padding:0 12px;border:1px solid #c9cdd2;border-radius:8px;background:#fff;color:#1c1f22;font:400 14px inherit;font-family:inherit;width:100%}
.recherche{max-width:360px}

/* Tableaux */
.table-defilante{overflow-x:auto;max-width:100%;min-width:0}
table.liste{width:100%;border-collapse:collapse}
table.liste th{position:relative;text-align:left;font-size:13px;font-weight:500;color:#4a5056;padding:10px 12px;border-bottom:1px solid #d5d8dc;white-space:nowrap}
table.liste td{padding:12px;border-bottom:1px solid #e3e5e8;vertical-align:middle}
table.liste tbody tr:hover{background:#eef0f2}
table.saisie{min-width:800px}
table.saisie td{padding:6px 6px}
table.saisie th{padding:8px 6px}
.droite{text-align:right}
input.pct{width:84px}
table.saisie td:first-child input{min-width:150px}
table.saisie td:nth-child(2) input{min-width:140px}

/* Pastilles */
.pastille{display:inline-block;font-size:12px;font-weight:600;padding:4px 10px;border-radius:999px;background:#e9ebed;color:#1c1f22;white-space:nowrap}
.pastille-ok{background:#1f4e5f;color:#fff}

/* Messages */
.message{border-radius:8px;padding:12px 14px;display:flex;flex-direction:column;gap:4px}
.message.ok{background:#e4eef1;color:#163a47;border:1px solid #b9cdd4}
.message.erreur{background:#fbeaea;color:#7a1f1f;border:1px solid #e3b6b6}

/* Totaux de composition */
.totaux{display:flex;flex-wrap:wrap;gap:8px}
.total{font-size:13px;font-weight:500;padding:5px 10px;border-radius:8px}
.total-ok{background:#e4eef1;color:#163a47}
.total-ko{background:#fbeaea;color:#7a1f1f}

/* QR code */
.qr-ligne{display:flex;gap:14px;align-items:center}
.qr{flex:0 0 auto;line-height:0;border:1px solid #e3e5e8;border-radius:8px;overflow:hidden}
.qr svg{display:block;width:120px;height:120px}
.qr-texte{min-width:0;display:flex;flex-direction:column;gap:4px}
.lien{font-size:13px;font-weight:500;word-break:break-all}

.historique{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.historique li{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #e3e5e8;font-size:13px}
.historique li span:first-child{font-weight:600}
.historique li span:last-child{color:#4a5056;text-align:right}

/* Connexion */
.page-login{display:flex;min-height:100vh;align-items:center;justify-content:center;padding:24px}
.login{width:100%;max-width:380px;padding:28px;box-shadow:0 8px 30px rgba(0,0,0,.12)}
.login p{margin:0}
