/* ConformIA — design system sobre, professionnel (cible : experts-comptables) */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--primary); text-decoration: none; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { font-weight: 800; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 8px; padding: 10px 18px; font-weight: 600; font-size: .9rem;
  cursor: pointer; transition: opacity .15s, transform .1s;
}
.btn:hover { opacity: .9; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px;
}
.input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: .9rem; font-family: inherit; background: #fff; color: var(--text);
}
.input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
label { font-size: .8rem; font-weight: 600; color: var(--muted); display: block; margin-bottom: 4px; }
.field { margin-bottom: 14px; }

.container { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em;
}
.badge-non_demarre { background: #fee2e2; color: var(--danger); }
.badge-pdp_choisie { background: #fef3c7; color: var(--warning); }
.badge-pret_a_recevoir { background: #dbeafe; color: var(--primary-dark); }
.badge-pret_a_emettre { background: #dcfce7; color: var(--success); }

.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 20px; }
.kanban-col { background: #eef1f8; border-radius: var(--radius); padding: 14px; min-height: 200px; }
.kanban-col h3 { font-size: .8rem; margin: 0 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kanban-card {
  background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
  margin-bottom: 8px; font-size: .85rem; cursor: pointer;
}
.kanban-card:hover { border-color: var(--primary); }
.kanban-card .meta { color: var(--muted); font-size: .72rem; margin-top: 4px; }

.toast-container { position: fixed; top: 20px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--text); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: .85rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.15); animation: slidein .2s ease;
}
@keyframes slidein { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.5); display: flex; align-items: center;
  justify-content: center; z-index: 1000; padding: 20px;
}
.modal { background: #fff; border-radius: 14px; padding: 28px; max-width: 560px; width: 100%; max-height: 85vh; overflow-y: auto; }
.modal-title { font-size: 1.2rem; font-weight: 800; margin: 0 0 4px; }
.modal-close { float: right; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); }

.spinner {
  display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }
