:root {
  --bg: #0B0E17;
  --surface: #141A2B;
  --surface-2: #1B2236;
  --border: #2A3352;
  --text: #F5F3ED;
  --text-muted: #9298B0;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --pal-a: #5B8DEF;
  --pal-b: #F2542D;
  --pal-c: #FFC145;
  --pal-d: #2EC4B6;
  --pal-e: #B388FF;

  --font-display: "Unbounded", sans-serif;
  --font-body: "Manrope", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

a { color: inherit; }

/* ---------- ambient background ---------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 420px at 12% 8%, rgba(91, 141, 239, 0.20), transparent 60%),
    radial-gradient(560px 400px at 88% 28%, rgba(242, 84, 45, 0.14), transparent 60%),
    radial-gradient(620px 480px at 50% 95%, rgba(179, 136, 255, 0.14), transparent 60%);
  filter: blur(10px);
}

/* ---------- layout shells ---------- */

.topbar, main, .footer { position: relative; z-index: 1; }

.topbar { padding: 24px clamp(20px, 5vw, 64px) 0; }

.topbar__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.01em; }
.logo__mark { color: var(--pal-b); }

.topbar__contact {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.topbar__contact:hover { color: var(--text); border-color: var(--border); }

main { max-width: 1100px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px) 80px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  max-width: 900px;
  margin: 24px auto 0;
  padding: clamp(64px, 12vw, 108px) clamp(24px, 5vw, 48px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(11, 14, 23, 0.35) 0%, rgba(11, 14, 23, 0.92) 88%),
    url("bg2.jpg") center 25% / cover no-repeat;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: rise 0.7s ease both;
}

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

.hero__kicker { font-size: 0.95rem; color: var(--pal-d); font-weight: 600; margin: 0 0 18px; }

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.12;
  margin: 0 0 20px;
}

.hero__lead { color: var(--text-muted); font-size: 1.08rem; max-width: 46ch; margin: 0 0 32px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.btn--primary {
  background: var(--text);
  color: #0B0E17;
  box-shadow: 0 10px 30px -12px rgba(245, 243, 237, 0.35);
}

.btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px -12px rgba(245, 243, 237, 0.45);
}

.btn--primary:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }

.btn--ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn--ghost:hover { color: var(--text); border-color: var(--text-muted); }

.btn:focus-visible { outline: 2px solid var(--pal-d); outline-offset: 3px; }

/* ---------- wizard shell ---------- */

.wizard {
  padding: 56px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 24px;
}

.wizard__eyebrow {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 0 10px;
}

.step__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 0 0 8px;
}

.step__subtitle { color: var(--text-muted); margin: 0 0 28px; font-size: 0.98rem; }

.wizard__panel { animation: rise 0.35s ease both; }

.wizard__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}

/* ---------- trail (breadcrumb of the tree) ---------- */

.trail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.trail__chip {
  --accent: var(--pal-d);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: default;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.trail__chip--done {
  color: #0B0E17;
  background: var(--accent);
  border-color: var(--accent);
  cursor: pointer;
}

.trail__chip--active {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.trail__chip--upcoming { opacity: 0.45; }

.trail__chip:disabled { cursor: default; }

/* ---------- option cards (choice steps) ---------- */

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.option-card {
  --accent: var(--pal-d);
  position: relative;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 20px;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.option-card:hover { transform: translateY(-2px); border-color: var(--accent); }

.option-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 16px 32px -18px var(--accent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface));
}

.option-card__icon { display: block; font-size: 1.5rem; margin-bottom: 12px; }
.option-card__name { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; margin-bottom: 6px; }
.option-card__hint { display: block; color: var(--text-muted); font-size: 0.86rem; }

.option-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- text step ---------- */

.wizard__panel textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wizard__panel textarea:focus {
  outline: none;
  border-color: var(--pal-e);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pal-e) 20%, transparent);
}

/* ---------- devis view ---------- */

.devis-view { animation: rise 0.35s ease both; }

.recap {
  display: grid;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 32px;
}

.recap__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.94rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.recap__row:last-child { border-bottom: none; padding-bottom: 0; }

.recap__label {
  --accent: var(--pal-d);
  color: var(--accent);
  font-weight: 700;
  flex: none;
}

.recap__value { color: var(--text-muted); text-align: right; }

/* ---------- form ---------- */

.quote-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }

label { font-size: 0.88rem; color: var(--text-muted); font-weight: 600; }

input, textarea {
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, .quote-form textarea:focus {
  outline: none;
  border-color: var(--pal-d);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pal-d) 20%, transparent);
}

.quote-form textarea { resize: vertical; }

.form-feedback { margin-top: 20px; font-size: 0.95rem; min-height: 1.4em; }
.form-feedback.is-success { color: var(--pal-d); }
.form-feedback.is-error { color: var(--pal-b); }

/* ---------- footer ---------- */

.footer { padding: 32px clamp(20px, 5vw, 64px) 48px; text-align: center; color: var(--text-muted); font-size: 0.88rem; }
.footer a { text-decoration: none; border-bottom: 1px solid var(--border); }

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .quote-form { grid-template-columns: 1fr; }
  .wizard__nav { flex-direction: column-reverse; align-items: stretch; }
  .wizard__nav .btn { width: 100%; justify-content: center; text-align: center; }
  .recap__row { flex-direction: column; gap: 2px; }
  .recap__value { text-align: left; }
}
