/* ===== V2 Design Tokens ===== */
:root {
  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Karla", "Segoe UI", system-ui, -apple-system, sans-serif;
  --primary: #9e3f3a;
  --primary-dark: #83322e;
  --primary-light: rgba(205, 82, 81, 0.08);
  --button: #cd5251;
  --button-dark: #b44544;
  --text: #2a2420;
  --text-dark: #2a2420;
  --muted: #5e5550;
  --bg: #faf6ef;
  --ivory: #f6f1e8;
  --sand: #f5eee3;
  --border: #e3d9c8;
  --brass: #b08d57;
  --brass-dark: #7a5c34;
}

/* ===== Font Face ===== */
@font-face {
  font-family: 'Obviously';
  src: url('../fonts/nucleo/Obviously.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

/* ===== Reset & Body ===== */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  color: var(--text);
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-font-smoothing: antialiased;
}

/* ===== Header / Top Bar ===== */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  background-color: var(--sand);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 3.5rem;
}

@media (min-width: 64rem) {
  .top-bar {
    height: 4rem;
    padding: 0 2.5rem;
  }
}

.top-bar-inner {
  width: 100%;
  max-width: 96rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.top-bar-logo {
  display: flex;
  align-items: center;
}

.top-logo-image {
  height: 2rem;
  width: auto;
  display: block;
}

@media (min-width: 64rem) {
  .top-logo-image {
    height: 2.25rem;
  }
}

/* Phone link in header */
.top-bar-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.top-bar-phone:hover {
  color: var(--primary);
}

.top-bar-phone img {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}

@media (min-width: 64rem) {
  .top-bar-phone {
    font-size: 0.9375rem;
  }
}

/* Progress bar under header */
.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--border);
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--primary);
  width: 0%;
  transition: width 0.3s ease;
}

/* ===== Step Indicator (numbered circles) ===== */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  margin-bottom: 2rem;
  padding: 0;
}

.step-indicator__item {
  display: flex;
  align-items: center;
  list-style: none;
}

.step-indicator__circle {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  background: #ffffff;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.step-indicator__line {
  width: 2.5rem;
  height: 2px;
  background: var(--border);
  transition: background 0.25s ease;
}

.step-indicator__item.is-active .step-indicator__circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.step-indicator__item.is-active .step-indicator__line {
  background: var(--primary);
}

/* ===== Container ===== */
.container {
  width: 92%;
  max-width: 640px;
  background: var(--bg);
  padding: 2rem 0;
  position: relative;
  margin-top: 2rem;
  text-align: left;
}

@media (min-width: 64rem) {
  .container {
    margin-top: 3rem;
  }
}

/* ===== Typography ===== */
h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: normal;
  line-height: 1.2;
  color: var(--text-dark);
  margin: 0 0 0.75rem;
  text-align: left;
}

h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: normal;
  line-height: 1.25;
  color: var(--text-dark);
  margin: 0 0 1rem;
  text-align: left;
}

h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 0.75rem;
  text-align: left;
}

p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ===== Form Steps ===== */
.form-step {
  display: none;
  min-height: 300px;
  flex-direction: column;
  justify-content: flex-start;
}

.form-step.active {
  display: flex;
}

/* ===== Form Groups ===== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 1.125rem 1.25rem;
  margin-top: 0.25rem;
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 0.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(222, 90, 89, 0.12);
}

.form-group input::placeholder {
  color: #999;
}

.form-control {
  padding: 1.125rem 1.25rem;
}

/* ===== Buttons ===== */
.btn {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  padding: 0.875rem 1.75rem;
  transition: background-color 0.2s ease, transform 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
  padding: 1.125rem 2rem;
  font-size: 1.0625rem;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--sand);
  border-color: #ddd;
}

/* ===== Button Groups (option buttons) ===== */
.button-container {
  display: flex;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Care for buttons (moi-même / un proche) */
.button-container .btn {
  flex: 1;
  min-width: 140px;
  padding: 1.125rem 1.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  border-radius: 50px;
  text-align: center;
  justify-content: center;
}

.button-container .btn.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.button-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.625rem;
  width: 100%;
  margin-top: 1rem;
}

