/* ═══════════════════════════════════════════════════════════════════════════
   Jetour — Simulateur de Financement CSS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Section wrapper ──────────────────────────────────────────────────────── */
.jt-section--financement {
  background: var(--jt-grey-100, #f5f5f5);
}

/* ── Layout 2 colonnes ────────────────────────────────────────────────────── */
.jt-fin-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) {
  .jt-fin-inner { grid-template-columns: 1fr; gap: 32px; }
}
.jt-fin-inner--compact { gap: 24px; }

/* ── Formulaire ───────────────────────────────────────────────────────────── */
.jt-fin-form { display: flex; flex-direction: column; gap: 28px; }

.jt-fin-group { display: flex; flex-direction: column; gap: 10px; }
.jt-fin-group--inline {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.jt-fin-group--inline label { margin: 0; }

.jt-fin-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.jt-fin-label-row label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--jt-grey-800, #222);
}
.jt-fin-value-display {
  font-size: .875rem;
  font-weight: 700;
  color: var(--jt-accent, #CC0000);
  min-width: 160px;
  text-align: right;
}

/* ── Sliders ──────────────────────────────────────────────────────────────── */
.jt-fin-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--jt-grey-200, #e8e8e8);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.jt-fin-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--jt-accent, #CC0000);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  transition: transform .15s ease;
}
.jt-fin-range::-webkit-slider-thumb:hover { transform: scale(1.2); }
.jt-fin-range::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--jt-accent, #CC0000);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
/* Track rempli (webkit seulement) */
.jt-fin-range::-webkit-slider-runnable-track { border-radius: 3px; }

.jt-fin-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--jt-grey-400, #999);
  margin-top: -4px;
}

/* ── Input numérique taux ─────────────────────────────────────────────────── */
.jt-fin-input-num {
  width: 100px;
  border: 1px solid var(--jt-grey-200, #e8e8e8);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--jt-grey-800, #222);
  text-align: center;
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
}
.jt-fin-input-num:focus { border-color: var(--jt-accent, #CC0000); }

/* ── Carte résultat ───────────────────────────────────────────────────────── */
.jt-fin-result-card {
  background: var(--jt-dark, #1a1a2e);
  border-radius: 18px;
  padding: 32px 28px;
  color: #fff;
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Mensualité principale */
.jt-fin-main-result {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.jt-fin-result-label {
  display: block;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.55);
  margin-bottom: 10px;
}
.jt-fin-result-monthly {
  display: block;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -.03em;
}
.jt-fin-result-monthly small {
  font-size: .5em;
  font-weight: 400;
  color: rgba(255,255,255,.6);
  letter-spacing: 0;
}

/* Détails */
.jt-fin-result-details { display: flex; flex-direction: column; gap: 10px; }
.jt-fin-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .875rem;
}
.jt-fin-detail span { color: rgba(255,255,255,.6); }
.jt-fin-detail strong { color: #fff; }

/* Barre progression */
.jt-fin-progress {
  background: rgba(255,255,255,.1);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}
.jt-fin-progress-bar {
  height: 100%;
  background: var(--jt-accent, #CC0000);
  border-radius: 4px;
  transition: width .4s cubic-bezier(.4,0,.2,1);
  min-width: 2%;
}
.jt-fin-progress-label {
  font-size: .75rem;
  color: rgba(255,255,255,.55);
  text-align: center;
  margin-top: -8px;
}
.jt-fin-progress-label strong { color: rgba(255,255,255,.85); }

/* Disclaimer */
.jt-fin-disclaimer {
  font-size: .7rem;
  color: rgba(255,255,255,.35);
  text-align: center;
  line-height: 1.5;
}

/* CTA */
.jt-fin-ctas { display: flex; flex-direction: column; gap: 10px; }

/* ── Loading ──────────────────────────────────────────────────────────────── */
.jt-fin-loading {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.3);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.jt-fin-spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: jt-spin .7s linear infinite;
}
@keyframes jt-spin { to { transform: rotate(360deg); } }

/* ── Widget compact (sur page single) ────────────────────────────────────── */
.jt-fin-widget {
  background: var(--jt-grey-100, #f5f5f5);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--jt-grey-200, #e8e8e8);
}
.jt-fin-widget .jt-fin-result-card {
  position: static;
}
