/* ==========================================================================
   Calculateur de prêt auto — Crédit Auto Solutions
   Réutilise les variables cas-* du site. Portée : .casc-page uniquement, pour
   ne rien changer ailleurs.
   ========================================================================== */

.casc-page { color: var(--cas-ink); font-family: var(--cas-font); }
.casc-shell { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 48px); }

/* --- Bandeau --- */
.casc-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(38px, 5vw, 68px) 0 clamp(90px, 10vw, 140px);
  background-image: radial-gradient(130% 190% at 50% -55%, #f2f7ff 0%, #93bdfa 22%, #3f77f2 56%, #1a48cf 100%);
}
.casc-badge {
  display: inline-flex; align-items: center; gap: 8px;
  color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase;
  padding: 7px 15px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px; backdrop-filter: blur(4px);
}
.casc-badge-dot { width: 7px; height: 7px; border-radius: 999px; background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .28); }
.casc-h1 {
  color: #fff; font-weight: 800; letter-spacing: -.03em; line-height: 1.06;
  font-size: clamp(31px, 5vw, 57px); margin: clamp(16px, 2vw, 24px) 0 clamp(12px, 1.4vw, 18px);
  max-width: 20ch; text-wrap: balance;
}
.casc-sub { color: rgba(255, 255, 255, .88); font-weight: 500; line-height: 1.6; font-size: clamp(16px, 1.5vw, 19.5px); max-width: 56ch; margin: 0; }

/* --- Grille principale, remontée sur le bandeau --- */
.casc-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(18px, 2.4vw, 30px); margin-top: clamp(-78px, -8vw, -118px); position: relative; z-index: 2;
}
.casc-card {
  background: #fff; border: 1px solid var(--cas-line); border-radius: 24px;
  padding: clamp(22px, 2.6vw, 34px); box-shadow: 0 40px 80px -46px rgba(15, 40, 90, .42);
}
.casc-card-h { font-weight: 800; font-size: 19px; letter-spacing: -.02em; margin: 0 0 4px; }
.casc-card-sub { color: var(--cas-muted); font-size: 14.5px; font-weight: 500; margin: 0 0 clamp(18px, 2vw, 26px); }

/* --- Champs --- */
.casc-field { margin-bottom: 20px; }
.casc-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.casc-label span:first-child { font-weight: 700; font-size: 14.5px; color: var(--cas-ink); }
.casc-hint { color: var(--cas-faint); font-size: 12.5px; font-weight: 600; }
.casc-money { position: relative; }
.casc-money::before {
  content: "$"; position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  color: var(--cas-faint); font-weight: 700; font-size: 15px; pointer-events: none;
}
.casc-input {
  width: 100%; box-sizing: border-box; font-family: inherit; font-weight: 700; font-size: 16.5px;
  color: var(--cas-ink); background: #fff; border: 1.5px solid #dfe6f1; border-radius: 13px;
  padding: 13px 15px 13px 32px; transition: border-color .18s, box-shadow .18s;
  -moz-appearance: textfield;
}
.casc-input::-webkit-outer-spin-button, .casc-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.casc-input:focus { outline: 0; border-color: var(--cas-blue); box-shadow: 0 0 0 4px rgba(29, 78, 216, .13); }
.casc-input:hover { border-color: #c7d5e8; }

/* --- Curseur --- */
.casc-range { width: 100%; margin: 4px 0 0; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; background: var(--cas-line); cursor: pointer; }
.casc-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 999px; background: var(--cas-blue);
  border: 3px solid #fff; box-shadow: 0 3px 10px rgba(29, 78, 216, .45); cursor: grab;
}
.casc-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 999px; background: var(--cas-blue); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(29, 78, 216, .45); cursor: grab; }
.casc-range:focus-visible { outline: 2px solid var(--cas-blue); outline-offset: 4px; }

