/* Page /epargne-placements/ — calculatrice d'épargne.
   Reutilise uniquement les variables de couleur/typo definies dans ws.css (:root). */

.epargne-calc { max-width: 920px; margin: 0 auto; }

.epargne-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 36px;
  margin-bottom: 40px;
}
.epargne-field label,
.epargne-field > .epargne-field-label {
  display: block;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  font-size: 15px;
}
.epargne-field output {
  display: block;
  margin-top: 8px;
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--navy);
}

.epargne-slider-wrap { padding: 4px 0; }
input[type="range"].epargne-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  background: transparent;
  margin: 0;
  padding: 0;
  cursor: pointer;
}
input[type="range"].epargne-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
}
input[type="range"].epargne-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--navy);
  margin-top: -10px;
}
input[type="range"].epargne-slider::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  border: none;
}
input[type="range"].epargne-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--navy);
}
input[type="range"].epargne-slider:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.epargne-segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.epargne-segmented button {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
  font-family: var(--body);
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.epargne-segmented button:hover { border-color: var(--gold); }
.epargne-segmented button.is-selected {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.epargne-segmented button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.epargne-result {
  text-align: center;
  margin: 36px 0;
  padding: 30px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.epargne-result-lead { font-size: 1.05rem; color: var(--muted); margin: 0 0 8px; }
.epargne-result-amount {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--navy);
  margin: 0 0 12px;
}
.epargne-result-sub { font-size: .95rem; color: var(--muted); margin: 0; }

.epargne-chart-wrap { margin: 32px 0; }
#ec-chart { width: 100%; height: auto; display: block; }
.epargne-legend {
  display: flex; gap: 20px; flex-wrap: wrap; justify-content: center;
  margin-top: 14px; font-size: 13px; color: var(--muted);
}
.epargne-swatch {
  display: inline-block; width: 12px; height: 12px; border-radius: 3px;
  margin-right: 6px; vertical-align: middle;
}
.epargne-swatch-deposits { background: var(--cream); border: 1px solid var(--line); }
.epargne-swatch-growth { background: var(--gold); }
.epargne-swatch-compare { background: var(--navy); }

.epargne-early-lead {
  text-align: center;
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--navy);
  margin: 0 0 18px;
}
.epargne-early-cta { text-align: center; }
.epargne-early-result {
  text-align: center;
  background: var(--cream);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 16px 22px;
  margin: 20px auto 0;
  max-width: 640px;
}

.epargne-goal {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.epargne-goal-lead {
  font-family: var(--display);
  font-size: 1.3rem;
  color: var(--navy);
  margin: 0 0 18px;
}
.epargne-goal .epargne-segmented { justify-content: center; margin-bottom: 16px; }
.epargne-goal-result { min-height: 1.6em; font-weight: 600; color: var(--navy); margin: 16px 0; }

.epargne-disclaimer {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 36px auto 0;
  max-width: 640px;
}

.epargne-signature { text-align: center; margin-top: 40px; color: var(--muted); }

@media (max-width: 700px) {
  .epargne-controls { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 360px) {
  .epargne-segmented button { padding: 10px 12px; font-size: 13px; }
}
