/* =====================================================================
   MINERVIA · Calculateur d'économies (estimation.html)
   ===================================================================== */

.calc-hero { padding-top: clamp(140px, 18vh, 200px); padding-bottom: clamp(30px, 4vw, 50px); }
.calc-hero h1 { max-width: 24ch; font-size: clamp(1.7rem, 6.2vw, 5rem); line-height: 1.04; text-wrap: balance; }
.calc-hero .lead { margin-top: 24px; }

.calc-wrap {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
}
@media (max-width: 940px) { .calc-wrap { grid-template-columns: 1fr; } }

/* ----- panneau de saisie ----- */
.calc-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: clamp(24px, 3vw, 40px);
  box-shadow: var(--shadow-sm);
}
.calc-step { padding-block: clamp(22px, 2.6vw, 30px); border-bottom: 1px solid var(--line); }
.calc-step:first-child { padding-top: 4px; }
.calc-step:last-child { border-bottom: 0; padding-bottom: 4px; }
.calc-step__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.calc-step__n { font-family: var(--serif); color: var(--citron-deep); font-size: 1.05rem; }
.calc-step__t { font-weight: 550; font-size: 1.08rem; }
.calc-step__hint { font-size: .85rem; color: var(--ink-faint); margin-left: auto; }

/* secteur chips */
.chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.chip {
  position: relative; border: 1px solid var(--line-2); border-radius: 12px;
  padding: 14px 14px 14px 46px; text-align: left; font-size: .95rem; font-weight: 480;
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
  background: var(--paper);
}
.chip:hover { border-color: var(--ink); transform: translateY(-1px); }
.chip::before {
  content:""; position:absolute; left:14px; top:50%; transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 50%; border: 1.6px solid var(--line-2);
  transition: .25s var(--ease);
}
.chip.is-on { border-color: var(--ink); background: var(--citron-ghost); }
.chip.is-on::before { background: var(--citron); border-color: var(--ink); box-shadow: inset 0 0 0 3px var(--paper); }
.chip small { display: block; font-size: .76rem; color: var(--ink-faint); font-weight: 400; margin-top: 2px; }
@media (max-width: 520px) { .chips { grid-template-columns: 1fr; } }

/* sliders */
.slider { display: grid; gap: 12px; }
.slider__top { display: flex; align-items: baseline; justify-content: space-between; }
.slider__label { font-size: .95rem; color: var(--ink); }
.slider__val { font-family: var(--serif); font-size: 1.5rem; letter-spacing: -.01em; }
.slider__val b { font-weight: 400; }
.slider__val small { font-size: .62em; color: var(--ink-faint); margin-left: 3px; }
.calc-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 100px;
  background: var(--line-2); outline: none;
}
.calc-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); border: 4px solid var(--citron); cursor: grab;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  box-shadow: 0 2px 8px rgba(11,11,12,.2);
}
.calc-range::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.12); }
.calc-range::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; background: var(--ink);
  border: 4px solid var(--citron); cursor: grab;
}
.slider + .slider { margin-top: 24px; }
.slider__scale { display: flex; justify-content: space-between; font-size: .74rem; color: var(--ink-faint); }

