/* ============================================================
   epargnezbien.fr — calculators.css  (v6 · Light Corporate Futuriste)
   Composants calculateurs + bloc résultat HYPER IMPACTANT
   ============================================================ */

/* ════════════════════════════════════════════
   TABS
   ════════════════════════════════════════════ */
.calc-tabs { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:22px; }
.ctab {
  padding: 7px 15px;
  border: 1.5px solid var(--mist);
  border-radius: 20px;
  font-size: .78rem; font-weight: 500;
  color: var(--graphite);
  background: var(--white);
  transition: var(--ease); cursor: pointer; white-space: nowrap;
  font-family: var(--fui);
  box-shadow: var(--sh-xs);
}
.ctab:hover { border-color: var(--green); color: var(--green-d); }
.ctab.active {
  background: var(--ink); border-color: var(--ink);
  color: var(--white); font-weight: 600;
}
.cpanel { display:none; }
.cpanel.active { display:block; }

/* ════════════════════════════════════════════
   CARTE CALCULATEUR
   ════════════════════════════════════════════ */
.ccard {
  background: var(--white);
  border: 1.5px solid var(--mist);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}
.chdr {
  padding: 22px 30px 18px;
  border-bottom: 1px solid var(--mist);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  background: var(--white);
}
.ctitle { font-size: 1rem; margin-bottom: 3px; }
.cdesc  { font-size: .8rem; color: var(--ash); }
.cbody  { display: grid; grid-template-columns: 1fr 1fr; min-height: 360px; }
.cinps  { padding: 26px 30px; border-right: 1px solid var(--mist); background: var(--white); }
.cres   {
  padding: 0;
  display: flex; flex-direction: column;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}

/* ════════════════════════════════════════════
   INPUTS
   ════════════════════════════════════════════ */
.ig    { margin-bottom: 16px; }
.iglbl {
  display: block;
  font-family: var(--fmo);
  font-size: .64rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--graphite); margin-bottom: 6px;
}
.igf {
  display: flex;
  background: var(--white);
  border: 1.5px solid var(--mist);
  border-radius: var(--rs); overflow: hidden;
  transition: border-color var(--ease);
  box-shadow: var(--sh-xs);
}
.igf:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-s); }
.igf input[type=number] {
  flex: 1; padding: 10px 13px;
  background: transparent; border: none; outline: none;
  color: var(--ink); font-family: var(--fmo);
  font-size: .96rem; font-weight: 500; min-width: 0;
  -moz-appearance: textfield;
}
.igf input::-webkit-outer-spin-button,
.igf input::-webkit-inner-spin-button { -webkit-appearance: none; }
.igf input::placeholder { font-family: var(--fui); font-weight: 400; color: var(--pebble); }
.igf select {
  flex: 1; padding: 10px 13px;
  background: transparent; border: none; outline: none;
  color: var(--ink); font-size: .84rem; cursor: pointer; appearance: none;
}
.igu {
  padding: 0 12px; font-family: var(--fmo);
  font-size: .68rem; font-weight: 400; letter-spacing: .04em;
  color: var(--pebble); background: var(--cloud);
  border-left: 1px solid var(--mist);
  display: flex; align-items: center; white-space: nowrap; flex-shrink: 0;
}
.igh {
  font-size: .66rem; color: var(--pebble);
  margin-top: 4px; font-style: italic;
  font-family: var(--fui);
}
.igr { margin-top: 6px; }
input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 2px;
  background: var(--mist); border-radius: 1px;
  outline: none; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--ink);
  transition: transform .14s;
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); background: var(--green-d); box-shadow: 0 0 0 2px var(--green-d); }
input[type=range]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--white); cursor: pointer;
}
.cbtn {
  width: 100%; margin-top: 10px;
  padding: 13px; background: var(--ink); color: var(--white);
  border: none; border-radius: var(--rs);
  font-family: var(--fdi); font-weight: 700; font-size: .84rem;
  cursor: pointer; transition: var(--ease);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  letter-spacing: .02em;
  box-shadow: 0 4px 14px var(--noir-md);
}
.cbtn:hover {
  background: var(--green-d);
  transform: translateY(-1px);
  box-shadow: var(--sh-g);
}
.cbtn:active { transform: translateY(0); }

