/* ============================================================
   RETROCOTE — Feuille de styles principale
   Palette : navy #1C2B4A | or #C9A84C | crème #F8F6F0
   ============================================================ */

:root {
  --navy:      #1C2B4A;
  --navy-dark: #0E1A33;
  --navy-mid:  #2A4080;
  --gold:      #C9A84C;
  --gold-pale: #F5E9C8;
  --cream:     #F8F6F0;
  --white:     #FFFFFF;
  --mid:       #64748B;
  --light:     #E2E8F0;
  --dark:      #1A1A2E;
  --green:     #059669;
  --red:       #DC2626;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--dark);
  line-height: 1.6;
}

/* ── Typography ── */
h1, h2, h3, h4 { font-family: 'Georgia', serif; color: var(--navy); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p  { color: var(--mid); }

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.container { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }
.section   { padding: 5rem 0; }
.section-alt { background: var(--white); }

/* ── Navbar ── */
.navbar {
  background: var(--navy-dark);
  padding: 1rem 0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between;
}
.navbar-brand {
  font-family: 'Georgia', serif;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--white);
  letter-spacing: .02em;
}
.navbar-brand span { color: var(--gold); }
.navbar-links { display: flex; gap: 2rem; }
.navbar-links a {
  color: rgba(255,255,255,.75);
  font-size: .92rem;
  transition: color .2s;
}
.navbar-links a:hover { color: var(--gold); text-decoration: none; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: .8rem 2rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform .15s, box-shadow .15s, opacity .15s;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.18); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--gold); color: var(--navy-dark); }
.btn-primary:hover { background: #b8942e; }

.btn-secondary { background: transparent; color: var(--white); border: 2px solid var(--gold); }
.btn-secondary:hover { background: var(--gold); color: var(--navy-dark); }

.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }

.btn-lg { padding: 1rem 2.5rem; font-size: 1.1rem; }
.btn-sm { padding: .5rem 1.2rem; font-size: .88rem; }
.btn-block { display: block; width: 100%; }

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