.button-group .btn {
  width: 100%;
  padding: 1.125rem 1.5rem;
  background-color: #ffffff;
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 500;
  border: 1px solid #d5d5d5;
  border-radius: 50px;
  text-align: left;
  justify-content: flex-start;
}

.button-group .btn:hover {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: none;
}

/* ===== Intent Filter (step0) ===== */
.intent-filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.intent-filter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  border-radius: 50px;
  border: 1px solid #d5d5d5;
  background: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  width: 100%;
}

.intent-filter-btn:hover {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.intent-filter-btn--primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-size: 1.0625rem;
}

.intent-filter-btn--primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.intent-filter-dead-end {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  text-align: center;
}

.intent-filter-dead-end h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.intent-filter-dead-end p {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0.5rem 0;
}

/* ===== Representative Section ===== */
.representative-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.representative-photo {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
}

.representative-info__name {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.representative-info__subtitle {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* Contact step: the same conseillère, now as the person who will call. */
.contact-rep {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  margin-bottom: 1.25rem;
  background: var(--sand);
  border-radius: 14px;
}
.contact-rep__photo {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  flex: none;
}
.contact-rep__name {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
}
.contact-rep__note {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--muted);
  margin-top: 0.125rem;
}
.call-time {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.call-time__opt {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid rgba(42, 36, 32, 0.18);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
}
.call-time__opt.is-on {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.representative-question {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.representative-question__title {
  margin: 0;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
}

/* ===== Matching Step ===== */
.matching-text p {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  opacity: 0;
  transition: opacity 1s ease-in-out;
  margin: 0.5rem 0;
}

/* ===== Profile Display ===== */
#profileDisplay {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-top: 0.625rem;
  width: 100%;
}

#profileDisplay img {
  width: 90%;
  max-width: 350px;
  height: auto;
  object-fit: contain;
  border-radius: 0.625rem;
  margin-left: 0;
}

#profileCountText {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text);
}

/* ===== Bottom Trust Bar ===== */
.bottom-bar {
  background-color: transparent;
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  text-align: left;
  width: 92%;
  max-width: 640px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.bottom-bar .info-item {
  display: flex;
  align-items: center;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--muted);
  flex: 1;
  gap: 0.5rem;
}

.bottom-bar .info-item strong {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
  display: block;
}

.icon {
  height: 1.25rem;
  width: auto;
}

.trustpilot {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 0;
  height: 2.5rem;
}

.trustpilot-icon {
  width: 5rem;
  height: auto;
}

/* ===== Error Feedback ===== */
.error {
  font-family: var(--font-body);
  color: var(--primary);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(222, 90, 89, 0.08);
  border-radius: 0.375rem;
}

/* ===== Autocomplete ===== */
.autocomplete-items {
  position: absolute;
  background: white;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.autocomplete-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9375rem;
}

.autocomplete-item:hover {
  background-color: var(--bg);
}

/* ===== Hidden Utility ===== */
.hidden {
  display: none;
}

/* ===== Team Photos ===== */
.team-welcome {
  text-align: left;
  margin-bottom: 1rem;
}

.team-photo {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  margin: 0.5rem 0.5rem 0.5rem 0;
  display: inline-block;
  object-fit: cover;
}

/* ===== Back Link ===== */
.step-back-link {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  margin-top: 1.5rem;
  display: inline-block;
  transition: color 0.2s ease;
}

.step-back-link:hover {
  color: var(--primary);
}

/* ===== Soft Button Variant ===== */
.btn-soft {
  background-color: transparent !important;
  color: var(--muted) !important;
  border: 1px solid var(--border) !important;
  font-style: italic;
}

.btn-soft:hover {
  background-color: var(--sand) !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .container {
    width: 95%;
    margin-top: 1.5rem;
    padding: 1.25rem 0;
  }

  h1 {
    font-size: 1.625rem;
    line-height: 1.25;
  }

  h2 {
    font-size: 1.375rem;
  }

  .button-group .btn {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }

  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
  }

  .bottom-bar {
    padding: 0.75rem 0;
    gap: 0.75rem;
  }

  .bottom-bar .info-item {
    font-size: 0.625rem;
  }

  .bottom-bar .info-item strong {
    font-size: 0.6875rem;
  }

  .trustpilot-icon {
    width: 3.5rem;
  }

  .representative-photo {
    width: 5rem;
    height: 5rem;
  }

  .team-photo {
    width: 4rem;
    height: 4rem;
  }

  .intent-filter-btn {
    padding: 0.875rem 1.125rem;
    font-size: 0.9375rem;
  }

  .step-indicator__circle {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
  }

  .step-indicator__line {
    width: 1.5rem;
  }

  .button-container .btn {
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
  }
}


