/* PafStock — même palette que pafinvoice (Slate + Sky) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #f8fafc; --surface: #ffffff; --navy: #0f172a; --navy-light: #1e293b;
  --sky: #0ea5e9; --sky-dark: #0284c7; --green: #16a34a; --red: #dc2626; --amber: #d97706;
  --text: #1e293b; --muted: #64748b; --border: #e2e8f0; --radius: 6px;
}

html, body { background: var(--bg); color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
h1, h2, h3, h4, h5, h6 { font-weight: 600; color: var(--navy); }
a { color: var(--sky-dark); }
.btn-primary { background: var(--sky-dark); border-color: var(--sky-dark); }
.btn-primary:hover, .btn-primary:focus { background: #0369a1; border-color: #0369a1; }

.ps-navbar { background: var(--navy); }
.ps-navbar .navbar-text a { color: #bae6fd; }
.ps-site { color: #94a3b8; font-size: .7em; text-transform: uppercase; letter-spacing: .08em; }
.ps-main { padding-top: 1.25rem; padding-bottom: 6rem; }
.ps-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.ps-cancelled td { text-decoration: line-through; color: var(--muted); }
.ps-cancelled td .badge { text-decoration: none; }

.ps-login { max-width: 24rem; }

/* Tuiles d'accueil : grosses cibles tactiles */
.ps-tile { display: flex; align-items: center; gap: 1rem; padding: 1.4rem 1.5rem; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border); color: var(--navy); font-size: 1.15rem;
  font-weight: 600; text-decoration: none !important; box-shadow: 0 1px 3px rgba(0,0,0,.06); transition: transform .08s; }
.ps-tile:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.08); color: var(--navy); }
.ps-tile i { font-size: 1.8rem; width: 2.2rem; text-align: center; }
.ps-tile-in i { color: var(--green); } .ps-tile-out i { color: var(--red); } .ps-tile-inv i { color: var(--sky-dark); }

/* Écran de scan */
.ps-scan-box { border-width: 2px; }
.ps-scan-in .ps-scan-box { border-color: #86efac; }
.ps-scan-out .ps-scan-box { border-color: #fca5a5; }
.ps-scan-inventory .ps-scan-box { border-color: #7dd3fc; }
#scan-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ps-lines .js-qty { font-size: 1.1rem; font-weight: 600; text-align: right; }
.ps-camera { max-width: 480px; }

.ps-sticky-actions { position: sticky; bottom: 0; z-index: 10; background: rgba(248,250,252,.96);
  border-top: 1px solid var(--border); padding: .75rem 0; margin-top: 1rem;
  display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; }

/* KPI */
.ps-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; }
.ps-kpi-v { font-size: 1.5rem; font-weight: 700; color: var(--navy); line-height: 1.2; }
.ps-kpi-l { font-size: .8rem; color: var(--muted); }
.ps-kpi-bad .ps-kpi-v { color: var(--red); }

.ps-perms .form-check { margin-bottom: .25rem; }
.ps-qty-col { width: 8rem; }
@media (max-width: 575.98px) { .ps-qty-col { width: 5.5rem; } .ps-lines .js-qty { padding-left: .4rem; padding-right: .4rem; } }

/* Écran de scan sur petit écran (terminal de poche Android, téléphone) : cibles tactiles plus grosses */
@media (max-width: 575.98px) {
  .ps-main { padding-top: .75rem; }
  .ps-scan h1 { font-size: 1.35rem; }
  .ps-inv-help { padding: .5rem .75rem; font-size: .78rem; }
  .ps-scan-box .card-body { padding: .75rem; }
  .ps-scan-box .input-group-append .btn { min-width: 3rem; }
  .ps-lines td { padding: .4rem .3rem; }
  .ps-lines .js-qty { height: 2.75rem; font-size: 1.25rem; }
  .ps-lines .js-del { width: 2.5rem; height: 2.5rem; }
  .ps-sticky-actions { justify-content: space-between; padding: .5rem 0; }
  .ps-sticky-actions .ps-finish { flex: 1 1 auto; margin-left: .5rem; }
}
#btn-keyboard.active { background: var(--navy-light); color: #fff; }
