/* =========================================================================
   SCALEAD GEO — Section Simulateur (calculateur de manque à gagner IA)
   Thème clair, langage visuel du site : encoches navy, fil lumineux, mono Coda,
   angles 4px, dégradé bleu -> navy de la marque.
   ========================================================================= */
.sim-section {
  position: relative;
  z-index: 2;
  padding: 92px 0 40px;
}
.sim-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---- En-tête ---- */
.sim-head { text-align: center; margin-bottom: 44px; }
.sim-eyebrow { display: inline-block; margin-bottom: 18px; }
.sim-title {
  font-family: var(--_typography---font--primary), sans-serif;
  font-weight: 600;
  font-size: clamp(28px, 3.6vw, 42px);
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: #111827;
  margin: 0 auto 12px;
  max-width: 20ch;
}
.sim-sub {
  font-size: 15px;
  line-height: 1.6;
  color: #667085;
  max-width: 58ch;
  margin: 0 auto;
}

/* ---- Cadre "quadrillage" (grille + rulers) comme la section offre ---- */
.sim-frame {
  position: relative;
  border-radius: 0;
}

/* Grille de fond, étendue autour du panneau, fondue sur les bords */
.sim-grid {
  position: absolute;
  inset: -44px -54px;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(22, 119, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 119, 255, 0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 82% 78% at 50% 50%, #000 42%, transparent 100%);
  mask-image: radial-gradient(ellipse 82% 78% at 50% 50%, #000 42%, transparent 100%);
}

/* Rulers verticaux avec graduations, de part et d'autre du panneau */
.sim-ruler {
  position: absolute;
  top: -26px;
  bottom: -26px;
  width: 7px;
  z-index: 1;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    180deg,
    rgba(22, 119, 255, 0.28) 0 1px,
    transparent 1px 17px
  );
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}
.sim-ruler--l {
  left: -30px;
  border-left: 1px solid rgba(22, 119, 255, 0.16);
}
.sim-ruler--r {
  right: -30px;
  border-right: 1px solid rgba(22, 119, 255, 0.16);
  background-position: right;
}
/* Fil lumineux bleu qui court le long des traits (comme la section offre) */
.sim-ruler::after {
  content: '';
  position: absolute;
  width: 1px;
  height: 74px;
  background: linear-gradient(180deg, transparent, #2b83ff 45%, #8cc0ff 50%, #2b83ff 55%, transparent);
  filter: drop-shadow(0 0 5px rgba(43, 131, 255, 0.9));
  animation: sim-ruler-run 4s linear infinite;
}
.sim-ruler--l::after { left: -1px; }
.sim-ruler--r::after { right: -1px; animation-delay: 2s; }
@keyframes sim-ruler-run {
  0% { top: -74px; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ---- Panneau (entrées | résultats) ---- */
.sim-panel {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: #ffffff;
  border: 1px solid rgba(22, 119, 255, 0.14);
  border-radius: 0;
  box-shadow: 0 22px 60px rgba(16, 74, 170, 0.12);
  overflow: hidden;
}

/* Encoches — posées sur le CADRE (non rognées), elles couvrent les coins */
.sim-cnr {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1.7px solid #0a3d91;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 0 2px rgba(10, 61, 145, 0.25));
}
.sim-cnr.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.sim-cnr.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.sim-cnr.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.sim-cnr.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* Fil lumineux qui fait tout le tour (sur le cadre, donc non rogné) */
.sim-beam {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 0;
  padding: 1.5px;
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  overflow: hidden;
}
.sim-beam::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 210px;
  height: 210px;
  transform: translate(-50%, 50%);
  background: radial-gradient(circle, rgba(43, 131, 255, 0.95) 0%, transparent 60%);
  animation: sim-go 6s linear infinite;
}
@keyframes sim-go {
  0% { left: 0; bottom: 0; }
  25% { left: 0; bottom: 100%; }
  50% { left: 100%; bottom: 100%; }
  75% { left: 100%; bottom: 0; }
  100% { left: 0; bottom: 0; }
}

/* ---- Entrées ---- */
.sim-inputs {
  padding: 34px 34px 36px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid rgba(17, 24, 39, 0.06);
}
.sim-field { display: flex; flex-direction: column; gap: 8px; }
.sim-field-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sim-label {
  font-family: var(--_typography---font--coda), monospace;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #475467;
}
.sim-value {
  font-family: var(--_typography---font--primary), sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #0a3d91;
  white-space: nowrap;
}
.sim-hint {
  font-size: 12.5px;
  line-height: 1.45;
  color: #98a2b3;
  margin: 0;
}

/* ---- Dropdown personnalisé (panneau façon menu navbar mobile déplié) ---- */
.sim-dd { position: relative; }
.sim-dd-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 13px 15px;
  font-family: var(--_typography---font--secondary), sans-serif;
  font-size: 14.5px;
  text-align: left;
  color: #111827;
  background: #f7faff;
  border: 1px solid rgba(22, 119, 255, 0.18);
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.sim-dd-trigger:hover { border-color: rgba(22, 119, 255, 0.4); }
.sim-dd.open .sim-dd-trigger {
  border-color: #2b83ff;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(43, 131, 255, 0.14);
}
.sim-dd-arrow {
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid #0a3d91;
  border-bottom: 2px solid #0a3d91;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.22s ease;
}
.sim-dd.open .sim-dd-arrow { transform: translateY(1px) rotate(-135deg); }

/* Panneau déroulant */
.sim-dd-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 264px;
  overflow-y: auto;
  padding: 6px;
  background: rgba(255, 255, 255, 0.98);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border: 1px solid rgba(22, 119, 255, 0.22);
  border-radius: 0;
  box-shadow: 0 18px 44px rgba(16, 74, 170, 0.22);
  animation: sim-dd-in 0.16s ease;
}
@keyframes sim-dd-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
/* Petites encoches d'angle (langage du site) */
.sim-dd-cnr {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1.5px solid #0a3d91;
  pointer-events: none;
  z-index: 2;
}
.sim-dd-cnr.tl { top: 3px; left: 3px; border-right: 0; border-bottom: 0; }
.sim-dd-cnr.tr { top: 3px; right: 3px; border-left: 0; border-bottom: 0; }
.sim-dd-cnr.bl { bottom: 3px; left: 3px; border-right: 0; border-top: 0; }
.sim-dd-cnr.br { bottom: 3px; right: 3px; border-left: 0; border-top: 0; }

.sim-dd-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 11px 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  font-family: var(--_typography---font--secondary), sans-serif;
  font-size: 14px;
  color: #475467;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.sim-dd-opt:hover { background: rgba(43, 131, 255, 0.09); color: #0a3d91; }
.sim-dd-opt.sel { color: #0a3d91; font-weight: 600; background: rgba(43, 131, 255, 0.06); }
.sim-dd-check {
  flex: none;
  width: 8px;
  height: 12px;
  border-right: 2px solid #2b83ff;
  border-bottom: 2px solid #2b83ff;
  transform: rotate(45deg);
  margin-right: 3px;
}

/* Slider */
.sim-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, #2b83ff 0%, #0a3d91 var(--pct), #e4edf9 var(--pct), #e4edf9 100%);
  cursor: pointer;
  margin: 2px 0;
}
.sim-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #2b83ff;
  box-shadow: 0 3px 10px rgba(16, 74, 170, 0.35);
  cursor: pointer;
  transition: transform 0.15s;
}
.sim-range::-webkit-slider-thumb:hover { transform: scale(1.12); }
.sim-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #2b83ff;
  box-shadow: 0 3px 10px rgba(16, 74, 170, 0.35);
  cursor: pointer;
}
.sim-range:focus { outline: none; }
.sim-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(43, 131, 255, 0.2); }