/* ===== Premium pass: same language as the landing pages ===================== */

body { background-color: var(--ivory); }

h1, h2, h3, .form-step h2, .representative-question {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: normal;
  color: var(--text);
}

/* The card the questions sit in: parchment, not a grey panel. */


/* Inputs: quiet until focused, then brick — never a blue browser outline. */
.form-control,
input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: #fffdf9;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
input[type="text"]:focus, input[type="tel"]:focus, input[type="email"]:focus,
select:focus, textarea:focus {
  outline: none;
  border-color: var(--button);
  box-shadow: 0 0 0 3px rgba(205, 82, 81, 0.14);
}

::placeholder { color: #a89a8c; }

/* Answer chips and the primary action share the pill language of the site. */
.btn-primary, .intent-filter-btn--primary {
  background-color: var(--button);
  border-color: var(--button);
  font-family: var(--font-body);
  font-weight: 700;
}

.btn-primary:hover, .intent-filter-btn--primary:hover {
  background-color: var(--button-dark);
  border-color: var(--button-dark);
}

.btn-secondary, .button-group .btn, .button-group button, .intent-filter-btn {
  background-color: #fffdf9;
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

/* Hover goes WARMER and darker, never paler: the previous near-white hover
   vanished against the card. */
.btn-secondary:hover, .button-group .btn:hover, .button-group button:hover,
.intent-filter-btn:hover {
  border-color: var(--brass);
  background-color: var(--sand);
  /* The old rule turned the label white on hover, which vanished on sand. */
  color: var(--text);
  box-shadow: 0 4px 14px rgba(42, 36, 32, 0.08);
}

.button-group .btn.selected, .button-group button.selected,
.button-group button[aria-pressed="true"] {
  border-color: var(--primary);
  background-color: #f7e9e6;
  color: var(--primary);
}

/* Progress: brass rather than a loud coral bar. */
.progress-bar { background-color: var(--ivory); }
.progress-bar-fill { background-color: var(--brass); }

.step-indicator .active, .step-indicator .completed {
  background-color: var(--button);
  border-color: var(--button);
}

/* The reassurance strip at the bottom of the page. */
.bottom-bar {
  background: var(--ivory);
  border-top: 1px solid var(--border);
  font-family: var(--font-body);
  color: var(--muted);
}

.error {
  background: #fdf3f3;
  border: 1px solid #e3b9b8;
  color: #83322e;
}


/* The card: warm white on ivory, so it reads as paper rather than a white box. */
/* The card. It used to be the page background with `padding: 2rem 0`, so it
   needed no side padding; as a bordered card that left the content flush
   against the edge. The step is no longer forced to 300px either — that was
   the empty gap under the answers. */
.container {
  background: #fffdf9;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(42, 36, 32, 0.07);
  padding: 2.25rem 2rem 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 40rem) {
  .container {
    padding: 1.75rem 1.25rem 1.5rem;
    border-radius: 14px;
  }
}

.form-step {
  min-height: 0;
}

.form-step.active {
  display: flex;
}

/* The one filled action stays brick red — darker and calmer than the coral,
   and it holds white text at any size. */
.btn-primary, .intent-filter-btn--primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-primary:hover, .intent-filter-btn--primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}
