/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: #212121;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== FORM CONTAINER ===== */
.form-container {
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* ===== SCREENS ===== */
.screen {
  display: none;
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  animation: fadeIn 0.3s ease;
}

.screen.active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Screen backgrounds */
.screen-welcome {
  background-image: url(../images/form-bg-welcome.svg);
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% 100%;
  background-color: #fff;
}

.screen-merci {
  background-image: url(../images/back-merci.svg);
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: cover;
  background-color: #fcfcfc;
  height: 100vh;
  min-height: 100vh;
}


/* ===== PROGRESS BAR (thin top line) ===== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: #7814ba;
  transition: width 0.4s ease;
  z-index: 10000;
}

/* ===== PROGRESS STEPS ===== */
.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.progress-step {
  font-size: 13px;
  font-weight: 600;
  color: rgba(33, 33, 33, 0.35);
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.3s;
  white-space: nowrap;
}

.progress-step.active {
  color: #7814ba;
  background: rgba(120, 20, 186, 0.1);
}

.progress-step.done {
  color: rgba(33, 33, 33, 0.6);
}

.progress-separator {
  font-size: 12px;
  color: rgba(33, 33, 33, 0.25);
  margin: 0 2px;
}

/* ===== LOGO ===== */
.logo-header {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}

.logo-header h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  color: #7814ba;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.logo-header img { height: 36px; }


/* ===== CONTENT WRAPPER ===== */
.content-wrapper {
  max-width: 690px;
  width: 100%;
  text-align: center;
}

.content-wrapper-wide {
  max-width: 905px;
  width: 100%;
  text-align: center;
}

/* ===== TYPOGRAPHY ===== */
.screen-title {
  font-size: 27px;
  font-weight: 700;
  color: #212121;
  margin-bottom: 10px;
  text-align: center;
}

.screen-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: #212121;
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.5;
}

.paragraphe {
  font-size: 27px;
  font-weight: 700;
  text-align: center;
  margin: 20px auto;
  width: 600px;
  max-width: 100%;
  line-height: 100%;
}

.question-label {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #212121;
}

/* ===== CARDS (Q1 options) ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 520px;
  margin: 0 auto 28px;
}

.card-option {
  padding: 24px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.card-option:hover {
  border-color: #7814ba;
  background: rgba(120, 20, 186, 0.04);
}

.card-option.selected {
  border-color: #7814ba;
  background: #7814ba;
  color: #fff;
}

.card-option .card-icon {
  line-height: 1;
  color: #7814ba;
}
.card-option .card-icon svg {
  display: block;
}
.card-option.selected .card-icon {
  color: #fff;
}

.card-option .card-text {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

/* ===== STEPPER ===== */
.stepper-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 16px auto 24px;
}

.stepper-btn {
  width: 48px;
  height: 48px;
  border: 2px solid #7814ba;
  border-radius: 50%;
  background: #fff;
  color: #7814ba;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  line-height: 1;
  padding: 0 0 2px;
}

.stepper-btn:hover {
  background: #7814ba;
  color: #fff;
}

.stepper-input {
  width: 80px;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  border: none;
  background: transparent;
  color: #212121;
  outline: none;
  -moz-appearance: textfield;
}

.stepper-input::-webkit-inner-spin-button,
.stepper-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ===== CHIPS (features multi-select) ===== */
.chips-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}

.chip {
  padding: 10px 20px;
  border: 2px solid rgba(120, 20, 186, 0.3);
  border-radius: 50px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #212121;
  transition: all 0.2s;
  user-select: none;
}

.chip:hover {
  border-color: #7814ba;
  background: rgba(120, 20, 186, 0.06);
}

.chip.selected {
  background: #7814ba;
  color: #fff;
  border-color: #7814ba;
}

/* ===== CHIP TOOLTIP ===== */
.chip-tooltip-icon {
  display: none;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(120, 20, 186, 0.15);
  color: #7814ba;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  margin-left: 6px;
  cursor: help;
  flex-shrink: 0;
}

.chip[data-tooltip]:not([data-tooltip=""]) {
  position: relative;
}

.chip[data-tooltip]:not([data-tooltip=""]) .chip-tooltip-icon {
  display: inline-flex;
}

.chip-tooltip-bubble {
  display: block;
  position: fixed;
  background: #1a1a2e;
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 8px;
  width: 260px;
  max-width: calc(100vw - 24px);
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 100;
  white-space: normal;
}

.chip:hover .chip-tooltip-bubble {
  opacity: 1;
}

/* ===== TOGGLE ===== */
.toggle-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 20px;
}

.toggle-group .toggle-label {
  font-size: 14px;
  font-weight: 600;
  color: #212121;
  margin-right: 16px;
  white-space: nowrap;
}

.toggle-options {
  display: flex;
  border: 2px solid #7814ba;
  border-radius: 50px;
  overflow: hidden;
}

.toggle-opt {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
  color: #212121;
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
}

.toggle-opt.active {
  background: #7814ba;
  color: #fff;
}