/* ---- Résultats ---- */
.sim-results {
  padding: 34px 34px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
}
.sim-cards { display: flex; flex-direction: column; gap: 12px; }
.sim-card {
  border: 1px solid rgba(22, 119, 255, 0.12);
  border-radius: 0;
  padding: 16px 18px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sim-card-label {
  font-family: var(--_typography---font--coda), monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #667085;
}
.sim-card-value {
  font-family: var(--_typography---font--primary), sans-serif;
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: #111827;
}
.sim-card--main {
  background: linear-gradient(135deg, #2b83ff 0%, #0a3d91 100%);
  border-color: transparent;
  box-shadow: 0 14px 34px rgba(16, 74, 170, 0.28);
}
.sim-card--main .sim-card-label { color: rgba(255, 255, 255, 0.82); }
.sim-card--main .sim-card-value { color: #ffffff; font-size: 34px; }

/* Bloc final */
.sim-final {
  margin-top: 6px;
  padding: 20px 20px 22px;
  border-radius: 0;
  border: 1px dashed rgba(22, 119, 255, 0.3);
  background: rgba(43, 131, 255, 0.04);
  text-align: center;
}
.sim-final-lead {
  font-size: 13.5px;
  line-height: 1.5;
  color: #475467;
  margin: 0 0 8px;
}
.sim-final-lead b { color: #0a3d91; font-weight: 600; }
.sim-final-amount {
  font-family: var(--_typography---font--primary), sans-serif;
  font-weight: 600;
  font-size: 32px;
  letter-spacing: -0.02em;
  color: #0a3d91;
  line-height: 1.05;
}
.sim-final-sub {
  font-family: var(--_typography---font--coda), monospace;
  font-size: 12.5px;
  color: #667085;
  margin-top: 4px;
}
.sim-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 14px 30px;
  border-radius: 0;
  font-family: var(--_typography---font--coda), monospace;
  font-size: 14px;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #2b83ff 0%, #0a3d91 100%);
  border: 1px solid rgba(10, 61, 145, 0.4);
  box-shadow: 0 10px 28px rgba(16, 74, 170, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.sim-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(16, 74, 170, 0.4);
}

/* CTA natif du site dans le bloc final */
.sim-cta-wrap { margin-top: 16px; }

/* Note */
.sim-note {
  max-width: 760px;
  margin: 24px auto 0;
  font-size: 12px;
  line-height: 1.55;
  color: #98a2b3;
  text-align: center;
}

/* ---- Responsive ---- */
@media (max-width: 820px) {
  .sim-panel { grid-template-columns: 1fr; }
  .sim-inputs { border-right: 0; border-bottom: 1px solid rgba(17, 24, 39, 0.06); }
  .sim-section { padding: 64px 0 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .sim-beam::after { animation: none; }
}