/* ════════════════════════════════════════════════════════════
   RÉSULTAT — BLOC HYPER IMPACTANT
   Conçu pour maintenir l'utilisateur en alerte totale
   ════════════════════════════════════════════════════════════ */

/* État vide */
.rempty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 40px 24px;
}
.rempty-icon {
  width: 48px; height: 48px;
  border: 2px dashed var(--fog); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; opacity: .4;
}
.rempty p { font-size: .78rem; color: var(--pebble); max-width: 14ch; }
.rempty-hint {
  font-family: var(--fmo); font-size: .62rem; color: var(--fog);
  letter-spacing: .08em; text-transform: uppercase;
}

/* ── CONTENEUR RÉSULTAT ACTIF ── */
.res-active {
  flex: 1;
  display: flex; flex-direction: column;
  animation: fadeUp .3s ease both;
}

/* ── BLOC CHIFFRE PRINCIPAL — L'IMPACT MAXIMAL ── */
.rmain-wrap {
  position: relative;
  background: var(--ink);
  padding: 28px 30px 24px;
  overflow: hidden;
}
/* Scan line animé — effet terminal futuriste */
.rmain-wrap::before {
  content: '';
  position: absolute;
  left: 0; right: 0; height: 60px;
  background: linear-gradient(180deg, transparent, rgba(0,200,83,.06), transparent);
  animation: scanLine 3.5s ease-in-out infinite;
  pointer-events: none;
}
/* Coin décoratif vert */
.rmain-wrap::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 60px; height: 60px;
  background: linear-gradient(225deg, rgba(0,200,83,.18) 0%, transparent 60%);
}
/* Ligne supérieure verte pulsante */
.rmain-top-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--green) 0%, var(--green-d) 60%, transparent 100%);
  animation: borderFlash 2.8s ease-in-out infinite;
}
.rmain-lbl {
  font-family: var(--fmo);
  font-size: .62rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: .22em;
  color: rgba(0,200,83,.7);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.rmain-lbl::before {
  content: '';
  width: 5px; height: 5px; background: var(--green);
  border-radius: 50%;
  animation: pulse 1.8s ease infinite;
  flex-shrink: 0;
}
/* Le grand chiffre */
.rmval {
  font-family: var(--fdi);
  font-weight: 900;
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  color: var(--white);
  letter-spacing: -.04em;
  line-height: 1;
  animation: countUp .45s cubic-bezier(0,.9,.57,1) both;
}
/* Shimmer sur le chiffre */
.rmval.shimmer {
  background: linear-gradient(120deg,
    var(--white) 0%,
    var(--green) 40%,
    var(--white) 60%,
    var(--white) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: countUp .45s cubic-bezier(0,.9,.57,1) both, shimmer 2.4s linear .5s 1;
}
.rmsub {
  font-size: .8rem; color: rgba(253,252,250,.55);
  margin-top: 8px; line-height: 1.5;
  font-family: var(--fui); font-weight: 300;
}

/* ── GRILLE MÉTRIQUES ── */
.rmets {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--mist);
}
.rmet {
  padding: 14px 18px;
  border-right: 1px solid var(--mist);
  border-bottom: 1px solid var(--mist);
  background: var(--white);
  position: relative;
  transition: background var(--ease);
}
.rmet:nth-child(even) { border-right: none; }
.rmet:nth-last-child(-n+2) { border-bottom: none; }
/* Accent couleur à gauche */
.rmet::before {
  content: '';
  position: absolute; top: 12px; bottom: 12px; left: 0; width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--mist);
}
.rmet.hi::before { background: var(--c-good); }
.rmet.wa::before { background: var(--c-warn); }
.rmet.ba::before { background: var(--c-bad);  }
.rmet.in::before { background: var(--c-info); }
.rmet-l {
  font-family: var(--fmo);
  font-size: .6rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--ash); margin-bottom: 4px;
}
.rmet-v {
  font-family: var(--fmo);
  font-weight: 500; font-size: .94rem;
  color: var(--ink); line-height: 1.2;
}
.rmet.hi .rmet-v { color: var(--c-good); }
.rmet.wa .rmet-v { color: var(--c-warn); }
.rmet.ba .rmet-v { color: var(--c-bad);  }
.rmet.in .rmet-v { color: var(--c-info); }

