@font-face {
  font-family: Inter;
  src: url("polices/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --line: #d2d2d7;
  --paper: #fff;
  --mist: #f5f5f7;
  --night: #000;
  --night-card: #1d1d1f;
  --blue: #0071e3;
  --blue-text: #0066cc;

  /* Barre de répartition du loyer (palette validée daltonisme et contraste) */
  --part-charges: #c9700a;
  --part-credit: #0071e3;
  --part-rest: #248a3d;
  --part-deficit: #d70015;

  --ease: cubic-bezier(.22, .8, .24, 1);
  --gutter: clamp(20px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 56px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.47;
  letter-spacing: -.012em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
h1, h2 { font-weight: 600; letter-spacing: -.028em; line-height: 1.06; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* ---------- Navigation ---------- */

.nav {
  position: fixed; inset: 0 0 auto; z-index: 20;
  background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.nav-inner {
  max-width: calc(960px + 2 * var(--gutter)); height: 44px; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.logo { font-weight: 400; font-size: 16px; letter-spacing: -.02em; }
.logo b { font-weight: 600; }
.nav nav { display: flex; align-items: center; gap: 24px; font-size: 12px; }
.nav nav a { color: var(--ink); opacity: .8; transition: opacity .2s; }
.nav nav a:hover { opacity: 1; }
.nav nav .nav-cta {
  opacity: 1; color: #fff; background: var(--blue);
  padding: 4px 12px; border-radius: 980px;
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-block; border: 0; cursor: pointer;
  padding: 9px 18px; border-radius: 980px;
  background: var(--blue); color: #fff; font-size: 15px;
  transition: background .2s, transform .2s var(--ease);
}
.btn:hover { background: #0077ed; }
.btn:active { transform: scale(.97); }
.link, .link-button { color: var(--blue-text); font-size: 15px; }
.link::after { content: " ›"; }
.link:hover, .link-button:hover { text-decoration: underline; }
.link-button { background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- Hero ---------- */

.hero { padding: 104px var(--gutter) 72px; background: var(--paper); }
.hero-inner {
  max-width: 960px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 56px; align-items: center;
}
.insecable { white-space: nowrap; }
.hero h1 { font-size: clamp(30px, 4.6vw, 50px); line-height: 1.05; letter-spacing: -.035em; }
.hero-sub {
  max-width: 440px; margin-top: 16px;
  font-size: clamp(16px, 1.5vw, 18px); line-height: 1.35; color: var(--ink-soft);
}
.hero-paste { margin-top: 24px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); transition: border-color .2s, box-shadow .2s; }
.hero-paste:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 113, 227, .16); }
.hero-paste textarea { display: block; width: 100%; padding: 6px 8px; border: 0; outline: 0; resize: none; background: none; }
.hero-paste .btn { display: block; margin: 6px 0 0 auto; }
.hero-note { margin-top: 12px; font-size: 13px; color: var(--ink-soft); }
.hero-note .link { font-size: 13px; }
.hero-visual .result { box-shadow: 0 24px 64px -20px rgba(0, 0, 0, .22); }

.js .rise { opacity: 0; transform: translateY(28px); animation: rise 1.1s var(--ease) forwards; }
.js .hero-sub.rise { animation-delay: .12s; }
.js .hero-paste.rise { animation-delay: .2s; }
.js .hero-note.rise { animation-delay: .26s; }
.js .hero-visual.rise { animation-delay: .34s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Phrase ---------- */

.statement { padding: 88px var(--gutter); background: var(--paper); }
#statement-text {
  max-width: 760px; margin: 0 auto; text-align: center;
  font-size: clamp(24px, 3.2vw, 36px); font-weight: 600; line-height: 1.2; letter-spacing: -.024em;
}
#statement-text span { transition: opacity .45s linear; }
.js #statement-text span { opacity: .16; }
.js #statement-text.on span { opacity: 1; }

/* ---------- Comment ça marche ---------- */

.how { padding: 72px var(--gutter); background: var(--mist); }
.how-inner {
  max-width: 960px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center;
}
.how-titre { margin-bottom: 20px; font-size: clamp(26px, 3vw, 36px); }
.how-step {
  display: block; width: 100%; padding: 14px 0; text-align: left; cursor: pointer;
  background: none; border: 0; border-top: 1px solid var(--line); transition: opacity .3s;
}
.how-step b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.016em; }
.how-step span { display: block; margin-top: 0; color: var(--ink-soft); overflow: hidden; max-height: 0; transition: max-height .5s var(--ease), margin-top .5s var(--ease); }
.how-step.is-active span { max-height: 130px; margin-top: 6px; }
.how-step:not(.is-active) { opacity: .62; }
.how-step:hover { opacity: 1; }

.stage-card {
  position: relative; width: 100%; height: 470px; overflow: hidden;
  display: flex; align-items: center;
  background: var(--paper); border-radius: 22px;
}
.stage-ad {
  padding: 28px; font-size: 14px; line-height: 1.55; white-space: pre-line; color: var(--ink);
  transition: opacity .6s, transform .8s var(--ease);
}
.stage-ad mark {
  background: transparent; color: inherit; border-radius: 5px; padding: 1px 3px; margin: 0 -3px;
  transition: background .5s, color .5s;
}
.stage-card[data-step="2"] .stage-ad mark,
.stage-card[data-step="3"] .stage-ad mark { background: var(--blue); color: #fff; }
.stage-card[data-step="3"] .stage-ad { opacity: 0; transform: scale(.96); }

.stage-result {
  position: absolute; inset: 0; padding: 4px;
  display: flex; align-items: center;
  opacity: 0; transform: translateY(40px);
  transition: opacity .6s, transform .8s var(--ease);
}
.stage-result .result-slot { width: 100%; }
.stage-card[data-step="3"] .stage-result { opacity: 1; transform: none; }

/* ---------- Bento ---------- */

.features { background: var(--paper); padding: 88px var(--gutter); }
.features-title { max-width: 960px; margin: 0 auto 40px; font-size: clamp(32px, 4.4vw, 52px); }
.bento {
  max-width: 960px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.tile {
  background: var(--mist); border-radius: 22px; padding: 28px;
  display: flex; flex-direction: column; min-height: 240px;
}
.tile-wide { grid-column: 1 / -1; }
.tile h3 { font-size: 21px; font-weight: 600; letter-spacing: -.022em; line-height: 1.14; }
.tile p { margin-top: 8px; max-width: 420px; color: var(--ink-soft); }
.tile-figure {
  margin-top: auto; padding-top: 24px;
  font-size: clamp(44px, 6vw, 64px); font-weight: 600; letter-spacing: -.045em; line-height: 1;
}
.tile-figure-small { font-size: clamp(30px, 3.2vw, 38px); letter-spacing: -.035em; }
.tile-dark { background: var(--night-card); color: #fff; }
.tile-dark p { color: #a1a1a6; }

/* Couleurs de l'étiquette DPE officielle, du vert foncé (A) au rouge (G). */
.dpe { margin-top: auto; padding-top: 24px; padding-bottom: 22px; display: flex; gap: 6px; align-items: flex-end; }
.dpe span {
  position: relative; flex: 1; height: 42px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #1d1d1f; font-weight: 600;
}
.dpe .dpe-a { background: #009c6d; }
.dpe .dpe-b { background: #52b153; }
.dpe .dpe-c { background: #a5cc74; }
.dpe .dpe-d { background: #f4e70f; }
.dpe .dpe-e { background: #f0b50f; }
.dpe .dpe-f { background: #eb8235; }
.dpe .dpe-g { background: #d7221f; color: #fff; }
/* L'échéance d'interdiction de louer, sous les classes concernées. */
.dpe span[data-echeance]::after {
  content: attr(data-echeance); position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  font-size: 11px; font-weight: 500; text-align: center; color: #a1a1a6;
}

/* ---------- Outil ---------- */

.tool { min-height: 70vh; padding: 88px var(--gutter) 72px; background: var(--paper); }
.tool-head { text-align: center; }
.tool-head h1 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 600; letter-spacing: -.028em; line-height: 1.1; }
.tool-head p { margin-top: 8px; font-size: 15px; color: var(--ink-soft); }

.paste { max-width: 620px; margin: 28px auto 0; }
.paste-message a { color: var(--blue-text); }
.paste label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--ink-soft); }
.paste textarea {
  display: block; width: 100%; resize: vertical; min-height: 130px;
  padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--paper);
  transition: border-color .2s, box-shadow .2s;
}
.paste textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 113, 227, .16); }
.paste-message { min-height: 22px; margin-top: 6px; font-size: 13px; color: var(--ink-soft); }
.paste-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 6px; }

.workspace {
  max-width: 960px; margin: 56px auto 0;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: start;
  animation: rise .9s var(--ease) both;
}
.workspace[hidden] { display: none; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 12px; background: var(--mist); }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 6px; border-radius: 9px; text-align: center; font-size: 13px; cursor: pointer; transition: background .2s, box-shadow .2s; }
.segmented input:checked + span { background: var(--paper); box-shadow: 0 1px 4px rgba(0, 0, 0, .14); font-weight: 500; }
.segmented input:focus-visible + span { outline: 2px solid var(--blue); }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.field { min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 4px; font-size: 13px; color: var(--ink-soft); }
.field em { font-style: normal; color: var(--blue-text); }
.input {
  display: flex; align-items: center; gap: 6px;
  padding: 0 12px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper);
  transition: border-color .2s, box-shadow .2s;
}
.input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 113, 227, .16); }
.input input, .input select { flex: 1; min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; background: none; }
.input span { flex: none; font-size: 13px; color: var(--ink-soft); }

.more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.more summary { cursor: pointer; color: var(--blue-text); }

.workspace-result { position: sticky; top: 64px; }
.result-empty { padding: 40px 24px; border-radius: 22px; background: var(--mist); text-align: center; color: var(--ink-soft); }

/* ---------- Carte de résultat ---------- */

.result { background: var(--paper); border-radius: 22px; padding: 24px; text-align: left; }
.workspace-result .result { background: var(--mist); }
.result-place { font-size: 13px; color: var(--ink-soft); }
.result-title { margin-top: 2px; font-size: 25px; font-weight: 600; letter-spacing: -.026em; line-height: 1.1; }
.result-note { margin-top: 4px; font-size: 14px; color: var(--ink-soft); }
.result-main { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.result-figure { font-size: 42px; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.result-caption { font-size: 13px; color: var(--ink-soft); }

.split { display: flex; gap: 2px; height: 8px; margin-top: 16px; }
.split i { display: block; min-width: 0; flex: 0 1 0; transition: flex-grow .7s var(--ease); }
.split i:first-child { border-radius: 5px 0 0 5px; }
.split i:last-child { border-radius: 0 5px 5px 0; }
.split-charges, .dot-charges { background: var(--part-charges); }
.split-credit, .dot-credit { background: var(--part-credit); }
.split-rest, .dot-rest { background: var(--part-rest); }
[data-deficit] .split-rest, [data-deficit] .dot-rest { background: var(--part-deficit); }

.legend { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-soft); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; }
.legend b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(0, 0, 0, .1); }
.stats dt { font-size: 12px; color: var(--ink-soft); }
.stats dd { margin-top: 2px; font-size: 17px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.result-warning { margin-top: 12px; font-size: 13px; color: #b3000f; }

/* ---------- Pied de page ---------- */

.footer { background: var(--mist); padding: 28px var(--gutter) 40px; font-size: 12px; line-height: 1.5; color: var(--ink-soft); }
.footer p { max-width: 960px; margin: 0 auto 8px; }

/* ---------- Apparition au défilement ---------- */

.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Petits écrans ---------- */

@media (max-width: 860px) {
  .how-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .stage-card { height: 500px; }
  .stage-ad { padding: 20px; font-size: 13px; }

  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-visual { max-width: 460px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .workspace-result { position: static; }
}

@media (max-width: 620px) {
  .nav nav a:not(.nav-cta, .nav-compte) { display: none; }
  .nav nav { gap: 14px; }
  .preuves dl { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .offres { grid-template-columns: minmax(0, 1fr); }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .tile { min-height: 200px; padding: 22px; }
  .result { padding: 20px; }
  .result-title { font-size: 22px; }
  .result-figure { font-size: 36px; }
  .stats dd { font-size: 15px; }
  .input input, .input select, .paste textarea, .hero-paste textarea { font-size: 16px; } /* sous 16 px, iOS zoome sur le champ */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rise, .js .reveal { opacity: 1; transform: none; }
  .js #statement-text span { opacity: 1; }
}

/* ---------- Détails de l'outil ---------- */

.skip {
  position: fixed; top: 8px; left: 8px; z-index: 30;
  padding: 8px 14px; border-radius: 980px; background: var(--ink); color: #fff; font-size: 14px;
  transform: translateY(-60px);
}
.skip:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.workspace { scroll-margin-top: 64px; }
.hint { min-height: 18px; margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--ink-soft); }
.tranche { margin: 14px 0 0; padding: 0; border: 0; min-width: 0; }
.tranche legend { padding: 0; margin-bottom: 4px; font-size: 13px; color: var(--ink-soft); }
.segmented-5 { grid-template-columns: repeat(5, 1fr); }
.segmented-6 { grid-template-columns: repeat(6, 1fr); }
.segmented-8 { grid-template-columns: repeat(8, 1fr); }
.segmented-8 span { padding: 6px 2px; }
#champ-dpe { margin-top: 0; }
.bloc-lecture { margin-top: 16px; font-size: 15px; line-height: 1.5; }
.leviers { margin-top: 12px; font-size: 15px; line-height: 1.5; }
.leviers:empty { display: none; }
.leviers li { padding: 10px 0; border-top: 1px solid rgba(0, 0, 0, .08); }
.leviers li:last-child { border-bottom: 1px solid rgba(0, 0, 0, .08); }
.more > .hint { margin: 4px 0 8px; }
.segmented label { position: relative; min-width: 0; }

.more summary { list-style: none; display: flex; align-items: center; gap: 8px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after {
  content: ""; width: 7px; height: 7px; margin-top: -3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform .3s var(--ease);
}
.more[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.more[open] .field-grid { animation: rise .5s var(--ease) both; }

.location { margin-top: 8px; }
.field[hidden] { display: none; }
.legal { max-width: 620px; margin: 0 auto; padding: 96px var(--gutter) 72px; }
.legal h1 { margin: 0 0 24px; font-size: clamp(28px, 4vw, 36px); line-height: 1.1; letter-spacing: -.02em; }
.legal h2 { margin: 28px 0 6px; font-size: 17px; }
.legal p { margin: 0 0 12px; color: var(--ink-soft); }
.legal a { color: var(--blue-text); }
.legal .modele { padding: 14px 16px; border-radius: 12px; background: var(--mist); font-size: 14px; line-height: 1.7; }
.legal mark { padding: 0 4px; border-radius: 4px; background: #fff3c4; color: var(--ink); }
.result-market { margin-top: 10px; font-size: 13px; line-height: 1.4; color: var(--ink-soft); }

.noscript { max-width: 620px; margin: 24px auto 0; text-align: center; color: var(--ink-soft); }

@media (max-width: 360px) {
  .field label { font-size: 13px; white-space: nowrap; }
}

.stats > div { display: flex; flex-direction: column; justify-content: space-between; }

/* ---------- Accueil : preuves, tarifs, questions ---------- */

.preuves { padding: 28px var(--gutter); border-block: 1px solid rgba(0, 0, 0, .08); }
.preuves dl { max-width: 960px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.preuves div { display: flex; flex-direction: column-reverse; }
.preuves dt { font-size: 13px; color: var(--ink-soft); }
.preuves dd { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }

.section-head { text-align: center; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 52px); }
.section-head p { margin-top: 10px; font-size: 17px; color: var(--ink-soft); }

.tarifs { padding: 88px var(--gutter); background: var(--paper); }
.offres { max-width: 1000px; margin: 40px auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tarifs-note { max-width: 560px; margin: 20px auto 0; text-align: center; font-size: 13px; color: var(--ink-soft); }
.offre { display: flex; flex-direction: column; padding: 28px; border-radius: 22px; background: var(--mist); }
.offre h3 { font-size: 17px; font-weight: 600; }
.offre-prix { margin-top: 10px; font-size: 38px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.offre-prix small { font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--ink-soft); }
.offre-detail { margin-top: 4px; font-size: 13px; color: var(--ink-soft); }
.offre ul { margin: 20px 0 24px; flex: 1; font-size: 14px; }
.offre li { padding: 6px 0; border-top: 1px solid rgba(0, 0, 0, .08); }
.offre .btn { text-align: center; }
.btn-bientot { opacity: .55; cursor: default; pointer-events: none; }
.offre-pro { background: var(--night-card); color: #fff; }
.offre-pro .offre-prix small, .offre-pro .offre-detail { color: #a1a1a6; }
.offre-pro li { border-color: rgba(255, 255, 255, .14); }
@media (max-width: 860px) {
  .offres { max-width: 440px; grid-template-columns: minmax(0, 1fr); }
}
.btn-secondaire { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-secondaire:hover { background: var(--paper); box-shadow: inset 0 0 0 1px var(--ink-soft); }
.btn-plein { display: block; width: 100%; }

.faq { padding: 96px var(--gutter); background: var(--mist); }
.faq h2 { max-width: 620px; margin: 0 auto 24px; font-size: clamp(26px, 3vw, 36px); }
.faq details { max-width: 620px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq summary { padding: 14px 0; font-weight: 500; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-soft); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 16px; color: var(--ink-soft); }

.appel { padding: 96px var(--gutter); background: var(--night); color: #fff; text-align: center; }
.appel h2 { margin-bottom: 24px; font-size: clamp(26px, 3.6vw, 42px); line-height: 1.15; }

.footer a { text-decoration: underline; }

/* ---------- Connexion et compte ---------- */

.espace { max-width: 620px; min-height: 100vh; margin: 0 auto; padding: 96px var(--gutter) 64px; }
.espace-etroit { max-width: 420px; }
.espace h1 { margin-bottom: 24px; font-size: clamp(28px, 3.6vw, 36px); }
.sso { display: grid; gap: 10px; }
.sso-bouton {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
  font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color .2s;
}
.sso-bouton:hover { border-color: var(--ink-soft); }
.separateur { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-size: 13px; color: var(--ink-soft); }
.separateur::before, .separateur::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
#connexion { display: grid; gap: 12px; }
.petit { justify-self: start; font-size: 13px; }
.erreur { min-height: 18px; font-size: 13px; color: #b3000f; }
.bascule { margin-top: 18px; font-size: 14px; text-align: center; color: var(--ink-soft); }
.bascule .link-button { font-size: 14px; }
.demo { margin-top: 28px; padding: 12px 14px; border-radius: 10px; background: var(--mist); font-size: 12px; line-height: 1.45; color: var(--ink-soft); }
.infos div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid rgba(0, 0, 0, .08); }
.infos dt { color: var(--ink-soft); }
.infos dd { min-width: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.carte-pro { margin-top: 20px; padding: 24px; border-radius: 22px; background: var(--mist); }

/* Parrainage */
.invitation {
  position: fixed; left: 50%; bottom: 16px; z-index: 30; transform: translateX(-50%);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px;
  width: max-content; max-width: calc(100% - 32px); margin: 0; padding: 10px 18px; border-radius: 22px;
  background: var(--ink); color: #fff; font-size: 14px; line-height: 1.4; text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
}
.invitation a { color: #2997ff; font-weight: 500; }
.invitation button { padding: 0; border: 0; background: none; color: #a1a1a6; font: inherit; cursor: pointer; }
.parrainage-code { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; }
.parrainage-code .code {
  font: 600 26px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .14em; color: var(--ink);
}
.parrainage-code .boutons { display: flex; gap: 8px; }
.parrainage-code .btn { padding: 8px 16px; font-size: 14px; }
#parrainage-regles { font-size: 14px; line-height: 1.5; }
#parrainage-bilan { margin-top: 14px; }
#parrainage-saisie { margin-top: 18px; }
#parrainage-bilan[hidden], #parrainage-saisie[hidden], #champ-parrain[hidden] { display: none; }
.carte-pro[hidden], .segmented[hidden] { display: none; }
.carte-pro h2 { font-size: 21px; letter-spacing: -.02em; }
.carte-pro p { margin: 6px 0 14px; font-size: 14px; color: var(--ink-soft); }
.carte-pro .segmented { background: var(--paper); margin-bottom: 10px; }
.carte-pro .segmented input:checked + span { background: var(--mist); }
#gerer-pro { margin-top: 16px; }
#gerer-pro .link-button, #deconnexion { font-size: 14px; }
.espace-titre { margin-top: 36px; font-size: 21px; letter-spacing: -.02em; }
.historique { margin: 8px 0 28px; font-size: 14px; }
.historique li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 10px 0; border-top: 1px solid rgba(0, 0, 0, .08); }
.historique li span:nth-child(2) { grid-row: 2; font-size: 12px; color: var(--ink-soft); }
.historique b { grid-row: 1 / 3; grid-column: 2; align-self: center; font-weight: 500; }

/* ---------- Risque et graphiques ---------- */

.risque { padding: 88px var(--gutter); background: var(--mist); }
.risque .section-head p { max-width: 560px; margin-inline: auto; }
.risque-carte { max-width: 960px; margin: 32px auto 0; padding: 24px; border-radius: 22px; background: var(--paper); }
.risque-entete { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-bottom: 12px; }
.risque-entete h3 { font-size: 17px; font-weight: 600; letter-spacing: -.016em; }
.risque-entete p { font-size: 13px; color: var(--ink-soft); }
.risque-entete .legend { margin-top: 2px; }

.graphique { position: relative; min-height: 260px; margin-top: 8px; touch-action: pan-y; }
.courbe { display: block; }
.courbe .grille { stroke: rgba(0, 0, 0, .07); }
.courbe .axe-zero { stroke: rgba(0, 0, 0, .35); }
.courbe .etiquette { fill: var(--ink-soft); font-size: 11px; }
.courbe .ligne { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.courbe .ligne-bleue { stroke: var(--part-credit); }
.courbe .bande { fill: var(--part-credit); fill-opacity: .14; }
.courbe .repere { stroke: var(--ink-soft); stroke-dasharray: 3 3; }
.courbe .point { fill: var(--part-credit); stroke: var(--paper); stroke-width: 2; }
.bulle {
  position: absolute; top: 8px; z-index: 2; display: grid; gap: 1px; padding: 8px 10px; border-radius: 10px;
  background: var(--ink); color: #fff; font-size: 12px; line-height: 1.35; white-space: nowrap; pointer-events: none;
}
.bulle[hidden] { display: none; }
.bulle b { font-weight: 600; }
.pastille-ligne { width: 14px !important; height: 2px !important; border-radius: 1px !important; background: var(--part-credit); }
.pastille-bande { width: 14px !important; height: 10px !important; border-radius: 3px !important; background: rgba(0, 113, 227, .16); }

.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-top: 16px; }
.chiffres div { display: flex; flex-direction: column; }
.chiffres dt { order: 2; font-size: 13px; color: var(--ink-soft); }
.chiffres dd { order: 1; font-size: 25px; font-weight: 600; letter-spacing: -.026em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.chiffres .hint { order: 3; min-height: 0; margin-top: 0; }

.approfondi { max-width: 960px; margin: 40px auto 0; display: grid; gap: 16px; }
.approfondi[hidden], #pro-contenu[hidden], .bloc[hidden] { display: none; }
#pro-contenu { display: grid; gap: 16px; min-width: 0; }
.bloc { min-width: 0; padding: 24px; border-radius: 22px; background: var(--mist); }
.bloc h2 { font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -.024em; line-height: 1.12; }
.bloc-titre { margin-top: 24px; font-size: 14px; font-weight: 600; }
.bloc-note { margin-top: 6px; font-size: 14px; color: var(--ink-soft); }
.bloc .legend { margin-top: 16px; }
.bloc .courbe .point { stroke: var(--mist); }
.bloc .infos { margin-top: 16px; font-size: 14px; }
.bloc.more { margin-top: 0; border: 0; padding-top: 24px; }
.bloc-offre { text-align: center; background: var(--night-card); color: #fff; }
.bloc-offre p { max-width: 460px; margin: 8px auto 16px; color: #a1a1a6; }

.sensibilites { margin-top: 12px; }
.sensibilites li { display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr); gap: 12px; align-items: center; padding: 7px 0; font-size: 13px; }
.sens-barres { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.sens-moitie { position: relative; display: flex; align-items: center; gap: 6px; height: 18px; font-variant-numeric: tabular-nums; }
.sens-moitie i { display: block; height: 10px; flex: none; transition: width .5s var(--ease); }
.sens-moitie span { flex: none; font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.sens-bas { flex-direction: row-reverse; }
.sens-bas i { background: var(--part-charges); border-radius: 4px 0 0 4px; }
.sens-haut i { background: var(--part-credit); border-radius: 0 4px 4px 0; }
.sens-moitie i { max-width: calc(100% - 52px); }

.tableau { margin-top: 12px; overflow-x: auto; }
.tableau table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tableau th, .tableau td { padding: 6px 10px; text-align: right; font-weight: 400; }
.tableau thead th { color: var(--ink-soft); }
.tableau tbody tr { border-top: 1px solid rgba(0, 0, 0, .08); }
.tableau th:first-child { text-align: left; }

.pile { display: grid; gap: 12px; margin-top: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; }
.actions .link-button { font-size: 14px; }
.case { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; font-size: 13px; color: var(--ink-soft); cursor: pointer; }
.case input { flex: none; margin-top: 3px; }
.petit-texte { font-size: 12px; color: var(--ink-soft); }
.petit-texte a { color: var(--blue-text); }
.btn-danger { background: var(--part-deficit); }
.btn-danger:hover { background: #b3000f; }
.btn[disabled] { opacity: .6; cursor: default; }
.historique li a { color: var(--blue-text); }
.historique .link-button { grid-column: 2; justify-self: end; }
.sso[hidden], .separateur[hidden], .sso-bouton[hidden], .case[hidden] { display: none; }
#changement { margin-top: 28px; }
#lettre { margin-top: 3px; }
.espace-titre + .case { margin-top: 10px; }

@media (max-width: 620px) {
  .preuves dl { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .offres { grid-template-columns: minmax(0, 1fr); }
  .stage-card { height: 560px; }
  .sensibilites li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .chiffres dd { font-size: 21px; }
  .bloc, .risque-carte { padding: 18px; }
}
