/* Clients B2B et stands en supermarché (views/clients.js, views/stands.js) — style iOS : listes en encart (base.css),
   fiche dans le panneau de droite (tasks.css), feuilles. Ici seulement ce qui est propre à ces deux écrans. */

/* Les feuilles ouvertes depuis la fiche d'un client (formulaires, PIN du gérant) passent devant le panneau. */

.cl-red { color: var(--red) !important; } .cl-green { color: var(--green) !important; }
.cl-off { opacity: .5; }

/* lignes façon Contacts : avatar plus grand, valeur à droite sur deux lignes */
.list > .item.cl-row { --sep-left: 68px; }
.cl-row > .av { width: 40px; height: 40px; font-size: 15px; }
.cl-val { flex: none; max-width: 50%; text-align: right; font-size: 17px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cl-val .tiny { margin-top: 1px; }
.cl-pv { max-width: 55%; }
.list > .item.cl-total { font-weight: 600; }
.cl-note { white-space: pre-wrap; font-size: 15px; }
.cl-strike { text-decoration: line-through; }

/* actions en liste (comme « Envoyer un message » dans Contacts) */
.list > .item.cl-act { color: var(--accent-text); }
.list > .item.cl-act.cl-danger { color: var(--red); }

/* en-tête de fiche (client, facture, relevé) */
.cl-hero { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 4px 8px 0; }
.cl-hero > .av { width: 76px; height: 76px; font-size: 28px; margin-bottom: 8px; }
.cl-hname { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.cl-big { font-family: var(--rounded); font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cl-foot .btn { flex: 1; }

/* feuilles : titres de section et notes au plus près de leur liste */
.cl-sheet .section-title { margin: 0 16px 6px; }
.cl-sheet .sect > .section-foot { margin-top: 6px; }
.cl-sheet .card > textarea { background: transparent; border-radius: 0; min-height: 84px; box-shadow: none !important; }
.cl-sub { margin-top: -6px; }
/* titre long (nom d'un stand, d'un client) : il rétrécit, les boutons de l'en-tête gardent leur place */
.modal.cl-sheet header { grid-template-columns: auto minmax(0, 1fr) auto; }
.modal.cl-sheet header h2 { max-width: none; }

/* champ en cellule : libellé à gauche, saisie alignée à droite */
.list > label.item.cl-field { color: var(--text); font-size: 17px; font-weight: 400; letter-spacing: -.02em; gap: 12px; }
.cl-field > span { flex: none; max-width: 48%; }
.cl-field > input, .cl-field > select { flex: 1; min-width: 0; width: auto; min-height: 28px; padding: 0; background-color: transparent; border-radius: 0; text-align: right; box-shadow: none !important; }

/* éditeur de facture */
.list > .item.cl-line { align-items: flex-start; }
.cl-line .cl-val, .cl-line > .btn { margin-top: 2px; }
.cl-lname { min-height: 28px; padding: 0; background-color: transparent; border-radius: 0; box-shadow: none !important; }
.cl-lnums { display: grid; grid-template-columns: repeat(3, minmax(0, 96px)); gap: 8px; margin-top: 6px; }
.cl-mini { display: flex; flex-direction: column; gap: 2px; font-size: 12px; font-weight: 400; color: var(--muted); min-width: 0; }
.cl-mini input { width: 100%; min-height: 32px; padding: 4px 8px; font-size: 15px; text-align: right; border-radius: 8px; }
.cl-sic { width: 24px; display: grid; place-items: center; color: var(--muted); flex: none; }
.cl-results { margin-top: 8px; }
.cl-results:empty { display: none; }

/* encaissement */
.cl-amt { padding: 8px 16px; }
.cl-amount { flex: 1; min-width: 0; min-height: 52px; padding: 0; font-family: var(--rounded); font-size: 34px; font-weight: 600; text-align: right; background-color: transparent; box-shadow: none !important; }
.cl-unit { font-family: var(--rounded); font-size: 22px; font-weight: 600; }
.cl-due { margin: 8px 4px 0; }
.cl-done { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 6px 0 2px; }
.cl-done > .itile { width: 56px; height: 56px; border-radius: 50%; margin-bottom: 6px; }
.cl-done > .itile svg.i { width: 30px; height: 30px; stroke-width: 2.4; }

/* balance âgée */
.cl-agebar { display: flex; gap: 2px; height: 6px; max-width: 220px; margin: 5px 0 3px; border-radius: 999px; overflow: hidden; background: var(--fill); }
.cl-agebar i { display: block; min-width: 3px; }
.cl-agebar.big { height: 10px; max-width: none; margin: 4px 0; }

/* ---------- stands ---------- */
.list > .item.st-row { align-items: center; }
.item input.st-qin { width: 84px; flex: none; text-align: right; }

/* relevé (plein écran) : une cellule par article, au stand · compté · repris · vendu */
.st-sheet > .inner { width: 100%; max-width: 760px; margin: 0 auto; padding-bottom: 24px; }
.list > .item.st-line { flex-direction: column; align-items: stretch; gap: 8px; transition: background .2s; }
.st-line.err { background: var(--red-soft); }
.st-q { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; align-items: end; }
.st-c { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.st-c > b { min-height: 40px; display: flex; align-items: center; font-family: var(--rounded); font-size: 20px; font-weight: 600; color: var(--text); }
.st-c > input { min-height: 40px; padding: 4px 6px; text-align: center; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.st-line.done .st-counted { box-shadow: inset 0 0 0 1.5px var(--green); }
.st-sold { align-items: flex-end; text-align: right; }
/* [Claude 2026-11-07] offline relevé: red until the server has the line, green once it has; inputs 44 px for the finger */
.st-line.pend { background: var(--red-soft); }
.st-state { min-height: 0; color: var(--muted); } .st-state:empty { display: none; }
.st-state.pending, .st-state.error { color: var(--red); font-weight: 600; } .st-state.confirmed { color: var(--green); }
.st-help { margin: 0 4px 6px; color: var(--text); font-weight: 600; }
.st-net { margin-bottom: 10px; }
.st-c > input { min-height: 44px; }
.st-sold > b { min-height: 0; justify-content: flex-end; }
.st-foot { display: flex; align-items: center; gap: 14px; padding: 10px 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); border-top: .5px solid var(--material-line); background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.st-total { font-family: var(--rounded); font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
@media (max-width: 400px) { .st-foot .btn.lg { padding: 10px 14px; } .st-c > input, .st-c > b { font-size: 18px; } }
/* [Claude 2026-11-07] « Fanées » in the relevé: « Au stand » under the name, then Je ramène · Fanées · Reste en rayon · Vendu. */
.st-at { margin-top: -4px; } .st-at b { color: var(--text); font-weight: 600; }
.st-w > input { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 35%, transparent); }
/* [Claude 2026-11-07] « Mes stands » (js/now/stand.js): one card per stand, its four steps in order, one verb per step. */
.ns-home { gap: 14px; }
.ns-stand { padding: 0; overflow: hidden; }
.ns-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 10px; }
.ns-head h3 { margin: 0; font-size: 19px; font-weight: 700; }
.ns-badge { flex: none; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--fill, rgba(120,120,128,.12)); color: var(--muted); }
.ns-badge.ok { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.ns-steps { list-style: none; margin: 0; padding: 0 0 6px; }
.ns-step { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 16px; border-top: .5px solid var(--line, rgba(60,60,67,.18)); }
.ns-step.cur { background: color-mix(in srgb, var(--blue) 10%, transparent); box-shadow: inset 3px 0 0 var(--blue); }
.ns-step.quiet { opacity: .62; }
.ns-dot { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--fill, rgba(120,120,128,.14)); color: var(--muted); }
.ns-step.cur .ns-dot { background: var(--blue); color: #fff; }
.ns-step.done .ns-dot { background: var(--green); color: #fff; }
.ns-txt { min-width: 0; }
.ns-lbl { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
.ns-lbl strong { font-size: 16px; }
.ns-step.done .ns-lbl .small { color: var(--green); font-weight: 600; }
.ns-step.cur .ns-lbl .small { color: var(--text); }
.ns-verb { flex: none; min-height: 44px; min-width: 88px; }
.ns-task.done .ellipsis { color: var(--muted); text-decoration: line-through; }
.ns-links { display: flex; flex-wrap: wrap; gap: 10px; }
.ns-links .btn { min-height: 44px; }
@media (max-width: 400px) { .ns-verb { min-width: 76px; padding-left: 12px; padding-right: 12px; } .ns-step { padding: 8px 12px; gap: 10px; } }
