/* La feuille d'encaissement (js/pay.js) : même aspect dans Vendre, Service, Clients et Atelier 3D.
   Gros boutons tactiles (tablette 800 px en portrait), le reste dû en grand, une liste groupée pour le détail. */
.pay { display: flex; flex-direction: column; gap: 14px; }
/* La feuille commune est posée dans une cellule de formSheet : on enlève la carte autour (les boutons ont leur fond). */
.fs-list:has(> .fs-cell > .fs-row > .pay) { background: transparent; box-shadow: none; border: 0; overflow: visible; }
.fs-cell:has(> .fs-row > .pay) { padding: 0 !important; border: 0; background: transparent; }
.fs-cell:has(> .fs-row > .pay)::after, .fs-cell:has(> .fs-row > .pay)::before { display: none; }
.fs-row.full:has(> .pay) { padding: 0; }
.pay-detail .fs-l { white-space: nowrap; }
.pay-due { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 2px 4px 0; }
.pay-l { color: var(--muted); font-size: 13px; }
.pay-big { font-family: var(--rounded); font-weight: 700; font-size: 38px; line-height: 1.1; letter-spacing: -.02em; }
.pay-alt { text-align: right; }
.pay-mid { font-family: var(--rounded); font-weight: 600; font-size: 20px; color: var(--muted); }

.pay-chs { display: flex; flex-direction: column; gap: 10px; }
.pay-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pay-row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; }
.pay-ch, .pay-ch2 { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; border-radius: 14px; background: var(--surface); color: var(--text);
  border: 2px solid transparent; font-size: 17px; font-weight: 600; transition: background .12s, border-color .12s; }
.pay-ch { flex-direction: column; gap: 6px; min-height: 92px; padding: 10px 8px; }
.pay-picker .pay-ch2 { background: var(--fill); }
.pay-ch2 { min-height: 54px; padding: 0 14px; font-weight: 500; color: var(--accent-text); }
.pay-ch.on, .pay-ch2.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--text); }
.pay-ch:active, .pay-ch2:active { background: var(--fill); }
.pay-chn { max-width: 100%; }
.pay-caret { color: var(--muted); font-size: 13px; }
.pay-logo { flex: none; width: 34px; height: 34px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--c); color: #fff;
  font-family: var(--rounded); font-weight: 700; font-size: 13px; letter-spacing: -.02em; }
.pay-ch .pay-logo { width: 40px; height: 40px; border-radius: 11px; font-size: 15px; }
.pay-ch2 .pay-logo, .pay-tenders .pay-logo { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; }
.pay-logo .i { width: 20px; height: 20px; }

