:root {
  --ink: #0f172a;
  --soft: #334155;
  --bg-a: #f7fee7;
  --bg-b: #e0f2fe;
  --panel: rgba(255, 255, 255, 0.86);
  --line: #dbeafe;
  --accent: #0f766e;
  --accent-2: #0ea5e9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 5% 10%, #dcfce7 0%, transparent 35%),
    radial-gradient(circle at 95% 90%, #bfdbfe 0%, transparent 40%),
    linear-gradient(120deg, var(--bg-a), var(--bg-b));
  font-family: "Nunito Sans", "Segoe UI", sans-serif;
  min-height: 100vh;
}

.page {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(320px, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 24px auto;
  padding: 12px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  backdrop-filter: blur(4px);
  box-shadow: 0 14px 35px rgba(15, 118, 110, 0.12);
}

.branding {
  animation: rise 500ms ease;
}

.wizard {
  animation: rise 650ms ease;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--soft);
}

h1 {
  margin: 6px 0 8px;
  font-size: clamp(30px, 4vw, 52px);
}

h2 {
  margin: 0 0 14px;
}

ul {
  padding-left: 18px;
}

label,
legend {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  padding: 10px 12px;
  background: #ffffff;
}

fieldset {
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
}

.checkbox {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 500;
}

.checkbox input {
  width: auto;
  margin: 0;
}

.progress {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  margin-bottom: 16px;
}

.bar {
  height: 100%;
  width: 20%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 250ms ease;
}

.step {
  display: none;
  animation: fadeIn 250ms ease;
}

.step.active {
  display: block;
}

/* ── Chat panel ────────────────────────────────────────────────────────── */

.chat {
  display: flex;
  flex-direction: column;
  height: 72vh;
  min-height: 500px;
  max-height: 760px;
  padding: 16px;
  overflow: hidden;
}

.messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 2px 8px;
  scroll-behavior: smooth;
}

/* Scrollbar */
.messages::-webkit-scrollbar { width: 4px; }
.messages::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* Message rows */
.message {
  display: flex;
  flex-direction: column;
  max-width: 88%;
  animation: fadeIn 200ms ease;
}

.message.bot  { align-self: flex-start; align-items: flex-start; }
.message.user { align-self: flex-end;   align-items: flex-end; }

/* Bubbles */
.bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.55;
}

.message.bot .bubble {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-bottom-left-radius: 4px;
  color: var(--ink);
}

.message.user .bubble {
  background: linear-gradient(135deg, #0f766e, #0ea5e9);
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Typing dots */
.bubble.typing {
  display: flex;
  gap: 6px;
  padding: 14px 18px;
  align-items: center;
}

.bubble.typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  animation: blink 1.2s infinite;
}

.bubble.typing span:nth-child(2) { animation-delay: 0.2s; }
.bubble.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40%            { opacity: 1;   transform: scale(1); }
}

/* Quick replies */
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  transition: opacity 200ms;
}

.reply-btn {
  background: #fff;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 150ms, color 150ms;
}

.reply-btn:hover:not(:disabled)  { background: var(--accent); color: #fff; }
.reply-btn:disabled               { opacity: 0.5; cursor: default; }

/* Mobility mode picker */
.mode-picker {
  width: 100%;
  max-width: 480px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mode-note {
  font-size: 12.5px;
  color: var(--soft);
  margin: 0 0 4px;
  line-height: 1.5;
}

.mode-cards {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mode-card {
  flex: 1 1 120px;
  background: #fff;
  border: 2px solid color-mix(in srgb, var(--mode-color, var(--accent)) 30%, #e2e8f0);
  border-radius: 14px;
  padding: 12px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: color-mix(in srgb, var(--mode-color, var(--accent)) 5%, white);
}

.mode-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.mode-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
}

.mode-slider-row {
  width: 100%;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.mode-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--mode-color, var(--accent)) 25%, #e2e8f0);
  outline: none;
  cursor: pointer;
  accent-color: var(--mode-color, var(--accent));
}

.mode-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--mode-color, var(--accent));
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: grab;
}

.mode-range:active::-webkit-slider-thumb { cursor: grabbing; }

.mode-time-lbl {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.mode-mins {
  font-size: 11px;
  font-weight: 800;
  color: var(--mode-color, var(--accent));
}

.mode-dist {
  font-size: 11px;
  color: #64748b;
}

/* Confirmation card */
.confirm-card {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 10px;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.confirm-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.confirm-row label {
  font-size: 12px;
  font-weight: 700;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.confirm-row input,
.confirm-row select {
  margin: 0;
  font-size: 14px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

.confirm-btn {
  align-self: flex-end;
  background: linear-gradient(90deg, #0f766e, #0284c7);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 9px 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 150ms;
}

.confirm-btn:hover:not(:disabled) { opacity: 0.88; }
.confirm-btn:disabled { opacity: 0.5; cursor: default; }

/* Input row */
.input-row {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  margin-top: 4px;
}

.input-row input {
  flex: 1;
  margin: 0;
  border-radius: 22px;
  padding: 10px 16px;
  border: 1.5px solid #cbd5e1;
  font-size: 14.5px;
  transition: border-color 150ms;
}

.input-row input:focus        { outline: none; border-color: var(--accent); }
.input-row input:disabled     { background: #f8fafc; color: #94a3b8; }

#sendBtn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 150ms;
}

#sendBtn:hover:not(:disabled) { opacity: 0.85; }
#sendBtn:disabled              { opacity: 0.4; cursor: default; }

/* Report link & restart */
.report-link {
  display: inline-block;
  background: linear-gradient(90deg, #0f766e, #0284c7);
  color: #fff;
  text-decoration: none;
  padding: 9px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
}

.report-link:hover { opacity: 0.88; }

.restart-btn {
  background: none;
  border: 1px solid #94a3b8;
  color: var(--soft);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

.restart-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Renonciation au droit de rétractation — étape obligatoire avant paiement.
   La case n'est jamais pré-cochée et le bouton reste inactif tant qu'elle
   ne l'est pas : c'est ce qui rend le consentement valable. */
.consent-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px 16px; border: 1px solid #cbd5e1; border-radius: 12px;
  background: #f8fafc;
}
.consent-line { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; font-size: 14px; line-height: 1.5; }
.consent-line input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--accent); cursor: pointer; }
.consent-note { margin: 0; font-size: 12px; color: var(--soft); }
.consent-note a { color: var(--accent); }
.consent-btn {
  align-self: flex-start;
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 10px 20px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.consent-btn:disabled { background: #cbd5e1; cursor: not-allowed; }
.consent-btn:not(:disabled):hover { opacity: .9; }

/* Misc */

.hidden { display: none; }

.small  { color: var(--soft); font-size: 13px; }

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

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

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

  .chat {
    height: 60vh;
    min-height: 400px;
  }
}

