/* Generix Demo — vraie charte Generix Group (navy + orange accent) */

:root {
  --gx-navy: #182954;          /* bleu marine principal Generix officiel */
  --gx-navy-dark: #0F1C3D;
  --gx-navy-mid: #336279;      /* bleu moyen logo variant */
  --gx-orange: #F28A48;        /* orange accent officiel "i" Generix */
  --gx-orange-dark: #E07532;
  --gx-grey-bg: #F4F6F9;
  --gx-grey-line: #E1E5EB;
  --gx-white: #FFFFFF;
  --ink: #1A1F2E;
  --ink-2: #6B7280;
  --green: #16A34A;
  --blue: #2563EB;
  --gx-purple: #7C3AED;
  --gx-rose: #EC4899;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background: var(--gx-grey-bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

/* ─── HEADER ────────────────────────────────────────── */
.topbar {
  background: linear-gradient(135deg, var(--gx-navy) 0%, var(--gx-navy-dark) 100%);
  color: white;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(24, 41, 84, 0.15);
}
.brand { display: flex; align-items: center; gap: 18px; }
.gx-logo {
  height: 38px;
  display: flex; align-items: center;
}
.gx-logo img { height: 100%; display: block; }
.brand .divider {
  width: 1px; height: 32px;
  background: rgba(255,255,255,0.18);
}
.brand h1 {
  font-size: 19px; font-weight: 700; margin: 0;
  letter-spacing: -0.2px;
  color: white;
}
.brand .sub {
  font-size: 11px;
  color: var(--gx-orange);
  margin-top: 3px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #A0A4AA; }
.meta .ts { font-feature-settings: "tnum"; }
.badge {
  background: rgba(255,255,255,0.08);
  padding: 5px 10px; border-radius: 12px;
  font-size: 11px; color: #DDD;
}
.clock {
  background: var(--gx-orange); color: white;
  padding: 5px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 600;
  font-feature-settings: "tnum";
}

/* ─── KPI BLOCK ─────────────────────────────────────── */
.target {
  background: white;
  padding: 18px 28px;
  border-bottom: 1px solid var(--gx-grey-line);
}
.target-head { margin-bottom: 12px; }
.target-title {
  font-size: 13px; text-transform: uppercase;
  color: var(--ink-2); font-weight: 700; letter-spacing: 0.5px;
}
.target-sub { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.target-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.target-stat {
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFBFD 100%);
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--gx-grey-line);
  border-left: 3px solid var(--gx-orange);
  transition: all 0.15s;
}
.target-stat:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24, 41, 84, 0.08);
  border-left-color: var(--gx-navy);
}
.target-stat .val {
  font-size: 24px; font-weight: 800; color: var(--gx-navy);
  font-feature-settings: "tnum";
  letter-spacing: -0.5px;
}
.target-stat .lbl {
  font-size: 11px; color: var(--ink-2);
  text-transform: uppercase; font-weight: 600; letter-spacing: 0.3px;
  margin-top: 2px;
}

/* ─── TABS ──────────────────────────────────────────── */
.tabs {
  background: white;
  padding: 0 28px;
  display: flex; gap: 0;
  border-bottom: 1px solid var(--gx-grey-line);
  overflow-x: auto;
}
.tab {
  background: transparent; border: none;
  padding: 14px 18px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-2); cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: inherit;
}
.tab:hover { color: var(--gx-navy); background: var(--gx-grey-bg); }
.tab.active {
  color: var(--gx-navy);
  border-bottom-color: var(--gx-orange);
  background: linear-gradient(180deg, rgba(242, 138, 72, 0.04) 0%, transparent 100%);
}

/* ─── FILTERS ───────────────────────────────────────── */
.filters {
  background: white;
  padding: 12px 28px;
  display: flex; gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--gx-grey-line);
}
.filter-pill {
  background: var(--gx-grey-bg);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  display: flex; align-items: center; gap: 8px;
}
.filter-lbl { color: var(--ink-2); font-weight: 600; }
.filter-pill select {
  background: transparent; border: none;
  font-size: 12px; font-weight: 600;
  color: var(--gx-navy); font-family: inherit;
  cursor: pointer;
}
.grow { flex: 1; }
.search-wrap input {
  background: var(--gx-grey-bg);
  border: 1px solid var(--gx-grey-line);
  padding: 8px 14px;
  border-radius: 16px;
  font-size: 13px; font-family: inherit;
  width: 220px;
}

