/* CRM des commerciaux : modèle recommandé du 23/10/2026 (comme leur Sheet sur ordinateur, fiche sur téléphone). */
:root {
  --bg: #F5F6F8; --panel: #FFFFFF; --ink: #14181F; --mute: #566070; --line: #E3E6EB; --soft: #EEF1F5;
  --accent: #1F4FA8; --accent-ink: #FFFFFF; --ok: #0F7A3D; --ok-bg: #E3F4EA; --warn: #B45309; --warn-bg: #FFF4E0;
  --bad: #B42318; --bad-bg: #FDECEC; --wa: #14532D; --wa-bg: #E8F5EC; --kompass-bg: #FFF8E6; --kompass-line: #F3D18A;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); }
a { color: var(--accent); }
h1 { font-size: 20px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 8px; }
.muted { color: var(--mute); }
.small { font-size: 13px; }
.pad { padding: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }

button, .btn { font: 600 14px var(--font); border-radius: 10px; padding: 10px 14px; min-height: 44px; border: 1px solid #D5DAE1; background: var(--panel); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button:disabled { opacity: .55; cursor: default; }
.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.wa { background: var(--wa-bg); color: var(--wa); border-color: #BFE3CB; }
.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--mute); font-weight: 500; text-decoration: underline; }
input, select, textarea { font: 15px var(--font); color: var(--ink); background: var(--panel); border: 1px solid #D5DAE1; border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; }
label { font-size: 13px; color: var(--mute); display: block; margin-bottom: 4px; }

/* connexion */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .box { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px; }

/* en-tête */
.top { background: var(--panel); border-bottom: 1px solid var(--line); padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; z-index: 5; }
.cities { display: flex; gap: 4px; overflow-x: auto; }
.cities a { text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 14px; color: var(--mute); background: var(--soft); white-space: nowrap; }
.cities a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.views { display: flex; gap: 6px; overflow-x: auto; }
.views a { text-decoration: none; padding: 7px 12px; border-radius: 20px; font-size: 13px; color: var(--ink); background: var(--soft); white-space: nowrap; }
.views a[aria-current="page"] { background: var(--ink); color: #fff; font-weight: 600; }

/* liste : cartes sur téléphone, tableau sur ordinateur */
.list { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card .name { font-weight: 600; font-size: 16px; }
.card .actions { display: flex; gap: 8px; }
.card .actions > * { flex: 1; }
.table-wrap { display: none; margin: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 1000px; }
th { text-align: left; background: #F0F2F5; color: #3D4654; font-weight: 600; padding: 10px; white-space: nowrap; }
td { padding: 9px 10px; border-top: 1px solid #E8EBEF; vertical-align: middle; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #F7F9FC; }
@media (min-width: 900px) {
  .list { display: none; }
  .table-wrap { display: block; }
}

.pill { display: inline-block; border-radius: 6px; padding: 4px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--soft); color: var(--ink); }
.q-Chaud { background: var(--ok-bg); color: var(--ok); }
.q-Tiède { background: var(--warn-bg); color: var(--warn); }
.q-Froid { background: #E8EEFB; color: var(--accent); }
.q-Invalide { background: var(--soft); color: var(--mute); }
.late { color: var(--bad); font-weight: 600; }

/* fiche */
.sheet { position: fixed; inset: 0; background: rgba(20, 24, 31, .35); display: flex; justify-content: flex-end; z-index: 10; }
.sheet .panel { background: var(--bg); width: 100%; max-width: 480px; height: 100%; overflow-y: auto; display: flex; flex-direction: column; }
.sheet header { background: var(--panel); border-bottom: 1px solid var(--line); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.sheet section { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.contact { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.new-contact { background: var(--panel); border: 2px solid var(--accent); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.outcomes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.outcomes button { font-weight: 500; font-size: 13px; padding: 10px 6px; text-align: center; }
.outcomes button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.quals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.quals button[aria-pressed="true"] { outline: 2px solid var(--ink); }
.kompass { background: var(--kompass-bg); border: 1px solid var(--kompass-line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }

/* équipe */
.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); padding: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.kpi .v { font-size: 24px; font-weight: 700; }

.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%) translateY(8px); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; opacity: 0; transition: .2s; pointer-events: none; max-width: 90vw; z-index: 20; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { background: var(--bad); }

/* aide */
.faq { max-width: 720px; margin: 0 auto; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.faq summary { font-weight: 600; cursor: pointer; min-height: 28px; }
.faq li { margin: 6px 0; }
