/* ============================================================
   AXELYA AI TOOL — Styles
   Reprend le design system du site Axelya Consulting
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- Design tokens (identiques à axelya.css) ---------- */
:root {
  --bg:        #070B1F;
  --bg-2:      #0B1129;
  --bg-3:      #0F1733;
  --bg-card:   #0C1330;
  --line:      rgba(255,255,255,0.08);
  --line-2:    rgba(255,255,255,0.14);

  --ink:       #F0F0F5;
  --ink-soft:  #C3C8DD;
  --muted:     #888FAB;
  --faint:     #5A6188;

  --violet:    #6C63FF;
  --indigo:    #4F46E5;
  --cyan:      #18D9F2;
  --cyan-deep: #00B8D9;

  --grad-accent: linear-gradient(100deg, #6C63FF 0%, #18D9F2 100%);
  --grad-text:   linear-gradient(100deg, #C9C5FF 0%, #8AE9F7 60%, #18D9F2 100%);
  --glow-violet: rgba(108,99,255,0.45);
  --glow-cyan:   rgba(24,217,242,0.40);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Instrument Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1200px;
  --pad:  clamp(20px, 5vw, 56px);
  --radius: 18px;
  --radius-lg: 26px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 0%, transparent 75%);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: rgba(108,99,255,0.35); color: #fff; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); position: relative; z-index: 1; }

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--glow-cyan);
}
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .2s, box-shadow .25s, background .25s, border-color .25s;
  white-space: nowrap;
  cursor: pointer;
}
.btn--primary {
  background: var(--grad-accent);
  color: #07112B;
  box-shadow: 0 8px 30px -8px var(--glow-violet);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -8px var(--glow-cyan); }
.btn--ghost {
  background: rgba(255,255,255,0.04);
  border-color: var(--line-2);
  color: var(--ink);
}
.btn--ghost:hover { background: rgba(255,255,255,0.09); transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 72px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.site-header.scrolled {
  background: rgba(7,11,31,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand .mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--grad-accent);
  box-shadow: 0 4px 16px -4px var(--glow-violet);
  flex-shrink: 0;
}
.brand .mark svg { width: 18px; height: 18px; }
.brand-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  display: block;
  line-height: 1;
  margin-top: 2px;
}
.brand-name-wrap { display: flex; flex-direction: column; gap: 0; }
.brand-name { line-height: 1.1; }

.header-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-transform: uppercase;
}

/* ---------- Tab navigation ---------- */
.tab-nav {
  position: sticky;
  top: 72px;
  z-index: 50;
  background: rgba(7,11,31,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding-block: 0;
}
.tab-nav .wrap { display: flex; gap: 0; }
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  margin-bottom: -1px;
}
.tab-btn svg { width: 18px; height: 18px; opacity: 0.7; }
.tab-btn:hover { color: var(--ink-soft); }
.tab-btn.active {
  color: var(--ink);
  border-bottom-color: var(--violet);
}
.tab-btn.active svg { opacity: 1; }

/* ---------- Sections ---------- */
.app-section {
  display: none;
  flex: 1;
  padding-block: clamp(48px, 7vw, 80px);
}
.app-section.active { display: block; }

/* ---------- Hero intro ---------- */
.hero-intro {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: clamp(40px, 6vw, 64px);
}
.hero-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-block: 16px 20px;
}
.hero-intro p {
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ---------- Calculator layout ---------- */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 900px) {
  .calc-grid { grid-template-columns: 1fr; }
}

/* Calculator form */
.calc-form-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
}
.calc-form-card h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.calc-form-card h2 .step-num {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(108,99,255,0.2);
  border: 1px solid rgba(108,99,255,0.4);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--violet);
  flex-shrink: 0;
}

.form-group { margin-bottom: 22px; }
.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.form-select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 16px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888FAB' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
  transition: border-color .2s;
}
.form-select:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(108,99,255,0.15); }

/* Radio buttons */
.radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.02);
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
  user-select: none;
}
.radio-label input { display: none; }
.radio-label:hover { border-color: rgba(108,99,255,0.4); color: var(--ink); }
.radio-label.checked { border-color: var(--violet); background: rgba(108,99,255,0.12); color: var(--ink); }