/* --- Choix en pastilles --- */
.casc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.casc-chip {
  font-family: inherit; font-weight: 700; font-size: 14px; color: var(--cas-ink-2);
  background: #fff; border: 1.5px solid #dfe6f1; border-radius: 11px; padding: 10px 15px;
  cursor: pointer; transition: all .16s;
}
.casc-chip:hover { border-color: var(--cas-blue-lite); color: var(--cas-blue); }
.casc-chip[aria-pressed="true"] { background: var(--cas-blue); border-color: var(--cas-blue); color: #fff; box-shadow: 0 6px 16px -8px rgba(29, 78, 216, .6); }
.casc-chip:focus-visible { outline: 2px solid var(--cas-blue); outline-offset: 2px; }

/* --- Interrupteur taxes --- */
.casc-switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 17px; background: var(--cas-band); border: 1px solid var(--cas-line); border-radius: 15px; }
.casc-switch-txt strong { display: block; font-size: 14.5px; }
.casc-switch-txt span { display: block; color: var(--cas-muted); font-size: 12.5px; font-weight: 500; margin-top: 2px; }
.casc-toggle { position: relative; flex: 0 0 auto; width: 50px; height: 29px; border: 0; border-radius: 999px; background: #cbd5e1; cursor: pointer; transition: background .2s; }
.casc-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 999px; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .22); transition: transform .2s; }
.casc-toggle[aria-pressed="true"] { background: var(--cas-green); }
.casc-toggle[aria-pressed="true"]::after { transform: translateX(21px); }
.casc-toggle:focus-visible { outline: 2px solid var(--cas-blue); outline-offset: 3px; }

