:root {
  --black: #070808;
  --panel: #0a0b0b;
  --panel-soft: #0d0e0e;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text: #f2f2f2;
  --muted: #777b80;
  --muted-2: #45494e;
  --green: #20d66b;
  --yellow: #f5cf00;
  --orange: #ff8a1f;
  --red: #ff3848;
  --body: "Inter", Arial, sans-serif;
  --heading: "Oswald", "Arial Narrow", Arial, sans-serif;
}

body[data-auth-shell] { visibility: hidden; }

* { box-sizing: border-box; }

/* Un `display` explicite l'emporterait sur l'attribut hidden : les panneaux
   masqués resteraient visibles. */
[hidden] { display: none !important; }

html {
  min-height: 100%;
  background: var(--black);
  color: var(--text);
  font-family: var(--body);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.035), transparent 26rem),
    var(--black);
}

.crm-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
}

.crm-app.nav-collapsed { grid-template-columns: 88px minmax(0, 1fr); }

.crm-rail {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100vh;
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background: #080909;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.crm-rail::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.crm-rail-logo {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--heading);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.crm-rail-logo img { width: 34px; height: 34px; object-fit: contain; flex: 0 0 34px; }

.crm-rail-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin: 20px 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.crm-rail-toggle:hover { color: var(--green); border-color: rgba(32, 214, 107, 0.45); }
.crm-rail-toggle svg, .crm-rail-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.crm-rail-link svg rect { fill: none; }
.crm-rail-nav { display: grid; gap: 6px; }

.crm-rail-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
  padding: 14px 10px 0;
  border-top: 1px solid var(--line);
}
.crm-rail-account span { min-width: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.crm-rail-account button { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.crm-rail-account button:hover { color: var(--green); border-color: rgba(32, 214, 107, 0.45); }
.crm-rail-account button:disabled { opacity: 0.5; cursor: wait; }
.crm-rail-account svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.crm-rail-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 11px;
  border-radius: 6px;
  color: #676c71;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.crm-rail-link:hover, .crm-rail-link.active { color: var(--green); background: rgba(32, 214, 107, 0.07); }
.crm-rail-link svg { flex: 0 0 18px; }

.nav-collapsed .crm-rail-logo span,
.nav-collapsed .crm-rail-link span { display: none; }
.nav-collapsed .crm-rail-logo, .nav-collapsed .crm-rail-link { justify-content: center; }
.nav-collapsed .crm-rail-toggle { margin-inline: auto; }
.nav-collapsed .crm-rail-account { justify-content: center; padding-inline: 0; }
.nav-collapsed .crm-rail-account span { display: none; }

button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--heading); font-weight: 600; letter-spacing: 0.01em; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.crm-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 44px) clamp(14px, 4vw, 34px) 96px;
}

.kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.crm-head {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.crm-head h1 { font-size: 40px; margin: 6px 0 8px; }
.subtitle { color: var(--muted); max-width: 62ch; line-height: 1.6; font-size: 14px; }

.action-main {
  height: 42px;
  padding: 0 20px;
  border: 0;
  border-radius: 6px;
  background: var(--green);
  color: #041008;
  font-weight: 700;
  cursor: pointer;
}
.action-main:hover { filter: brightness(1.08); }
.action-main:disabled { opacity: 0.5; cursor: progress; }

.action-ghost {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.action-ghost:hover { border-color: var(--green); color: var(--green); }

:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* Onglets */
.tabs { display: flex; gap: 6px; margin: 28px 0 20px; flex-wrap: wrap; }
.tab {
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--panel); border-color: var(--line-strong); color: var(--text); font-weight: 600; }

.panel-view { display: none; }
.panel-view.active { display: block; }
.view-intro { color: var(--muted); line-height: 1.65; font-size: 14px; max-width: 76ch; margin-bottom: 22px; }

/* Bandeaux d'honnêteté sur les données */
.notices { display: grid; gap: 10px; margin-bottom: 20px; }
.notice {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-left-width: 3px;
  border-radius: 8px;
  background: var(--panel);
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.notice strong { color: var(--text); font-weight: 600; }
.notice.info { border-left-color: var(--muted-2); }
.notice.warn { border-left-color: var(--orange); }
.notice.error { border-left-color: var(--red); }

/* Indicateurs */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.stat {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}
.stat span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.stat strong { font-family: var(--heading); font-size: 28px; display: block; line-height: 1; }
.stat small { display: block; margin-top: 6px; font-size: 12px; color: var(--muted-2); }
.stat.chaud strong { color: var(--green); }
.stat.tiede strong { color: var(--yellow); }
.stat.froid strong { color: var(--muted); }

/* Filtres */
.toolbar {
  display: grid;
  grid-template-columns: minmax(200px, 2fr) repeat(3, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.field { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.field input, .field select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
}

/* Liste et fiche */
.split { display: block; }
.list-wrap { width: min(760px, 100%); }
.list-count { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.prospect-list { display: grid; gap: 10px; }

.prospect {
  width: 100%;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  text-align: left;
  cursor: pointer;
}
.prospect:hover { border-color: var(--line-strong); }
.prospect[aria-pressed="true"] { border-color: var(--green); background: var(--panel-soft); }

.score-badge {
  display: grid;
  place-content: center;
  height: 52px;
  border-radius: 8px;
  font-family: var(--body);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid var(--line-strong);
}
.score-badge.chaud { color: var(--green); border-color: rgba(32, 214, 107, 0.4); background: rgba(32, 214, 107, 0.08); }
.score-badge.tiede { color: var(--yellow); border-color: rgba(245, 207, 0, 0.35); background: rgba(245, 207, 0, 0.07); }
.score-badge.froid { color: var(--muted); }

.prospect-main { min-width: 0; }
.prospect-name { font-weight: 600; font-size: 15px; margin-bottom: 4px; overflow-wrap: anywhere; }
.prospect-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; }
.prospect-meta span::after { content: "·"; margin-left: 8px; color: var(--muted-2); }
.prospect-meta span:last-child::after { content: ""; }
.prospect-action { margin-top: 8px; font-size: 12px; color: var(--green); }
.prospect-action.blocked { color: var(--muted-2); }
.prospect-open {
  display: block;
  width: fit-content;
  margin-top: 10px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.tag {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
}
.tag.signe { color: var(--green); border-color: rgba(32, 214, 107, 0.4); }
.tag.refuse { color: var(--red); border-color: rgba(255, 56, 72, 0.35); }

/* Fiche détaillée */
.detail-drawer {
  position: fixed;
  z-index: 60;
  top: 50%;
  right: clamp(12px, 2vw, 28px);
  width: min(560px, calc(100vw - 120px));
  max-height: calc(100dvh - 32px);
  transform: translateY(-50%);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: -20px 0 48px rgba(0, 0, 0, 0.48);
  overflow: hidden;
}
.detail-bar {
  min-height: 52px;
  padding: 0 12px 0 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.detail-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.detail-close span { font-size: 26px; font-weight: 300; line-height: 1; }
.detail-close:hover { color: var(--text); border-color: var(--line-strong); }
.detail {
  min-height: 0;
  padding: 20px;
  display: grid;
  gap: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.detail-empty { color: var(--muted); font-size: 14px; line-height: 1.6; display: grid; gap: 8px; }
.detail h2 { font-size: 20px; }
.detail h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-family: var(--body); font-weight: 600; }
.detail section { display: grid; gap: 10px; }

.detail-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.detail-head .score-badge {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  font-size: 17px;
}
.detail-contact { font-size: 13px; color: var(--muted); line-height: 1.7; overflow-wrap: anywhere; }
.detail-contact a { color: var(--text); }
.commercial-facts { display: grid; gap: 0; margin: 0; }
.commercial-facts div {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.commercial-facts div:first-child { border-top: 0; }
.commercial-facts dt { color: var(--muted); }
.commercial-facts dd { margin: 0; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.source-note { color: var(--muted-2); font-size: 11px; line-height: 1.5; }

.score-summary {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}
.score-formula { font-size: 12px; color: var(--muted); }
.reasons { display: grid; gap: 6px; font-size: 13px; line-height: 1.55; }
.reasons li { padding-left: 14px; position: relative; color: var(--muted); }
.reasons li::before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--muted-2); }
.reasons li:first-child { color: var(--text); font-weight: 600; }
.reasons li:first-child::before { background: var(--green); }

.criteria { display: grid; gap: 9px; }
.criterion { display: grid; gap: 5px; font-size: 12px; }
.criterion-head { display: flex; justify-content: space-between; gap: 10px; }
.criterion-head span:last-child { color: var(--muted); }
.bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); border-radius: 3px; }
.criterion small { color: var(--muted-2); line-height: 1.5; }
.criterion.exclu .criterion-head span:first-child { color: var(--muted); }
.criterion.exclu small { color: var(--orange); }

.steps { display: grid; gap: 8px; }
.step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 13px;
}
.step-when { font-size: 11px; color: var(--muted); white-space: nowrap; }
.step-objective { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 3px; }
.step.due { border-color: rgba(255, 138, 31, 0.4); }
.step.due .step-when { color: var(--orange); }

.blocked-note {
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.timeline { display: grid; gap: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.timeline li:first-child { border-top: 0; }
.timeline time { font-size: 11px; color: var(--muted); }
.timeline p { color: var(--muted); font-size: 12px; margin-top: 3px; line-height: 1.5; overflow-wrap: anywhere; }

/* Campagnes */
.segment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.segment {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  padding: 18px;
  display: grid;
  gap: 12px;
  align-content: start;
}
.segment h3 { font-family: var(--heading); font-size: 17px; text-transform: none; letter-spacing: 0; color: var(--text); font-weight: 600; }
.segment-criterion { font-size: 12px; color: var(--muted); line-height: 1.5; }
.segment-total { font-family: var(--heading); font-size: 26px; }
.channels { display: grid; gap: 6px; font-size: 12px; }
.channel { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.channel strong { color: var(--text); font-weight: 600; }
.channel-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.draft-zone { margin-top: 20px; }
.draft {
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--panel);
  padding: 20px;
  display: grid;
  gap: 14px;
}
.draft-badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(245, 207, 0, 0.4);
  color: var(--yellow);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: fit-content;
}
.draft pre {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--black);
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.draft-warnings { display: grid; gap: 6px; font-size: 12px; color: var(--orange); line-height: 1.5; }

/* Réglages */
.settings-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  padding: 20px;
  display: grid;
  gap: 14px;
  max-width: 560px;
  margin-bottom: 16px;
}
.settings-card h2 { font-size: 18px; }
.settings-card small { color: var(--muted); font-size: 12px; min-height: 16px; }
.settings-card dl { display: grid; gap: 8px; margin: 0; font-size: 13px; }
.settings-card dl div { display: flex; justify-content: space-between; gap: 12px; }
.settings-card dt { color: var(--muted); }

.empty-state {
  padding: 40px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

@media (max-width: 1020px) {
  .crm-app, .crm-app.nav-collapsed { display: block; }
  .crm-rail {
    position: sticky;
    height: auto;
    min-height: 66px;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .crm-rail-logo { height: 40px; }
  .crm-rail-toggle { margin: 0; }
  .crm-rail-nav {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 12px;
  }
  .crm-rail-account {
    grid-column: 1 / -1;
    margin-top: 12px;
    padding: 12px 0 0;
  }
  .nav-collapsed .crm-rail-account { display: none; }
  .nav-collapsed .crm-rail-nav { display: none; }
  .nav-collapsed .crm-rail-logo { justify-content: flex-start; }
  .nav-collapsed .crm-rail-logo span { display: inline; }
  .crm-rail-link { min-width: 0; }
  .detail-drawer {
    right: 12px;
    width: min(560px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
  }
}

@media (max-width: 720px) {
  .crm-shell { padding-top: 22px; }
  .crm-head h1 { font-size: 28px; }
  .toolbar { grid-template-columns: minmax(0, 1fr); }
  .crm-head { align-items: flex-start; }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .prospect { grid-template-columns: 44px minmax(0, 1fr); gap: 11px; }
  .score-badge { height: 44px; font-size: 17px; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-drawer {
    top: 8px;
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
    max-height: none;
    transform: none;
  }
  .detail { padding: 18px 16px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Vues de travail ---------- */

.vue-intro {
  max-width: 78ch;
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.vue-onglets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.vue-onglet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
}

.vue-onglet:hover { color: var(--text); }

.vue-onglet.active {
  border-color: rgba(32, 214, 107, 0.45);
  background: rgba(32, 214, 107, 0.08);
  color: var(--green);
  font-weight: 600;
}

.vue-compte {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  color: inherit;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.vue-critere {
  margin: 12px 0 14px;
  font-size: 12px;
  color: var(--muted-2);
}

/* Une table large scrolle dans son cadre, jamais la page. */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}

.vue-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}

.vue-table thead th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-strong);
  background: var(--panel-soft);
  color: var(--muted);
  font-family: var(--heading, inherit);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.vue-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: #b3b7b3;
}

.vue-table tbody tr:last-child td { border-bottom: 0; }
.vue-table tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }

.vue-nom {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.vue-nom:hover { color: var(--green); }

.vue-sous {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
}

a.vue-sous { color: var(--muted); }

.vue-retard {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--orange);
}

.vue-bloque {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--yellow);
}

.vue-vide {
  padding: 28px 16px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Formulaires reçus ---------- */

.form-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.form-item {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  padding: 15px 17px;
  display: grid;
  gap: 8px;
}

.form-tete {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.form-tete strong { font-size: 14px; color: var(--text); }

.form-date {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--muted-2);
}

.tag-source {
  border-color: rgba(32, 214, 107, 0.35);
  background: rgba(32, 214, 107, 0.08);
  color: var(--green);
}

.tag-alerte {
  border-color: rgba(245, 207, 0, 0.35);
  background: rgba(245, 207, 0, 0.08);
  color: var(--yellow);
}

.form-coord {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 12.5px;
  color: var(--muted);
}

.form-message {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
  color: #b3b7b3;
  overflow-wrap: anywhere;
}

.form-vide {
  padding: 28px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 640px) {
  .form-date { margin-left: 0; width: 100%; }
}

/* ---------- Ajout d'un prospect ---------- */

.ajout-barre {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.ajout-aide { font-size: 12px; color: var(--muted); }

.ajout-form {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
  padding: 19px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
}

.ajout-grille {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
}

.ajout-form .field { display: grid; gap: 6px; font-size: 12px; color: var(--muted); min-width: 0; }

.ajout-form input,
.ajout-form select,
.ajout-form textarea {
  width: 100%;
  min-width: 0;
  padding: 0 11px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #050606;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.ajout-form textarea {
  height: auto;
  padding: 9px 11px;
  line-height: 1.5;
  resize: vertical;
}

.ajout-consentement {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  cursor: pointer;
}

.ajout-consentement input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--green); }
.ajout-consentement strong { display: block; font-size: 13px; color: var(--text); }
.ajout-consentement small { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.5; color: var(--muted); }

.ajout-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ajout-actions small { font-size: 12px; line-height: 1.5; color: var(--muted); }

.action-secondaire {
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.action-secondaire:hover { color: var(--text); }

/* ---------- Actions sur la fiche prospect ---------- */

.fiche-actions { border-bottom: 1px solid var(--line); padding-bottom: 16px; }

.fiche-form { display: grid; gap: 11px; }

.fiche-grille {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
}

.fiche-form .field { display: grid; gap: 5px; font-size: 11.5px; color: var(--muted); min-width: 0; }

.fiche-form input,
.fiche-form select,
.fiche-form textarea {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #050606;
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
}

.fiche-form textarea { height: auto; padding: 8px 10px; line-height: 1.5; resize: vertical; }

.fiche-boutons { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fiche-boutons small { font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.fiche-boutons .action-main { height: 34px; padding: 0 14px; font-size: 12.5px; }