.pay-detail .fs-row { min-height: 56px; }
.pay-amt { flex: 1 1 auto; min-width: 0; min-height: 48px; background: transparent; padding: 0; text-align: right; font-family: var(--rounded); font-weight: 700; font-size: 28px; box-shadow: none !important; }
.pay-unit { color: var(--muted); font-weight: 600; font-size: 17px; }
.pay-ccy { display: inline-flex; flex: none; background: var(--fill); border-radius: 10px; padding: 2px; }
.pay-ccy button { min-width: 48px; height: 40px; padding: 0 12px; border-radius: 8px; font-weight: 600; font-size: 16px; color: var(--muted); }
.pay-ccy button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.pay-ccy.wide button { min-width: 0; font-size: 14px; }
.pay-chips { gap: 8px; }
.pay-chips .chip { min-height: 40px; padding: 0 14px; font-size: 15px; }
.pay-chips .chip.on { background: var(--accent-fill); color: #fff; } /* [Claude 2026-11-23] design pass: white text on --accent-fill (4.5:1) */
.pay-change .fs-l, .pay-change .pay-strong { color: var(--green); }
.pay-strong { font-family: var(--rounded); font-weight: 700; font-size: 22px; }
.pay-sum .pay-strong { color: var(--orange); }
.pay-picked .fs-row { gap: 8px; color: var(--green); }
.pay-picked .grow { color: var(--text); }
.pay-tenders .fs-row { gap: 10px; min-height: 48px; }
/* [GPT 2026-10-26] All active methods are visible, with a dedicated split-payment action. */
.pay-accounts{grid-template-columns:repeat(auto-fit,minmax(104px,1fr));gap:8px}.pay-accounts .pay-ch{min-height:72px;font-size:13px;gap:5px}.pay-accounts .pay-logo{width:30px;height:30px;font-size:12px}.pay-add{color:var(--accent-text);justify-content:center;gap:8px;font-weight:600;min-height:52px}.pay-picked>.grow{padding:8px 0}.pay-picked .small{margin-top:6px}.pay-detail strong.small{text-align:right;overflow-wrap:anywhere}

@media (max-width: 640px) {
  .pay-big { font-size: 32px; }
  .pay-ch { min-height: 80px; font-size: 15px; }
  .pay-amt { font-size: 24px; }
}

/* Finance → compte : « Partagé avec » = les logos des autres sociétés, à toucher. */
.fin-logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; padding: 4px 0; }
.fin-logo { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 12px; border: 2px solid transparent; background: var(--fill); color: var(--muted); min-width: 0; }
.fin-logo.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--text); }
.fin-logo .small { max-width: 100%; }
.item.fin-lead .pay-logo { width: 30px; height: 30px; border-radius: 8px; font-size: 12px; }
/* [Claude 2026-11-15] Total · Payé · Reste: what was paid shows apart, in green, once a first payment is in. */
.pay-trio{display:flex;gap:18px;width:100%;padding-bottom:8px;margin-bottom:6px;border-bottom:1px solid var(--line)}
.pay-trio .pay-paid .pay-mid{color:var(--green)}
.pay-due{flex-wrap:wrap}

/* [Claude 2026-11-19] one big live figure: still missing (orange), exact (green), to give back (blue) — dollars and francs */
.pay-live{width:100%;padding:10px 12px;border-radius:16px;background:var(--fill,rgba(120,120,128,.1))}.pay-live .pay-big{font-size:42px}.pay-big2{font-family:var(--rounded);font-weight:650;font-size:24px;line-height:1.15;color:var(--muted)}
.pay-live.short{background:color-mix(in srgb,var(--orange) 14%,transparent)}.pay-live.short .pay-big{color:var(--orange)}.pay-live.even{background:color-mix(in srgb,var(--green) 14%,transparent)}.pay-live.even .pay-big{color:var(--green)}
.pay-live.back{background:color-mix(in srgb,var(--blue,#0a84ff) 14%,transparent)}.pay-live.back .pay-big{color:var(--blue,#0a84ff)}
@media (max-height:700px){.pay-live .pay-big{font-size:32px}.pay-big2{font-size:19px}}
/* [Claude 2026-11-20] change mix: dollars in $5 notes + francs, one tap each */
.pay-mix{flex-direction:column;align-items:stretch;gap:6px}
.pay-mix .pay-chips .chip{min-height:44px;font-weight:600}
.pay-mixstep{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pay-mixstep .btn{min-height:44px;min-width:64px;font-weight:700}
.pay-mixstep .pay-strong{flex:1 1 auto;text-align:center}

/* [Claude 2026-11-23] UX pass on the till: « Montant reçu » was cut to « Montant re… » by the amount field (1280 × 720) and to
     « Montan » on the 360 px handheld; « Orange Money » and « Carte bancaire » ended in « … » in the three-column grid. The label keeps
     its words (on a narrow screen it is a small caption above the amount, which then has the whole row: « 1 950 000 » FC fits) and a
     payment name may take two lines. */
.pay-detail .pay-amtrow > .fs-l { flex: none; }
.pay-chn.ellipsis { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; line-height: 1.15; overflow-wrap: anywhere; }
@media (max-width: 480px) {
     .pay-detail .pay-amtrow { flex-wrap: wrap; row-gap: 0; }
     .pay-detail .pay-amtrow > .pay-amt { flex: 1 1 0; }
     .pay-detail .pay-amtrow > .fs-l { flex: 1 1 100%; padding-top: 6px; font-size: 13px; color: var(--muted); }
     .pay-trio { gap: 12px; }
     .pay-trio .pay-mid { font-size: 17px; }
}
