/* ============================================================
   KIBOT - Design System (site public)
   Direction : epuree, technique, conversationnelle.
   Signature : le "pouls" de Kibot (indicateur d'ecoute / waveform)
   ============================================================ */

:root {
  --bg:            #FFFFFF;
  --bg-soft:       #F6F7F9;
  --bg-navy:       #10162B;
  --ink:           #12131A;
  --ink-soft:      #5B5F6B;
  --ink-faint:     #9096A3;
  --navy:          #1B2A4A;
  --accent:        #FF5A36;
  --accent-soft:   #FFE6DE;
  --violet:        #5B6CFF;
  --violet-soft:   #EBEDFF;
  --line:          #E7E9EE;
  --radius:        14px;
  --shadow:        0 1px 2px rgba(16,22,43,.04), 0 8px 24px rgba(16,22,43,.06);

  --font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typo --- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.lede { color: var(--ink-soft); font-size: 18px; }

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pulse 1.8s ease-in-out infinite; }
.nav-links { display: flex; gap: 32px; font-size: 14.5px; color: var(--ink-soft); }
.nav-links a:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14.5px; font-weight: 600; transition: all .15s ease;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #0D1730; }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-faint); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #E64B26; }

/* --- Hero : la conversation EST le heros --- */
.hero { padding: 88px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.08; margin: 18px 0 20px; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* Demo transcript card (signature element) */
.demo-card {
  background: var(--bg-navy); color: #fff; border-radius: 20px;
  padding: 22px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.demo-card::before {
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(91,108,255,.35), transparent 70%);
  pointer-events: none;
}
.demo-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.demo-steps { display: flex; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; color: rgba(255,255,255,.4); }
.demo-steps span { padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); }
.demo-steps span.active { color: #fff; border-color: var(--accent); background: rgba(255,90,54,.18); }
.demo-transcript { display: flex; flex-direction: column; gap: 10px; min-height: 220px; font-size: 14.5px; }
.demo-msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; line-height: 1.45; }
.demo-msg.bot { background: rgba(255,255,255,.08); align-self: flex-start; border: 1px solid rgba(255,255,255,.08); }
.demo-msg.user { background: var(--violet); align-self: flex-end; }
.demo-caption { font-family: var(--font-mono); font-size: 11.5px; color: rgba(255,255,255,.35); margin-top: 14px; }

@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .5; } }

/* --- Points d'entree (section) --- */
.section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: 32px; margin-top: 10px; }

.entry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.entry-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  background: var(--bg-soft); transition: transform .18s ease, box-shadow .18s ease;
}
.entry-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.entry-icon {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--violet-soft); color: var(--violet); margin-bottom: 16px;
}
.entry-card h3 { font-size: 18px; margin-bottom: 8px; }
.entry-card p { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 18px; }

/* --- Services --- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.service-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.service-cat { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.service-card h4 { font-size: 16.5px; margin: 8px 0 8px; }
.service-card p { color: var(--ink-soft); font-size: 14px; margin: 0; }

/* --- FAQ --- */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 15.5px; list-style: none; display: flex; justify-content: space-between; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--ink-faint); font-weight: 400; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { color: var(--ink-soft); margin: 12px 0 0; font-size: 14.5px; }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 40px; }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--ink-faint); }

/* ============================================================
   Widgets flottants (chat / voix / appel simule)
   ============================================================ */
.kibot-launcher {
  position: fixed; bottom: 24px; right: 24px; z-index: 100;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
.launcher-btn {
  width: 56px; height: 56px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); border: none;
  position: relative;
}
.launcher-btn .ring {
  position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0;
}
.launcher-btn.pulsing .ring { animation: ring 1.6s ease-out infinite; }
@keyframes ring { 0% { opacity:.6; transform: scale(.9);} 100% { opacity:0; transform: scale(1.3);} }

.kibot-panel {
  width: 360px; max-width: calc(100vw - 32px); height: 480px; max-height: 70vh;
  background: #fff; border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--line);
  display: none; flex-direction: column; overflow: hidden;
}
.kibot-panel.open { display: flex; }
.kibot-panel-head { background: var(--navy); color: #fff; padding: 16px 18px; display: flex; align-items: center; gap: 10px; }
.kibot-panel-head .dot { width: 8px; height: 8px; border-radius: 50%; background: #35D07F; }
.kibot-panel-head strong { font-family: var(--font-display); }
.kibot-panel-head small { display: block; color: rgba(255,255,255,.6); font-size: 12px; }
.kibot-panel-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-soft); }
.bubble { max-width: 82%; padding: 10px 13px; border-radius: 12px; font-size: 14px; line-height: 1.45; }
.bubble.robot { background: #fff; border: 1px solid var(--line); align-self: flex-start; }
.bubble.user { background: var(--navy); color: #fff; align-self: flex-end; }
.typing { display: flex; gap: 4px; align-self: flex-start; padding: 10px 13px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint); animation: bounce 1.1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }

.kibot-panel-foot { padding: 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.kibot-panel-foot input {
  flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; font-size: 14px; font-family: inherit;
}
.kibot-panel-foot input:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
.kibot-panel-foot button { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; border: none; }

.voice-orb {
  width: 88px; height: 88px; border-radius: 50%; margin: 24px auto 8px; position: relative;
  background: radial-gradient(circle at 35% 30%, var(--violet), var(--navy));
  display: flex; align-items: center; justify-content: center;
}
.voice-orb.listening { animation: orb 1.2s ease-in-out infinite; }
@keyframes orb { 0%,100% { box-shadow: 0 0 0 0 rgba(91,108,255,.4); } 50% { box-shadow: 0 0 0 14px rgba(91,108,255,0); } }
.voice-state { text-align: center; font-size: 13px; color: var(--ink-soft); font-family: var(--font-mono); }

/* --- Responsive --- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .entry-grid, .services-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .entry-grid, .services-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 40px; }
  .kibot-panel { width: calc(100vw - 32px); }
  .site-footer .container { flex-direction: column; gap: 10px; text-align: center; }
}