/* ── Hero ── */
.hero {
  background: var(--navy-dark);
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 55%; height: 100%;
  background: radial-gradient(ellipse at 70% 50%, #1A3060 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.hero h1 { color: var(--white); margin-bottom: 1.25rem; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p { color: #C0CFDF; font-size: 1.1rem; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 2rem;
  backdrop-filter: blur(4px);
}
.hero-card-header {
  background: var(--gold);
  color: var(--navy-dark);
  font-size: .8rem;
  font-weight: 700;
  padding: .4rem .8rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 1rem;
}
.hero-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
  margin: .5rem 0;
}
.hero-range {
  display: flex; gap: .5rem; margin: 1rem 0;
}
.range-box {
  flex: 1; padding: .5rem; border-radius: 4px; text-align: center;
  background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.1);
}
.range-box.active { border-color: var(--gold); }
.range-box .label { font-size: .7rem; color: #8899BB; }
.range-box .val   { font-size: .95rem; font-weight: 700; color: var(--white); }
.range-box.active .val { color: var(--gold); }
.hero-factors { margin-top: 1rem; font-size: .82rem; }
.hero-factors li { list-style: none; padding: .2rem 0; }
.factor-pos { color: #4ADE80; }
.factor-neg { color: #F87171; }
.hero-confidence {
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .8rem; color: #5566AA; font-style: italic;
}

/* ── Features ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.feature-card {
  background: var(--cream);
  border: 1px solid var(--light);
  border-radius: 10px;
  padding: 1.75rem;
  border-top: 4px solid var(--gold);
  transition: box-shadow .2s;
}
.feature-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.feature-icon {
  font-size: 2rem; margin-bottom: 1rem;
}
.feature-card h3 { margin-bottom: .5rem; }

/* ── How it works ── */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; margin-top: 3rem; }
.step { text-align: center; }
.step-num {
  width: 3rem; height: 3rem;
  background: var(--navy);
  color: var(--gold);
  border-radius: 50%;
  font-size: 1.3rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.step h3 { margin-bottom: .5rem; }

/* ── Social proof / stats ── */
.stats-bar {
  background: var(--navy);
  padding: 3rem 0;
}
.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat-val { font-size: 2.2rem; font-weight: 800; color: var(--gold); font-family: Georgia, serif; }
.stat-lbl { font-size: .88rem; color: rgba(255,255,255,.6); margin-top: .25rem; }

/* ── CTA section ── */
.cta-section {
  background: var(--navy-dark);
  text-align: center;
  padding: 5rem 0;
}
.cta-section h2 { color: var(--white); margin-bottom: 1rem; }
.cta-section p  { color: #C0CFDF; margin-bottom: 2rem; font-size: 1.1rem; }

/* ── Footer ── */
footer {
  background: #0A1428;
  padding: 2rem 0;
  text-align: center;
}
footer p { color: #445566; font-size: .85rem; }
footer span { color: var(--gold); }

/* ── Section title ── */
.section-title { text-align: center; margin-bottom: .75rem; }
.section-subtitle { text-align: center; color: var(--mid); font-size: 1.05rem; max-width: 600px; margin: 0 auto 1rem; }
.gold-rule {
  width: 3rem; height: 3px; background: var(--gold);
  margin: .75rem auto 2.5rem;
  border: none;
}

/* ── Badge bêta ── */
.badge-beta {
  display: inline-block;
  background: var(--gold-pale);
  color: var(--navy);
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: .25rem .9rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  margin-bottom: 1rem;
}

/* ============================================================
   FORMULAIRE
   ============================================================ */
.form-wrapper {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 32px rgba(0,0,0,.08);
  overflow: hidden;
}
.form-header {
  background: var(--navy);
  padding: 1.5rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.form-header h2 { color: var(--white); font-size: 1.1rem; margin: 0; }
.form-step-indicator {
  font-size: .82rem; color: var(--gold); font-weight: 600;
}

/* Progress bar */
.progress-bar {
  height: 4px;
  background: var(--light);
}
.progress-fill {
  height: 100%; background: var(--gold);
  transition: width .4s ease;
}

.form-body { padding: 2rem; }

.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .4rem;
}
.form-group label .required { color: var(--gold); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--light);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--dark);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
textarea { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Checkbox / radio groups */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .6rem;
  margin-top: .4rem;
}
.option-label {
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem .9rem;
  border: 1.5px solid var(--light);
  border-radius: 6px;
  cursor: pointer;
  font-size: .9rem;
  transition: border-color .15s, background .15s;
}
.option-label:hover { border-color: var(--gold); background: var(--gold-pale); }
.option-label input { accent-color: var(--gold); }
.option-label.selected { border-color: var(--gold); background: var(--gold-pale); font-weight: 600; }

/* Condition slider */
.condition-slider-wrapper { margin-top: .5rem; }
.condition-slider {
  -webkit-appearance: none;
  width: 100%; height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--gold) 0%, var(--gold) var(--val, 70%), var(--light) var(--val, 70%));
  outline: none;
}
.condition-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--gold);
  cursor: pointer;
}
.condition-labels {
  display: flex; justify-content: space-between;
  font-size: .75rem; color: var(--mid); margin-top: .4rem;
}
.condition-current {
  text-align: center; font-weight: 700; color: var(--navy);
  font-size: .95rem; margin-top: .3rem;
}

.form-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem 2rem;
  background: var(--cream);
  border-top: 1px solid var(--light);
}
.form-hint { font-size: .8rem; color: var(--mid); }

/* Steps nav */
.step-panel { display: none; }
.step-panel.active { display: block; }

/* ============================================================
   RÉSULTATS
   ============================================================ */
.results-wrapper {
  max-width: 820px;
  margin: 0 auto;
}

.result-header {
  background: var(--navy);
  border-radius: 12px 12px 0 0;
  padding: 1.5rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.result-header h2 { color: var(--white); margin: 0; font-size: 1.1rem; }
.result-vehicle { color: var(--gold-pale); font-size: .85rem; margin-top: .25rem; }

.result-body {
  background: var(--white);
  border: 1px solid var(--light);
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 2rem;
}

.price-block { text-align: center; padding: 2rem 0 1.5rem; }
.price-label { font-size: .82rem; color: var(--mid); text-transform: uppercase; letter-spacing: .08em; }
.price-main  { font-size: 3rem; font-weight: 800; color: var(--gold); font-family: Georgia, serif; }
.price-range {
  display: flex; gap: 1rem; justify-content: center; margin-top: 1rem;
}
.price-range-box {
  flex: 1; max-width: 160px;
  padding: .75rem 1rem;
  border-radius: 8px;
  text-align: center;
  background: var(--cream);
  border: 1px solid var(--light);
}
.price-range-box.active { background: var(--navy); border-color: var(--navy); }
.price-range-box .r-label { font-size: .75rem; color: var(--mid); }
.price-range-box.active .r-label { color: rgba(255,255,255,.6); }
.price-range-box .r-val { font-size: 1.1rem; font-weight: 700; color: var(--navy); }
.price-range-box.active .r-val { color: var(--gold); }

.divider { height: 1px; background: var(--light); margin: 1.5rem 0; }

.analysis-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
}
.analysis-block h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--mid); margin-bottom: .75rem; }

