/*
 * Cap Portage V12.4.14 — densité éditoriale & résultats simulateur.
 *
 * 1. Resserre l'échelle typographique et les vides verticaux (retour recette :
 *    « tout est trop grand, trop de vide ») sans toucher aux couleurs ni au design.
 * 2. Styles des nouveaux composants du panneau résultats : cascade CA → salaire,
 *    bandeau « cadre officiel », CTA contrat.
 * Chargé en dernier, après v12.4.1-fixes.css.
 */

/* ── 1. Échelle typographique globale (écrase les variables de main.css) ── */
:root {
  --text-display:    clamp(2.1rem, 3.6vw, 3.1rem);
  --text-display-sm: clamp(1.75rem, 2.8vw, 2.35rem);
  --text-h1:         clamp(1.6rem, 2.6vw, 2.15rem);
  --text-h2:         clamp(1.4rem, 2.2vw, 1.8rem);
  --text-h3:         clamp(1.15rem, 1.8vw, 1.35rem);
  --text-h4:         1.15rem;
  --text-body-lg:    1.0625rem;
}

/* Rythme vertical : sections plus compactes sur tout le site. */
.section     { padding-block: clamp(2.75rem, 5.5vw, 4rem); }
.section--lg { padding-block: clamp(3.25rem, 6.5vw, 4.75rem); }
.section__header { margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem); }

