/* ─────────────────────────────────────────
   Calculette d'intérêts composés — thème sombre
   calculette.css
   ───────────────────────────────────────── */

.calc-dark {
  background: var(--navy-dark);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  color: white;
}

/* ── Left: inputs ── */
.calc-dark-left {
  padding: 2.6rem 2.2rem;
  display: flex;
  flex-direction: column;
}
.calc-dark-field {
  padding: 1.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.calc-dark-field:first-child { padding-top: 0; }
.calc-dark-field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 10px;
}
.calc-dark-field label i { font-size: 14px; color: rgba(255,255,255,0.35); cursor: help; }
.calc-dark-input-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.calc-dark-input-row input {
  background: none;
  border: none;
  outline: none;
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  font-weight: 500;
  color: white;
  width: 100%;
  padding: 0;
  -moz-appearance: textfield;
}
.calc-dark-input-row input::-webkit-outer-spin-button,
.calc-dark-input-row input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.calc-dark-input-row input:focus { color: var(--gold); }
.calc-unit {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  flex-shrink: 0;
  white-space: nowrap;
}

.calc-dark-cta {
  margin-top: auto;
  padding-top: 1.8rem;
}
.calc-dark-cta h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 400;
  color: white;
  line-height: 1.35;
  margin-bottom: 8px;
}
.calc-dark-cta h4 em { font-style: italic; color: var(--gold); }
.calc-dark-cta p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

/* ── Right: results + chart ── */
.calc-dark-right {
  background: #0B1B30;
  padding: 2.6rem 2.2rem;
  display: flex;
  flex-direction: column;
}
.calc-dark-result-label {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 6px;
}
.calc-dark-result-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 600;
  color: white;
  margin-bottom: 1.4rem;
}
.calc-dark-totals {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1.6rem;
}
.calc-dark-totals-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.calc-dark-totals-row span:first-child { color: rgba(255,255,255,0.5); }
.calc-dark-totals-row span:last-child { color: white; font-weight: 500; }

/* Chart */
.calc-chart-wrap {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 220px;
}
.calc-chart-wrap svg { width: 100%; height: 100%; display: block; overflow: visible; }
.calc-area-interest { fill: var(--gold); fill-opacity: 0.55; }
.calc-area-contrib { fill: var(--navy-soft); fill-opacity: 0.5; }
.calc-line-interest { fill: none; stroke: var(--gold); stroke-width: 2; }
.calc-line-contrib { fill: none; stroke: #6E97C7; stroke-width: 2; }
.calc-grid-line { stroke: rgba(255,255,255,0.06); stroke-width: 1; }
.calc-grid-label { fill: rgba(255,255,255,0.35); font-size: 11px; font-family: 'Outfit', sans-serif; }
.calc-hover-line { stroke: rgba(255,255,255,0.3); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.calc-hover-dot { opacity: 0; }
.calc-hover-dot circle { fill: var(--gold); stroke: var(--navy-dark); stroke-width: 2; }
.calc-hover-dot.dot-contrib circle { fill: #6E97C7; }

.calc-tooltip {
  position: absolute;
  pointer-events: none;
  background: #16273F;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.1s;
  box-shadow: var(--shadow-md);
  z-index: 5;
}
.calc-tooltip.visible { opacity: 1; }
.calc-tooltip-year {
  display: flex; justify-content: space-between; gap: 16px;
  font-weight: 500; color: white; margin-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 6px;
}
.calc-tooltip-row { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; margin-top: 3px; }
.calc-tooltip-row .lbl-interest { color: var(--gold); }
.calc-tooltip-row .lbl-contrib { color: #6E97C7; }
.calc-tooltip-row span:last-child { color: white; font-weight: 500; }

.calc-axis-labels {
  display: flex; justify-content: space-between;
  font-size: 12px; color: rgba(255,255,255,0.4);
  margin-top: 8px;
}
.calc-legend {
  display: flex; gap: 1.4rem; margin-top: 1rem;
  font-size: 12px; color: rgba(255,255,255,0.6);
}
.calc-legend-item { display: flex; align-items: center; gap: 6px; }
.calc-legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.calc-legend-dot.dot-interest { background: var(--gold); }
.calc-legend-dot.dot-contrib { background: #6E97C7; }

.calc-disclaimer {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 1.4rem;
  padding: 1rem 1.4rem;
  background: var(--warm-gray);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold);
}

@media (max-width: 860px) {
  .calc-dark { grid-template-columns: 1fr; }
  .calc-dark-left { padding: 2rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .calc-dark-right { padding: 2rem 1.5rem; }
  .calc-dark-cta { display: none; }
  .calc-chart-wrap { min-height: 200px; }
}
