:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface2: #243044;
  --border: #2d3f56;
  --text: #e8edf4;
  --muted: #8b9cb3;
  --accent: #e85d2c;
  --accent-soft: rgba(232, 93, 44, 0.15);
  --success: #3ecf8e;
  --linkedin: #0a66c2;
  --airtable: #fcb400;
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.shell { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem 4rem; }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.logo-mark {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), #c44a1a);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

nav.demo-nav,
nav.app-nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

nav.demo-nav button,
nav.app-nav button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

nav.demo-nav button:hover,
nav.demo-nav button.active,
nav.app-nav button:hover,
nav.app-nav button.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}

/* Sections */
section.panel { display: none; animation: fade 0.35s ease; }
section.panel.active { display: block; }

@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero {
  text-align: center;
  padding: 2.5rem 0 2rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.hero p.lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0 auto 1.5rem;
}

.badge-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.badge.linkedin { border-color: var(--linkedin); color: #6eb3f7; }
.badge.airtable { border-color: var(--airtable); color: #fcd34d; }
.badge.claude { border-color: #d4a574; color: #e8c9a0; }

.cta-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { box-shadow: 0 6px 24px rgba(232, 93, 44, 0.35); }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Cards & grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card p { color: var(--muted); font-size: 0.9rem; }

.card .cmd {
  margin-top: 0.75rem;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  background: var(--bg);
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  color: var(--accent);
}

/* Flow diagram */
.flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 2rem 0;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.flow-step {
  flex: 1;
  min-width: 140px;
  text-align: center;
  position: relative;
  padding: 0 0.5rem;
}

.flow-step .num {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  margin: 0 auto 0.6rem;
  font-size: 0.9rem;
}

.flow-step h4 { font-size: 0.9rem; margin-bottom: 0.25rem; }
.flow-step p { font-size: 0.78rem; color: var(--muted); }

.flow-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -6px;
  top: 14px;
  color: var(--muted);
  font-size: 1.1rem;
}

/* Demo workspace */
.demo-workspace {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  min-height: 480px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .demo-workspace { grid-template-columns: 1fr; }
}

.demo-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1rem;
}

.demo-sidebar h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.demo-cmd {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.35rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: ui-monospace, monospace;
}

.demo-cmd:hover { background: var(--surface2); }
.demo-cmd.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.demo-main {
  background: var(--bg);
  padding: 1.25rem;
  overflow: auto;
}

.demo-main h2 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.demo-main .subtitle {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}

/* Setup wizard */
.wizard-progress {
  display: flex;
  gap: 4px;
  margin-bottom: 1.25rem;
}

.wizard-progress span {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  transition: background 0.3s;
}

.wizard-progress span.done { background: var(--success); }
.wizard-progress span.current { background: var(--accent); }

.wizard-question {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.wizard-input {
  width: 100%;
  max-width: 400px;
  padding: 0.65rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.wizard-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 480px;
}

.wizard-options label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.wizard-options label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.preview-box {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 1rem;
  white-space: pre-wrap;
  font-family: ui-monospace, monospace;
  max-height: 200px;
  overflow-y: auto;
}

/* Table */
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

table.data th,
table.data td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table.data th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

table.data tr:hover td { background: var(--surface); }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--surface2);
}

.tag.nouveau { background: rgba(62, 207, 142, 0.2); color: var(--success); }
.tag.contacte { background: rgba(10, 102, 194, 0.2); color: #6eb3f7; }

/* Icebreaker */
.icebreaker-card {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  padding: 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
  line-height: 1.65;
  white-space: pre-line;
}

.lead-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.lead-chip {
  padding: 0.4rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
}

.lead-chip.active,
.lead-chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Setup checklist */
.checklist { list-style: none; }

.checklist li {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.checklist .check {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.checklist li.done .check {
  background: var(--success);
  border-color: var(--success);
  color: #0f1419;
}

.checklist li.done .check::after { content: "✓"; }

.checklist strong { display: block; margin-bottom: 0.2rem; }
.checklist p { color: var(--muted); font-size: 0.88rem; }

/* CRM stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem;
  text-align: center;
}

.stat-box .n { font-size: 1.75rem; font-weight: 800; color: var(--accent); }
.stat-box .l { font-size: 0.75rem; color: var(--muted); }

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--success);
  color: #0f1419;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.35s;
  z-index: 100;
}

.toast.show { transform: translateY(0); opacity: 1; }

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-intro {
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 640px;
}

.footer-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
