/* ============================================================
   YVO Épargne — couche « premium » : application mobile Android
   (chargée après styles.css, elle affine et surcharge)
   ============================================================ */

:root {
  --gold-2: #e3c37e;
  --emerald-1: #0e5c45;
  --emerald-2: #093a2b;
  --emerald-3: #062a1f;
  --lift: 0 2px 4px rgba(10, 40, 30, 0.05), 0 14px 32px -18px rgba(10, 40, 30, 0.35);
  --lift-lg: 0 4px 10px rgba(10, 40, 30, 0.08), 0 26px 50px -22px rgba(10, 40, 30, 0.5);
  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

html { -webkit-text-size-adjust: 100%; }
body { font-variant-numeric: tabular-nums; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
button, a, .prow, .crow { touch-action: manipulation; }
input, select, textarea { font-size: 16px; }
.panel, .kpi, .setting-card { border-radius: var(--radius); box-shadow: var(--lift); }

.only-mobile { display: none; }
.only-desktop { display: block; }
.small { font-size: 11px; }
.grow { flex: 1; }
.scroll-x { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x .chip { flex: none; }
.sub-red, .sub-amber { font-weight: 650; }
.sub-red { color: var(--red); }
.sub-amber { color: var(--amber); }

/* Statuts : partiel (orange), avance (bleu), couvert (bleu clair) */
.cal-day.partiel { background: var(--amber-bg); border-color: #ecd7a8; color: #7d4c08; }
.cal-day.avance { background: #dfeaf6; border-color: #b8d0e8; color: #1f4d78; }
.cal-day.covered { background: #eef4fa; border: 1px dashed #b8d0e8; color: #3d6a93; }
i.lg.partiel { background: var(--amber-bg); border-color: #ecd7a8; }
i.lg.avance { background: #dfeaf6; border-color: #b8d0e8; }
i.lg.covered { background: #eef4fa; border: 1px dashed #b8d0e8; }

/* Boutons additionnels */
.btn.wa { background: #1fa855; color: #fff; border-color: #1fa855; }
.btn.full { width: 100%; }
.contact-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 44px; min-width: 44px; padding: 0 14px; border-radius: 14px;
  font-weight: 650; font-size: 13px; border: 1px solid var(--line-2); background: var(--surface);
}
.contact-btn.call { color: var(--brand); }
.contact-btn.wa { color: #137a3d; background: #e6f6ec; border-color: #bfe5cd; }
.relance-contact .contact-btn { height: 40px; min-width: 40px; padding: 0 10px; border-radius: 12px; }

/* ---------- Bandeaux de protection ---------- */
.guards { display: grid; gap: 10px; margin-bottom: 16px; }
.guard {
  display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--lift);
}
.guard > span { flex: 1; min-width: 0; display: grid; gap: 2px; }
.guard strong { font-size: 13.5px; }
.guard em { font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.guard.red { background: #fdeceb; border-color: #f0c0bb; color: var(--red); }
.guard.red em { color: #8c3029; }
.guard.amber { background: #fdf4e0; border-color: #ecd7a8; color: var(--amber); }
.guard.amber em { color: #7d4c08; }
.guard.blue { background: #eaf2fa; border-color: #c4d9ec; color: var(--blue); }
.guard.blue em { color: #2c5578; }

/* ---------- Actions rapides ---------- */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.qa {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--lift); font-weight: 650; font-size: 12px; color: var(--ink-2);
  transition: transform 0.15s var(--ease);
}
.qa:active { transform: scale(0.96); }
.qa-ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--brand-3); color: var(--brand); }
.qa-ic.brand { background: linear-gradient(145deg, var(--emerald-1), var(--emerald-3)); color: #fff; }
.qa-ic.out { background: var(--red-bg); color: var(--red); }

/* ---------- Relances ---------- */
.relance-list { display: grid; }
.relance { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 12px 4px; border-top: 1px solid var(--line); }
.relance:first-child { border-top: 0; }
.relance-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.relance-main span { display: grid; min-width: 0; }
.relance-main strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.relance-main em { font-style: normal; font-size: 11px; color: var(--muted); }
.relance-side { display: grid; justify-items: end; gap: 3px; }
.relance-side strong { font-size: 13.5px; }
.relance-contact { display: flex; gap: 6px; }

/* ---------- Pointage ---------- */
.date-nav { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.date-nav-main { flex: 1; position: relative; display: grid; text-align: center; padding: 6px 4px; border-radius: 14px; cursor: pointer; }
.date-nav-main strong { font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em; }
.date-nav-main span { font-size: 11.5px; color: var(--muted); }
.date-nav-main input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.date-nav .icon-btn { width: 44px; height: 44px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }

.day-summary {
  padding: 18px; border-radius: 22px; margin-bottom: 14px; color: #eaf5ef;
  background: radial-gradient(circle at 90% -10%, rgba(227, 195, 126, 0.28), transparent 50%), linear-gradient(150deg, var(--emerald-1), var(--emerald-3));
  box-shadow: var(--lift-lg);
}
.ds-top { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.ds-top span { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #a9cdbd; }
.ds-top strong { font-size: 25px; font-family: var(--serif); letter-spacing: -0.01em; }
.ds-right { text-align: right; }
.ds-right strong { font-size: 18px; color: #d8e8df; }
.day-summary .progress { background: rgba(255, 255, 255, 0.16); height: 9px; }
.ds-foot { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: #bcd8cb; }
.ds-foot .amber { color: var(--gold-2); font-weight: 650; }
.ds-foot .green { color: #8fe0b7; font-weight: 650; }

.pointage-page .search-box, .act-page .search-box { margin-bottom: 10px; }
.seg-tabs { display: flex; gap: 4px; padding: 4px; margin: 4px 0 14px; background: var(--bg-soft); border-radius: 14px; }
.seg-tabs button { flex: 1; height: 38px; border: 0; background: transparent; border-radius: 11px; font-weight: 650; font-size: 12.5px; color: var(--ink-2); }
.seg-tabs button em { font-style: normal; font-size: 11px; opacity: 0.7; margin-left: 3px; }
.seg-tabs button.on { background: var(--surface); color: var(--brand); box-shadow: 0 2px 8px rgba(10, 40, 30, 0.12); }

.prow-group { margin-bottom: 16px; }
.prow-group-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 8px; }
.prow-group-head h2 { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.prow-group-head span { font-size: 11.5px; color: var(--muted); }
.prow-list { display: grid; gap: 8px; }
.prow {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; min-height: 68px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--lift);
  cursor: pointer; transition: transform 0.12s var(--ease), border-color 0.15s;
}
.prow:active { transform: scale(0.985); }
.prow.is-risk { border-left: 4px solid var(--red); }
.prow-id { flex: 1; min-width: 0; display: grid; gap: 2px; }
.prow-id strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow-id span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow-amt { text-align: right; display: grid; gap: 1px; }
.prow-amt strong { font-size: 15px; }
.prow-amt span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.prow-amt.green strong, .prow-amt.green span { color: var(--green); }
.prow-amt.amber strong, .prow-amt.amber span { color: var(--amber); }
.prow-amt.blue strong, .prow-amt.blue span { color: var(--blue); }
.prow-amt.red strong, .prow-amt.red span { color: var(--red); }
.prow-quick, .prow-done {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 0;
}
.prow-quick { background: var(--brand-3); color: var(--brand); border: 2px solid var(--brand-4); }
.prow-quick:active { background: var(--brand); color: #fff; }
.prow-done { background: var(--brand); color: #fff; }
.prow.st-complet, .prow.st-avance { background: #f3faf6; border-color: #cfe6da; }
.prow.st-partiel { background: #fffaf0; border-color: #efdcb0; }
.prow.st-absent { background: #fdf4f2; border-color: #f0cdc8; }
.prow.st-absent .prow-quick { background: var(--surface); }

.close-day-cta {
  display: flex; align-items: center; gap: 13px; padding: 15px 16px; margin-top: 8px; border-radius: 18px;
  background: var(--surface); border: 1px dashed var(--line-2); color: var(--brand);
}
.close-day-cta > span { flex: 1; display: grid; }
.close-day-cta em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.close-day-cta.done { border-style: solid; border-color: #bfe1cf; background: var(--green-bg); }

/* ---------- Clients ---------- */
.crow-list { display: grid; gap: 8px; }
.crow {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; min-height: 68px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--lift);
  transition: transform 0.12s var(--ease);
}
.crow:active { transform: scale(0.985); }
.crow.inactive { opacity: 0.6; }
.crow.late-risque { border-left: 4px solid var(--red); }
.crow.late-attention { border-left: 4px solid var(--amber); }
.crow.late-retard { border-left: 4px solid #e2b866; }
.crow-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.crow-main strong { font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.crow-main em { font-style: normal; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow-late { font-weight: 650; }
.crow-late.red { color: var(--red) !important; }
.crow-late.amber { color: var(--amber) !important; }
.crow-side { text-align: right; display: grid; }
.crow-side strong { font-size: 14.5px; color: var(--green); }
.crow-side em { font-style: normal; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.crow-chev { color: var(--line-2); }
.pill-mini { font-style: normal; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--blue-bg); color: var(--blue); }
.pill-mini.gray { background: var(--bg-soft); color: var(--muted); }
.group-head { position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 10px 2px; }
.mini-kpi.warn strong { color: var(--amber); }
.mini-kpi.bad strong { color: var(--red); }
.fab { display: none; }

.profile-quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.profile-quick .btn { min-width: 150px; }
.risk-line { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border-radius: 14px; font-size: 12.5px; margin: 10px 0; }
.risk-line.red { background: var(--red-bg); color: #8c3029; }
.risk-line.amber { background: var(--amber-bg); color: #7d4c08; }

/* ---------- Cartes virtuelles ---------- */
.vcards { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 18px; margin: 4px -2px 0; scrollbar-width: none; }
.vcards::-webkit-scrollbar { display: none; }
.vcard {
  position: relative; flex: none; width: min(340px, 84vw); aspect-ratio: 1.586; scroll-snap-align: center;
  display: flex; flex-direction: column; justify-content: space-between; padding: 16px 18px; border-radius: 22px;
  color: #fff; overflow: hidden; box-shadow: var(--lift-lg); isolation: isolate; transition: transform 0.2s var(--ease);
}
.vcard:active { transform: scale(0.98); }
.vcard.v0 { background: radial-gradient(circle at 85% 0%, rgba(227, 195, 126, 0.45), transparent 55%), linear-gradient(145deg, #0e6a4f, #052a1f); }
.vcard.v1 { background: radial-gradient(circle at 85% 0%, rgba(160, 200, 255, 0.35), transparent 55%), linear-gradient(145deg, #1f4d78, #0a1f33); }
.vcard.v2 { background: radial-gradient(circle at 85% 0%, rgba(255, 190, 150, 0.35), transparent 55%), linear-gradient(145deg, #7a3b1d, #2a1208); }
.vcard.v3 { background: radial-gradient(circle at 85% 0%, rgba(210, 170, 255, 0.35), transparent 55%), linear-gradient(145deg, #4b2c7a, #170d2b); }
.vcard.closed { filter: grayscale(0.85) brightness(0.9); }
.vc-shine { position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.14) 48%, transparent 60%); }
.vc-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.95; }
.vc-brand { font-weight: 700; font-family: var(--serif); letter-spacing: 0.06em; font-size: 13px; text-transform: none; }
.vc-state { padding: 3px 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.18); font-size: 9.5px; font-weight: 700; }
.vc-state.late { background: rgba(255, 120, 100, 0.85); }
.vc-chip { width: 38px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, #f3dca2, #b98a3c); display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 5px; opacity: 0.95; }
.vc-chip i { background: rgba(80, 50, 10, 0.25); border-radius: 1px; }
.vc-number { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 17px; letter-spacing: 0.14em; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.vc-amount { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.vc-amount span { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75; }
.vc-amount strong { font-size: 21px; font-family: var(--serif); }
.vc-bar { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.vc-bar span { display: block; height: 100%; background: linear-gradient(90deg, #f3dca2, #fff); border-radius: 99px; }
.vc-foot { display: grid; grid-template-columns: 1.6fr 1.1fr 0.7fr 0.7fr; gap: 8px; }
.vc-foot span { display: block; font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.65; }
.vc-foot strong { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.vc-label { position: absolute; right: 16px; bottom: 9px; font-size: 9px; letter-spacing: 0.08em; opacity: 0; }

/* ---------- Activité / fil ---------- */
.feed-day h3 { font-size: 13px; margin: 18px 4px 8px; text-transform: capitalize; }
.feed-day h3 span { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 11.5px; }
.feed { display: grid; }
.feed.panel { padding: 4px 14px; }
.feed-item, .trash-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.feed-item:first-child, .trash-item:first-child { border-top: 0; }
.feed-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--bg-soft); color: var(--ink-2); }
.feed-ic.green { background: var(--green-bg); color: var(--green); }
.feed-ic.amber { background: var(--amber-bg); color: var(--amber); }
.feed-ic.red { background: var(--red-bg); color: var(--red); }
.feed-ic.blue { background: var(--blue-bg); color: var(--blue); }
.feed-main { flex: 1; min-width: 0; }
.feed-text { font-size: 13.5px; line-height: 1.35; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 4px; font-size: 11px; color: var(--muted); margin-top: 3px; }
.feed-meta a { color: var(--brand); font-weight: 600; }
.feed-amt { font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.feed-amt.in { color: var(--green); }
.feed-amt.out { color: var(--red); }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.filter-row .select-inline { width: 100%; }
.filter-row select { width: 100%; }
.trash-item .btn { align-self: center; }
.trash-item .icon-btn { align-self: center; }

/* ---------- Risques / clôture ---------- */
.cover-card { padding: 18px; border-radius: 22px; margin-bottom: 14px; color: #fff; box-shadow: var(--lift-lg); }
.cover-card.ok { background: linear-gradient(150deg, var(--emerald-1), var(--emerald-3)); }
.cover-card.bad { background: linear-gradient(150deg, #a63c33, #5a1612); }
.cover-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.cover-head > div { display: grid; gap: 2px; }
.cover-head span { font-size: 12px; opacity: 0.85; }
.cover-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cover-grid div { background: rgba(255, 255, 255, 0.12); border-radius: 14px; padding: 10px 12px; display: grid; gap: 3px; }
.cover-grid span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.8; }
.cover-grid strong { font-size: 14px; }
.cover-grid .green, .cover-grid .red { color: #fff; }
.reliab-list { display: grid; gap: 10px; }
.reliab { display: grid; grid-template-columns: 1fr 1.2fr 44px; align-items: center; gap: 12px; font-size: 13px; }
.reliab-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.reliab strong { text-align: right; }
.inline-form { display: flex; gap: 12px; align-items: flex-end; }
.inline-form .field { flex: 1; }

.cloture-lines { display: grid; gap: 8px; margin-bottom: 16px; }
.cloture-lines > div { display: flex; justify-content: space-between; padding: 10px 14px; background: var(--surface-2); border-radius: 12px; font-size: 13.5px; }
.cloture-lines .total { background: var(--brand-3); font-weight: 700; color: var(--brand); font-size: 15px; }
.big-field .input-suffix input { font-size: 28px; font-weight: 700; height: 62px; }
.ecart-box { margin: 14px 0; padding: 14px 16px; border-radius: 16px; background: var(--bg-soft); display: grid; gap: 2px; }
.ecart-box span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.ecart-box strong { font-size: 24px; }
.ecart-box em { font-style: normal; font-size: 12px; color: var(--muted); }
.ecart-box.ok { background: var(--green-bg); } .ecart-box.ok strong { color: var(--green); }
.ecart-box.neg { background: var(--red-bg); } .ecart-box.neg strong { color: var(--red); }
.ecart-box.pos { background: var(--amber-bg); } .ecart-box.pos strong { color: var(--amber); }
.cloture-panel form .field { margin-bottom: 12px; }

/* ---------- Menu Plus ---------- */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 22px; color: #fff; margin-bottom: 12px; box-shadow: var(--lift-lg);
  background: radial-gradient(circle at 90% -20%, rgba(227, 195, 126, 0.3), transparent 55%), linear-gradient(150deg, var(--emerald-1), var(--emerald-3)); }
.me-card > div { display: grid; }
.me-card strong { font-family: var(--serif); font-size: 20px; }
.me-card span { font-size: 12px; opacity: 0.8; }
.me-card .brand-mark { width: 52px; height: 52px; font-size: 20px; }
.safe-card { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-radius: 18px; margin-bottom: 14px; border: 1px solid; }
.safe-card.ok { background: var(--green-bg); border-color: #bfe1cf; color: var(--green); }
.safe-card.warn { background: var(--amber-bg); border-color: #ecd7a8; color: var(--amber); }
.safe-card > span { flex: 1; display: grid; }
.safe-card em { font-style: normal; font-size: 11.5px; opacity: 0.85; }
.menu-list { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--lift); overflow: hidden; margin-bottom: 14px; }
.menu-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; min-height: 64px; }
.menu-item:first-child { border-top: 0; }
.menu-item:active { background: var(--brand-3); }
.menu-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-3); color: var(--brand); flex: none; }
.menu-text { flex: 1; display: grid; gap: 1px; }
.menu-text strong { font-size: 15px; }
.menu-text em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.menu-chev { color: var(--line-2); }
.menu-count { font-style: normal; font-size: 11px; font-weight: 700; background: var(--red); color: #fff; border-radius: 99px; padding: 2px 8px; }
.version-line { text-align: center; color: var(--muted); font-size: 11px; padding: 6px 0 12px; }

/* ---------- Paramètres : santé des données ---------- */
.health-list { display: grid; gap: 8px; margin-bottom: 14px; }
.health { display: flex; gap: 11px; align-items: center; padding: 11px 13px; border-radius: 14px; }
.health > span { display: grid; }
.health em { font-style: normal; font-size: 11.5px; opacity: 0.85; }
.health.ok { background: var(--green-bg); color: var(--green); }
.health.warn { background: var(--amber-bg); color: var(--amber); }
.sub-h { font-size: 13px; margin: 16px 0 8px; }
.snap-list { display: grid; gap: 8px; margin-bottom: 12px; }
.snap { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; }
.snap > div { display: grid; min-width: 0; }
.snap strong { font-size: 13px; }
.snap span { font-size: 11px; color: var(--muted); }
.welcome-import { margin-top: 12px; }

/* ---------- Feuille d'encaissement ---------- */
.pay-card { padding: 14px; border: 1px solid var(--line); border-radius: 18px; margin-bottom: 12px; background: var(--surface-2); }
.pay-card-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 12.5px; }
.pay-card-head span { color: var(--muted); }
.pay-already { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-bottom: 8px; color: var(--ink-2); }
.pay-input { display: flex; align-items: center; border: 2px solid var(--brand-4); background: #fff; border-radius: 16px; overflow: hidden; }
.pay-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(14, 92, 69, 0.12); }
.pay-input input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; outline: 0; border-radius: 0 !important; font-size: 30px; font-weight: 700; height: 64px; padding: 0 14px; background: transparent; }
.pay-input span { padding: 0 16px; color: var(--muted); font-weight: 650; }
.pay-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pay-chips .chip { height: 38px; font-size: 12.5px; padding: 0 13px; }
.status-preview { margin: 10px 0 4px; font-size: 13px; min-height: 26px; }
.day-history { margin: 8px 0; padding: 10px 12px; background: var(--surface-2); border-radius: 12px; font-size: 12px; }
.day-history > span { display: block; color: var(--muted); margin-bottom: 4px; }
.day-history div { display: flex; justify-content: space-between; }
.day-history em { font-style: normal; color: var(--muted); }
.paid-ok { display: grid; justify-items: center; gap: 4px; padding: 10px 0 16px; text-align: center; }
.paid-ic { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: var(--green-bg); color: var(--green); animation: pop 0.4s var(--ease); }
.paid-ok strong { font-size: 32px; font-family: var(--serif); }
.paid-ok span:last-child { color: var(--muted); }
.paid-lines { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.paid-lines div { background: var(--surface-2); border-radius: 14px; padding: 12px; display: grid; gap: 2px; text-align: center; }
.paid-lines span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 70% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }

.sheet-handle { display: none; }

/* ============================================================
   Mode application (téléphone / tablette) — style Android
   ============================================================ */

@media (max-width: 980px) {
  body { background: var(--bg); padding-top: env(safe-area-inset-top); }

  .only-mobile { display: block; }
  .only-desktop { display: none; }

  /* Barre d'application */
  .mobile-bar {
    top: 0; padding: calc(10px + env(safe-area-inset-top)) 12px 12px 14px; gap: 10px; justify-content: flex-start;
    background: linear-gradient(160deg, var(--emerald-1), var(--emerald-3)); color: #fff; border-bottom: 0;
    border-radius: 0 0 24px 24px; box-shadow: 0 10px 28px -14px rgba(5, 40, 28, 0.7);
    backdrop-filter: none; -webkit-backdrop-filter: none; margin-top: calc(-1 * env(safe-area-inset-top));
  }
  .mb-brand { width: 38px; height: 38px; border-radius: 12px; font-size: 21px; }
  .mb-back { color: #fff; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); display: grid; place-items: center; }
  .mb-title { flex: 1; min-width: 0; display: grid; line-height: 1.15; }
  .mb-title strong { font-size: 18px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mb-title small { font-size: 11.5px; color: #a9cdbd; text-transform: capitalize; }
  .mb-title small:empty { display: none; }
  .mobile-actions .icon-btn { color: #fff; width: 42px; height: 42px; border-radius: 50%; }
  .mobile-actions .icon-btn:active { background: rgba(255, 255, 255, 0.18); }
  .mobile-bar .icon-btn { display: grid; place-items: center; background: transparent; border: 0; box-shadow: none; }
  .mobile-bar .icon-btn .ic { color: #fff; }
  .mobile-bar .mb-back { background: rgba(255, 255, 255, 0.14); }

  .view { padding: 18px 14px calc(104px + env(safe-area-inset-bottom)); }

  /* Les gros titres sont portés par la barre d'application */
  .page-head { margin-bottom: 14px; }
  body:not([data-route="tableau"]) .page-head-main { display: none; }
  body:not([data-route="tableau"]) .page-head { justify-content: flex-end; }
  body[data-route="tableau"] .page-head h1 { font-size: 24px; }
  body[data-route="tableau"] .page-head .page-actions { display: none; }
  body[data-route="tableau"] .page-sub { display: none; }
  body[data-route="pointage"] .page-head, body[data-route="plus"] .page-head,
  body[data-route="activite"] .page-head .page-actions .btn, body[data-route="client"] .page-head { display: none; }
  .back-link { display: none; }

  /* Barre de navigation basse (Material 3) */
  .bottom-nav {
    padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); gap: 2px;
    background: rgba(255, 253, 249, 0.98); border-top: 1px solid var(--line);
    box-shadow: 0 -12px 30px -16px rgba(10, 40, 30, 0.35);
    border-radius: 22px 22px 0 0;
  }
  .bottom-link { background: transparent !important; gap: 4px; font-size: 11px; padding: 2px 0; color: var(--muted); }
  .bl-pill { position: relative; width: 62px; height: 32px; border-radius: 16px; display: grid; place-items: center; transition: background 0.25s var(--ease); }
  .bottom-link.active { color: var(--brand); }
  .bottom-link.active .bl-pill { background: var(--brand-4); color: var(--emerald-2); }
  .bl-label { font-weight: 600; letter-spacing: 0.01em; }
  .bottom-link.active .bl-label { font-weight: 750; }
  .bl-badge {
    position: absolute; top: -3px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
    background: var(--red); color: #fff; font-style: normal; font-size: 10px; font-weight: 700; display: grid; place-items: center;
    border: 2px solid #fffdf9;
  }

  /* Bouton flottant */
  .fab {
    display: grid; place-items: center; position: fixed; right: 18px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 38;
    width: 58px; height: 58px; border-radius: 20px; border: 0; color: #fff;
    background: linear-gradient(145deg, var(--emerald-1), var(--emerald-3)); box-shadow: 0 12px 28px -8px rgba(5, 40, 28, 0.7);
  }
  .fab:active { transform: scale(0.94); }

  .toast-root { bottom: calc(96px + env(safe-area-inset-bottom)); }

  /* Feuilles basses */
  .modal-backdrop { padding: 0; align-items: flex-end; background: rgba(6, 30, 22, 0.55); }
  .modal {
    width: 100%; max-width: none !important; max-height: 92vh; border-radius: 28px 28px 0 0;
    animation: sheetUp 0.3s var(--ease); box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, 0.5);
  }
  .sheet-handle { display: block; width: 42px; height: 5px; border-radius: 99px; background: var(--line-2); margin: 10px auto 0; flex: none; }
  .modal-head { padding: 12px 20px 12px; border-bottom: 0; }
  .modal-head h2 { font-size: 22px; }
  .modal-sub { font-size: 12px; }
  .modal-body { padding: 4px 20px 16px; }
  .modal-foot {
    padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); flex-wrap: nowrap; background: var(--surface);
    box-shadow: 0 -10px 24px -16px rgba(10, 40, 30, 0.3); border-top: 1px solid var(--line);
  }
  .modal-foot .btn { flex: 1; height: 52px; border-radius: 16px; font-size: 15px; white-space: nowrap; }
  .pay-sheet .modal-foot .btn.primary { flex: 2; }
  .paid-sheet .modal-foot { flex-direction: column; }
  .paid-sheet .modal-foot .btn { width: 100%; }
  @keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

  /* Tailles tactiles */
  .btn { min-height: 44px; }
  .icon-btn { min-width: 40px; min-height: 40px; }
  .chip { height: 36px; font-size: 12.5px; padding: 0 14px; }
  .chip span { font-size: 11px; }
  .search-box { height: 48px; border-radius: 16px; }
  .field input, .field select, .field textarea { min-height: 48px; border-radius: 14px; }
  .select-inline select { min-height: 44px; }
  .toolbar { flex-wrap: wrap; }
  .toolbar .select-inline { width: 100%; }
  .toolbar .select-inline select { width: 100%; }

  .kpi-grid .kpi.primary {
    background: radial-gradient(circle at 90% -10%, rgba(227, 195, 126, 0.3), transparent 50%), linear-gradient(150deg, var(--emerald-1), var(--emerald-3));
  }
  .calendar { border-radius: 18px; }
  .cal-day { min-height: 48px; border-radius: 10px; }
  .cal-day .damt { display: block; font-size: 8px; }
  .profile { border-radius: 22px; }
  .cp-actions { flex-wrap: wrap; }
  .cp-actions .btn { min-height: 44px; }

  .client-page .profile-actions { gap: 6px; flex-wrap: nowrap; }
  .client-page .profile-actions .btn { min-height: 42px; padding: 0 8px; font-size: 12.5px; white-space: nowrap; }
  .client-page .profile-actions .icon-btn { flex: none; }
  .client-page .profile-quick .btn.lg { height: 52px; }
  .clients-page .mini-kpis .mini-kpi:nth-child(n+3) { display: none; }

  .cover-grid { grid-template-columns: 1fr; }
  .cover-grid div { flex-direction: row; display: flex; justify-content: space-between; align-items: center; }
  .filter-row { grid-template-columns: 1fr; }
  .relance { grid-template-columns: 1fr auto; }
  .relance-contact { grid-column: 1 / -1; justify-content: flex-end; }
  .quick-actions { gap: 8px; }
}

@media (max-width: 400px) {
  .vc-number { font-size: 15px; }
  .ds-top strong { font-size: 22px; }
  .quick-actions .qa-label { font-size: 11px; }
}

@media (min-width: 981px) {
  .pointage-page, .plus-page { max-width: 760px; margin: 0 auto; }
  .prow-list { grid-template-columns: 1fr 1fr; }
  .crow-list { grid-template-columns: 1fr 1fr; }
  .vcards { flex-wrap: wrap; overflow: visible; }
  .modal.pay-sheet { max-width: 480px; }
  .fab { display: none; }
}

@media print {
  .mobile-bar, .bottom-nav, .fab, .sheet-handle { display: none !important; }
}

/* ===== v2.1 : commissions, reçus, alertes, synchronisation ===== */
.block { display: block; }
.comm-switch { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 16px 18px; margin-bottom: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--lift); }
.comm-switch.on { background: linear-gradient(135deg, var(--emerald-1), var(--emerald-3)); color: #fff; border-color: transparent; }
.comm-switch strong { display: block; font-size: 15px; }
.comm-switch span { font-size: 12.5px; opacity: .8; }
.switch { flex: none; width: 54px; height: 32px; border-radius: 99px; border: 0; background: #cfc8b6; position: relative; cursor: pointer; transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch.on { background: var(--gold-2); }
.switch.on i { transform: translateX(22px); }
.bareme-list, .template-list, .alert-list { display: grid; gap: 12px; }
.bareme { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--surface-2); }
.bareme.is-default { border-color: var(--green); background: var(--green-bg); }
.bareme-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.bareme-head .muted { margin-left: auto; font-size: 12px; }
.bareme-rules { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.bareme-rules li.off { opacity: .45; text-decoration: line-through; }
.bareme-rules li { display: flex; gap: 6px; align-items: center; }
.bareme-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.template { text-align: left; border: 1px dashed var(--line-2); border-radius: 14px; background: var(--surface); padding: 12px 14px; cursor: pointer; }
.template strong { display: block; font-size: 14px; }
.template span { font-size: 12.5px; color: var(--muted); }
.rules { display: grid; gap: 12px; margin-bottom: 12px; }
.rule { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--surface-2); }
.rule-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rule-top .checkline { margin-left: auto; display: flex; gap: 6px; align-items: center; font-size: 13px; }
.comm-sim { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--brand-3); }
.comm-sim h3 { margin: 0 0 8px; font-size: 14px; }
.comm-sim-out { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.comm-sim-out div { background: var(--surface); border-radius: 12px; padding: 10px; }
.comm-sim-out span { display: block; font-size: 11.5px; color: var(--muted); }
.comm-empty { text-align: center; padding: 20px; color: var(--muted); }
.icon-btn.sm { width: 30px; height: 30px; }
.toast-act { margin-left: 10px; border: 0; border-radius: 99px; padding: 6px 12px; font-weight: 700; background: var(--gold-2); color: #3a2a06; cursor: pointer; }

.bell { position: relative; }
.bell-badge { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: #d9483b; color: #fff; font: 700 10px/17px var(--sans); text-align: center; font-style: normal; }
/* Point de couleur sur le nuage : vert = à jour, orange = sans réseau, rouge = problème. */
.sync-pill { position: relative; }
.sync-pill::after { content: ''; position: absolute; right: 3px; bottom: 5px; width: 10px; height: 10px; border-radius: 50%; background: #9aa5a0; box-shadow: 0 0 0 2px #0b3d2e; }
.sync-pill[data-sync="idle"]::after { background: #2ecc71; }
.sync-pill[data-sync="syncing"]::after { background: #2ecc71; animation: pulse 1s infinite; }
.sync-pill[data-sync="offline"]::after { background: #f1a33b; }
.sync-pill[data-sync="error"]::after { background: #e5483b; }
input::-ms-reveal, input::-ms-clear { display: none; }
@keyframes pulse { 50% { opacity: .35; } }

.alert-item { display: flex; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--blue); box-shadow: var(--lift); }
.alert-item.critique { border-left-color: var(--red); background: var(--red-bg); }
.alert-item.important { border-left-color: #d89a22; background: var(--amber-bg); }
.alert-item.seen { opacity: .6; }
.alert-ic { flex: none; }
.alert-main strong { display: block; font-size: 14.5px; }
.alert-main p { margin: 4px 0 8px; font-size: 13px; color: var(--ink-2); }
.alert-sev { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); }
.alert-actions { display: flex; gap: 8px; }
.section-title { margin: 20px 0 8px; font-size: 14px; color: var(--muted); }

.sync-hero { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: var(--radius); color: #fff; background: linear-gradient(135deg, var(--emerald-1), var(--emerald-3)); margin-bottom: 12px; }
.sync-hero.offline { background: linear-gradient(135deg, #8a6a1f, #4d3a0d); }
.sync-hero.error { background: linear-gradient(135deg, #a63c33, #5a1f1a); }
.sync-hero strong { display: block; font-size: 16px; }
.sync-hero span { display: block; font-size: 12.5px; opacity: .85; }
.audit-list { margin-top: 10px; display: grid; gap: 4px; max-height: 320px; overflow: auto; }
.audit-row { display: flex; gap: 10px; font-size: 12.5px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.audit-row em { color: var(--muted); font-style: normal; min-width: 120px; }
.form-actions { display: grid; gap: 8px; margin-top: 12px; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.pad { padding: 16px; }

.recu-card { background: #fffdf9; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--lift); }
.recu-head { padding: 18px; color: #fff; background: linear-gradient(135deg, var(--emerald-1), var(--emerald-3)); display: grid; gap: 2px; }
.recu-head small { color: var(--gold-2); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; font-size: 11px; }
.recu-head strong { font-size: 19px; }
.recu-head em { font-style: normal; opacity: .75; font-size: 12.5px; }
.recu-amount { text-align: center; padding: 18px 12px 8px; display: grid; gap: 2px; }
.recu-amount strong { font-size: 30px; color: var(--brand); }
.recu-amount span { color: var(--muted); font-size: 13px; }
.recu-lines { padding: 6px 18px; }
.recu-lines div { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.recu-code { display: flex; align-items: center; gap: 8px; margin: 8px 14px; padding: 10px 12px; border-radius: 12px; font-size: 13px; }
.recu-code strong { margin-left: auto; letter-spacing: .08em; }
.recu-code.ok { background: var(--green-bg); color: var(--green); }
.recu-code.bad { background: var(--red-bg); color: var(--red); }
.recu-foot { text-align: center; color: var(--muted); font-size: 11.5px; padding: 0 14px 14px; margin: 0; }

.inline-actions .btn { flex: 1 1 auto; white-space: normal; text-align: center; justify-content: center; }
.inline-actions .btn.lg { min-height: 48px; }
.inline-actions .btn { height: auto; padding-top: 12px; padding-bottom: 12px; }

/* ===== simplification ===== */
details.more { margin-top: 12px; border-top: 1px dashed var(--line-2); padding-top: 10px; }
details.more > summary { cursor: pointer; font-weight: 650; font-size: 14px; color: var(--green); padding: 8px 0; list-style: none; display: flex; align-items: center; gap: 6px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '＋'; font-weight: 700; }
details.more[open] > summary::before { content: '−'; }
.menu-title { margin: 18px 4px 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.menu-count[data-alert-badge] { background: #d9483b; color: #fff; }
.toast-root, #toast-root { max-width: 100%; }

/* ===== guide de premier lancement ===== */
.guide-card { padding: 20px; margin-bottom: 14px; border: 0; color: #fff8e8; background: linear-gradient(135deg, var(--emerald-1), var(--emerald-3)); border-radius: var(--radius); display: grid; gap: 14px; }
.guide-top { display: flex; justify-content: space-between; align-items: center; }
.guide-count { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--gold-2); }
.guide-dots { display: flex; gap: 6px; }
.guide-dots i { width: 22px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.25); }
.guide-dots i.on { background: var(--gold-2); }
.guide-dots i.now { background: #fff; }
.guide-body { display: flex; gap: 14px; align-items: center; }
.guide-ic { flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,.14); color: var(--gold-2); }
.guide-main strong { display: block; font-size: 19px; font-family: var(--serif); font-weight: 600; }
.guide-main span { display: block; font-size: 14px; opacity: .85; line-height: 1.4; margin-top: 2px; }
.guide-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.guide-actions .btn.primary { background: var(--gold-2); color: #3a2a06; justify-content: center; }
.guide-actions .link-btn { color: #cfe4d8; text-align: center; font-size: 13px; }
.guide-card.done { grid-template-columns: auto 1fr; align-items: center; }
.guide-card.done .btn { grid-column: 1 / -1; background: var(--gold-2); color: #3a2a06; }

/* ===== accueil simplifié ===== */
.dash-head { margin: 4px 2px 14px; }
.dash-head span { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--green); font-weight: 700; }
.dash-head h1 { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.15; margin: 2px 0 0; }
.dash-main { display: grid; gap: 12px; margin-bottom: 14px; }
.today-hero { border-radius: var(--radius); padding: 18px; color: #fff8e8; background: linear-gradient(135deg, var(--emerald-1), var(--emerald-3)); box-shadow: var(--lift-lg); display: grid; gap: 14px; }
.th-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.th-label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-2); font-weight: 700; display: block; }
.th-title { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.15; }
.th-ring { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.th-ring::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--emerald-2); }
.th-ring span { position: relative; font-weight: 700; font-size: 15px; }
.th-lines { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.th-lines div { background: rgba(255,255,255,.1); border-radius: 12px; padding: 10px 12px; }
.th-lines span { display: block; font-size: 12px; opacity: .75; }
.th-lines strong { font-size: 18px; }
.th-btn { background: var(--gold-2); color: #3a2a06; justify-content: center; font-weight: 700; min-height: 48px; }
.caisse-card { border-radius: var(--radius); padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--lift); display: grid; gap: 8px; }
.cc-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; font-weight: 600; }
.cc-value { font-family: var(--serif); font-size: 32px; font-weight: 600; color: var(--brand); }
.cc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 13px; }
.cc-split span { display: block; color: var(--muted); font-size: 12px; }
.cc-split b { font-size: 15px; }
.cc-link { color: var(--green); font-weight: 650; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
details.dash-more { margin-top: 16px; }
@media (min-width: 900px) { .dash-main { grid-template-columns: 1.3fr 1fr; } }

/* ===== types de carte ===== */
.vcard.v4 { background: radial-gradient(circle at 85% 0%, rgba(227, 195, 126, 0.55), transparent 55%), linear-gradient(145deg, #2a2a2a, #050505); }
.vcard.v5 { background: radial-gradient(circle at 85% 0%, rgba(255, 160, 160, 0.35), transparent 55%), linear-gradient(145deg, #7a1d2e, #2a0810); }
.ctype-list { display: grid; gap: 8px; margin-bottom: 8px; }
.ctype { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.ctype-main { flex: 1; min-width: 0; }
.ctype-main strong { display: block; font-size: 15px; }
.ctype-main span { font-size: 12.5px; color: var(--muted); }
.ctype-dot { flex: none; width: 30px; height: 20px; border-radius: 6px; display: inline-block; background: #0e6a4f; }
.ctype-dot.v1 { background: #1f4d78; } .ctype-dot.v2 { background: #7a3b1d; } .ctype-dot.v3 { background: #4b2c7a; }
.ctype-dot.v4 { background: linear-gradient(145deg, #333, #050505); box-shadow: inset 0 0 0 2px #c9a24b; } .ctype-dot.v5 { background: #7a1d2e; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.swatch { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 13px; }
.swatch input { accent-color: var(--green); }
.swatch em { font-style: normal; }
@media (max-width: 900px) { .toast-root { top: calc(84px + env(safe-area-inset-top)); bottom: auto; z-index: 9999; } }

/* boutons lien (WhatsApp) : même alignement que les boutons */
.modal-foot a.btn, .paid-sheet a.btn { display: inline-flex; align-items: center; justify-content: center; line-height: 1.2; }

.seg-tabs.inline-seg { margin: 0 0 12px; }
.seg-tabs.inline-seg button { padding: 0 12px; white-space: nowrap; }
.rule, .bareme-rule { margin-top: 12px; }

/* sélecteur de couleur : petit, sans débordement */
.swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.swatch { min-width: 0; position: relative; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.swatch em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swatch:has(input:checked) { border-color: var(--green); background: var(--brand-3); box-shadow: 0 0 0 2px rgba(15, 118, 86, .25); }
#form-type .field + .field, #form-type .field + .form-grid, #form-type .form-grid + .field, #form-type .field + .field { margin-top: 14px; }
#form-type .field > span:first-child { display: block; margin-bottom: 6px; }

/* ---------- Mode de paiement : Espèces / Airtel / Moov ---------- */
.mode-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.mode-opt { position: relative; margin: 0; }
.mode-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.mode-opt span {
  display: flex; align-items: center; justify-content: center; gap: 6px; height: 52px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--surface); font-weight: 650; font-size: 13.5px; color: var(--ink-2);
}
.mode-opt input:focus-visible + span { box-shadow: 0 0 0 4px rgba(14, 92, 69, 0.15); }
.mode-opt.mode-especes input:checked + span { border-color: var(--brand); background: var(--brand-3); color: var(--brand); }
.mode-opt.mode-airtel input:checked + span { border-color: #e40613; background: #fdecec; box-shadow: 0 0 0 3px rgba(228, 6, 19, 0.15); }
.mode-opt.mode-moov input:checked + span { border-color: #f06c00; background: #fff1e5; box-shadow: 0 0 0 3px rgba(240, 108, 0, 0.18); }
.mode-opt:not(.mode-especes) span .mode-logo { height: 34px; }
.mode-quick { display: grid; gap: 10px; margin: 6px 0 14px; }
.mode-opt-btn {
  display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 18px; border-radius: 16px;
  border: 2px solid var(--line); background: var(--surface); font-size: 16px; color: var(--ink); text-align: left;
}
.mode-opt-btn.mode-especes { border-color: var(--brand-4); color: var(--brand); }
.mode-opt-btn.mode-airtel { border-color: #f4b5b9; color: #c4040f; }
.mode-opt-btn.mode-moov { border-color: #f9c79c; color: #d35f00; }
.mode-ic { width: 48px; display: grid; place-items: center; flex: none; }
.mode-opt-btn:active { transform: scale(0.98); }
.mode-logo { display: inline-block; width: auto; border-radius: 5px; object-fit: contain; vertical-align: middle; flex: none; }
.mode-tag { justify-self: end; display: inline-flex !important; align-items: center; gap: 3px; margin-top: 3px; }
.mode-tag.mode-mixte { padding: 1px 5px; border-radius: 99px; background: var(--bg-soft); color: var(--ink-2) !important; }
.mode-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.mode-split > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 11.5px; }
.mode-split span { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.mode-split strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.mode-split .mode-airtel strong { color: #c4040f; }
.mode-split .mode-moov strong { color: #d35f00; }
.recu-mode { display: inline-flex; align-items: center; gap: 6px; }
.cloture-lines .muted-line { color: var(--muted); font-size: 12.5px; }

/* ---------- Avance d'argent ---------- */
.pret-preview { display: grid; gap: 6px; margin: 4px 0 6px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 13px; }
.pret-preview > div { display: flex; justify-content: space-between; gap: 10px; }
.pret-preview span { color: var(--muted); }
.pret-preview .total { padding-top: 6px; border-top: 1px dashed var(--line); font-size: 14.5px; }
.pret-preview .total strong { color: var(--amber); }
.pret-preview.warn { background: #fff4e5; }
.fc-pret { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #fff4e5; color: #8a4a08; font-size: 13px; }
.fc-pret span { display: grid; gap: 2px; }
.fc-pret em { font-style: normal; font-size: 11.5px; color: #a1520b; }
.pret-alert { display: flex; gap: 6px; align-items: flex-start; margin: 4px 0 0; color: #a1520b; font-weight: 600; font-size: 12.5px; }

/* ---------- Connexion : espace privé de Yvo ---------- */
.lock-screen {
  position: relative; overflow: hidden; min-height: 100vh; min-height: 100dvh;
  background: radial-gradient(120% 80% at 50% 0%, #1b6a50 0%, #0a3a2b 45%, #04170f 100%);
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}
.login-bg { position: absolute; inset: 0; pointer-events: none; }
.login-bg i { position: absolute; border-radius: 50%; border: 1px solid rgba(227, 195, 126, 0.16); }
.login-bg i:nth-child(1) { width: 520px; height: 520px; left: 50%; top: -180px; transform: translateX(-50%); }
.login-bg i:nth-child(2) { width: 760px; height: 760px; left: 50%; top: -300px; transform: translateX(-50%); border-color: rgba(227, 195, 126, 0.09); }
.login-bg i:nth-child(3) { width: 300px; height: 300px; right: -120px; bottom: -110px; background: radial-gradient(circle, rgba(227, 195, 126, 0.16), transparent 70%); border: 0; }
.login-card {
  position: relative; width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; text-align: center;
  color: #fff; animation: login-in 0.7s var(--ease) both;
}
.login-mark {
  width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; margin-bottom: 26px;
  background: linear-gradient(145deg, #f3dca4, #c9963f); box-shadow: 0 18px 40px -14px rgba(227, 195, 126, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.login-mark span { font-family: var(--serif); font-size: 42px; font-weight: 600; color: #0a3a2b; line-height: 1; }
.login-kicker { margin: 0 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-2); }
.login-hello { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 40px; line-height: 1.1; letter-spacing: -0.01em; }
.login-hello em { font-style: italic; color: var(--gold-2); }
.login-date { margin: 8px 0 30px; font-size: 14px; color: rgba(255, 255, 255, 0.62); text-transform: capitalize; }
.login-card form { width: 100%; display: grid; gap: 10px; }
.login-field {
  display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 8px 0 18px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: border-color 0.2s, background 0.2s;
}
.login-field:focus-within { border-color: var(--gold-2); background: rgba(255, 255, 255, 0.12); }
.login-field input {
  flex: 1; min-width: 0; height: 100%; border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important;
  color: #fff; font-size: 17px; letter-spacing: 0.04em; padding: 0;
}
.login-field input::placeholder { color: rgba(255, 255, 255, 0.45); letter-spacing: 0; }
.login-eye { width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: rgba(255, 255, 255, 0.7); display: grid; place-items: center; cursor: pointer; }
.login-card .lock-error { min-height: 18px; font-size: 13px; color: #ffb4a8; }
.login-btn {
  height: 58px; border: 0; border-radius: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg, #f3dca4, #d4a24c); color: #0a3a2b; font-size: 16.5px; font-weight: 750;
  box-shadow: 0 16px 34px -14px rgba(227, 195, 126, 0.75); transition: transform 0.15s, filter 0.15s;
}
.login-btn:active { transform: scale(0.98); filter: brightness(0.96); }
.login-foot { display: flex; align-items: center; gap: 6px; margin: 28px 0 0; font-size: 12px; color: rgba(255, 255, 255, 0.45); }
.login-card.shake { animation: login-shake 0.4s; }
.login-card.is-ok { animation: login-out 0.3s ease forwards; }
@keyframes login-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes login-out { to { opacity: 0; transform: scale(0.97); } }
@keyframes login-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) { .login-card, .login-card.shake, .login-card.is-ok { animation: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Fiche client (calendrier) ---------- */
/* En-tête : identité, contact, 3 chiffres clés, gros bouton Encaisser */
.fc-hero { padding: 18px; }
.fc-id { display: flex; align-items: center; gap: 14px; }
.fc-id .avatar-lg { width: 60px; height: 60px; border-radius: 18px; flex: none; }
.fc-id-main { min-width: 0; flex: 1; }
.fc-id-main h1 { font-size: 26px; line-height: 1.1; margin: 0; overflow-wrap: anywhere; }
.fc-id-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 13.5px; color: var(--ink-2); }
.fc-id-meta span { display: inline-flex; align-items: center; gap: 5px; }
.fc-id-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.fc-id-badges:empty { display: none; }
.fc-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.fc-contact .contact-btn { height: 50px; font-size: 15px; border-radius: 15px; }
.fc-figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.fc-fig { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 11px 12px; border-radius: 15px; background: var(--surface-2); border: 1px solid var(--line); }
.fc-fig span { font-size: 11.5px; font-weight: 650; color: var(--muted); }
.fc-fig strong { font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.15; overflow-wrap: anywhere; }
.fc-fig em { font-style: normal; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 3px; line-height: 1.3; }
.fc-fig-late { background: var(--red-bg); border-color: #f0c8c3; }
.fc-fig-late strong, .fc-fig-late em { color: var(--red); }
.fc-fig-ok { background: var(--green-bg); border-color: #bfe1cf; }
.fc-fig-ok strong, .fc-fig-ok em { color: var(--green); }
.fc-fig-today.ok em { color: var(--green); font-weight: 650; }
.fc-pay-btn { width: 100%; height: 58px; margin-top: 14px; font-size: 17px; border-radius: 16px; gap: 9px; }
.fc-actions { display: flex; gap: 8px; margin-top: 12px; }
.fc-actions .btn { min-height: 44px; flex: 1; min-width: 0; padding: 0 8px; white-space: nowrap; }
.fc-actions .icon-btn { width: 44px; height: 44px; flex: none; }

/* Avancement de la carte */
.fc-progress { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 14px 0; }
.fc-prog { padding: 12px 13px; border-radius: 15px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.fc-prog-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.fc-prog-head span { font-size: 12px; font-weight: 650; color: var(--muted); }
.fc-prog-head strong { font-size: 14.5px; text-align: right; }
.fc-prog-head em { font-style: normal; font-weight: 500; font-size: 12px; color: var(--muted); }
.fc-prog .progress { height: 9px; }
.progress.blue > span { background: linear-gradient(90deg, #2f628c, #6d9cc4); }
.fc-prog-foot { display: flex; justify-content: space-between; gap: 6px; margin-top: 7px; font-size: 11.5px; color: var(--muted); }
.fc-prog-foot b { color: var(--ink-2); font-weight: 650; }
.fc-card-figs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fc-card-figs div { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.fc-card-figs span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.fc-card-figs strong { font-size: 14.5px; line-height: 1.25; }
.fc-more .mini-stats { margin-top: 10px; }
.fc-more-line { margin: 8px 2px 0; }

/* Calendrier : grand, lisible, une couleur par situation */
.fc-cal { padding: 14px; }
.fc-cal .cal-head { margin-bottom: 12px; }
.fc-cal .fc-cal-nav { width: 46px; height: 46px; border-radius: 14px; flex: none; }
.fc-cal .cal-title strong { font-size: 19px; }
.fc-cal .cal-title span { font-size: 12px; }
.fc-cal-today { border: 0; background: none; padding: 4px 6px; font-size: 12.5px; font-weight: 650; color: var(--brand); text-decoration: underline; cursor: pointer; }
.fc-cal .cal-weekdays span { font-size: 11px; text-transform: none; letter-spacing: 0; }
.fc-cal .cal-day { min-height: 54px; padding: 5px 6px; cursor: pointer; }
.fc-cal .cal-day:disabled { cursor: default; }
.fc-cal .cal-empty { min-height: 54px; }
.fc-cal .cal-day .dnum { font-size: 13px; }
.fc-cal .cal-day .damt { font-size: 9.5px; }
.fc-cal .cal-day.today { box-shadow: 0 0 0 2.5px var(--brand); }
.fc-cal .cal-day.out { opacity: 0.35; }
.fc-cal .cal-day.missed { background: var(--red-bg); border: 1px dashed #dfa9a1; color: #8c3029; }
.cal-marks { display: flex; gap: 2px; flex: none; }
.cal-mm { display: block; width: 15px; height: 15px; border-radius: 4px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); overflow: hidden; }
.cal-mm img { width: 100%; height: 100%; object-fit: contain; display: block; }
.fc-cal-sum { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13.5px; color: var(--ink-2); }
.fc-cal-sum p { margin: 0; }
.fc-cal-sum div { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 12.5px; font-weight: 600; }
.fc-cal-sum .blue { color: var(--blue); }
.fc-legend { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 10px; font-size: 12px; color: var(--ink-2); }
.fc-legend span { display: inline-flex; align-items: center; gap: 5px; }
.fc-legend .lg { width: 14px; height: 14px; border-radius: 4px; }
.fc-legend-mm img { height: 15px; width: auto; border-radius: 3px; }
.fc-cal-hint { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 12px; color: var(--muted); }

/* Derniers versements */
.fc-pay-list { display: grid; gap: 6px; }
.fc-pay {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left; cursor: pointer; color: inherit; font: inherit;
}
.fc-pay:active { transform: scale(0.99); }
.fc-pay-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); flex: none; color: var(--green); }
.fc-pay-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fc-pay-main strong { font-size: 15px; }
.fc-pay-main em { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-pay-main .fc-pay-ref { font-family: ui-monospace, monospace; font-size: 11.5px; }
.fc-pay-mode { font-size: 12px; font-weight: 650; color: var(--muted); flex: none; }
.fc-pay.mode-airtel .fc-pay-mode { color: #c4040f; }
.fc-pay.mode-moov .fc-pay-mode { color: #d35f00; }

@media (min-width: 981px) {
  .client-page { max-width: 920px; margin: 0 auto; }
  .fc-hero { padding: 24px; }
  .fc-id-main h1 { font-size: 30px; }
  .fc-contact { display: flex; }
  .fc-contact .contact-btn { min-width: 160px; }
  .fc-pay-list { grid-template-columns: 1fr 1fr; }
  .fc-cal .cal-day { min-height: 64px; }
  .fc-cal .cal-empty { min-height: 64px; }
}

@media (max-width: 560px) {
  .fc-hero { padding: 16px; }
  .fc-id-main h1 { font-size: 23px; }
  .fc-figs { gap: 6px; }
  .fc-fig { padding: 9px; border-radius: 13px; }
  .fc-fig strong { font-size: 15.5px; }
  .fc-fig span, .fc-fig em { font-size: 11px; }
  .fc-progress { grid-template-columns: 1fr; }
  .fc-cal { padding: 10px; }
  .fc-cal .cal-weekdays, .fc-cal .cal-grid { gap: 4px; }
  .fc-cal .cal-day { min-height: 48px; padding: 4px; border-radius: 9px; }
  .fc-cal .cal-empty { min-height: 48px; }
  .fc-cal .cal-day .dnum { font-size: 12px; }
  .fc-cal .cal-day .damt { display: block; font-size: 8.5px; }
  .cal-mm { width: 13px; height: 13px; }
}

/* Chaque carte du client = sa carte physique (couleur du type), calendrier dedans */
.fc-card-panel { margin-bottom: 22px; scroll-margin-top: 80px; }
.vcard.fc-card { width: 100%; aspect-ratio: auto; display: block; padding: 16px; border-radius: 24px; scroll-snap-align: none; }
.vcard.fc-card:active { transform: none; }
.fc-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.fc-card-top .vc-state { font-size: 11px; letter-spacing: 0.04em; text-transform: none; white-space: nowrap; }
.fc-card-id { display: flex; align-items: center; gap: 12px; margin: 14px 0 12px; }
.fc-card-id .vc-chip { flex: none; }
.fc-card-name { flex: 1; min-width: 0; }
.fc-card-name h3 { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 600; color: #fff; line-height: 1.1; }
.fc-card-name span { display: block; font-size: 12px; opacity: 0.8; margin-top: 2px; }
.fc-card-daily { flex: none; text-align: right; line-height: 1.1; }
.fc-card-daily strong { display: block; font-family: var(--serif); font-size: 20px; font-weight: 600; white-space: nowrap; }
.fc-card-daily span { font-size: 12px; opacity: 0.8; }
.fc-card .fc-cal { color: var(--ink); background: #fffdf9; border: 0; border-radius: 18px; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.55); }
.fc-card-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 12px 2px 7px; font-size: 12.5px; }
.fc-card-foot span { opacity: 0.85; }
.fc-card-foot strong { font-size: 14px; opacity: 1; }
.fc-card-body {
  margin: -18px 10px 0; padding: 28px 14px 6px; border-radius: 0 0 20px 20px;
  background: var(--surface); border: 1px solid var(--line); border-top: 0; box-shadow: var(--lift);
}
.fc-card-body .fc-progress { margin-top: 12px; }
.fc-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fc-card-actions .btn { flex: 1 1 auto; min-height: 44px; white-space: nowrap; }
.fc-card-tools { display: flex; gap: 8px; margin-left: auto; }
.fc-card-tools .icon-btn { width: 44px; height: 44px; }

/* Jour pointé : ✓ en haut à droite, montant et Airtel / Moov en bas */
.fc-cal .cal-day { justify-content: space-between; align-items: stretch; }
.cal-top, .cal-bot { display: flex; align-items: center; justify-content: space-between; gap: 2px; min-width: 0; }
.cal-bot .damt { min-width: 0; }
.cal-check {
  display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; flex: none;
  background: rgba(0, 0, 0, 0.12); color: inherit; font-style: normal; font-size: 10px; font-weight: 800; line-height: 1;
}
.cal-day.complet .cal-check { background: #0f7656; color: #fff; }
.cal-day.partiel .cal-check { background: #b47c2a; color: #fff; }
.cal-day.avance .cal-check { background: #2f628c; color: #fff; }
.cal-day.absent .cal-check { background: #a63c33; color: #fff; }
.fc-legend .cal-check { background: var(--brand); color: #fff; }
.fc-legend .cal-check.is-no { background: #a63c33; }

@media (min-width: 981px) {
  .vcard.fc-card { padding: 22px 24px; }
  .fc-card-name h3 { font-size: 24px; }
  .fc-card-daily strong { font-size: 24px; }
  .fc-card-body { margin: -18px 16px 0; padding: 30px 18px 8px; }
}

@media (max-width: 560px) {
  .vcard.fc-card { padding: 12px 10px 12px; border-radius: 20px; }
  .fc-card-top { padding: 0 4px; }
  .fc-card-id { margin: 12px 4px 10px; gap: 10px; }
  .fc-card-id .vc-chip { width: 32px; height: 24px; padding: 4px; }
  .fc-card-name h3 { font-size: 19px; }
  .fc-card-daily strong { font-size: 18px; }
  .fc-card .fc-cal { padding: 8px 6px; border-radius: 15px; }
  .fc-card .fc-cal .cal-weekdays, .fc-card .fc-cal .cal-grid { gap: 3px; }
  .fc-card .fc-cal .cal-day { min-height: 46px; padding: 3px 3px 3px 4px; }
  .fc-card .fc-cal .cal-empty { min-height: 46px; }
  .fc-card-foot { margin: 10px 4px 6px; }
  .fc-card .vc-bar { margin: 0 4px; }
  .cal-check { width: 13px; height: 13px; font-size: 9px; }
  .fc-card-body { margin: -16px 6px 0; padding: 26px 10px 4px; }
}

/* Application ouverte dans une autre fenêtre */
.other-tab { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 24px; background: rgba(6, 42, 31, .92); }
.other-tab-card { max-width: 380px; display: flex; flex-direction: column; gap: 12px; padding: 26px; border-radius: 22px; background: var(--surface, #fffdf8); text-align: center; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6); }
.other-tab-card strong { font-size: 19px; }
.other-tab-card span { color: var(--muted, #5b6660); }

/* Barre latérale : la liste défile si l'écran est bas, le pied reste visible */
.sidebar { overflow: hidden; }
.sidebar .nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin-right: -8px;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.sidebar .nav::-webkit-scrollbar { width: 6px; }
.sidebar .nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.18); border-radius: 6px; }
.sidebar .brand { flex: none; }
.sidebar-foot { flex: none; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); margin-top: 10px; }
.nav-link { flex: none; }
.nav-link:focus-visible { outline: 2px solid #dcb877; outline-offset: 1px; }
.nav-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.nav-text small { font-size: 11px; font-weight: 600; color: #dcb877; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-link.active .nav-text small { color: #0e5c45; }
.nav-sep {
  flex: none;
  margin: 12px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6f9483;
}
@media (max-height: 860px) {
  .sidebar { padding-top: 16px; padding-bottom: 14px; }
  .sidebar .brand { padding-bottom: 12px; }
  .nav { gap: 2px; }
  .nav-link { padding: 8px 12px; }
}

/* Reçu envoyé / versement enregistré : boutons empilés sur toutes les tailles */
.paid-sheet .modal-foot { flex-direction: column; }
.paid-sheet .modal-foot .btn { width: 100%; justify-content: center; }

/* Formulaires des fenêtres : un espace régulier entre chaque bloc */
.modal-body form { display: flex; flex-direction: column; gap: 14px; }
.modal-body form > .form-grid { margin: 0; }
.page .callout:not(:last-child) { margin-bottom: 16px; }
.page > .search-box, .page .search-box + .empty, .page .search-box + .panel { margin-bottom: 14px; }
/* Pas de petites flèches dans les champs de montant */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
/* La ligne « En retard · … » des clients passe à la ligne au lieu d'être coupée */
.crow-late { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
/* Français : pas de majuscule forcée sur les jours et les mois */
.mb-title small, .login-date { text-transform: none; }

/* ---------- Petits écrans (v3.1) ---------- */
@media (max-width: 980px) {
  .clients-page { padding-bottom: 84px; }
  .journal-tools { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
  .journal-tools .select-sm { flex: 1 1 140px; height: 40px; }
  .panel-head:has(.journal-tools) { flex-wrap: wrap; }
  .prow-id strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; }
  .reliab-name { white-space: normal; }
  /* liens texte assez grands pour le doigt */
  .mv-link, .cc-link, .link-arrow { display: inline-flex; align-items: center; min-height: 40px; }
  .reliab { min-height: 40px; }
  .chip { height: 40px; }
  .switch { min-height: 40px; }
  .modal-body input[type="checkbox"] { width: 22px; height: 22px; }
  /* clavier ouvert : la barre du bas laisse la place */
  body.kb-open .bottom-nav { display: none; }
  body.kb-open .view { padding-bottom: 24px; }
}
@media (max-width: 400px) {
  .fc-figs, .fc-card-figs { gap: 6px; }
  .fc-fig strong, .fc-card-figs strong { font-size: 14px; white-space: nowrap; }
  .fc-fig span, .fc-card-figs span { font-size: 10px; line-height: 1.2; }
  .mb-title strong { font-size: 16px; }
}
@media (max-height: 520px) {
  .login-mark { transform: scale(0.7); margin: -10px 0; }
  .login-date { margin-bottom: 10px !important; }
  .login-card { padding-top: 16px; padding-bottom: 16px; gap: 10px; }
  .modal-sub, .pay-late { display: none; }
}
/* Rangées de 3 chiffres : pas de case vide ni de case orpheline */
@media (min-width: 601px) { .mini-kpis:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .mini-kpis > :nth-child(3):last-child { grid-column: 1 / -1; } }
.modal-body form > .pay-chips, .modal-body form > .status-preview, .modal-body form > .hint { margin-top: 0; margin-bottom: 0; }
.modal-body form > .status-preview:empty { display: none; }

/* Barre latérale fixe (ordinateur) : elle ne bouge jamais quand la page défile,
   et la molette au-dessus d'elle fait défiler la page si la liste n'a rien à défiler. */
@media (min-width: 981px) {
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 252px; height: auto; }
  .app > .main { grid-column: 2; }
}
.sidebar .nav.fade-top { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28px); mask-image: linear-gradient(to bottom, transparent 0, #000 28px); }
.sidebar .nav.fade-bottom { -webkit-mask-image: linear-gradient(to top, transparent 0, #000 28px); mask-image: linear-gradient(to top, transparent 0, #000 28px); }
.sidebar .nav.fade-top.fade-bottom { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); }