/* Checkboxes tasks */
.tasks-grid { display: grid; gap: 8px; }
.task-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  user-select: none;
}
.task-label input { display: none; }
.task-checkbox-ui {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--faint);
  background: transparent;
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: border-color .2s, background .2s;
}
.task-checkbox-ui svg { display: none; width: 12px; height: 12px; }
.task-label:hover { border-color: rgba(108,99,255,0.35); }
.task-label.checked { border-color: rgba(108,99,255,0.5); background: rgba(108,99,255,0.07); }
.task-label.checked .task-checkbox-ui { background: var(--violet); border-color: var(--violet); }
.task-label.checked .task-checkbox-ui svg { display: block; }
.task-label-text { flex: 1; font-size: 14.5px; }
.task-hours {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* Slider */
.slider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.slider-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.form-range {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: var(--bg-3);
  outline: none;
  appearance: none;
  cursor: pointer;
}
.form-range::-webkit-slider-thumb {
  appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--grad-accent);
  box-shadow: 0 0 14px var(--glow-violet);
  cursor: pointer;
  transition: box-shadow .2s;
}
.form-range::-webkit-slider-thumb:hover { box-shadow: 0 0 20px var(--glow-cyan); }

/* ---------- Calculator results ---------- */
.calc-results {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.results-empty {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  color: var(--muted);
}
.results-empty .empty-icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.results-empty p { font-size: 15px; line-height: 1.6; }

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
  transition: border-color .3s;
}
.result-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-accent);
  opacity: 0;
  transition: opacity .3s;
}
.result-card.highlight { border-color: rgba(108,99,255,0.35); }
.result-card.highlight::before { opacity: 1; }

.result-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.result-value {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.result-unit {
  font-size: 16px;
  font-weight: 500;
  opacity: 0.7;
  margin-left: 4px;
}
.result-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }

.roi-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.roi-badge.low { background: rgba(88,187,136,0.15); color: #58BB88; border: 1px solid rgba(88,187,136,0.3); }
.roi-badge.moderate { background: rgba(24,217,242,0.1); color: var(--cyan); border: 1px solid rgba(24,217,242,0.3); }
.roi-badge.high { background: rgba(108,99,255,0.15); color: #A89BFF; border: 1px solid rgba(108,99,255,0.3); }
.roi-badge.very-high { background: linear-gradient(100deg, rgba(108,99,255,0.2), rgba(24,217,242,0.15)); color: var(--ink); border: 1px solid rgba(108,99,255,0.4); }
.roi-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.results-cta-card {
  background: linear-gradient(135deg, rgba(108,99,255,0.18), rgba(24,217,242,0.08));
  border: 1px solid rgba(108,99,255,0.35);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}
.results-cta-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.results-cta-card p { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 20px; line-height: 1.5; }

/* ---------- Chatbot layout ---------- */
.chatbot-container {
  max-width: 780px;
  margin-inline: auto;
}
.chatbot-header-card {
  background: linear-gradient(135deg, rgba(108,99,255,0.15), rgba(24,217,242,0.08));
  border: 1px solid rgba(108,99,255,0.25);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.bot-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--grad-accent);
  display: grid; place-items: center;
  box-shadow: 0 0 20px var(--glow-violet);
  flex-shrink: 0;
}
.bot-avatar svg { width: 22px; height: 22px; }
.bot-info { flex: 1; }
.bot-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.bot-status {
  font-size: 13px;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--glow-cyan);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

.chat-window {
  background: var(--bg-card);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 420px;
  max-height: 480px;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}
.chat-window::-webkit-scrollbar { width: 4px; }
.chat-window::-webkit-scrollbar-track { background: transparent; }
.chat-window::-webkit-scrollbar-thumb { background: var(--faint); border-radius: 2px; }

/* Messages */
.msg {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  max-width: 85%;
  animation: msgIn .25s ease both;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msg--bot { align-self: flex-start; }
.msg--user { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--grad-accent);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.msg-avatar svg { width: 15px; height: 15px; }

.msg-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.55;
}
.msg--bot .msg-bubble {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  color: var(--ink);
}
.msg--user .msg-bubble {
  background: var(--grad-accent);
  color: #07112B;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  max-width: 85%;
}
.typing-indicator.hidden { display: none; }
.typing-dots {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  padding: 14px 18px;
  display: flex;
  gap: 5px;
  align-items: center;
}
.typing-dots span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: dotBounce 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dotBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-6px); opacity: 1; }
}

