/* ============================================================
   ImprimeriePro — feuille de styles
   ============================================================ */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e6eaf2;
  --line-2: #eef1f7;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef2ff;
  --green: #059669;
  --green-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --sky: #0284c7;
  --sky-soft: #f0f9ff;
  --violet: #7c3aed;
  --violet-soft: #f5f3ff;
  --pink: #db2777;
  --pink-soft: #fdf2f8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 28px -16px rgba(15, 23, 42, .18);
  --shadow-lg: 0 24px 70px -24px rgba(15, 23, 42, .35);
  --sidebar: 264px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }
::selection { background: #c7d2fe; }

::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #64748b; background-clip: content-box; }
::-webkit-scrollbar-track { background: #eef1f7; border-radius: 20px; }

/* Firefox : barres de défilement colorées (Chromium utilise ::-webkit-scrollbar ci-dessus) */
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: auto; scrollbar-color: #94a3b8 #eef1f7; }
  .nav { scrollbar-color: #64748b transparent; }
}
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Layout ---------- */
.app { min-height: 100vh; }
.main {
  margin-left: var(--sidebar);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.view {
  padding: 26px 30px 60px;
  max-width: 1560px;
  width: 100%;
  margin: 0 auto;
  animation: viewIn .25s ease both;
}
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  background:
    radial-gradient(600px 300px at 10% -10%, rgba(99, 102, 241, .28), transparent 60%),
    radial-gradient(400px 260px at 90% 105%, rgba(14, 165, 233, .14), transparent 60%),
    #0b1220;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 16px;
  z-index: 60;
  border-right: 1px solid rgba(148, 163, 184, .08);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  margin-bottom: 14px;
}
.brand-logo {
  width: 42px; height: 42px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .5px;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #ec4899);
  box-shadow: 0 8px 20px -6px rgba(99, 102, 241, .8);
}
.brand-text { min-width: 0; }
.brand-text strong {
  display: block;
  color: #f8fafc;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-text span { font-size: 11px; color: #94a3b8; letter-spacing: .02em; }

.nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 2px 10px; }
.nav::-webkit-scrollbar { width: 12px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar-thumb { background: #475569; border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
.nav::-webkit-scrollbar-thumb:hover { background: #64748b; background-clip: content-box; }
.nav-group { margin-top: 14px; }
.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  color: #64748b;
  padding: 8px 12px 6px;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #aebccf;
  font-size: 13.5px;
  font-weight: 500;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  margin-bottom: 2px;
  position: relative;
  transition: background .15s, color .15s;
}
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav-item:hover { background: rgba(148, 163, 184, .09); color: #f1f5f9; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, .22), rgba(99, 102, 241, .08));
  color: #fff;
  font-weight: 600;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -2px; top: 8px; bottom: 8px;
  width: 3px;
  border-radius: 4px;
  background: #818cf8;
}
.nav-item.active svg { color: #a5b4fc; opacity: 1; }
.nav-count {
  margin-left: auto;
  background: rgba(148, 163, 184, .16);
  color: #e2e8f0;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}
.nav-item.active .nav-count { background: rgba(165, 180, 252, .22); color: #e0e7ff; }
.nav-count.is-alert { background: rgba(248, 113, 113, .22); color: #fecaca; }

.sidebar-foot { border-top: 1px solid rgba(148, 163, 184, .12); padding-top: 12px; }
.sidebar-foot-card {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(148, 163, 184, .06);
  margin-bottom: 8px;
}
.sidebar-foot-card .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34d399;
  margin-top: 5px;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, .12);
  flex: none;
}
.sidebar-foot-card strong { display: block; font-size: 11.5px; color: #e2e8f0; font-weight: 600; }
.sidebar-foot-card small { font-size: 10.5px; color: #94a3b8; line-height: 1.35; display: block; }
.sidebar-link {
  display: flex; align-items: center; gap: 9px;
  background: none; border: 0;
  color: #94a3b8;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  width: 100%;
  text-align: left;
}
.sidebar-link svg { width: 15px; height: 15px; }
.sidebar-link:hover { background: rgba(148, 163, 184, .08); color: #e2e8f0; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 30px;
  background: rgba(244, 246, 251, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, .9);
}
.page-head { min-width: 0; flex: 1; }
.page-head h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-head p { font-size: 12.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.date-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.date-pill svg { width: 14px; height: 14px; }
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px 4px 5px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.user-chip:hover { border-color: #c7d2fe; box-shadow: 0 4px 14px -8px rgba(79, 70, 229, .5); }
.user-chip > svg { width: 14px; height: 14px; color: var(--muted-2); flex: none; }
.user-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; max-width: 140px; }
.user-meta strong { font-size: 12.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.user-meta small { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.menu-btn { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .06s;
  background: #fff;
  color: var(--ink-2);
  border-color: var(--line);
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: #f8fafc; border-color: #d7ddea; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, #5b52ee, #4f46e5);
  border-color: #4f46e5;
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(79, 70, 229, .8);
}
.btn-primary:hover { background: linear-gradient(180deg, #4f46e5, #4338ca); border-color: #4338ca; }
.btn-soft { background: var(--primary-soft); border-color: transparent; color: var(--primary-dark); }
.btn-soft:hover { background: #e0e7ff; border-color: transparent; }
.btn-danger { background: #fff; border-color: #fecaca; color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: #fca5a5; }
.btn-danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger-solid:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: #eef1f7; color: var(--ink); border-color: transparent; }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.icon-btn {
  width: 34px; height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { background: #eef1f7; color: var(--ink); }
.icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 600; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.grow { flex: 1; }
.sep { height: 1px; background: var(--line-2); margin: 4px 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 0;
}
.card-head.with-border { padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.card-title { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.card-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 18px 20px; }
.card-body.tight { padding: 12px 20px; }
.card-body.flush { padding: 0; }

/* ---------- KPI ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.kpi-label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.kpi-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  flex: none;
}
.kpi-icon svg { width: 18px; height: 18px; }
.kpi-icon.green { background: var(--green-soft); color: var(--green); }
.kpi-icon.amber { background: var(--amber-soft); color: var(--amber); }
.kpi-icon.red { background: var(--red-soft); color: var(--red); }
.kpi-icon.sky { background: var(--sky-soft); color: var(--sky); }
.kpi-icon.violet { background: var(--violet-soft); color: var(--violet); }
.kpi-value { font-size: 24px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.kpi-foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 11.5px; color: var(--muted); }
.kpi-foot svg { width: 13px; height: 13px; }
.trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 11.5px; padding: 1px 6px; border-radius: 6px; }
.trend.up { color: var(--green); background: var(--green-soft); }
.trend.down { color: var(--red); background: var(--red-soft); }
.trend.flat { color: var(--muted); background: #f1f5f9; }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid transparent;
}
.pill .dot-s { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill-green { background: var(--green-soft); color: #047857; }
.pill-blue { background: var(--sky-soft); color: #0369a1; }
.pill-amber { background: var(--amber-soft); color: #b45309; }
.pill-red { background: var(--red-soft); color: #b91c1c; }
.pill-violet { background: var(--violet-soft); color: #6d28d9; }
.pill-pink { background: var(--pink-soft); color: #be185d; }
.pill-gray { background: #f1f5f9; color: #64748b; }
.pill-dark { background: #0f172a; color: #fff; }
.pill-outline { background: #fff; border-color: var(--line); color: var(--muted); }
.badge-cat {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
  padding: 2px 8px; border-radius: 6px;
}
.cat-photos { background: var(--pink-soft); color: #be185d; }
.cat-banderoles { background: var(--amber-soft); color: #b45309; }
.cat-flyers { background: var(--sky-soft); color: #0369a1; }
.cat-affiches { background: var(--green-soft); color: #047857; }
.cat-autres { background: #f1f5f9; color: #475569; }

/* ---------- Avatars ---------- */
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700;
  flex: none;
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.avatar.lg { width: 46px; height: 46px; font-size: 14px; }
.avatar.sm { width: 28px; height: 28px; font-size: 10px; }
.av-0 { background: #eef2ff; color: #4338ca; }
.av-1 { background: #fdf2f8; color: #be185d; }
.av-2 { background: #ecfdf5; color: #047857; }
.av-3 { background: #fffbeb; color: #b45309; }
.av-4 { background: #f0f9ff; color: #0369a1; }
.av-5 { background: #f5f3ff; color: #6d28d9; }
.av-6 { background: #fef2f2; color: #b91c1c; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data thead th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted-2);
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
  white-space: nowrap;
}
table.data thead th:first-child { padding-left: 20px; }
table.data thead th:last-child { padding-right: 20px; }
table.data tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tbody td:first-child { padding-left: 20px; }
table.data tbody td:last-child { padding-right: 20px; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: #fafbff; }
table.data tbody tr.clickable { cursor: pointer; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .actions { display: flex; justify-content: flex-end; gap: 2px; }
.cell-main { font-weight: 600; color: var(--ink); }
.cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.cell-flex { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-flex .grow { min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .label {
  font-size: 11.5px;
  font-weight: 650;
  color: #475569;
  letter-spacing: .01em;
}
.field .hint { font-size: 11px; color: var(--muted-2); }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  min-height: 38px;
}
.textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}
.input::placeholder, .textarea::placeholder { color: #b6c1d0; }
.input.sm, .select.sm { min-height: 32px; padding: 5px 9px; font-size: 12px; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  padding-right: 32px;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 9px 0 0 9px; }
.input-group .addon {
  display: grid; place-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 9px 9px 0;
  background: #f8fafc;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}
.check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, background .15s;
}
.check:hover { border-color: #c7d2fe; background: #fafbff; }
.check input { accent-color: var(--primary); margin-top: 2px; flex: none; }
.check .check-title { font-size: 12.5px; font-weight: 600; }
.check .check-sub { font-size: 11px; color: var(--muted); }
.check.checked { border-color: #a5b4fc; background: #f5f7ff; }

/* ---------- Toolbar / filters ---------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-2);
  background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
}
.search-box { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.search-box svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--muted-2); pointer-events: none;
}
.search-box .input { padding-left: 33px; }
.toolbar .select { width: auto; min-width: 130px; }
.toolbar .spacer { flex: 1; }
.result-count { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding: 0 20px; background: #fff; }
.tab {
  border: 0; background: none;
  padding: 11px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 6px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab .count { background: #f1f5f9; color: var(--muted); font-size: 10.5px; padding: 1px 6px; border-radius: 20px; }
.tab.active .count { background: var(--primary-soft); color: var(--primary-dark); }

/* ---------- Empty ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 54px 24px;
  color: var(--muted);
}
.empty .empty-icon {
  width: 54px; height: 54px;
  border-radius: 16px;
  background: #f4f6fb;
  display: grid; place-items: center;
  color: var(--muted-2);
  margin-bottom: 14px;
}
.empty .empty-icon svg { width: 24px; height: 24px; }
.empty h3 { font-size: 14px; color: var(--ink); margin-bottom: 5px; }
.empty p { font-size: 12.5px; max-width: 360px; margin-bottom: 16px; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 18px 30px;
  overflow-y: auto;
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff;
  width: 100%;
  max-width: 620px;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn .18s ease;
  margin: auto 0;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
.modal.modal-lg { max-width: 880px; }
.modal.modal-xl { max-width: 1080px; }
.modal.modal-sm { max-width: 440px; }
.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line-2);
}
.modal-head h2 { font-size: 16px; font-weight: 700; letter-spacing: -.015em; }
.modal-head p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.modal-head .icon-btn { margin-left: auto; margin-top: -4px; }
.modal-body { padding: 20px 22px; max-height: calc(100vh - 240px); overflow-y: auto; }
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--line-2);
  background: #fbfcfe;
  flex-wrap: wrap;
}
.modal-foot .left { margin-right: auto; display: flex; gap: 8px; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0f172a;
  color: #f1f5f9;
  padding: 11px 15px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn .2s ease both;
  max-width: 380px;
  pointer-events: auto;
}
.toast svg { width: 16px; height: 16px; flex: none; }
.toast.success svg { color: #34d399; }
.toast.error { background: #7f1d1d; }
.toast.error svg { color: #fca5a5; }
.toast.info svg { color: #93c5fd; }
.toast.out { animation: toastOut .18s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(16px); } }

/* ---------- Charts ---------- */
.chart-wrap { padding: 6px 0 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.chart-legend .item { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); }
.chart-legend .swatch { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.chart-legend strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.bars { display: flex; flex-direction: column; gap: 13px; }
.bar-row { display: grid; grid-template-columns: 108px 1fr 92px; align-items: center; gap: 11px; font-size: 12px; }
.bar-track { height: 8px; background: #f1f5f9; border-radius: 20px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 20px; background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.bar-row .bar-value { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut {
  width: 148px; height: 148px; border-radius: 50%;
  position: relative; flex: none;
}
.donut::after {
  content: ""; position: absolute; inset: 24px; border-radius: 50%; background: #fff;
}
.donut-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 1; text-align: center;
}
.donut-center strong { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.donut-center span { font-size: 10px; color: var(--muted); }

/* ---------- Production / kanban ---------- */
.kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(230px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  align-items: start;
}
.kanban-col {
  background: #eef2f9;
  border-radius: 14px;
  padding: 10px;
  min-height: 200px;
  border: 1px solid #e3e8f2;
  transition: background .15s, border-color .15s;
}
.kanban-col.drop { background: #e8edff; border-color: #a5b4fc; }
.kanban-head {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 6px 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #475569;
}
.kanban-head .count { margin-left: auto; background: #fff; border-radius: 20px; padding: 1px 7px; font-size: 10.5px; color: var(--muted); border: 1px solid #e2e8f0; }
.kanban-cards { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.job-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 12px;
  cursor: grab;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: box-shadow .15s, transform .1s;
}
.job-card:hover { box-shadow: 0 8px 20px -12px rgba(15, 23, 42, .3); transform: translateY(-1px); }
.job-card:active { cursor: grabbing; }
.job-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.job-num { font-size: 11px; font-weight: 700; color: var(--primary); letter-spacing: .01em; }
.job-title { font-size: 12.5px; font-weight: 600; line-height: 1.35; margin-bottom: 3px; }
.job-meta { font-size: 11px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.job-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 9px; padding-top: 8px; border-top: 1px dashed #eef1f7; }
.job-foot .amount { font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.job-actions { display: flex; gap: 2px; }
.job-actions .icon-btn { width: 24px; height: 24px; border-radius: 6px; }
.job-actions .icon-btn svg { width: 13px; height: 13px; }
.job-card.late { border-left: 3px solid #f87171; }
.kanban-empty { font-size: 11px; color: #94a3b8; text-align: center; padding: 14px 6px; border: 1px dashed #cbd5e1; border-radius: 9px; }

/* ---------- misc ---------- */
.progress { height: 6px; background: #f1f5f9; border-radius: 20px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 20px; background: var(--primary); }
.progress.green > span { background: var(--green); }
.progress.amber > span { background: var(--amber); }
.progress.red > span { background: var(--red); }
.divider { height: 1px; background: var(--line-2); margin: 16px 0; }
.avatar-list { display: flex; }
.avatar-list .avatar { margin-left: -8px; border: 2px solid #fff; }
.avatar-list .avatar:first-child { margin-left: 0; }
.info-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 12.5px; }
.info-row .k { color: var(--muted); display: flex; align-items: center; gap: 7px; }
.info-row .k svg { width: 14px; height: 14px; }
.info-row .v { font-weight: 600; text-align: right; }
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 11px;
  background: var(--amber-soft); border: 1px solid #fde68a; color: #92400e;
  font-size: 12px;
}
.alert svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.alert.red { background: var(--red-soft); border-color: #fecaca; color: #991b1b; }
.alert.blue { background: var(--sky-soft); border-color: #bae6fd; color: #075985; }
.alert strong { font-weight: 700; }
.alert ul { margin: 4px 0 0; padding-left: 16px; }
.alert li { margin-bottom: 2px; }
.alert[hidden] { display: none; }
.card[hidden] { display: none; }

/* ---------- Écran de connexion ---------- */
body.locked .app { display: none; }
.auth {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(700px 420px at 15% 0%, rgba(99, 102, 241, .35), transparent 60%),
    radial-gradient(560px 380px at 90% 100%, rgba(14, 165, 233, .22), transparent 60%),
    #0b1220;
}
body.locked .auth { display: flex; }
.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 20px;
  padding: 30px 30px 26px;
  box-shadow: var(--shadow-lg);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.auth-brand .brand-text strong { color: var(--ink); }
.auth-brand .brand-text span { color: var(--muted); }
.auth-title { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.auth-sub { font-size: 12.5px; color: var(--muted); margin: 4px 0 18px; }
.auth .field { margin-bottom: 14px; }
.auth-pass { position: relative; }
.auth-pass .input { padding-right: 44px; }
.auth-pass .icon-btn { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); }
.auth-pass .icon-btn.on { color: var(--primary); }
.auth-submit { justify-content: center; margin-top: 4px; }

/* ---------- Menu utilisateur (topbar) ---------- */
.user-wrap { position: relative; }
.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 244px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 70;
}
.user-menu[hidden] { display: none; }
.user-menu-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.user-menu-head strong { display: block; font-size: 13px; color: var(--ink); }
.user-menu-head small { font-size: 11px; color: var(--muted); }
.user-menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 10px; border: 0; background: transparent; border-radius: 9px;
  font-size: 13px; color: var(--ink-2); text-align: left;
}
.user-menu-item:hover { background: #f4f6fb; }
.user-menu-item.danger { color: var(--red); }
.user-menu-item.danger:hover { background: var(--red-soft); }
.user-menu-item svg { width: 16px; height: 16px; }
.user-menu-item[hidden] { display: none; }

/* ---------- Grille de permissions ---------- */
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 4px; }
.perm-group { background: #fbfcfe; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.perm-group-title { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 7px; }
.perm-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; padding: 3px 0; color: var(--ink-2); cursor: pointer; }
.perm-item input { accent-color: var(--primary); width: 15px; height: 15px; }
.perm-item input:disabled { cursor: not-allowed; }
.chip-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  font-size: 11.5px;
  padding: 5px 10px;
  color: var(--muted);
  font-weight: 600;
}
.chip-btn:hover { border-color: #c7d2fe; color: var(--primary); }
.chip-btn.active { background: var(--primary-soft); border-color: #c7d2fe; color: var(--primary-dark); }

/* order detail */
.detail-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.detail-head .big { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.summary-box { background: #fbfcfe; border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 16px; }
.summary-line { display: flex; justify-content: space-between; gap: 14px; font-size: 12.5px; padding: 3px 0; color: var(--muted); }
.summary-line strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.summary-line.total { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 9px; font-size: 14px; color: var(--ink); font-weight: 700; }
.summary-line.total strong { font-size: 16px; color: var(--primary-dark); }
.line-table td { vertical-align: top; }
.line-desc { font-weight: 600; font-size: 12.5px; }
.line-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); font-size: 12px; }
.pay-row:last-child { border-bottom: 0; }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 2px; background: var(--line-2); }
.timeline-item { position: relative; padding: 0 0 13px 8px; font-size: 12px; }
.timeline-item::before { content: ""; position: absolute; left: -18px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: #c7d2fe; border: 2px solid #fff; box-shadow: 0 0 0 1px #c7d2fe; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item .t { color: var(--muted); font-size: 10.5px; }

/* ---------- Print root ---------- */
.print-root { display: none; }

.doc {
  background: #fff;
  color: #0f172a;
  font-family: var(--font);
  width: 210mm;
  min-height: 297mm;
  padding: 16mm 16mm 12mm;
  margin: 0 auto;
  font-size: 10.5pt;
  line-height: 1.45;
}
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 14px; border-bottom: 2px solid #0f172a; }
.doc-brand { display: flex; gap: 12px; align-items: center; }
.doc-logo {
  width: 46px; height: 46px; border-radius: 10px;
  background: #312e81; color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 15px;
}
.doc-brand h1 { font-size: 15pt; letter-spacing: -.02em; }
.doc-brand p { font-size: 8pt; color: #64748b; margin-top: 1px; }
.doc-brand .doc-contact { font-size: 7.8pt; color: #475569; margin-top: 5px; line-height: 1.5; }
.doc-type { text-align: right; }
.doc-type .kind { font-size: 19pt; font-weight: 800; letter-spacing: -.02em; color: #312e81; text-transform: uppercase; }
.doc-type .num { font-size: 10pt; font-weight: 700; margin-top: 2px; }
.doc-type .dates { font-size: 8pt; color: #475569; margin-top: 5px; line-height: 1.6; }
.doc-parties { display: flex; justify-content: space-between; gap: 20px; margin: 16px 0 14px; }
.doc-party { flex: 1; }
.doc-party .lbl { font-size: 7.5pt; text-transform: uppercase; letter-spacing: .08em; color: #64748b; font-weight: 700; margin-bottom: 4px; }
.doc-party .name { font-size: 11pt; font-weight: 700; }
.doc-party .line { font-size: 8.6pt; color: #334155; }
.doc-party.meta { text-align: right; }
.doc table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.doc table th {
  background: #f1f5f9;
  font-size: 7.8pt; text-transform: uppercase; letter-spacing: .05em;
  text-align: left; padding: 7px 8px; color: #334155;
  border-bottom: 1px solid #cbd5e1;
}
.doc table th.num, .doc table td.num { text-align: right; }
.doc table td { padding: 7px 8px; border-bottom: 1px solid #e2e8f0; font-size: 9pt; vertical-align: top; }
.doc table td .sub { font-size: 7.6pt; color: #64748b; margin-top: 1px; }
.doc-total-row { display: flex; justify-content: flex-end; margin-top: 12px; }
.doc-totals { width: 78mm; }
.doc-totals .l { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 9pt; color: #475569; }
.doc-totals .l strong { color: #0f172a; font-variant-numeric: tabular-nums; }
.doc-totals .l.grand { border-top: 2px solid #0f172a; margin-top: 5px; padding-top: 7px; font-size: 10.5pt; color: #0f172a; font-weight: 700; }
.doc-totals .l.grand strong { font-size: 13pt; color: #312e81; }
.doc-notes { margin-top: 14px; display: flex; gap: 20px; align-items: flex-start; }
.doc-notes .block { flex: 1; }
.doc-notes .lbl { font-size: 7.5pt; text-transform: uppercase; letter-spacing: .08em; color: #64748b; font-weight: 700; margin-bottom: 3px; }
.doc-notes p { font-size: 8pt; color: #475569; }
.doc-sign { margin-top: 16px; display: flex; justify-content: flex-end; gap: 16px; }
.doc-sign .box { width: 60mm; border-top: 1px solid #94a3b8; padding-top: 4px; text-align: center; font-size: 7.8pt; color: #64748b; margin-top: 26px; }
.doc-foot { margin-top: 12px; padding-top: 8px; border-top: 1px solid #cbd5e1; display: flex; justify-content: space-between; gap: 12px; font-size: 7.4pt; color: #64748b; }
.doc-stamp {
  display: inline-block; margin-top: 8px;
  border: 1.5px solid #16a34a; color: #15803d;
  font-size: 8pt; font-weight: 800; letter-spacing: .1em;
  padding: 3px 8px; border-radius: 4px; transform: rotate(-3deg);
}
.doc-stamp.paid { border-color: #16a34a; color: #15803d; }
.doc-stamp.unpaid { border-color: #64748b; color: #475569; }
.doc-stamp.partial { border-color: #d97706; color: #b45309; }

/* ---------- Sélecteur de catégorie (devis express) ---------- */
.cat-pick {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 11px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.cat-pick:hover { border-color: #c7d2fe; background: #fafbff; }
.cat-pick.active { border-color: #a5b4fc; background: #f5f7ff; box-shadow: 0 0 0 3px rgba(99, 102, 241, .1); }
.cat-pick .cp-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.cat-pick .cp-ico svg { width: 16px; height: 16px; }

/* ---------- Classements ---------- */
.rank-badge {
  width: 20px; height: 20px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 10.5px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex: none;
}

/* ---------- Nav ---------- */
.nav-item .nav-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kanban { grid-template-columns: repeat(5, 260px); }
}
@media (max-width: 1100px) {
  .grid-2, .grid-3, .grid-2-1, .grid-1-2 { grid-template-columns: minmax(0, 1fr); }
  .grid-3.keep { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 0 60px rgba(0, 0, 0, .4); }
  .sidebar.open { transform: none; }
  .sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 55;
  }
  .sidebar-overlay.show { display: block; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid !important; }
  .topbar { padding: 12px 18px; }
  .view { padding: 20px 18px 54px; }
}
@media (max-width: 760px) {
  .kpi-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .grid-3.keep { grid-template-columns: minmax(0, 1fr); }
  .form-grid, .form-grid.three { grid-template-columns: minmax(0, 1fr); }
  .topbar-actions .date-pill { display: none; }
  .user-chip .user-meta { display: none; }
  .user-chip { padding: 4px; }
  .page-head p { display: none; }
  .toolbar { padding: 12px 14px; }
  .search-box { max-width: none; flex-basis: 100%; }
  .modal-backdrop { padding: 16px 10px; }
  .modal-body { max-height: calc(100vh - 200px); }
  .modal-foot .left { width: 100%; margin-bottom: 6px; }
  .kpi-value { font-size: 22px; }
  .bar-row { grid-template-columns: 82px 1fr 80px; }
  .doc { width: 100%; padding: 10mm; }
}
@media (max-width: 520px) {
  .topbar-actions .btn span.label { display: none; }
  .page-head h1 { font-size: 17px; }
  .view { padding: 16px 12px 48px; }
}

/* ============================================================
   Logo image, imprimeries & upload
   ============================================================ */
.logo-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-logo .logo-img { background: #fff; border-radius: 9px; padding: 3px; }
.doc-logo .logo-img { background: #fff; border-radius: 7px; padding: 2px; }

/* Sélecteur d'imprimerie (compte maître) */
.imprimerie-picker {
  display: flex; align-items: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 10px 3px 12px; box-shadow: var(--shadow);
}
.imprimerie-picker[hidden] { display: none; }
.imprimerie-picker-ic { color: var(--primary); display: inline-flex; }
.imprimerie-select {
  border: 0 !important; background: transparent !important; padding: 2px 4px !important;
  font-weight: 600; font-size: 13px; max-width: 220px; height: auto !important;
  box-shadow: none !important; color: var(--ink);
}

/* Cartes imprimeries */
.imp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.imp-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.imp-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft), var(--shadow); }
.imp-card-head { display: flex; align-items: center; gap: 12px; }
.imp-logo {
  width: 48px; height: 48px; flex: none; border-radius: 12px;
  display: grid; place-items: center; overflow: hidden;
  font-weight: 800; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #ec4899);
}
.imp-logo .logo-img { background: #fff; border-radius: 10px; padding: 3px; }
.imp-name { font-weight: 700; font-size: 15px; }
.imp-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.imp-card-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; }
.imp-card-foot .btn { padding: 7px 11px; font-size: 12.5px; }

/* Upload de logo */
.logo-upload { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo-preview {
  width: 84px; height: 84px; flex: none; border-radius: 14px;
  display: grid; place-items: center; overflow: hidden;
  font-weight: 800; font-size: 22px; color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #ec4899);
  box-shadow: 0 8px 20px -8px rgba(99, 102, 241, .7);
}
.logo-preview .logo-img { background: #fff; }

@media (max-width: 760px) {
  .imprimerie-select { max-width: 130px; }
}

@media print {
  body { background: #fff; }
  .app, #modal-root, #toasts, .sidebar, .topbar { display: none !important; }
  .print-root { display: block !important; }
  .doc { width: auto; min-height: 0; padding: 0; box-shadow: none; }
  @page { size: A4; margin: 12mm; }
}
