/* ============================================================================
   SIMULATEURS — habillage du calculateur
   ----------------------------------------------------------------------------
   Complète assets/sous-pages.css : celle-ci porte la coquille commune (en-tête,
   hero, pied de page, boutons, FAQ, formulaires) déclinée en trois habillages ;
   ce fichier ne porte que les composants propres au calculateur (champs,
   panneau de résultat, jauge, encarts pédagogiques).

   Tout est exprimé en jetons --sp-*, donc l'aspect suit la direction d'origine
   du visiteur (html[data-dir]) sans qu'aucune couleur ne soit écrite en dur.
   ============================================================================ */

.badge { display: inline-flex; align-items: center; gap: 8px; background: var(--sp-surface); border: 1px solid var(--sp-line); border-radius: 999px; padding: 8px 16px; font-size: 13.5px; font-weight: 700; color: var(--sp-brand); }
.badge i { color: var(--sp-accent-ink); font-size: 16px; }
.hero .sous { font-size: 14.5px; color: var(--sp-muted); margin-top: 16px; max-width: 56ch; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; max-width: 420px; }
.hero-stats > div { background: var(--sp-surface); border: 1px solid var(--sp-line); border-radius: 14px; padding: 14px 10px; text-align: center; }
.hero-stats b { display: block; font-family: var(--sp-font-display); font-size: 1.4rem; color: var(--sp-brand); }
.hero-stats small { font-size: 12px; color: var(--sp-faint); }
.sim-card { background: var(--sp-surface); border: 1px solid var(--sp-line); border-radius: 24px; padding: clamp(22px, 3vw, 32px); box-shadow: 0 30px 70px -38px rgb(var(--c-primary-deep-rgb)/0.5); }
.sim-card h2 { font-family: var(--sp-font-display); font-size: 1.25rem; color: var(--sp-brand); margin-bottom: 18px; }
.field { margin-bottom: 18px; }
.field > label, .field > .flabel { display: block; font-size: 13.5px; font-weight: 700; color: var(--sp-brand); margin-bottom: 7px; }
.field .out { color: var(--sp-accent-ink); font-weight: 800; }
.field .hint { font-size: 12px; color: var(--sp-faint); margin-top: 5px; font-weight: 400; }
.field input[type=number], .field select { font-family: inherit; font-size: 15px; color: var(--sp-ink); background: var(--sp-page); border: 1px solid var(--sp-line-strong); border-radius: 10px; padding: 11px 13px; }
.field select { width: 100%; }
.field input[type=number]:focus, .field select:focus { outline: 2px solid var(--sp-accent); outline-offset: 1px; border-color: var(--sp-accent); }
.field input[type=range] { width: 100%; accent-color: var(--sp-brand); }
.field .inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) {
  .fgrid { grid-template-columns: 1fr; }
}
.seg { display: inline-flex; border: 1px solid var(--sp-line-strong); border-radius: 12px; padding: 3px; background: var(--sp-surface); gap: 2px; flex-wrap: wrap; }
.seg button { font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--sp-brand); background: transparent; border: 0; border-radius: 9px; padding: 8px 15px; cursor: pointer; transition: background .2s, color .2s; }
.seg button.on { background: var(--sp-brand); color: #fff; }
.chipbtn { font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--sp-brand); background: var(--sp-surface); border: 1px solid var(--sp-line-strong); border-radius: 10px; padding: 9px 13px; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.chipbtn.on { background: var(--sp-brand); color: #fff; border-color: var(--sp-brand); }
.chiprow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 520px) {
  .chiprow { grid-template-columns: repeat(2, 1fr); }
}
.reset { font-family: inherit; font-size: 13px; font-weight: 700; color: var(--sp-brand); background: transparent; border: 1px solid var(--sp-line-strong); border-radius: 999px; padding: 8px 15px; cursor: pointer; }
.reset:hover { border-color: var(--sp-accent); background: var(--sp-soft); }
.result { margin-top: 22px; border-radius: 18px; background: linear-gradient(135deg, var(--sp-brand), var(--sp-brand-deep)); color: #fff; padding: 22px; }
.result .r-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.result .r-kick { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: rgb(255 255 255/0.6); }
.result .r-kick.gold { color: var(--sp-accent); }
.result .r-big { font-family: var(--sp-font-display); font-weight: 800; font-size: 2.9rem; line-height: 1.05; }
.result .r-big small { font-size: 1.1rem; color: rgb(255 255 255/0.6); font-weight: 600; }
.result .r-mid { font-family: var(--sp-font-display); font-weight: 800; font-size: 1.5rem; }
.result .r-mid.gold { color: var(--sp-accent); }
.result .r-sub { font-size: 12px; color: rgb(255 255 255/0.55); }
.result .r-var { font-size: 14px; font-weight: 800; color: var(--sp-accent); }
.result .r-var.bad { color: #ffb3a7; }
.result .r-var.neutral { color: rgb(255 255 255/0.8); }
.result .r-band { margin-top: 16px; border-radius: 12px; background: rgb(255 255 255/0.12); padding: 12px; text-align: center; font-size: 13px; }
.result .r-band b { font-size: 14px; }
.result .r-band .lbl { color: rgb(255 255 255/0.7); font-size: 12px; }
.gauge { position: relative; height: 8px; border-radius: 999px; background: rgb(255 255 255/0.16); margin-top: 18px; }
.gauge i { position: absolute; top: -4px; height: 16px; width: 16px; margin-left: -8px; border-radius: 50%; background: var(--sp-accent); box-shadow: 0 0 0 2px #fff; transition: left .25s; }
.gauge-lbl { display: flex; justify-content: space-between; font-size: 11px; color: rgb(255 255 255/0.5); margin-top: 6px; }
.sim-note { margin-top: 14px; font-size: 12.5px; color: var(--sp-faint); }
.sim-note a { color: var(--sp-brand); font-weight: 700; text-decoration: underline; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) {
  .info-grid { grid-template-columns: 1fr; }
}
.info { background: var(--sp-surface); border: 1px solid var(--sp-line); border-radius: 16px; padding: 24px; }
.info .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--sp-soft); display: grid; place-items: center; }
.info .ic i { font-size: 24px; color: var(--sp-brand); }
.info h3 { font-family: var(--sp-font-display); font-size: 1.05rem; color: var(--sp-brand); margin: 14px 0 6px; }
.info p { font-size: 14.5px; color: var(--sp-muted); }
.info p strong { color: var(--sp-brand); }
.sec-lead { background: var(--sp-soft); border-top: 1px solid rgb(var(--c-ink-rgb)/0.06); border-bottom: 1px solid rgb(var(--c-ink-rgb)/0.06); }
.lead-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 60px); align-items: start; }
@media (max-width: 860px) {
  .lead-grid { grid-template-columns: 1fr; }
}
.lead-side h2 { font-family: var(--sp-font-display); font-weight: 800; font-size: clamp(1.5rem, 2.8vw, 2rem); color: var(--sp-brand); margin-top: 10px; }
.lead-side p { color: var(--sp-muted); margin-top: 12px; max-width: 48ch; }
.lead-side .fiche-link { margin-top: 22px; display: inline-flex; }
.recap { font-size: 13px; color: var(--sp-muted); background: var(--sp-soft); border: 1px dashed var(--sp-line-strong); border-radius: 10px; padding: 11px 13px; }
.recap b { color: var(--sp-brand); }