/* ── SCORE — BARRE DE PROGRESSION CORPORATE ── */
.rscore-wrap {
  padding: 16px 20px;
  background: var(--cream);
  border-top: 1px solid var(--mist);
  animation: fadeUp .3s .08s ease both;
}
.rscore-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.rscore-lbl {
  font-family: var(--fmo);
  font-size: .62rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: .18em; color: var(--ash);
}
.rscore-num {
  font-family: var(--fdi);
  font-weight: 800; font-size: 1.3rem;
  letter-spacing: -.03em;
}
/* Track avec segments style equalizer */
.rscore-track {
  height: 8px;
  background: var(--mist);
  border-radius: 4px; overflow: hidden;
  position: relative;
}
/* Fond strié sur le track */
.rscore-track::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    90deg, transparent, transparent 12px, rgba(0,0,0,.04) 12px, rgba(0,0,0,.04) 13px
  );
}
.rscore-fill {
  height: 100%; border-radius: 4px;
  transition: width 1s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.rscore-fill::after {
  content: '';
  position: absolute; top: 0; right: 0; bottom: 0; width: 3px;
  background: rgba(255,255,255,.6); border-radius: 2px;
}

/* ── ANALYSE ── */
.ranal-wrap {
  padding: 14px 20px;
  background: var(--white);
  border-top: 1px solid var(--mist);
  animation: fadeUp .3s .14s ease both;
}
.rarow {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--cream);
  font-size: .78rem; color: var(--graphite); line-height: 1.55;
}
.rarow:first-child { padding-top: 0; }
.rarow:last-child  { border-bottom: none; padding-bottom: 0; }
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0; margin-top: 5px;
}

/* ── SCÉNARIOS — CARTES STRIKING ── */
.rscen-wrap {
  padding: 16px 20px;
  background: var(--cream);
  border-top: 1px solid var(--mist);
  animation: fadeUp .3s .2s ease both;
}
.rscen-lbl {
  font-family: var(--fmo);
  font-size: .6rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .2em; color: var(--pebble);
  margin-bottom: 8px;
}
.rscen { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.rscenbox {
  border-radius: var(--rs);
  padding: 11px 12px; text-align: center;
  border: 1.5px solid var(--mist);
  background: var(--white);
  transition: var(--ease);
  box-shadow: var(--sh-xs);
}
.rscenbox:hover { transform: translateY(-2px); box-shadow: var(--sh-sm); }
.rscenbox.g { border-color: rgba(0,176,71,.3); background: linear-gradient(135deg, var(--green-l), var(--white)); }
.rscenbox.b { border-color: rgba(0,95,187,.2); background: linear-gradient(135deg, rgba(0,95,187,.05), var(--white)); }
.rscenbox.r { border-color: rgba(204,41,41,.2); background: linear-gradient(135deg, rgba(204,41,41,.05), var(--white)); }
.rscen-tag {
  font-family: var(--fmo);
  font-size: .58rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: .12em; color: var(--ash);
  margin-bottom: 4px;
}
.rscen-val { font-family: var(--fmo); font-weight: 500; font-size: .9rem; }
.g .rscen-val { color: var(--c-good); }
.b .rscen-val { color: var(--c-info); }
.r .rscen-val { color: var(--c-bad);  }

/* ── INFO SOURCE ── */
.rinfo-wrap {
  padding: 12px 20px;
  border-top: 1px solid var(--mist);
  background: var(--cream);
  animation: fadeUp .3s .26s ease both;
}
.rinfo {
  font-family: var(--fui);
  font-size: .74rem; color: var(--ash); line-height: 1.55;
}
.rinfo strong { color: var(--green-d); font-weight: 600; }

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */
@media(max-width:720px) {
  .cbody  { grid-template-columns:1fr; min-height:auto }
  .cinps  { border-right:none; border-bottom:1px solid var(--mist) }
  .chdr, .cinps { padding:18px }
  .cres   { padding:0 }
  .rmval  { font-size:2.4rem }
  .rmets  { grid-template-columns:1fr 1fr }
  .rscen  { grid-template-columns:1fr }
}
@media(max-width:380px) {
  .rmets  { grid-template-columns:1fr }
  .rscen  { grid-template-columns:1fr }
}
