/* InvestAide — Simulateur Loi Jeanbrun */

.ia-simulateur {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
  font-family: var(--ia-font, 'Poppins', sans-serif);
}

/* ── Intro ─────────────────────────────────────────────────────────────────── */
.ia-sim-intro {
  text-align: center;
  padding: 3rem 1rem 2.5rem;
}
.ia-sim-intro h1 {
  color: var(--ia-navy, #1C244B);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin: 0 0 .5rem;
}
.ia-sim-intro .ia-gold-bar {
  width: 60px; height: 3px;
  background: var(--ia-gold, #C7A252);
  border-radius: 2px;
  margin: .75rem auto 1.25rem;
}
.ia-sim-intro p {
  color: #6b7280;
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Layout deux colonnes ──────────────────────────────────────────────────── */
.ia-sim-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 768px) {
  .ia-sim-layout { grid-template-columns: 1fr; }
}

/* ── Panneau formulaire ────────────────────────────────────────────────────── */
.ia-sim-form {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(28,36,75,.07);
}

.ia-sim-section {
  margin-bottom: 1.75rem;
}
.ia-sim-section:last-child { margin-bottom: 0; }

.ia-sim-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .5rem;
}
.ia-sim-label span:first-child {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6b7280;
}
.ia-sim-pct-value {
  font-size: .85rem;
  font-weight: 700;
}
.ia-sim-pct--ok  { color: #16a34a; }
.ia-sim-pct--nok { color: #dc2626; }

.ia-sim-input-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .5rem;
}
.ia-sim-input {
  flex: 1;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: .65rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--ia-navy, #1C244B);
  background: #f9fafb;
  transition: border-color .15s;
  text-align: right;
}
.ia-sim-input:focus {
  outline: none;
  border-color: var(--ia-gold, #C7A252);
  background: #fff;
}
.ia-sim-currency {
  font-size: .95rem;
  color: #9ca3af;
  font-weight: 600;
  min-width: 16px;
}

/* Slider */
.ia-sim-range {
  width: 100%;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  background: #e5e7eb;
  outline: none;
  margin: .25rem 0;
}
.ia-sim-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--ia-gold, #C7A252);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(199,162,82,.4);
}
.ia-sim-range::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--ia-gold, #C7A252);
  cursor: pointer;
  border: none;
}

/* Progress bar travaux */
.ia-sim-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  margin: .4rem 0 .25rem;
  overflow: hidden;
}
.ia-sim-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .3s, background .3s;
}
.ia-sim-bar-fill--ok  { background: #16a34a; }
.ia-sim-bar-fill--nok { background: #dc2626; }

.ia-sim-warning {
  font-size: .78rem;
  color: #dc2626;
  margin-top: .3rem;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.ia-sim-cout-total {
  font-size: .82rem;
  color: #6b7280;
  margin-top: .4rem;
}
.ia-sim-cout-total strong { color: var(--ia-navy, #1C244B); }

/* Radio pills */
.ia-sim-pills {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.ia-sim-pill {
  position: relative;
}
.ia-sim-pill input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.ia-sim-pill label {
  display: block;
  padding: .5rem 1.1rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.ia-sim-pill input:checked + label {
  background: var(--ia-navy, #1C244B);
  border-color: var(--ia-navy, #1C244B);
  color: #fff;
}
.ia-sim-pill label:hover {
  border-color: var(--ia-gold, #C7A252);
  color: var(--ia-navy, #1C244B);
}
.ia-sim-pill input:checked + label:hover {
  background: var(--ia-navy, #1C244B);
  color: #fff;
}

/* ── Panneau résultats ─────────────────────────────────────────────────────── */
.ia-sim-results {
  position: sticky;
  top: 100px;
}

.ia-sim-results-card {
  background: var(--ia-navy, #1C244B);
  border-radius: 14px;
  padding: 1.75rem;
  color: #fff;
  margin-bottom: 1rem;
}

.ia-sim-results-card h3 {
  color: #fff !important;
  font-size: .78rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 0 0 1.5rem;
  opacity: .6;
}

.ia-res-item {
  margin-bottom: 1.25rem;
}
.ia-res-item:last-child { margin-bottom: 0; }

.ia-res-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(255,255,255,.5);
  margin-bottom: .2rem;
}
.ia-res-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ia-gold, #C7A252);
  line-height: 1.1;
}
.ia-res-value--white {
  color: #fff;
  font-size: 1.25rem;
}
.ia-res-sublabel {
  font-size: .75rem;
  color: rgba(255,255,255,.4);
  margin-top: .1rem;
}

.ia-sim-divider {
  height: 1px;
  background: rgba(255,255,255,.1);
  margin: 1.25rem 0;
}

/* Breakdown IR + PS */
.ia-sim-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: 1rem;
}
.ia-sim-breakdown-item {
  background: rgba(255,255,255,.06);
  border-radius: 8px;
  padding: .75rem;
  text-align: center;
}
.ia-sim-breakdown-item .ia-res-label { text-align: center; }
.ia-sim-breakdown-item .ia-res-value {
  font-size: 1rem;
  color: rgba(255,255,255,.85);
}

/* Note plafond */
.ia-sim-plafond-note {
  font-size: .72rem;
  color: rgba(255,255,255,.4);
  margin-top: .75rem;
  font-style: italic;
}

/* Alerte non éligible */
.ia-sim-not-eligible {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-size: .85rem;
  color: #dc2626;
}

/* CTA */
.ia-sim-cta-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 24px rgba(28,36,75,.07);
}
.ia-sim-cta-card p {
  font-size: .85rem;
  color: #6b7280;
  margin: 0 0 1rem;
  line-height: 1.5;
}
.ia-sim-cta-btn {
  display: block;
  background: var(--ia-gold, #C7A252);
  color: #fff !important;
  text-decoration: none;
  padding: .85rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: .9rem;
  transition: all .2s;
}
.ia-sim-cta-btn:hover {
  background: var(--ia-navy, #1C244B);
  color: #fff !important;
  transform: translateY(-1px);
}

/* ── Toggle Neuf / Ancien rénové ───────────────────────────────────────────── */
.ia-sim-type-toggle {
  display: flex;
  margin-bottom: 1.75rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}
.ia-sim-type-btn {
  flex: 1;
  padding: .75rem 1rem;
  border: none;
  background: #f9fafb;
  color: #6b7280;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.ia-sim-type-btn:first-child {
  border-right: 1.5px solid #e5e7eb;
}
.ia-sim-type-btn.active {
  background: var(--ia-navy, #1C244B);
  color: #fff;
}
.ia-sim-type-btn:hover:not(.active) {
  background: #f1f5f9;
  color: var(--ia-navy, #1C244B);
}
.ia-sim-type-icon { font-size: 1.1rem; }

/* Section travaux (cachée en mode Neuf) */
.ia-sim-travaux-wrap {
  overflow: hidden;
  transition: max-height .35s ease, opacity .35s ease;
  max-height: 0;
  opacity: 0;
}
.ia-sim-travaux-wrap.visible {
  max-height: 400px;
  opacity: 1;
}

/* ── Explainer ─────────────────────────────────────────────────────────────── */
.ia-sim-explainer {
  margin-top: 2.5rem;
  background: #f9fafb;
  border-radius: 14px;
  padding: 2rem;
}
.ia-sim-explainer h2 {
  font-size: 1.1rem;
  color: var(--ia-navy, #1C244B);
  margin: 0 0 1rem;
}
.ia-sim-explainer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.ia-sim-explainer-item {
  background: #fff;
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  border: 1px solid #e5e7eb;
}
.ia-sim-explainer-item .ia-sim-exp-taux {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ia-gold, #C7A252);
}
.ia-sim-explainer-item .ia-sim-exp-label {
  font-size: .82rem;
  color: var(--ia-navy, #1C244B);
  font-weight: 600;
  margin-top: .1rem;
}
.ia-sim-explainer-item .ia-sim-exp-sub {
  font-size: .76rem;
  color: #9ca3af;
  margin-top: .2rem;
}