/* Suggestion chips */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px;
  background: var(--bg-card);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.chat-suggestions.hidden { display: none; }
.suggestion-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.03);
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.suggestion-chip:hover { border-color: rgba(108,99,255,0.5); color: var(--ink); background: rgba(108,99,255,0.08); }

/* Chat input */
.chat-input-area {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-input {
  flex: 1;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 16px;
  outline: none;
  resize: none;
  height: 48px;
  line-height: 1.4;
  overflow: hidden;
  transition: border-color .2s;
}
.chat-input::placeholder { color: var(--faint); }
.chat-input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(108,99,255,0.12); }
.chat-send-btn {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--grad-accent);
  border: none;
  display: grid; place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 20px -4px var(--glow-violet);
  transition: transform .2s, box-shadow .2s;
}
.chat-send-btn svg { width: 20px; height: 20px; color: #07112B; }
.chat-send-btn:hover { transform: scale(1.06); box-shadow: 0 6px 24px -4px var(--glow-cyan); }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Lead captured confirmation */
.lead-captured {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(88,187,136,0.1);
  border: 1px solid rgba(88,187,136,0.25);
  border-radius: 12px;
  margin-top: 12px;
  font-size: 14px;
  color: #7DD4A8;
}
.lead-captured.visible { display: flex; }
.lead-captured svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 28px 0;
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 0.04em;
}
.footer-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color .2s;
}
.footer-link:hover { color: var(--cyan); }

/* ============================================================
   DIAGNOSTIC GRATUIT
   ============================================================ */

.diag-wrapper {
  max-width: 680px;
  margin-inline: auto;
}

/* Barre de progression */
.diag-progress-wrap { margin-bottom: 32px; }
.diag-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.diag-step-counter {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.diag-pct-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--cyan);
}
.diag-progress-bar {
  height: 4px;
  background: var(--bg-3);
  border-radius: 999px;
  overflow: hidden;
}
.diag-progress-fill {
  height: 100%;
  background: var(--grad-accent);
  border-radius: 999px;
  width: 0%;
  transition: width .5s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 12px var(--glow-cyan);
}

/* Zone question */
.diag-question-area { min-height: 320px; }
.hidden { display: none !important; }

/* Champ "Autre" */
.diag-autre-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  animation: msgIn .2s ease both;
}
.diag-autre-input {
  flex: 1;
  background: var(--bg-2);
  border: 1.5px solid var(--violet);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 16px;
  outline: none;
  box-shadow: 0 0 0 3px rgba(108,99,255,0.12);
  transition: border-color .2s;
}
.diag-autre-input::placeholder { color: var(--faint); }
.diag-autre-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(24,217,242,0.1); }
.diag-autre-confirm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  background: var(--grad-accent);
  border: none;
  border-radius: 12px;
  color: #07112B;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 16px -4px var(--glow-violet);
  transition: transform .2s, box-shadow .2s;
}
.diag-autre-confirm:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -4px var(--glow-cyan); }
.diag-question-area.hidden { display: none; }

/* Carte question */
.diag-question-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  opacity: 1;
  transform: translateY(0);
  transition: opacity .25s ease, transform .25s ease;
}
.diag-question-card.diag-entering {
  opacity: 0;
  transform: translateY(16px);
}

.diag-q-num { margin-bottom: 14px; }
.diag-q-text {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 28px;
  color: var(--ink);
}