/* ---- Personnalité par habillage --------------------------------------- */

html[data-dir='local'] .sim-card { border-radius: 28px; border-color: transparent; }
html[data-dir='local'] .info,
html[data-dir='local'] .hero-stats > div { border-color: transparent; box-shadow: 0 14px 30px -20px rgb(var(--c-primary-rgb) / 0.35); }
html[data-dir='local'] .result { border-radius: 24px; }
html[data-dir='local'] .info .ic { border-radius: 16px; }

html[data-dir='conversion'] .sim-card { border-radius: var(--sp-r-lg); box-shadow: none; border-left: 3px solid var(--sp-accent); }
html[data-dir='conversion'] .result { border-radius: var(--sp-r-card); }
html[data-dir='conversion'] .info { border-radius: var(--sp-r-card); border-left: 3px solid var(--sp-line); }
html[data-dir='conversion'] .info .ic { border-radius: var(--sp-r-sm); }
html[data-dir='conversion'] .seg,
html[data-dir='conversion'] .chipbtn,
html[data-dir='conversion'] .reset { border-radius: var(--sp-r-sm); }
html[data-dir='conversion'] .hero-stats > div { border-radius: var(--sp-r-card); }


/* ---- Formulaire de rappel et rythme des sections ----------------------- */
/* Ces règles vivaient dans le gabarit avant le passage aux trois habillages ;
   elles sont ici exprimées en jetons pour suivre la direction du visiteur. */

section.std { padding: clamp(44px, 7vw, 80px) 0; }
html[data-dir='premium'] section.std { padding: clamp(56px, 8vw, 108px) 0; }
html[data-dir='local'] section.std { padding: clamp(40px, 6vw, 76px) 0; }
html[data-dir='conversion'] section.std { padding: clamp(32px, 4.6vw, 62px) 0; }

form.lead {
  background: var(--sp-surface); border: 1px solid var(--sp-line);
  border-radius: var(--sp-r-lg); padding: clamp(22px, 3vw, 30px);
  display: grid; gap: 14px; box-shadow: var(--sp-shadow-lift);
}
form.lead .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { form.lead .row { grid-template-columns: 1fr; } }
form.lead label { font-size: 13px; font-weight: 700; color: var(--sp-brand); display: grid; gap: 6px; }
form.lead input {
  font-family: inherit; font-size: 15px; color: var(--sp-ink); background: var(--sp-page);
  border: 1px solid var(--sp-line-strong); border-radius: var(--sp-r-input);
  padding: 12px 14px; width: 100%;
}
form.lead input:focus { outline: 2px solid var(--sp-accent); outline-offset: 1px; border-color: var(--sp-accent); }
html[data-dir='local'] form.lead { border-color: transparent; border-radius: 24px; }
html[data-dir='conversion'] form.lead { border-left: 3px solid var(--sp-accent); box-shadow: none; }
