/* ============================================================
   CALCULATOR.CSS — Mortgage Calculator Section (index.html)
   ============================================================
   PURPOSE:
     Styles the mortgage calculator SECTION inside index.html.
     This is the embedded inline calculator with sliders.

   NAMING NOTE:
     This file is ONLY for the section embedded in index.html.
     The full-page calculator app at calculator.html has its
     own stylesheet: assets/css/sections/calculator-page.css

   NAVIGATION LINK (index.html → calculator.html):
     The Calculateur link in the nav (hero.css, nav-links)
     points to calculator.html. It is styled with:
       color: var(--gold); font-weight: 500;
     If this section is removed from index.html, update that
     nav link to point to calculator.html directly instead.
     Current link in index.html:
       <a href="calculator.html" style="color:var(--gold);">Calculateur</a>

   SAFE TO EDIT:
     - Background color of #calculateur (currently --paper)
     - Result card colors and font sizes
     - Input slider appearance (--gold for the thumb color)

   DO NOT MODIFY:
     - The range input styling below — browser cross-compatibility
       for range sliders requires all three vendor-prefixed
       versions (::-webkit-slider-thumb, ::-moz-range-thumb, etc.)
       Removing any one will break the styled slider in that browser.
============================================================ */


/* ── Section Background ───────────────────────────────────── */
#calculateur {
  background: var(--paper);
}


/* ── Calculator Layout ────────────────────────────────────── */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  margin-top: 3rem;
}

@media (max-width: 768px) {
  .calc-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}


/* ── Input Panel ──────────────────────────────────────────── */
.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calc-field label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
  font-weight: 400;
}

/* Value display next to slider */
.calc-field-value {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.25rem;
}


/* ── Range Slider ─────────────────────────────────────────── */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

/* Track fill color (webkit browsers: Chrome, Safari) */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 2px solid var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  transition: transform 0.15s;
}

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

/* Firefox */
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 2px solid var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}


/* ── Results Panel ────────────────────────────────────────── */
.calc-results {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2rem;
}

.calc-result-main {
  text-align: center;
  padding: 1.5rem 0 2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
}

.calc-result-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.5rem;
}

.calc-result-amount {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1;
}

/* Uses --stone, not --mist: --mist fails WCAG AA contrast (~2.2:1)
   against this card's light background (required: 4.5:1). */
.calc-result-period {
  font-size: 0.82rem;
  color: var(--stone);
  margin-top: 0.3rem;
}

/* Secondary result rows (total interest, amortization) */
.calc-result-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.calc-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.calc-result-row span:first-child {
  color: var(--stone);
}

.calc-result-row span:last-child {
  font-weight: 500;
  color: var(--ink);
}

/* Disclaimer text below results.
   Uses --stone, not --mist: --mist fails WCAG AA contrast (~2.2:1)
   against this card's light background (required: 4.5:1). */
.calc-disclaimer {
  font-size: 0.72rem;
  color: var(--stone);
  margin-top: 1.2rem;
  line-height: 1.5;
}

/* CTA button below calculator */
.calc-cta {
  margin-top: 1.5rem;
  text-align: center;
}
