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

:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --card: #1a1a28;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent: #22c55e;
  --starter: #3b82f6;
  --pro: #a855f7;
  --text: #e4e4e7;
  --text-light: #a1a1aa;
  --border: #27272a;
  --success: #22c55e;
  --radius: 12px;
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
.container { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; max-width: 1040px; margin: 0 auto; }
.nav-brand { font-size: 1.3rem; font-weight: 700; color: #fff; text-decoration: none; }
.nav-brand span { color: var(--primary); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--text-light); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }
.nav-cta { padding: 8px 18px !important; background: var(--primary); color: #fff !important; border-radius: var(--radius); font-weight: 500; }
.nav-cta:hover { background: var(--primary-hover); }

/* Hero */
.hero { padding: 100px 0 80px; text-align: center; background: radial-gradient(ellipse at top, #1a1a3e 0%, var(--bg) 60%); }
.badge { display: inline-block; padding: 6px 16px; border-radius: 20px; border: 1px solid var(--border); font-size: 0.8rem; color: var(--primary); margin-bottom: 24px; }
.hero h1 { font-size: 2.8rem; font-weight: 700; line-height: 1.15; max-width: 750px; margin: 0 auto 20px; background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.subtitle { font-size: 1.15rem; color: var(--text-light); max-width: 600px; margin: 0 auto 40px; }

/* Signup form */
.signup-form { max-width: 520px; margin: 0 auto; }
.form-row { display: flex; gap: 8px; margin-bottom: 8px; }
.handle-input { flex: 1; display: flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border 0.2s; }
.handle-input:focus-within { border-color: var(--primary); }
.handle-input input { flex: 1; padding: 14px 16px; background: transparent; border: none; color: var(--text); font-size: 1rem; outline: none; text-align: right; }
.handle-suffix { padding: 0 16px 0 0; color: var(--text-light); font-size: 0.9rem; white-space: nowrap; }
.form-row input[type="email"] { flex: 1; padding: 14px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: 1rem; outline: none; transition: border 0.2s; }
.form-row input[type="email"]:focus { border-color: var(--primary); }
.form-row button { padding: 14px 28px; background: var(--primary); color: white; border: none; border-radius: var(--radius); font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s; white-space: nowrap; }
.form-row button:hover { background: var(--primary-hover); }
.form-row button:disabled { opacity: 0.6; cursor: not-allowed; }
.success-msg { color: var(--success); font-size: 1.1rem; padding: 16px; text-align: center; }
.error-msg { color: #ef4444; font-size: 0.9rem; padding: 8px; text-align: center; }
.social-proof { margin-top: 24px; font-size: 0.9rem; color: var(--text-light); }
.social-proof span { font-weight: 700; color: var(--primary); }

/* Sections */
.section { padding: 80px 0; }
.section-dark { background: var(--surface); }
.section h2 { font-size: 2rem; text-align: center; margin-bottom: 16px; font-weight: 700; }
.section-subtitle { text-align: center; color: var(--text-light); font-size: 1rem; margin-bottom: 48px; max-width: 600px; margin-left: auto; margin-right: auto; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; transition: border-color 0.2s; }
.card:hover { border-color: var(--primary); }
.card-icon { font-size: 2rem; margin-bottom: 12px; }
.card h3 { font-size: 1.1rem; margin-bottom: 8px; font-weight: 600; }
.card p { font-size: 0.9rem; color: var(--text-light); line-height: 1.5; }

.steps { display: flex; gap: 32px; justify-content: center; }
.step { flex: 1; max-width: 280px; text-align: center; }
.step-num { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: white; font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.step h3 { margin-bottom: 8px; font-size: 1.05rem; }
.step p { font-size: 0.9rem; color: var(--text-light); }

/* Pricing — 3 tiers */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 920px; margin: 0 auto; }

.pricing-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 32px; text-align: center; position: relative; transition: border-color 0.2s, transform 0.2s; }
.pricing-card:hover { transform: translateY(-4px); }
.pricing-card.featured { border: 2px solid var(--primary); }
.pricing-card.featured::before { content: 'Populaire'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: white; font-size: 0.75rem; font-weight: 600; padding: 3px 14px; border-radius: 10px; }

.plan-name { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.plan-name.free { color: var(--accent); }
.plan-name.starter { color: var(--starter); }
.plan-name.pro { color: var(--pro); }

.price { font-size: 3rem; font-weight: 800; color: white; line-height: 1; margin-bottom: 4px; }
.price-unit { font-size: 1rem; font-weight: 400; color: var(--text-light); }
.price-note { font-size: 0.8rem; color: var(--text-light); margin-bottom: 20px; }

.features { list-style: none; text-align: left; margin: 20px 0; }
.features li { padding: 7px 0; font-size: 0.88rem; color: var(--text-light); }
.features li::before { content: '\2713'; color: var(--success); font-weight: 700; margin-right: 10px; }
.features li.disabled { opacity: 0.35; }
.features li.disabled::before { content: '\2717'; color: #666; }

.pricing-cta { display: block; width: 100%; padding: 12px; border-radius: var(--radius); font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.2s; text-decoration: none; text-align: center; border: none; }
.pricing-cta.free { background: var(--accent); color: #000; }
.pricing-cta.free:hover { background: #16a34a; }
.pricing-cta.starter { background: var(--primary); color: white; }
.pricing-cta.starter:hover { background: var(--primary-hover); }
.pricing-cta.pro { background: var(--pro); color: white; }
.pricing-cta.pro:hover { background: #9333ea; }

/* Pipeline visual */
.pipeline { display: flex; align-items: center; justify-content: center; gap: 0; margin: 48px auto 0; max-width: 700px; }
.pipeline-step { flex: 1; text-align: center; padding: 16px 12px; position: relative; }
.pipeline-step::after { content: ''; position: absolute; right: -1px; top: 50%; width: 24px; height: 2px; background: var(--border); }
.pipeline-step:last-child::after { display: none; }
.pipeline-icon { font-size: 1.6rem; margin-bottom: 6px; }
.pipeline-label { font-size: 0.8rem; color: var(--text-light); }
.pipeline-arrow { color: var(--primary); font-size: 1.2rem; flex-shrink: 0; }

/* Footer */
.footer { padding: 48px 0; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; font-size: 0.85rem; color: var(--text-light); }
.footer a { color: var(--primary); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-consent { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 0.75rem; color: #666; text-align: center; }

/* Comparison table */
.compare-table { width: 100%; border-collapse: collapse; margin-top: 32px; }
.compare-table th, .compare-table td { padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.compare-table th { color: var(--text-light); font-weight: 500; }
.compare-table td { color: var(--text); }
.compare-table .check { color: var(--success); font-weight: 700; }
.compare-table .dash { color: #444; }

@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .form-row { flex-direction: column; }
  .grid-3 { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  .steps { flex-direction: column; align-items: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 48px 0; }
  .hero { padding: 80px 0 48px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .pipeline { flex-direction: column; gap: 8px; }
  .pipeline-step::after { display: none; }
  .modal-box { width: 95vw; margin: 16px; padding: 24px; }
  .modal-name-row { flex-direction: column; }
  .ecoauth-badges { flex-direction: column; }
}

/* =============================================
   HERO CTA BUTTON
   ============================================= */
.hero-cta {
  display: inline-block;
  padding: 16px 40px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.hero-cta:hover { background: var(--primary-hover); transform: translateY(-1px); }

/* =============================================
   SIGNUP MODAL
   ============================================= */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  width: 460px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-x {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.modal-x:hover { color: #fff; }

/* Step indicator */
.modal-step-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s;
}
.step-dot.active { background: var(--primary); box-shadow: 0 0 8px rgba(99,102,241,0.4); }
.step-dot.done { background: var(--success); }

.modal-step h2 {
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 8px;
}

.modal-desc {
  text-align: center;
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

/* Tabs */
.input-tabs {
  display: flex;
  background: var(--card);
  border-radius: var(--radius);
  padding: 3px;
  margin-bottom: 16px;
}

.input-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: none;
  color: var(--text-light);
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.input-tab.active { background: var(--primary); color: white; }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Inputs */
.input-group {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.input-group:focus-within { border-color: var(--primary); }

.input-prefix {
  padding: 14px 12px 14px 16px;
  color: var(--text-light);
  font-size: 1rem;
  white-space: nowrap;
  background: rgba(255,255,255,0.03);
}

.input-group input {
  flex: 1;
  padding: 14px 16px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

.modal-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.modal-input:focus { border-color: var(--primary); }

.modal-error {
  color: #ef4444;
  font-size: 0.85rem;
  text-align: center;
  padding: 6px 0;
}

.modal-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
  transition: background 0.2s;
}
.modal-btn:hover { background: var(--primary-hover); }
.modal-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.modal-btn-done { background: var(--success); }
.modal-btn-done:hover { background: #16a34a; }

.modal-back {
  display: block;
  width: 100%;
  padding: 10px;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 8px;
}
.modal-back:hover { color: var(--text); }

.modal-hint {
  text-align: center;
  color: #666;
  font-size: 0.8rem;
  margin-top: 16px;
}

/* Step 2 — Name inputs */
.modal-name-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.modal-name-row .modal-input { flex: 1; }

/* Handle preview */
.handle-preview {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.handle-preview-label {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 6px;
}

.handle-preview-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
}
.handle-preview-value span { color: var(--primary); }

/* Step 3 — Success */
.modal-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.modal-result-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}
.result-row + .result-row { border-top: 1px solid var(--border); }
.result-label { color: var(--text-light); font-size: 0.9rem; }
.result-value { font-weight: 600; font-size: 0.9rem; }

/* EcoAuth section */
.ecoauth-section {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}
.ecoauth-section h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}
.ecoauth-section p {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 14px;
  line-height: 1.5;
}

.ecoauth-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 12px;
}

.ecoauth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}
.ecoauth-badge:hover { border-color: var(--primary); background: rgba(99,102,241,0.08); }

.ecoauth-icon { font-size: 1.2rem; }