/* Options */
.diag-options { display: flex; flex-direction: column; gap: 10px; }
.diag-option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  background: var(--bg-2);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s, background .18s, color .18s, transform .18s;
}
.diag-option-btn:hover {
  border-color: rgba(108,99,255,0.5);
  background: rgba(108,99,255,0.06);
  color: var(--ink);
  transform: translateX(4px);
}
.diag-option-btn.selected {
  border-color: var(--violet);
  background: rgba(108,99,255,0.14);
  color: var(--ink);
}
.diag-option-marker {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--faint);
  flex-shrink: 0;
  transition: border-color .18s, background .18s, box-shadow .18s;
  position: relative;
}
.diag-option-btn:hover .diag-option-marker { border-color: var(--violet); }
.diag-option-btn.selected .diag-option-marker {
  background: var(--violet);
  border-color: var(--violet);
  box-shadow: 0 0 10px var(--glow-violet);
}
.diag-option-btn.selected .diag-option-marker::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: white;
}

/* Résultat */
.diag-result { }
.diag-result.hidden { display: none; }

.result-score-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  margin-bottom: 20px;
}
@media (max-width: 560px) {
  .result-score-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

/* Score ring */
.score-ring-wrap {
  position: relative;
  width: 130px; height: 130px;
  flex-shrink: 0;
}
.score-ring {
  width: 130px; height: 130px;
  transform: rotate(-90deg);
}
.score-ring-track {
  fill: none;
  stroke: var(--bg-3);
  stroke-width: 8;
}
.score-ring-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(.4,0,.2,1);
}
.score-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.score-number {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.score-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Score text zone */
.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-bottom: 14px;
}
.score-badge--low    { background: rgba(88,187,136,0.12); color: #58BB88; border: 1px solid rgba(88,187,136,0.3); }
.score-badge--moderate { background: rgba(24,217,242,0.1); color: var(--cyan); border: 1px solid rgba(24,217,242,0.3); }
.score-badge--high   { background: rgba(168,155,255,0.12); color: #A89BFF; border: 1px solid rgba(168,155,255,0.35); }

.score-title {
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: 10px;
}
.score-detail { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }

/* CTA card résultat */
.diag-cta-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, rgba(108,99,255,0.14), rgba(24,217,242,0.07));
  border: 1px solid rgba(108,99,255,0.3);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 16px;
}
@media (max-width: 680px) {
  .diag-cta-card { grid-template-columns: 1fr; gap: 16px; }
  .diag-cta-btn { width: 100%; justify-content: center; }
}
.diag-cta-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(108,99,255,0.15);
  border: 1px solid rgba(108,99,255,0.3);
  display: grid; place-items: center;
  flex-shrink: 0;
  color: #A89BFF;
}
.diag-cta-icon svg { width: 22px; height: 22px; }
.diag-cta-text strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.diag-cta-text p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }

/* Lead form (après score) */
.diag-lead-form {
  background: var(--bg-card);
  border: 1px solid rgba(108,99,255,0.25);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: msgIn .25s ease both;
}
.diag-lead-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--ink);
}
.diag-lead-header svg { flex-shrink: 0; margin-top: 2px; color: var(--violet); }
.diag-lead-header strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.diag-lead-header p { font-size: 13.5px; color: var(--ink-soft); margin: 0; }
.diag-lead-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 560px) { .diag-lead-fields { grid-template-columns: 1fr; } }
.diag-lead-input {
  width: 100%;
  background: var(--bg-2);
  border: 1.5px solid var(--line-2);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 16px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.diag-lead-input::placeholder { color: var(--faint); }
.diag-lead-input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(108,99,255,0.12); }
.diag-lead-input.input-error { border-color: #E05A5A; box-shadow: 0 0 0 3px rgba(224,90,90,0.12); }
.diag-lead-error {
  font-size: 13.5px;
  color: #E07A7A;
  margin: 0;
  line-height: 1.5;
}
.diag-lead-error a { color: #E07A7A; text-decoration: underline; }

.diag-restart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 8px 0;
  transition: color .2s;
}
.diag-restart-btn:hover { color: var(--ink-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .tab-btn { padding: 14px 16px; font-size: 14px; }
  .tab-btn span.tab-label { display: none; }
  .chat-suggestions { padding: 12px 16px; }
  .calc-form-card, .result-card, .results-cta-card { border-radius: var(--radius); }
  .header-badge { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}
