/* reception.mypassionelle.com — mobile-first 375 px, cibles tactiles ≥ 44 px, pas de scroll horizontal. */
:root {
  --noir: #111; --gris: #666; --gris-clair: #e8e8e8; --fond: #f6f6f4; --blanc: #fff;
  --vert: #1f8f4e; --vert-fond: #e6f6ec; --rouge: #c62828; --rouge-fond: #fdecea; --orange: #d97706; --orange-fond: #fff4e0;
  --bleu: #1e56a0; --bleu-fond: #e8f0fb; --radius: 12px; --ombre: 0 1px 3px rgba(0,0,0,.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--fond); color: var(--noir); font: 16px/1.4 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; overflow-x: hidden; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; }
#app { min-height: 100vh; display: flex; flex-direction: column; }
.entete { position: sticky; top: 0; z-index: 5; background: var(--blanc); border-bottom: 1px solid var(--gris-clair); padding: 10px 12px; display: flex; align-items: center; gap: 10px; min-height: 56px; }
.entete h1 { font-size: 17px; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entete .sous { font-size: 13px; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bandeau { padding: 8px 12px; font-size: 14px; text-align: center; }
.bandeau.hors-ligne { background: var(--orange-fond); color: var(--orange); }
.bandeau.info { background: var(--bleu-fond); color: var(--bleu); }
main { flex: 1; padding: 12px; max-width: 900px; width: 100%; margin: 0 auto; }
.carte { background: var(--blanc); border-radius: var(--radius); box-shadow: var(--ombre); padding: 12px; margin-bottom: 10px; }
.btn { min-height: 44px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--gris-clair); background: var(--blanc); color: var(--noir); cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primaire { background: var(--noir); color: var(--blanc); border-color: var(--noir); }
.btn-danger { background: var(--rouge); color: var(--blanc); border-color: var(--rouge); }
.btn-secondaire { background: var(--blanc); }
.btn-vert { background: var(--vert); color: var(--blanc); border-color: var(--vert); }
.btn-bloc { width: 100%; }
.btn-icone { min-width: 44px; padding: 8px; font-size: 20px; line-height: 1; }
.btn-petit { min-height: 44px; padding: 6px 10px; font-size: 14px; font-weight: 500; }
.input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #ccc; border-radius: 10px; background: var(--blanc); font-size: 16px; }
.input-nombre { font-size: 28px; text-align: center; }
label { display: block; font-size: 14px; color: var(--gris); margin: 10px 0 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.actions .btn { flex: 1; }
.groupe-titre { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--gris); margin: 16px 4px 6px; }
.liste-item { display: flex; align-items: center; gap: 10px; background: var(--blanc); border-radius: var(--radius); box-shadow: var(--ombre); padding: 12px; margin-bottom: 8px; cursor: pointer; min-height: 64px; }
.liste-item .corps { flex: 1; min-width: 0; }
.liste-item .titre { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.liste-item .detail { font-size: 13px; color: var(--gris); }
.badge { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--gris-clair); color: var(--noir); white-space: nowrap; }
.badge.vert { background: var(--vert-fond); color: var(--vert); }
.badge.rouge { background: var(--rouge-fond); color: var(--rouge); }
.badge.orange { background: var(--orange-fond); color: var(--orange); }
.badge.bleu { background: var(--bleu-fond); color: var(--bleu); }
.progression { height: 6px; border-radius: 3px; background: var(--gris-clair); overflow: hidden; margin-top: 6px; }
.progression > div { height: 100%; background: var(--vert); }
.compteur { font-size: 15px; font-weight: 600; }
.compteur.ok { color: var(--vert); }
/* lignes de réception */
.ligne { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; background: var(--blanc); border-radius: var(--radius); box-shadow: var(--ombre); padding: 10px; margin-bottom: 8px; border-left: 5px solid var(--gris-clair); }
.ligne.ok { border-left-color: var(--vert); background: #f7fdf9; }
.ligne.trop { border-left-color: var(--rouge); background: #fff8f7; }
.ligne.inconnue { border-left-color: var(--orange); background: #fffaf0; }
.ligne.flash { animation: flash .5s; }
@keyframes flash { 0% { background: #fff3b0; } 100% { background: inherit; } }
.ligne img, .ligne .picto { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; background: var(--fond); display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--gris); }
.ligne .infos { min-width: 0; }
.ligne .designation { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne .meta { font-size: 12px; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne .qte { text-align: right; }
.ligne .qte .grand { font-size: 26px; font-weight: 700; line-height: 1; }
.ligne .qte .grand.ok { color: var(--vert); }
.ligne .qte .grand.trop { color: var(--rouge); }
.ligne .qte .attendu { font-size: 13px; color: var(--gris); }
.ligne .tick { font-size: 22px; color: var(--vert); }
.ligne-actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.ligne-actions .btn { flex: 1; min-width: 44px; }
.ecart { grid-column: 1 / -1; font-size: 13px; color: var(--orange); }
.note-item { font-size: 14px; padding: 8px 0; border-top: 1px solid var(--gris-clair); }
.note-item .auteur { color: var(--gris); font-size: 12px; }
.note-item img { max-width: 100%; border-radius: 8px; margin-top: 6px; }
.barre-scan { position: sticky; bottom: 0; background: var(--blanc); border-top: 1px solid var(--gris-clair); padding: 10px 12px; display: flex; gap: 8px; z-index: 5; }
.barre-scan .btn { flex: 1; }
.cam-conteneur { position: fixed; inset: 0; background: #000; z-index: 20; display: flex; flex-direction: column; }
.cam-video { flex: 1; width: 100%; object-fit: cover; }
.cam-viseur { position: absolute; left: 10%; right: 10%; top: 35%; height: 26%; border: 3px solid #fff; border-radius: 12px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); pointer-events: none; }
.cam-fermer { position: absolute; top: 12px; right: 12px; z-index: 21; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 30; padding: 12px; }
.modale { background: var(--blanc); border-radius: 16px; padding: 18px; width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; }
.modale h2 { margin: 0 0 10px; font-size: 18px; }
.modale-texte { white-space: pre-line; }
.modale-actions { display: flex; gap: 8px; margin-top: 16px; }
.modale-actions .btn { flex: 1; }
.toast { position: fixed; left: 12px; right: 12px; bottom: 80px; background: var(--noir); color: var(--blanc); padding: 12px 14px; border-radius: 10px; text-align: center; opacity: 0; transform: translateY(10px); transition: .2s; z-index: 40; pointer-events: none; font-size: 15px; }
.toast.visible { opacity: 1; transform: none; }
.toast.ok { background: var(--vert); } .toast.erreur { background: var(--rouge); } .toast.attention { background: var(--orange); }
.tableau { width: 100%; border-collapse: collapse; }
.tableau td, .tableau th { padding: 6px 4px; border-bottom: 1px solid var(--gris-clair); font-size: 14px; vertical-align: middle; }
.tableau input { width: 100%; min-height: 40px; padding: 6px 8px; border: 1px solid #ccc; border-radius: 8px; }
.tableau .qte-col { width: 64px; } .tableau .ean-col { width: 132px; }
.defil-x { overflow-x: auto; }
.connexion { max-width: 420px; margin: 40px auto; }
.logo { text-align: center; font-weight: 700; font-size: 22px; margin-bottom: 18px; }
.muet { color: var(--gris); font-size: 14px; }
.centre { text-align: center; }
.vide { text-align: center; color: var(--gris); padding: 30px 10px; }
.select-boutique { display: flex; gap: 6px; flex-wrap: wrap; }
.choix { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.choix label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border: 1px solid var(--gris-clair); border-radius: 10px; margin: 0; color: var(--noir); font-size: 15px; }
.choix input[type=radio] { width: 22px; height: 22px; }
@media (min-width: 700px) { .ligne { grid-template-columns: 72px 1fr 120px; } .overlay { align-items: center; } }