.factor-list { list-style: none; }
.factor-list li {
  display: flex; align-items: flex-start; gap: .5rem;
  font-size: .9rem; color: var(--dark); padding: .3rem 0;
}
.factor-list li .icon { font-size: 1rem; flex-shrink: 0; margin-top: .05rem; }
.factor-list li .icon.pos { color: var(--green); }
.factor-list li .icon.neg { color: var(--red); }
.factor-list li .icon.neu { color: var(--mid); }

.commentary-box {
  background: var(--cream);
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  font-size: .92rem;
  color: var(--dark);
  line-height: 1.65;
  margin: 1.5rem 0;
}

.comparables-section { margin-top: 1.5rem; }
.comparables-section h4 { margin-bottom: .75rem; font-size: 1rem; color: var(--navy); }
.comparables-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.comparables-table th {
  background: var(--navy); color: var(--white);
  padding: .6rem .8rem; text-align: left; font-weight: 600;
}
.comparables-table td { padding: .55rem .8rem; border-bottom: 1px solid var(--light); }
.comparables-table tr:last-child td { border-bottom: none; }
.comparables-table tr:hover td { background: var(--cream); }
.price-pill {
  background: var(--gold-pale);
  color: var(--navy);
  border-radius: 12px;
  padding: .15rem .6rem;
  font-weight: 700;
  font-size: .82rem;
}

.confidence-row {
  display: flex; align-items: center; gap: 1rem;
  margin-top: 1.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--light);
}
.confidence-bar-bg { flex: 1; height: 8px; background: var(--light); border-radius: 4px; overflow: hidden; }
.confidence-bar-fill { height: 100%; background: var(--gold); border-radius: 4px; }
.confidence-label { font-size: .82rem; color: var(--mid); white-space: nowrap; }
.confidence-pct { font-weight: 700; color: var(--navy); }

.results-actions {
  display: flex; gap: 1rem; flex-wrap: wrap;
  margin-top: 2rem;
}

/* ── Feedback form ── */
.feedback-section {
  margin-top: 3rem;
  background: var(--cream);
  border: 1px solid var(--light);
  border-radius: 12px;
  padding: 2rem;
}
.feedback-section h3 { margin-bottom: .5rem; }
.feedback-section p  { margin-bottom: 1.5rem; font-size: .92rem; }

.stars-input { display: flex; gap: .5rem; margin-bottom: .5rem; }
.star-btn {
  font-size: 2rem; background: none; border: none; cursor: pointer; color: var(--light);
  transition: color .15s; line-height: 1;
}
.star-btn.active, .star-btn:hover { color: var(--gold); }
.stars-label { font-size: .8rem; color: var(--mid); margin-bottom: 1rem; }

/* ── Loading overlay ── */
#loading-overlay {
  position: fixed; inset: 0;
  background: rgba(14,26,51,.92);
  z-index: 999;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.5rem;
  display: none;
}
.spinner {
  width: 56px; height: 56px;
  border: 5px solid rgba(201,168,76,.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--white); font-size: 1.1rem; }
.loading-sub  { color: var(--gold); font-size: .85rem; }

/* ── Alert / messages ── */
.alert {
  padding: .9rem 1.25rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: .92rem;
}
.alert-error   { background: #FEE2E2; color: #991B1B; border-left: 4px solid var(--red); }
.alert-success { background: #D1FAE5; color: #065F46; border-left: 4px solid var(--green); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-inner    { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-card     { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .steps         { grid-template-columns: 1fr; }
  .stats-inner   { grid-template-columns: 1fr 1fr; }
  .analysis-grid { grid-template-columns: 1fr; }
  .form-row      { grid-template-columns: 1fr; }
  .price-range   { flex-direction: column; align-items: center; }
  .navbar-links  { display: none; }
  .results-actions { flex-direction: column; }
}