.toggle-opt:first-child { border-right: 1px solid #7814ba; }

/* ===== DROPDOWN ===== */
.form-select {
  width: 100%;
  max-width: 400px;
  margin: 0 auto 20px;
  padding: 14px 18px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  color: #212121;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.form-select:focus { border-color: #7814ba; }

/* ===== RADIO GROUP ===== */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  margin: 0 auto 24px;
}

.radio-option {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 15px;
  font-weight: 500;
}

.radio-option:hover { border-color: #7814ba; }

.radio-option.selected {
  border-color: #7814ba;
  background: #7814ba;
  color: #fff;
}

.radio-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* ===== RADIO ERROR ===== */
.radio-error {
  display: none;
  color: #e53935;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  margin-top: -12px;
  margin-bottom: 16px;
}
.radio-error.visible { display: block; }

/* ===== INPUT FIELDS ===== */
.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #212121;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 18px;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  border: 2px solid #fff;
  border-radius: 6px;
  background: #fff;
  color: #212121;
  outline: none;
  transition: border-color 0.2s;
}

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

.form-group .error-message {
  color: #e53935;
  font-size: 13px;
  margin-top: 6px;
  display: none;
}

.form-group.has-error input { border-color: #e53935; }
.form-group.has-error .error-message { display: block; }

.form-row {
  display: flex;
  gap: 24px;
}

.form-row .form-group { flex: 1; }

/* ===== EMAIL WARNING ===== */
.email-warning {
  display: none;
  background: rgba(120, 20, 186, 0.08);
  border: 1px solid rgba(120, 20, 186, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #5a0e8a;
  margin-top: 6px;
  line-height: 1.4;
}

.email-warning.visible { display: block; }

/* ===== RECAP BAR ===== */
.sticky-recap {
  background: #fff;
  color: #212121;
  padding: 10px 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.sticky-recap .recap-highlight {
  color: #7814ba;
}

/* ===== BUTTONS ===== */
.btn-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}

.btn {
  padding: 12px 24px;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
  outline: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: #7814ba;
  color: #fff;
  border-color: #7814ba;
}

.btn-primary:hover {
  background: transparent;
  color: #7814ba;
  border-color: #7814ba;
}

.btn-back {
  background: rgba(80, 80, 81, 0.1);
  color: #212121;
  border-color: transparent;
}

.btn-back:hover {
  background: none;
  color: #7814ba;
  border-color: #7814ba;
}

.btn-submit {
  background: #7814ba;
  color: #fff;
  border-color: #7814ba;
  width: 100%;
  justify-content: center;
  padding: 16px 24px;
  border-radius: 10px;
  font-size: 16px;
}

.btn-submit:hover {
  background: transparent;
  color: #7814ba;
}

/* ===== SPINNER ===== */
.spinner {
  display: none;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn-submit.loading .spinner { display: inline-block; }
.btn-submit.loading .btn-text { display: none; }

/* ===== CONDITIONAL SECTIONS ===== */
.conditional { display: none; }
.conditional.visible { display: block; }

/* ===== TOGGLE ROW (2 columns) ===== */
.toggle-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 4px;
}

.toggle-col .question-label {
  font-size: 18px;
}

/* ===== SECTION DIVIDER ===== */
.section-divider {
  width: 60px;
  height: 3px;
  background: rgba(120, 20, 186, 0.2);
  border-radius: 2px;
  margin: 20px auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 820px) {
  .screen { padding: 20px; }
}

@media (min-width: 460px) and (max-width: 767px) {
  .screen-title { font-size: 22px; }
}

@media (max-width: 767px) {
  .screen-welcome {
    background-image: none;
    background: linear-gradient(271deg, #FFE655 0.51%, #FF961A 104.61%), #FCFCFC;
  }
}

@media (max-width: 689px) {
  .form-row { flex-direction: column; gap: 0; }
}

@media (max-width: 560px) {
  .paragraphe { width: 90%; }
}

@media (max-width: 560px) {
  .toggle-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 459px) {
  .screen-title { font-size: 20px; }
  .question-label { font-size: 18px; }
  .toggle-opt { padding: 8px 16px; font-size: 13px; }
  .card-option {
    padding: 18px 12px;
  }
  .card-option .card-text { font-size: 13px; }
}

@media (min-width: 821px) {
  .form-group input { padding: 24px; }
}

/* ===== SCREEN 7 : MERCI ===== */
.merci-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 600px;
  position: relative;
  z-index: 1;
}

.merci-emoji {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 20px;
}

.merci-title {
  font-size: 32px;
  font-weight: 800;
  color: #212121;
  line-height: 1.2;
  margin-bottom: 12px;
  text-align: center;
}

.merci-subtitle {
  font-size: 15px;
  font-weight: 400;
  color: #888;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 28px;
  max-width: 440px;
}

.merci-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
  width: 100%;
}

.merci-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 24px;
  border: none;
  border-radius: 14px;
  background: #fff;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  flex: 1 1 auto;
  justify-content: center;
}

.merci-pill-wide {
  flex-basis: 100%;
}

.merci-pill-label {
  font-weight: 700;
  color: #212121;
}

.merci-pill-value {
  font-weight: 500;
  color: #7814ba;
}

.merci-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-merci {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-merci-primary {
  background: #7814ba;
  color: #fff;
  border-color: #7814ba;
}

.btn-merci-primary:hover {
  background: #5e0f95;
  border-color: #5e0f95;
}

.btn-merci-outline {
  background: #fff;
  color: #212121;
  border-color: #e0e0e0;
}

.btn-merci-outline:hover {
  border-color: #7814ba;
  color: #7814ba;
}

@media (max-width: 560px) {
  .screen-merci { padding-top: 60px; }
  .merci-title { font-size: 24px; }
  .merci-subtitle { font-size: 14px; }
  .merci-pill { padding: 12px 16px; font-size: 13px; }
  .merci-actions { flex-direction: column; width: 100%; }
  .btn-merci { width: 100%; justify-content: center; }
}