/* ─── TABLE ─────────────────────────────────────────── */
.view-table {
  background: white;
  margin: 16px 28px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
table.leads {
  width: 100%; border-collapse: collapse;
}
table.leads thead th {
  background: #FAFBFC;
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--gx-grey-line);
}
table.leads tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gx-grey-line);
  font-size: 13px;
  vertical-align: top;
}
table.leads tbody tr:hover { background: #FAFBFC; cursor: pointer; }
.empty {
  text-align: center;
  color: var(--ink-2);
  padding: 40px !important;
  font-style: italic;
}

.ent-name { font-weight: 700; color: var(--gx-navy); }
.ent-domain { font-size: 11px; color: var(--ink-2); margin-top: 2px; }
.signal-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 4px;
  margin-bottom: 3px;
}
.signal-pill.s1 { background: #FFE8D6; color: #C2541F; }
.signal-pill.s2 { background: #E1ECFA; color: var(--gx-navy); }
.signal-pill.s3 { background: #E6F0F4; color: var(--gx-navy-mid); }
.signal-pill.s4 { background: #D1FAE5; color: #065F46; }
.signal-pill.s5 { background: #F3E8FF; color: #6D28D9; }

.signal-date {
  font-size: 11px;
  color: var(--ink-2);
  font-feature-settings: "tnum";
}
.source-link {
  color: var(--blue);
  text-decoration: none;
  font-size: 12px;
  word-break: break-word;
}
.source-link:hover { text-decoration: underline; }
.source-link .src-domain {
  background: var(--gx-grey-bg);
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
  color: var(--ink);
  font-weight: 600;
  font-size: 11px;
}
.produit-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--gx-grey-bg);
  color: var(--gx-navy);
  border: 1px solid var(--gx-grey-line);
}
.detail-btn {
  background: var(--gx-grey-bg);
  border: 1px solid var(--gx-grey-line);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gx-navy);
  cursor: pointer;
  font-family: inherit;
}
.detail-btn:hover { background: var(--gx-orange); color: white; border-color: var(--gx-orange); }

.enrich-btn {
  background: var(--gx-grey-bg);
  border: 1px solid var(--gx-grey-line);
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--gx-navy);
  cursor: pointer;
  font-family: inherit;
}
.enrich-btn:hover { background: var(--gx-orange); color: white; border-color: var(--gx-orange); }
.enrich-btn:disabled { opacity: 0.6; cursor: wait; }

/* ─── MODAL ─────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center; justify-content: center;
  z-index: 1000;
}
.modal.show { display: flex; }
.modal-card {
  background: white;
  border-radius: 12px;
  max-width: 760px; width: 90%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.close {
  position: absolute; top: 12px; right: 12px;
  background: var(--gx-grey-bg);
  border: none;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 20px; font-weight: 700;
  cursor: pointer;
  color: var(--ink);
}
.modal-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--gx-grey-line);
}
.modal-header h2 { margin: 0; font-size: 22px; font-weight: 800; color: var(--gx-navy); }
.modal-header .sub { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.modal-section {
  padding: 18px 28px;
  border-bottom: 1px solid var(--gx-grey-line);
}
.modal-section:last-child { border-bottom: none; }
.modal-section h3 {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 10px;
  font-weight: 700; letter-spacing: 0.4px;
}
.signal-block {
  background: linear-gradient(135deg, #FAFBFD 0%, #F4F6F9 100%);
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  border-left: 3px solid var(--gx-orange);
}
.signal-block .head {
  display: flex; align-items: center;
  gap: 8px; margin-bottom: 6px;
}
.signal-block .desc { font-size: 13px; color: var(--ink); margin-bottom: 6px; }
.signal-block .src {
  font-size: 12px;
  color: var(--blue);
  word-break: break-word;
}
.signal-block .src a { color: var(--blue); text-decoration: none; }
.signal-block .src a:hover { text-decoration: underline; }
.signal-block .produit {
  margin-top: 8px;
  font-size: 11px;
  color: var(--ink-2);
}
.signal-block .produit b { color: var(--gx-orange); }
