:root {
  --gold: #1E4B8C;
  --gold-light: #1E4B8C;
  --gold-dim: rgba(30,75,140,0.10);
  --dark: #F6F9FF;
  --dark-2: #FFFFFF;
  --dark-3: #EEF3FB;
  --dark-4: #DCE6F5;
  --text: #14213D;
  --text-muted: #55647E;
  --white: #14213D;
  --success: #1E4B8C;
  --red: #C8102E;
  --red-dim: rgba(200,16,46,0.08);
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: #FFFFFF;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: 4px;
}

/* Background texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(30,75,140,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(30,75,140,0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Header */
header {
  padding: 40px 0 32px;
  text-align: center;
}

.logo {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
  color: #1A2E44;
  margin-bottom: 40px;
  display: block;
}

.hero-tag {
  display: inline-block;
  background: #EEF4FF;
  border: 1px solid rgba(0,0,0,0.12);
  color: #1A2E44;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 20px;
}

h1 {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text);
}

h1 span {
  color: var(--gold);
}

.hero-sub {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto 40px;
}

/* Progress bar */
.progress-wrap {
  background: var(--dark-4);
  border-radius: 100px;
  height: 6px;
  margin-bottom: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #1E4B8C, #5B8FD6);
  border-radius: 100px;
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
}

.progress-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
}