/* tasks */
.tasks { display: grid; gap: 10px; }
.task {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px;
  border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.task:hover { border-color: var(--ink); }
.task.is-on { border-color: var(--ink); background: var(--citron-ghost); }
.task__box { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 1.6px solid var(--line-2); display: grid; place-items: center; transition: .25s var(--ease); }
.task.is-on .task__box { background: var(--citron); border-color: var(--ink); }
.task__box svg { width: 12px; height: 12px; opacity: 0; transition: opacity .2s; }
.task.is-on .task__box svg { opacity: 1; }
.task__txt { flex: 1; font-size: .95rem; }
.task__txt small { display: block; color: var(--ink-faint); font-size: .8rem; }
.task__rate { font-size: .78rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.task__rate b { color: var(--citron-deep); }

/* ----- panneau résultat (sticky) ----- */
.calc-result {
  position: sticky; top: 92px;
  border-radius: var(--radius-lg); background: var(--ink); color: var(--bone);
  padding: clamp(26px, 3vw, 38px); overflow: hidden;
}
.calc-result__glow { position: absolute; inset: 0; background: radial-gradient(80% 60% at 80% 0%, rgba(232,241,93,.18), transparent 60%); pointer-events: none; }
.calc-result > * { position: relative; z-index: 1; }
.calc-result__eyebrow { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.55); font-weight: 600; }
.calc-result__main { margin: 18px 0 6px; }
.calc-result__amount {
  font-family: var(--serif); font-size: clamp(2.8rem, 6vw, 4.2rem); line-height: .95;
  letter-spacing: -.02em; color: var(--citron); font-variant-numeric: tabular-nums;
}
.calc-result__amount .cur { font-size: .5em; vertical-align: baseline; margin-left: .1em; color: rgba(255,255,255,.8); }
.calc-result__sub { color: rgba(255,255,255,.6); font-size: .92rem; }
.calc-result__range { font-size: .85rem; color: rgba(255,255,255,.55); margin-top: 10px; }
.calc-result__range b { color: #fff; font-variant-numeric: tabular-nums; }

.calc-result__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 28px; background: rgba(255,255,255,.12); border-radius: 14px; overflow: hidden; }
.calc-metric { background: #141416; padding: 18px; }
.calc-metric .v { font-family: var(--serif); font-size: 1.7rem; line-height: 1; font-variant-numeric: tabular-nums; }
.calc-metric .l { font-size: .78rem; color: rgba(255,255,255,.55); margin-top: 8px; }

.calc-result__bar { margin-top: 26px; }
.calc-result__bar .lab { display: flex; justify-content: space-between; font-size: .8rem; color: rgba(255,255,255,.6); margin-bottom: 8px; }
.calc-result__bar .track { height: 8px; border-radius: 100px; background: rgba(255,255,255,.12); overflow: hidden; }
.calc-result__bar .fill { height: 100%; border-radius: 100px; background: var(--citron); width: 0; transition: width .8s var(--ease); }

.calc-result__cta { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.calc-result__cta .btn { justify-content: center; }
.calc-result__note { font-size: .76rem; color: rgba(255,255,255,.42); text-align: center; line-height: 1.5; }

/* disclaimer */
.calc-disclaimer { margin-top: 22px; font-size: .82rem; color: var(--ink-faint); max-width: 60ch; }

/* capture email (lead) dans le panneau résultat */
.calc-capture { display: grid; gap: 10px; min-width: 0; }
.calc-capture__lab { font-size: .84rem; color: rgba(255,255,255,.78); font-weight: 500; }
.calc-capture__row { display: flex; gap: 8px; min-width: 0; flex-wrap: wrap; }
.calc-capture__row input { flex: 1 1 60%; }
.calc-capture__row .btn { flex: 1 0 auto; }
.calc-capture__row input { flex: 1; min-width: 0; font: inherit; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 100px; padding: 13px 18px; color: #fff; }
.calc-capture__row input::placeholder { color: rgba(255,255,255,.45); }
.calc-capture__row input:focus { outline: none; border-color: var(--citron); background: rgba(255,255,255,.12); }
.calc-capture__row .btn { flex: none; }
.calc-capture__alt { display: inline-flex; margin-top: 4px; font-size: .85rem; color: rgba(255,255,255,.65); }
.calc-capture__alt:hover { color: #fff; }
.calc-result .form-state { background: rgba(255,255,255,.08); border-color: rgba(232,241,93,.4); }
.calc-result .form-state strong { color: var(--citron); }
.calc-result .form-state span { color: rgba(255,255,255,.7); }

/* pulse on update */
@keyframes pop { 0% { transform: scale(1);} 40% { transform: scale(1.04);} 100% { transform: scale(1);} }
.is-pop { animation: pop .45s var(--ease); }

/* ---------- FABLE 5 : le montant "respire" quand il change ---------- */
@media (prefers-reduced-motion: no-preference) {
  .calc-result__amount.is-pulse { animation: amountPulse .5s var(--ease); }
}
@keyframes amountPulse {
  30% { transform: scale(1.04); text-shadow: 0 0 30px rgba(232, 241, 93, .55); }
  100% { transform: scale(1); text-shadow: none; }
}
.calc-result__bar .fill { transition: width .9s cubic-bezier(.34, 1.35, .4, 1); }
