/* Reset léger */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif; color: #0f172a; background: #ffffff; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #635bff; /* Stripe-like */
  --primary-700: #4f46e5;
  --card: #0b1220;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 600; border: none; cursor: pointer; transition: transform .08s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover { background: var(--primary-700); transform: translateY(-1px); box-shadow: 0 10px 20px rgba(79,70,229,0.25); }
.btn.secondary { background: #0f172a; }

.nav { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }

.hero { padding: 80px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.05; margin: 0 0 16px; letter-spacing: -1px; }
.hero p { color: var(--muted); font-size: clamp(16px, 2.2vw, 20px); margin: 0 auto 28px; max-width: 760px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 60px 0; }
.card { background: linear-gradient(180deg, #0b1220 0%, #0b1220 60%, #0e172a 100%); border: 1px solid rgba(255,255,255,0.04); border-radius: 16px; color: #e2e8f0; padding: 22px; box-shadow: 0 10px 30px rgba(2,6,23,0.4); }
.card h3 { margin: 0 0 12px; font-size: 18px; color: #fff; }
.card p { margin: 0; color: #94a3b8; }

.footer { padding: 40px 0; color: #64748b; text-align: center; border-top: 1px solid #e2e8f0; margin-top: 60px; }

/* Chat widget */
.chat-container { display: flex; flex-direction: column; height: 100vh; max-height: 100vh; }
.chat-header { padding: 12px 16px; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: space-between; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; background: #f8fafc; }
.chat-input { display: flex; gap: 8px; border-top: 1px solid #e2e8f0; padding: 12px; background: #ffffff; }
.bubble { max-width: 70%; padding: 10px 14px; border-radius: 14px; margin-bottom: 10px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.bubble.visitor { background: #ffffff; border: 1px solid #e2e8f0; }
.bubble.agent { background: #e0e7ff; border: 1px solid #c7d2fe; }
.bubble .meta { font-size: 11px; color: #64748b; margin-top: 6px; }
.align-right { margin-left: auto; text-align: right; }
.align-left { margin-right: auto; text-align: left; }
.chat-empty { color: #64748b; text-align: center; padding: 24px; }

/* Floating bubble */
.custhub-bubble { position: fixed; right: 20px; bottom: 20px; width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 10px 30px rgba(79,70,229,0.4); z-index: 2147483647; }
.custhub-iframe { position: fixed; right: 20px; bottom: 84px; width: 360px; height: 520px; border: none; border-radius: 16px; box-shadow: 0 20px 60px rgba(2,6,23,0.35); overflow: hidden; display: none; z-index: 2147483647; }
@media (max-width: 420px) { .custhub-iframe { width: calc(100vw - 24px); right: 12px; } }

/* Admin layout */
.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: #f8fafc; }
.sidebar { background: #0b1220; color: #e2e8f0; padding: 18px; border-right: 1px solid rgba(255,255,255,0.06); position: sticky; top: 0; height: 100vh; display:flex; flex-direction:column; gap:18px; }
.sidebar .brand { font-size: 18px; font-weight: 800; margin-bottom: 6px; display:flex; align-items:center; gap:10px; }
.sidebar .brand img { width: 24px; height: 24px; }
.sidebar .section { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; margin: 8px 0 6px; }
.sidebar nav { display: grid; gap: 4px; }
.nav-item { display:flex; align-items:center; gap:10px; padding: 10px 12px; border-radius: 10px; color: #cbd5e1; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.12); color: #fff; }
.nav-item svg { width: 18px; height: 18px; opacity: .9; }
.nav-badge { margin-left: auto; background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 800; }

/* Marketing Landing (Stripe-like) */
.nav-pro { display:flex; align-items:center; justify-content:space-between; padding:14px 0; position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.8); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid #e2e8f0; }
.nav-pro .menu { display:flex; gap:16px; align-items:center; }
.nav-pro a.link { color:#475569; font-weight:600; }
.nav-pro a.link:hover { color:#0f172a; }
.nav-pro .hamburger { display:none; background: transparent; border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 10px; color:#0f172a; }

.hero-pro { padding: 80px 0 20px; text-align:center; }
.hero-pro .eyebrow { display:inline-block; padding:6px 10px; border-radius:999px; background:#f1f5f9; color:#334155; font-weight:700; margin-bottom:14px; }
.hero-pro h1 { font-size: clamp(40px, 6.6vw, 72px); line-height:1.05; letter-spacing:-1px; margin:0 0 16px; }
.hero-pro p.sub { color:#64748b; font-size: clamp(16px, 2.3vw, 20px); margin:0 auto 26px; max-width:760px; }
.hero-pro .cta { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }

.logos { display:flex; gap:22px; justify-content:center; align-items:center; flex-wrap:wrap; opacity:.8; margin: 18px 0 8px; }
.logos img { height:26px; filter: grayscale(1); opacity:.75; }

.channels { display:flex; gap:22px; justify-content:center; align-items:center; flex-wrap:wrap; margin: 18px 0 8px; }
.channels i { font-size:28px; opacity:.95; }
.channels .fa-comments { color: var(--primary); }
.channels .fa-envelope { color: #0f172a; }
.channels .fa-whatsapp { color: #25D366; }
.channels .fa-telegram { color: #229ED9; }

.mockup-wrap { display:flex; justify-content:center; margin-top: 26px; }
.mockup { width: min(960px, 92vw); height: 520px; border-radius: 16px; overflow: hidden; border: 1px solid #e2e8f0; box-shadow: 0 20px 60px rgba(2,6,23,0.15); background:#ffffff; }
.mockup iframe { width: 100%; height: 100%; border: 0; }

.demo-widget { display:flex; flex-direction:column; height:100%; background:#fff; }
.dw-header { padding:12px 14px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #e2e8f0; background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%); }
.dw-header .brand { display:flex; align-items:center; gap:8px; font-weight:900; color:#0f172a; }
.dw-header .tools { display:flex; gap:8px; }
.dw-header .tools .ico { width:30px; height:30px; display:flex; align-items:center; justify-content:center; border-radius:8px; border:1px solid #e2e8f0; color:#334155; background:#fff; }
.dw-body { flex:1; background:#f8fafc; padding:14px; overflow:auto; }
.dw-msg { max-width:68%; padding:10px 14px; border-radius:14px; margin-bottom:10px; box-shadow:0 2px 12px rgba(0,0,0,.06); border:1px solid transparent; }
.dw-msg.visitor { background:#ffffff; border-color:#e2e8f0; }
.dw-msg.agent { background:#e0e7ff; border-color:#c7d2fe; margin-left:auto; }
.dw-meta { font-size:11px; color:#64748b; margin-top:6px; }
.dw-ai { background:#0b1220; color:#e2e8f0; border:1px solid rgba(255,255,255,.08); border-radius:12px; padding:10px 12px; margin:10px 0; }
.dw-ai .ttl { font-weight:800; color:#fff; margin-bottom:6px; display:flex; align-items:center; gap:8px; }
.dw-chips { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0; }
.dw-chip { padding:8px 12px; border-radius:999px; border:1px solid #e2e8f0; background:#fff; color:#334155; font-weight:700; cursor:pointer; }
.dw-typing { display:flex; align-items:center; gap:6px; color:#64748b; font-size:12px; margin:6px 0; }
.dw-typing .dot { width:6px; height:6px; background:#94a3b8; border-radius:50%; animation: blink 1s infinite alternate; }
.dw-typing .dot:nth-child(2){ animation-delay:.2s; } .dw-typing .dot:nth-child(3){ animation-delay:.4s; }
@keyframes blink { from{opacity:.3; transform:translateY(0);} to{opacity:1; transform:translateY(-2px);} }
.dw-input { display:flex; gap:8px; padding:12px; border-top:1px solid #e2e8f0; background:#fff; }
.dw-input input { flex:1; padding:12px; border:1px solid #e2e8f0; border-radius:10px; }
.dw-input .btn { height:44px; }

.section { padding: 48px 0; }
.section h2 { text-align:center; font-size: clamp(26px, 3.6vw, 40px); margin:0 0 10px; }
.section p.lead { text-align:center; color:#64748b; max-width:720px; margin:0 auto 24px; }

.badge-ai { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; background: linear-gradient(90deg, #635bff 0%, #22d3ee 100%); color:#fff; font-weight:800; box-shadow: 0 6px 20px rgba(34,211,238,.25); }
.badge-ai svg { width:16px; height:16px; }

.ai-band { background: linear-gradient(180deg, #0b1220 0%, #0b1220 60%, #0e172a 100%); color:#e2e8f0; border:1px solid rgba(255,255,255,.06); border-radius:16px; padding:24px; box-shadow: 0 10px 30px rgba(2,6,23,.3); }
.ai-band h2 { color:#fff; }
.ai-band .cards .card { background: transparent; border-color: rgba(255,255,255,.08); }

.features-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap:18px; }
.feature { background:#fff; border:1px solid #e2e8f0; border-radius:14px; padding:18px; }
.feature h3 { margin:0 0 8px; }
.feature p { margin:0; color:#64748b; }

.pricing-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap:18px; }
.plan { background:#fff; border:1px solid #e2e8f0; border-radius:14px; padding:22px; text-align:left; }
.plan .price { font-size:34px; font-weight:900; margin:10px 0; }
.plan ul { list-style:none; padding:0; margin:0 0 12px; }
.plan ul li { display:flex; gap:8px; align-items:center; color:#334155; margin:6px 0; }

.testimonial-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap:18px; }
.quote { background:#0b1220; color:#e2e8f0; border:1px solid rgba(255,255,255,.06); border-radius:14px; padding:18px; box-shadow: 0 10px 30px rgba(2,6,23,.3); }
.quote .author { margin-top:10px; color:#cbd5e1; font-weight:700; }

.cta-bar { display:flex; align-items:center; justify-content:center; gap:12px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:14px; padding:18px; }

/* Responsive tweaks */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .nav-pro { flex-direction: column; align-items: stretch; gap: 10px; }
  .nav-pro .toprow { display:flex; align-items:center; justify-content: space-between; }
  .nav-pro .hamburger { display:block; }
  .nav-pro .menu { display:none; flex-direction: column; gap: 10px; width: 100%; padding-bottom: 8px; }
  .nav-pro.open .menu { display:flex; }
  .hero-pro { padding: 56px 0 16px; }
  .hero-pro .cta { flex-direction: column; }
  .hero-pro .cta .btn { width: 100%; }
  .channels { gap: 16px; }
  .channels i { font-size: 24px; }
  .mockup { height: 60vh; min-height: 360px; }
  .features-grid, .pricing-grid, .testimonial-grid { grid-template-columns: 1fr; }
  .cta-bar { flex-direction: column; align-items: stretch; }
  .cta-bar .btn { width: 100%; }
}
.main { display: block; }
.header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; background: #fff; border-bottom: 1px solid #e2e8f0; }
.header .title { font-size: 18px; font-weight: 700; }
.page { padding: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.stat-card { background: linear-gradient(180deg, #0b1220 0%, #0b1220 60%, #0e172a 100%); border: 1px solid rgba(255,255,255,0.06); color: #e2e8f0; border-radius: 14px; padding: 16px; box-shadow: 0 10px 30px rgba(2,6,23,0.3); }
.stat-card .kpi { font-size: 28px; font-weight: 800; color: #fff; }

/* Dashboard grid */
.dash-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-top: 16px; }
.dash-col { display: grid; gap: 16px; }
.panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }
.panel .panel-header { padding: 12px 16px; border-bottom: 1px solid #e2e8f0; font-weight: 700; }
.panel .panel-body { padding: 16px; }
.list { display: grid; gap: 10px; }
.item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.item:last-child { border-bottom: none; }
.muted { color: #64748b; }

/* Segmented control */
.segmented { display: inline-flex; background: #f1f5f9; border-radius: 999px; padding: 4px; gap: 4px; }
.segmented button { padding: 8px 12px; border: 0; background: transparent; border-radius: 999px; cursor: pointer; font-weight: 600; color: #334155; }
.segmented button.active { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

/* Conversation list */
.conv-list { display: grid; gap: 8px; }
.conv-item { border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; background: #fff; cursor: pointer; }
.conv-item:hover { background: #fafafa; }
.conv-item.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,91,255,0.15); }
.conv-title { font-weight: 700; }
.conv-sub { font-size: 12px; color: #64748b; }
.badge-dot { display:inline-flex; align-items:center; gap:6px; background:#fee2e2; color:#991b1b; border:1px solid #fecaca; border-radius:999px; padding:2px 8px; font-size:12px; font-weight:700; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(2,6,23,0.6); display: none; align-items: center; justify-content: center; z-index: 2147483000; }
.modal-overlay.show { display: flex; }
.modal { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; width: min(640px, 92vw); box-shadow: 0 20px 60px rgba(2,6,23,0.35); }
.modal .modal-header { padding: 14px 16px; border-bottom: 1px solid #e2e8f0; font-weight: 800; display: flex; align-items: center; justify-content: space-between; }
.modal .modal-body { padding: 16px; }
.modal .modal-actions { padding: 14px 16px; border-top: 1px solid #e2e8f0; display: flex; gap: 8px; justify-content: flex-end; }

/* Table & badges */
.table-wrap { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }
table.table { width: 100%; border-collapse: collapse; }
table.table th, table.table td { padding: 12px 14px; border-bottom: 1px solid #e2e8f0; text-align: left; font-size: 14px; }
table.table th { background: #f1f5f9; color: #334155; font-weight: 700; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.badge.muted { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }
.badge.warning { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }

/* Form fields */
.field { display: grid; gap: 6px; }
.input, .select { padding: 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.input.dark, .select.dark { background: #0b1220; color: #e2e8f0; border-color: #334155; }