.step-count { color: #1E4B8C; font-weight: 600; }

/* Card */
.card {
  background: var(--dark-2);
  border: 1px solid rgba(30,75,140,0.12);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.8;
}

.step { display: none; }
.step.active { display: block; animation: fadeUp 0.4s ease forwards; }

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

.step-icon {
  width: 48px; height: 48px;
  background: var(--gold-dim);
  border: 1px solid rgba(30,75,140,0.25);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 20px;
}

.step-q {
  font-family: 'DM Sans', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.step-hint {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* Options grid */
.options { display: grid; gap: 12px; }
.options.cols-2 { grid-template-columns: 1fr 1fr; }

.option {
  background: var(--dark-3);
  border: 1.5px solid rgba(30,75,140,0.15);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text);
  user-select: none;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.option:hover {
  border-color: rgba(30,75,140,0.4);
  background: var(--dark-4);
  transform: translateY(-1px);
}

.option.selected {
  border-color: var(--gold);
  background: var(--gold-dim);
  color: var(--text);
}

.option-icon {
  font-size: 20px;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.option-text { flex: 1; line-height: 1.3; }
.option-text small { font-size: 12px; color: var(--text-muted); display: block; margin-top: 2px; }
.option.selected .option-text small { color: var(--gold); }

.option-check {
  width: 20px; height: 20px;
  border: 1.5px solid rgba(30,75,140,0.3);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  color: transparent;
}

.option.selected .option-check {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
  font-size: 11px;
}

/* Slider */
.slider-wrap { margin-top: 8px; }

.slider-val {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
}

.slider-val span { font-size: 18px; color: var(--text-muted); margin-left: 4px; }

input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--dark-4);
  border-radius: 100px;
  outline: none;
  margin-bottom: 12px;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(30,75,140,0.4);
  transition: transform 0.1s;
}

input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }

.slider-range {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* Text input */
.text-input {
  width: 100%;
  background: var(--dark-3);
  border: 1.5px solid rgba(30,75,140,0.2);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 12px;
}

.text-input:focus { border-color: var(--gold); }
.text-input::placeholder { color: var(--text-muted); }

.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.date-row { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 12px; }

select.text-input {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9'><path d='M0 0 L7 8 L14 0' stroke='%235A7090' fill='none' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.civilite-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.civilite-btn {
  background: var(--dark-3);
  border: 1.5px solid rgba(30,75,140,0.15);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  font-size: 15px;
  color: var(--text);
  transition: all 0.2s ease;
  font-family: inherit;
  width: 100%;
}
.civilite-btn:hover { border-color: rgba(30,75,140,0.4); }
.civilite-btn.selected { border-color: var(--gold); background: var(--gold-dim); font-weight: 600; }

/* Checkbox RGPD */
.rgpd {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #FFFFFF;
  border: 1.5px solid rgba(30,75,140,0.2);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 12px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.2s;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.rgpd:hover { border-color: rgba(30,75,140,0.4); }
.rgpd.checked { border-color: var(--gold); background: var(--gold-dim); }

.rgpd input { display: none; }

.rgpd-box {
  min-width: 20px;
  height: 20px;
  border: 2px solid rgba(30,75,140,0.4);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  font-size: 12px;
  font-weight: 700;
}

.rgpd.checked .rgpd-box {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.rgpd-text { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.rgpd-text strong { color: var(--text); }

/* Buttons */
.btn-primary {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #1E4B8C, #1E4B8C);
  color: #FFFFFF;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 18px 32px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.3px;
  margin-top: 24px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(30,75,140,0.35);
}

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

.btn-back {
  background: none;
  border: 1px solid rgba(30,75,140,0.2);
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
}

.btn-back:hover { border-color: var(--gold); color: var(--gold); }

/* Erreur de soumission */
.form-error {
  display: none;
  margin-top: 14px;
  background: var(--red-dim);
  border: 1px solid rgba(200,16,46,0.3);
  color: var(--red);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.5;
}

.form-error.visible { display: block; }

/* Results */
.results { display: none; }
.results.active { display: block; animation: fadeUp 0.5s ease forwards; }

.result-header {
  text-align: center;
  padding: 40px 0 28px;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red-dim);
  border: 1px solid rgba(200,16,46,0.3);
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.result-title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.result-sub {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 8px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0 0 24px;
}

.metric {
  background: linear-gradient(135deg, #1E4B8C, #163A6E);
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(30,75,140,0.25);
}

.metric::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 80px; height: 80px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.metric-val {
  font-family: 'DM Sans', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #FFFFFF;
  display: block;
  margin-bottom: 6px;
}

.metric-label { font-size: 12px; color: rgba(255,255,255,0.8); line-height: 1.3; }

.profil-card {
  background: #F4F8FF;
  border: 1px solid rgba(30,75,140,0.2);
  border-left: 4px solid #1E4B8C;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 0;
}

.profil-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #1E4B8C;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profil-message {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.profil-items { list-style: none; }

.profil-items li {
  font-size: 14px;
  color: var(--text);
  padding: 10px 0;
  border-bottom: 1px solid rgba(30,75,140,0.08);
  display: flex;
  gap: 10px;
  line-height: 1.5;
}

.profil-items li:last-child { border-bottom: none; }

.profil-items li::before {
  content: '✓';
  color: #1E4B8C;
  font-weight: 700;
  flex-shrink: 0;
}

.cta-card {
  background: linear-gradient(135deg, #C8102E, #8C0C21);
  border-radius: 20px;
  padding: 36px 32px;
  text-align: center;
  margin-top: 24px;
  box-shadow: 0 8px 32px rgba(200,16,46,0.3);
}

.cta-card h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 10px;
}

.cta-card p {
  color: rgba(255,255,255,0.85);
  font-size: 15px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.cta-card p strong { color: #FFFFFF; text-decoration: underline; }

.trust-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
}

.trust-item span { color: #FFFFFF; font-weight: 700; }

footer {
  text-align: center;
  padding: 32px 0 48px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.8;
}

footer a { color: var(--text-muted); text-decoration: underline; }

/* Responsive */
@media (max-width: 520px) {
  .card { padding: 28px 20px; }
  .options.cols-2 { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .input-row { grid-template-columns: 1fr; }
}

.flag-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  display: flex;
  z-index: 10;
}
.flag-bar span { flex: 1; }
.flag-bar .b1 { background: #1E4B8C; }
.flag-bar .b2 { background: #FFFFFF; }
.flag-bar .b3 { background: #C8102E; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