/* --- Panneau de résultat --- */
.casc-result {
  position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) + 18px);
  color: #fff; border-radius: 24px; padding: clamp(24px, 2.8vw, 34px);
  background-image: linear-gradient(158deg, #2b6bf0 0%, #1d4ed8 46%, #16309b 100%);
  box-shadow: 0 40px 80px -40px rgba(10, 30, 80, .6);
  overflow: hidden;
}
.casc-seg { display: flex; gap: 4px; padding: 4px; background: rgba(255, 255, 255, .14); border-radius: 12px; margin-bottom: clamp(18px, 2vw, 26px); }
.casc-seg-btn { flex: 1; font-family: inherit; font-weight: 700; font-size: 13.5px; color: rgba(255, 255, 255, .8); background: transparent; border: 0; border-radius: 9px; padding: 9px 6px; cursor: pointer; transition: all .16s; }
.casc-seg-btn[aria-pressed="true"] { background: #fff; color: var(--cas-blue); box-shadow: 0 3px 10px rgba(0, 0, 0, .18); }
.casc-seg-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.casc-res-label { color: rgba(255, 255, 255, .78); font-weight: 600; font-size: 13.5px; text-transform: uppercase; letter-spacing: .05em; }
.casc-amount { display: flex; align-items: baseline; gap: 7px; margin: 8px 0 2px; }
.casc-amount b { font-weight: 800; font-size: clamp(46px, 6.4vw, 70px); line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.casc-amount i { font-style: normal; font-weight: 700; font-size: clamp(21px, 2.4vw, 28px); opacity: .9; }
.casc-cadence { color: rgba(255, 255, 255, .72); font-size: 13.5px; font-weight: 600; }

.casc-rows { margin: clamp(20px, 2.2vw, 28px) 0 0; padding-top: clamp(16px, 1.8vw, 22px); border-top: 1px solid rgba(255, 255, 255, .18); }
.casc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 7px 0; font-size: 14.5px; }
.casc-row span { color: rgba(255, 255, 255, .74); font-weight: 500; }
.casc-row b { font-weight: 700; font-variant-numeric: tabular-nums; }
.casc-row-total { margin-top: 8px; padding-top: 13px; border-top: 1px dashed rgba(255, 255, 255, .24); font-size: 16px; }
.casc-row-total span { color: #fff; font-weight: 700; }

.casc-save { display: flex; align-items: center; gap: 9px; margin-top: 16px; padding: 12px 14px; background: rgba(74, 222, 128, .16); border: 1px solid rgba(74, 222, 128, .34); border-radius: 13px; font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.casc-save svg { flex: 0 0 auto; width: 17px; height: 17px; }
.casc-save[hidden] { display: none !important; }

.casc-cta { display: block; width: 100%; box-sizing: border-box; margin-top: clamp(18px, 2vw, 24px); text-align: center; font-family: inherit; font-weight: 700; font-size: 15.5px; color: var(--cas-blue); background: #fff; border: 0; border-radius: 999px; padding: 15px 22px; cursor: pointer; text-decoration: none; box-shadow: 0 12px 26px -14px rgba(6, 24, 70, .6); transition: transform .16s, filter .16s; }
.casc-cta:hover { transform: translateY(-1px); filter: brightness(.97); }
.casc-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.casc-fine { color: rgba(255, 255, 255, .62); font-size: 12px; font-weight: 500; line-height: 1.5; margin: 12px 0 0; text-align: center; }

/* --- Bande de réassurance --- */
.casc-trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: clamp(14px, 1.8vw, 22px); margin: clamp(34px, 4vw, 54px) 0 0; }
.casc-trust-item { display: flex; gap: 12px; align-items: flex-start; padding: 18px 20px; background: var(--cas-band); border: 1px solid var(--cas-line); border-radius: 17px; }
.casc-trust-item svg { flex: 0 0 auto; width: 21px; height: 21px; color: var(--cas-blue); margin-top: 1px; }
.casc-trust-item strong { display: block; font-size: 14.5px; margin-bottom: 3px; }
.casc-trust-item span { color: var(--cas-muted); font-size: 13.5px; font-weight: 500; line-height: 1.5; }

/* --- Section d'honnêteté --- */
.casc-note { margin: clamp(34px, 4vw, 54px) 0 0; padding: clamp(22px, 2.6vw, 32px); background: var(--cas-tint); border: 1px solid #dbe6fe; border-radius: 20px; }
.casc-note h2 { font-size: clamp(19px, 2vw, 23px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 12px; }
.casc-note p { color: var(--cas-ink-2); font-size: 15.5px; line-height: 1.68; margin: 0 0 10px; }
.casc-note p:last-child { margin-bottom: 0; }
.casc-note a { color: var(--cas-blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* --- Formulaire --- */
.casc-form-sec { margin: clamp(44px, 5.5vw, 78px) 0 clamp(50px, 6vw, 86px); }
.casc-form-wrap { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(20px, 3vw, 44px); align-items: center; padding: clamp(26px, 3.4vw, 46px); background: var(--cas-ink); border-radius: 26px; color: #fff; }
.casc-form-copy h2 { color: #fff; font-size: clamp(24px, 3vw, 36px); font-weight: 800; letter-spacing: -.025em; line-height: 1.14; margin: 0 0 14px; text-wrap: balance; }
.casc-form-copy p { color: rgba(255, 255, 255, .72); font-size: 16px; line-height: 1.62; margin: 0 0 18px; }
.casc-form-list { list-style: none; margin: 0; padding: 0; }
.casc-form-list li { display: flex; gap: 10px; align-items: flex-start; color: rgba(255, 255, 255, .88); font-size: 14.5px; font-weight: 500; padding: 5px 0; }
.casc-form-list svg { flex: 0 0 auto; width: 17px; height: 17px; color: #4ade80; margin-top: 2px; }

.casc-form { background: #fff; border-radius: 20px; padding: clamp(20px, 2.4vw, 30px); }
.casc-form-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.casc-flabel { display: block; font-weight: 700; font-size: 13.5px; color: var(--cas-ink); margin-bottom: 6px; }
.casc-finput { width: 100%; box-sizing: border-box; font-family: inherit; font-size: 15.5px; font-weight: 500; color: var(--cas-ink); background: #fff; border: 1.5px solid #dfe6f1; border-radius: 12px; padding: 12px 14px; transition: border-color .18s, box-shadow .18s; }
.casc-finput:focus { outline: 0; border-color: var(--cas-blue); box-shadow: 0 0 0 4px rgba(29, 78, 216, .13); }
.casc-finput[aria-invalid="true"] { border-color: #dc2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, .1); }
.casc-frow { margin-bottom: 14px; }
.casc-recap { margin: 4px 0 16px; padding: 13px 15px; background: var(--cas-band); border: 1px dashed var(--cas-line); border-radius: 12px; font-size: 13.5px; color: var(--cas-ink-2); font-weight: 600; line-height: 1.5; }
.casc-submit { width: 100%; font-family: inherit; font-weight: 700; font-size: 16px; color: #fff; background-image: linear-gradient(135deg, #2b6bf0, #1d4ed8); border: 0; border-radius: 999px; padding: 15px 20px; cursor: pointer; box-shadow: 0 14px 28px -14px rgba(29, 78, 216, .75); transition: transform .16s, filter .16s; }
.casc-submit:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }
.casc-submit:disabled { opacity: .62; cursor: default; }
.casc-submit:focus-visible { outline: 2px solid var(--cas-blue); outline-offset: 3px; }
.casc-reassure { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 12px 0 0; color: var(--cas-muted); font-size: 12.5px; font-weight: 600; }
.casc-reassure svg { width: 14px; height: 14px; color: var(--cas-green); }
.casc-err { margin: 12px 0 0; color: #b91c1c; font-size: 13.5px; font-weight: 600; }
.casc-err[hidden] { display: none !important; }
.casc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Écran de succès --- */
.casc-done { text-align: center; padding: clamp(16px, 2vw, 26px) 0; }
.casc-done-ic { width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 999px; background: rgba(22, 163, 74, .12); display: flex; align-items: center; justify-content: center; }
.casc-done-ic svg { width: 30px; height: 30px; color: var(--cas-green); }
.casc-done h3 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 9px; }
.casc-done p { color: var(--cas-muted); font-size: 15px; line-height: 1.6; margin: 0 auto; max-width: 40ch; }
.casc-done[hidden] { display: none !important; }

@media (max-width: 1023px) {
  .casc-grid { grid-template-columns: minmax(0, 1fr); }
  .casc-result { position: static; }
  .casc-form-wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .casc-hero { padding-bottom: clamp(74px, 16vw, 104px); }
  .casc-grid { margin-top: -62px; }
  .casc-card, .casc-result { border-radius: 20px; }
  .casc-amount b { font-size: clamp(42px, 13vw, 56px); }
}

/* ==========================================================================
   En-tête fondu dans le héros (page du calculateur uniquement)
   La bande de navigation et le héros portaient CHACUN leur dégradé : deux
   dégradés superposés laissaient un raccord horizontal visible. On rend la
   barre transparente et on peint UN seul dégradé, porté par un pseudo-élément
   du héros qui remonte derrière elle. Le préfixe body.page-id-105 garantit que
   les autres pages gardent leur barre bleue habituelle.
   ========================================================================== */

body.page-id-105 .casb-topbar {
  background-image: none;
  position: relative;
  z-index: 3;
  padding-bottom: var(--s-5);
}

body.page-id-105 .casc-hero {
  overflow: visible;
  background-image: none;
  padding-top: clamp(26px, 3.4vw, 46px);
}

body.page-id-105 .casc-hero::before {
  content: "";
  position: absolute;
  top: -320px;   /* remonte derrière la barre ; le surplus sort du document et est rogné */
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  background-image: radial-gradient(115% 118% at 50% 2%, #f4f8ff 0%, #9cc3fb 21%, #4479f3 55%, #1a48cf 100%);
}

/* Filet très discret sous la navigation : sépare sans casser le dégradé. */
body.page-id-105 .casb-topbar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22) 22%, rgba(255, 255, 255, .22) 78%, transparent);
}
