/* DevisVox — Factures — Mobile */
@media (max-width: 768px) {

#factures-mobile-page {
  position: relative;
  --fac-success: #10B981; --fac-warning: #F59E0B; --fac-danger: #DC2626;
  --fac-text: #0F172A; --fac-text2: #475569; --fac-text3: #94A3B8;
  --fac-border: #E2E8F0; --fac-border2: #CBD5E1; --fac-bg: #F9FAFB; --fac-bg2: #F1F5F9;
  --fac-r-sm: 14px; --fac-r-md: 18px; --fac-tr: .18s ease;
  display: flex; flex-direction: column; height: 100%;
  background: var(--fac-bg);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  color: var(--fac-text);
  overflow-y: auto; overflow-x: hidden;
  touch-action: pan-y; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch;
  will-change: transform;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
#factures-mobile-page::-webkit-scrollbar { display: none; }
#factures-mobile-page .fac-ph {
  position: relative;
  padding: 6px 6px 10px;
}
#factures-mobile-page .fac-ph::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -14px;
  right: -14px;
  height: 1px;
  background: var(--fac-border);
}
#factures-mobile-page .fac-title   { font-size: 21px; font-weight: 900; color: var(--fac-text); letter-spacing: -1px; line-height: 1.1; }
#factures-mobile-page .fac-filters { display: flex; gap: 6px; margin: 0 -14px; padding: 8px 8px 6px; }
#factures-mobile-page .fac-filter-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 6px; border-radius: 12px; border: 1.5px solid var(--fac-border2); background: #fff; cursor: pointer; font-family: inherit; transition: background var(--fac-tr), border-color var(--fac-tr); -webkit-tap-highlight-color: transparent; }
#factures-mobile-page .fac-filter-btn.active { background: #0F172A; border-color: #0F172A; }
#factures-mobile-page .fac-filter-btn.active .fac-fn,
#factures-mobile-page .fac-filter-btn.active .fac-fv { color: #fff; }
#factures-mobile-page .fac-fn { font-size: 9px; font-weight: 700; color: var(--fac-text3); text-transform: uppercase; letter-spacing: .05em; line-height: 1; display: block; }
#factures-mobile-page .fac-fv { font-size: 11px; font-weight: 700; color: var(--fac-text2); line-height: 1; white-space: nowrap; }
#factures-mobile-page .fac-fchev { font-size: 9px; }
/* ── Bottom sheet filtres — fixed pour ne pas décaler quand la page a scrollé ── */
#factures-mobile-page .fac-filter-sheet { position: fixed; inset: 0; z-index: 50; }
#factures-mobile-page .fac-fs-backdrop  { position: absolute; inset: 0; background: rgba(15,23,42,.35); }
#factures-mobile-page .fac-fs-panel     { position: absolute; bottom: 0; left: 0; right: 0; background: #fff; border-radius: 20px 20px 0 0; padding: 8px 16px 28px; display: flex; flex-direction: column; gap: 0; animation: fac-sheet-in .22s ease; max-height: 90svh; overflow-y: auto; }
@keyframes fac-sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
#factures-mobile-page .fac-fs-handle    { width: 36px; height: 4px; background: var(--fac-border2); border-radius: 2px; margin: 8px auto 12px; }
#factures-mobile-page .fac-fs-title     { font-size: 11px; font-weight: 700; color: var(--fac-text3); text-transform: uppercase; letter-spacing: .06em; padding: 0 4px 10px; border-bottom: 1px solid var(--fac-border); margin-bottom: 4px; }
#factures-mobile-page .fac-fs-opt       { height: 44px; border: none; background: none; text-align: left; font-size: 15px; font-weight: 500; color: var(--fac-text); cursor: pointer; padding: 0 8px; border-radius: 10px; font-family: inherit; transition: background var(--fac-tr); }
#factures-mobile-page .fac-fs-opt:active { background: var(--fac-bg2); }
#factures-mobile-page .fac-fs-opt.fac-fs-selected { font-weight: 700; color: #0F172A; }
#factures-mobile-page .fac-body   { flex: 1; padding: 0 14px calc(var(--bottom-nav-height, 70px) + 16px); } /* padding-bottom dégage la barre de nav fixe */
#factures-mobile-page .fac-search-row { position: sticky; top: 0; z-index: 10; background: var(--fac-bg); padding: 12px 0 8px; margin-bottom: 4px; }
#factures-mobile-page .fac-sw     { display: flex; align-items: center; background: #fff; border: 1.5px solid var(--fac-border); border-radius: 12px; padding: 0 12px; height: 44px; margin-bottom: 0; }
#factures-mobile-page .fac-search-input { flex: 1; border: none; background: transparent; font-size: 14px; color: var(--fac-text); outline: none; font-family: inherit; }
#factures-mobile-page .fac-list   { display: flex; flex-direction: column; }
#factures-mobile-page .fac-row    { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--fac-border); cursor: pointer; gap: 12px; transition: background var(--fac-tr); }
#factures-mobile-page .fac-row:last-child { border-bottom: none; }
#factures-mobile-page .fac-row:active { background: var(--fac-bg2); border-radius: 10px; }
#factures-mobile-page .fac-row-left  { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
#factures-mobile-page .fac-num    { font-size: 11px; font-weight: 700; color: var(--fac-text3); }
#factures-mobile-page .fac-client { font-size: 15px; font-weight: 700; color: var(--fac-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#factures-mobile-page .fac-desc   { font-size: 12px; color: var(--fac-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#factures-mobile-page .fac-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
#factures-mobile-page .fac-amount { font-size: 15px; font-weight: 800; color: var(--fac-text); }
#factures-mobile-page .fac-date   { font-size: 11px; color: var(--fac-text3); }
#factures-mobile-page .fac-badge  { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px; }
#factures-mobile-page .fac-ok     { background: #DCFCE7; color: #166534; }
#factures-mobile-page .fac-wa     { background: #FEF9C3; color: #854D0E; }
#factures-mobile-page .fac-er     { background: #FEE2E2; color: #991B1B; }
#factures-mobile-page .fac-empty-msg { text-align: center; color: var(--fac-text3); font-size: 14px; line-height: 1.6; padding: 48px 24px; }

}