/* ── 2. Home V6 : hero et sections resserrés ── */
.cp-home-v6 .v6-hero { padding: calc(var(--navbar-h) + 2.25rem) 0 3.25rem; }
.cp-home-v6 .v6-hero__grid { gap: clamp(2rem, 4vw, 4rem); }
.cp-home-v6 .v6-hero__content h1 { font-size: clamp(2.1rem, 3.4vw, 3.1rem); margin-bottom: 1rem; }
.cp-home-v6 .v6-hero__lead { font-size: clamp(.95rem, 1.2vw, 1.05rem); line-height: 1.65; }
.cp-home-v6 .v6-hero__photo { height: clamp(340px, 44vh, 470px); }
.cp-home-v6 .v6-hero__panel { min-height: clamp(330px, 42vh, 440px); gap: 1.4rem; padding: clamp(1.6rem, 2.8vw, 2.4rem); }
.cp-home-v6 .v6-hero__panel-rates b { font-size: clamp(2rem, 3.2vw, 2.6rem); }
.cp-home-v6 .v6-head h2 { font-size: clamp(1.65rem, 2.6vw, 2.25rem); margin-bottom: .7rem; }
.cp-home-v6 .v6-head p { font-size: 1rem; line-height: 1.6; }
.cp-home-v6 .v6-head { margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.cp-home-v6 .v6-sim { padding: 3.25rem 0 3.75rem; }
.cp-home-v6 .v6-sim__head h2 { font-size: clamp(1.6rem, 2.3vw, 2rem); }
.cp-home-v6 .v6-sim__head p { font-size: .98rem; }
.cp-home-v6 .v6-human { padding: 3.75rem 0; }
.cp-home-v6 .v6-human__grid { gap: clamp(2rem, 4.5vw, 4.5rem); }
.cp-home-v6 .v6-human__photo { height: clamp(360px, 46vh, 500px); }
.cp-home-v6 .v6-human__quote { min-height: clamp(320px, 40vh, 430px); padding: clamp(1.8rem, 3vw, 2.6rem); }
.cp-home-v6 .v6-human__quote blockquote { font-size: clamp(1.35rem, 2.1vw, 1.8rem); }
.cp-home-v6 .v6-human h2 { font-size: clamp(1.65rem, 2.6vw, 2.25rem); margin-bottom: 1rem; }
.cp-home-v6 .v6-human__lead { font-size: 1rem; margin-bottom: 1.5rem; }
.cp-home-v6 .v6-human__list { margin-bottom: 1.75rem; gap: .7rem; }
.cp-home-v6 .v6-faq__layout { gap: clamp(2.25rem, 4vw, 3.5rem); }
.cp-home-v6 .v6-cta { padding: 3.75rem 0; }
.cp-home-v6 .v6-cta__inner { gap: clamp(2.25rem, 4vw, 3.5rem); }

/* ── 3. Simulateur : cascade CA → salaire ── */
.sim-cascade {
  margin: 1.25rem 0 0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, .03);
}
.sim-cascade__title {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .85rem 1.1rem .75rem;
  background: rgba(255, 255, 255, .05);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.sim-cascade__title strong { font-size: .95rem; letter-spacing: .01em; }
.sim-cascade__title small { font-size: .72rem; opacity: .65; }
.sim-cascade ol { list-style: none; margin: 0; padding: 0; }
.sim-cascade li {
  display: grid;
  grid-template-columns: 1.35rem 1fr auto;
  align-items: center;
  gap: .6rem;
  padding: .6rem 1.1rem;
  font-size: .88rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sim-cascade li:last-child { border-bottom: 0; }
.sim-cascade li[hidden] { display: none; }
.sim-cascade .sim-cascade__sign {
  font-weight: 800;
  text-align: center;
  font-size: .95rem;
  opacity: .75;
}
.sim-cascade .sim-cascade__val {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}
.sim-cascade li small { display: block; font-size: .72rem; opacity: .6; font-weight: 400; }
.sim-cascade .sim-cascade__net {
  background: rgba(34, 197, 94, .1);
  font-weight: 700;
}
.sim-cascade .sim-cascade__net .sim-cascade__val { color: #4ade80; font-size: 1rem; }
.sim-cascade .sim-cascade__total {
  background: linear-gradient(90deg, rgba(200, 169, 107, .22), rgba(200, 169, 107, .08));
  font-weight: 800;
}
.sim-cascade .sim-cascade__total .sim-cascade__val {
  color: var(--cp-gold-2, #E7C878);
  font-size: 1.15rem;
}

/* ── 4. Bandeau « cadre officiel » ── */
.sim-officiel {
  margin: 1rem 0 0;
  padding: .85rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
}
.sim-officiel p {
  margin: 0 0 .5rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .7;
}
.sim-officiel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.sim-officiel li {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  font-size: .78rem;
  line-height: 1.45;
  opacity: .88;
}
.sim-officiel li::before {
  content: '✓';
  flex: 0 0 auto;
  font-weight: 800;
  color: #4ade80;
}

/* ── 5. CTA contrat ── */
.sim-signup-cta {
  margin: 1.25rem 0 0;
  padding: 1.25rem 1.2rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(200, 169, 107, .18), rgba(200, 169, 107, .05));
  border: 1px solid rgba(200, 169, 107, .35);
  text-align: center;
}
.sim-signup-cta strong { display: block; font-size: 1.02rem; margin-bottom: .25rem; }
.sim-signup-cta p { margin: 0 0 .85rem; font-size: .82rem; opacity: .8; }
.sim-signup-cta .sim-signup-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
}

/* Panneau résultats : léger resserrage typographique. */
.sim-result-big { font-size: clamp(2rem, 4vw, 2.7rem); }
.sim-result-highlight { padding: 1.35rem 1.2rem 1.2rem; }

/* Sur fond clair (pages internes, simulateur hors home dark). */
.simulator:not(.simulator--home) .sim-cascade,
.simulator:not(.simulator--home) .sim-officiel { color: inherit; }

/* Le panneau résultats est devenu plus long que le formulaire : en desktop,
   le formulaire suit le défilement pour éviter une colonne gauche vide. */
@media (min-width: 1024px) {
  .simulator__layout { align-items: start; }
  .simulator__form { position: sticky; top: calc(var(--navbar-h, 72px) + 1.25rem); }
  /* overflow:hidden sur un ancêtre neutralise position:sticky ; clip garde le
     rognage décoratif sans créer de conteneur de défilement. */
  .cp-home-v6 .v6-sim, .simulator.section { overflow: clip; }
}

@media (max-width: 768px) {
  .cp-home-v6 .v6-hero__photo,
  .cp-home-v6 .v6-human__photo { height: clamp(240px, 36vh, 340px); }
  .sim-cascade li { font-size: .82rem; padding: .55rem .85rem; }
  .sim-signup-cta .sim-signup-cta__actions { flex-direction: column; }
  .sim-signup-cta .sim-signup-cta__actions .btn { width: 100%; }
}
