/* Combien je touche — feuille de style commune.
   Layout : bandeau de navigation, colonne de lecture large ; sur les outils, formulaire à gauche et « bulletin » de résultat à droite. */
:root{
  --paper:#f5f7fa; --sheet:#ffffff; --ink:#18233a; --muted:#5b6780; --line:#d9dfe9;
  --accent:#1f4fd1; --accent-soft:#e7edfc; --good:#127a52; --good-soft:#e3f4ec; --warn:#8a5a00; --warn-soft:#fff4dc;
  --display:"Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body:"Public Sans", "Segoe UI", system-ui, sans-serif;
  --mono:"IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --paper:#0f1522; --sheet:#172034; --ink:#e6ebf5; --muted:#9aa6bf; --line:#2a3550;
  --accent:#7d9dff; --accent-soft:#1f2b4d; --good:#4fcf98; --good-soft:#15302a; --warn:#f2c46b; --warn-soft:#33290f; color-scheme:dark}}
:root[data-theme="dark"]{
  --paper:#0f1522; --sheet:#172034; --ink:#e6ebf5; --muted:#9aa6bf; --line:#2a3550;
  --accent:#7d9dff; --accent-soft:#1f2b4d; --good:#4fcf98; --good-soft:#15302a; --warn:#f2c46b; --warn-soft:#33290f; color-scheme:dark}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--body);font-size:16px;line-height:1.55;
  padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
img{max-width:100%}
[hidden]{display:none!important}
a{color:var(--accent)}
a:focus-visible,button:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
p{margin:0}
h1{font-family:var(--display);font-weight:800;font-size:clamp(30px,5vw,46px);line-height:1.05;margin:0;text-wrap:balance}
h2{font-family:var(--display);font-weight:600;font-size:24px;line-height:1.2;margin:0;text-wrap:balance}
h3{font-size:17px;margin:0;font-weight:600}

/* Bandeau */
.topbar{max-width:1080px;margin:0 auto;padding-block:18px;display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;border-bottom:1px solid var(--line)}
.logo{font-family:var(--display);font-weight:800;font-size:22px;color:var(--ink);text-decoration:none;display:flex;align-items:center;gap:8px}
.logo-mark{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:8px;background:var(--accent);color:var(--sheet);font-family:var(--mono);font-size:15px;font-weight:500}
.topnav{display:flex;gap:18px;flex-wrap:wrap;font-size:15px}
.topnav a{color:var(--muted);text-decoration:none}
.topnav a:hover,.topnav a[aria-current="page"]{color:var(--ink)}

.wrap{max-width:1080px;margin:0 auto;padding-block:32px 64px;display:flex;flex-direction:column;gap:48px}
.page-head{display:flex;flex-direction:column;gap:10px;max-width:70ch}
.crumbs{font-size:13.5px;color:var(--muted)}
.crumbs a{color:var(--muted)}
.eyebrow{font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent)}
.lede{color:var(--muted);font-size:17px}
.hint{font-size:13.5px;color:var(--muted)}

/* Outils */
.tool{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:28px;align-items:start}
@media (max-width:860px){.tool{grid-template-columns:minmax(0,1fr)}}
.tool>*{min-width:0}
.result{display:flex;flex-direction:column;gap:16px;position:sticky;top:max(16px,env(safe-area-inset-top,0px))}
@media (max-width:860px){.result{position:static}}
form{display:flex;flex-direction:column;gap:22px}
fieldset{border:0;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;min-width:0}
legend{font-weight:600;padding:0;margin-bottom:10px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chips input{position:absolute;opacity:0;pointer-events:none}
.chips label{border:1.5px solid var(--line);background:var(--sheet);border-radius:999px;padding:8px 14px;cursor:pointer;font-size:15px;transition:border-color .15s,background .15s}
.chips label:hover{border-color:var(--accent)}
.chips input:checked+label{border-color:var(--accent);background:var(--accent-soft);color:var(--accent);font-weight:600}
.chips input:focus-visible+label{outline:2px solid var(--accent);outline-offset:2px}
select{appearance:none;-webkit-appearance:none;border:1.5px solid var(--line);background-color:var(--sheet);color:var(--ink);border-radius:10px;padding:10px 36px 10px 12px;font:inherit;max-width:100%;
  background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);
  background-position:calc(100% - 18px) 55%,calc(100% - 13px) 55%;background-size:5px 5px;background-repeat:no-repeat}
select:focus{outline:none;border-color:var(--accent)}
.field{display:flex;align-items:center;gap:8px;border:1.5px solid var(--line);background:var(--sheet);border-radius:10px;padding:0 12px;max-width:260px}
.field:focus-within{border-color:var(--accent)}
.field input{border:0;background:transparent;color:var(--ink);font:500 17px var(--mono);padding:10px 0;width:100%;min-width:0;outline:none}
.field span{color:var(--muted);font-family:var(--mono);white-space:nowrap}
.row{display:flex;gap:12px;flex-wrap:wrap}
.check{display:flex;gap:10px;align-items:flex-start;cursor:pointer}
.check input{margin-top:4px;width:18px;height:18px;accent-color:var(--accent);flex:none}
.check>span{display:flex;flex-direction:column;gap:2px}
.linkbtn{background:none;border:0;color:var(--accent);font:inherit;font-size:13.5px;padding:0;cursor:pointer;text-decoration:underline;align-self:flex-start}
.callout{background:var(--warn-soft);color:var(--ink);border-radius:10px;padding:12px 14px;font-size:14px;display:flex;flex-direction:column;gap:4px}
.callout b{color:var(--warn)}
details.more{border:1.5px dashed var(--line);border-radius:10px;padding:12px 14px}
details.more>summary{cursor:pointer;font-weight:600;list-style:none;display:flex;justify-content:space-between;gap:12px}
details.more>summary::-webkit-details-marker{display:none}
details.more>summary::after{content:"+";font-family:var(--mono);color:var(--accent)}
details.more[open]>summary::after{content:"–"}
details.more .inner{display:flex;flex-direction:column;gap:20px;margin-top:16px}

/* Bulletin de résultat */
.slip{background:var(--sheet);border:1px solid var(--line);border-radius:6px;box-shadow:0 1px 0 var(--line),0 12px 30px -18px rgba(24,35,58,.35);overflow:hidden}
.slip-head{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 20px;border-bottom:1px dashed var(--line);font-family:var(--mono);font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.net{padding:20px;display:flex;flex-direction:column;gap:4px;background:var(--good-soft)}
.net .label{font-size:14px;color:var(--good);font-weight:600}
.net .amount{font-family:var(--display);font-weight:800;font-size:clamp(38px,7vw,52px);line-height:1;color:var(--ink);font-variant-numeric:tabular-nums}
.net .sub{font-size:14px;color:var(--muted)}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));border-bottom:1px solid var(--line)}
.kpi{padding:14px 20px;display:flex;flex-direction:column;gap:2px;border-top:1px solid var(--line)}
.kpi span{font-size:12.5px;color:var(--muted)}
.kpi strong{font-family:var(--mono);font-weight:500;font-size:17px;font-variant-numeric:tabular-nums}
.tablewrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:14px}
th,td{padding:9px 20px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}
th{font-family:var(--mono);font-size:11.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:500}
td.num,th.num{text-align:right;font-family:var(--mono);font-variant-numeric:tabular-nums;white-space:nowrap}
tr.total td{font-weight:600;border-bottom:0}
tr.muted td{color:var(--muted)}
.slip-foot{padding:14px 20px;font-size:13px;color:var(--muted);border-top:1px dashed var(--line)}
.steps{background:var(--sheet);border:1px solid var(--line);border-radius:6px;padding:16px 20px;display:flex;flex-direction:column;gap:10px}
.steps ol{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;font-size:14.5px}
.steps li strong{font-family:var(--mono);font-weight:500}
.meter{height:10px;border-radius:999px;background:var(--line);overflow:hidden}
.meter i{display:block;height:100%;background:var(--accent);border-radius:999px}

/* Sections de contenu */
section{display:flex;flex-direction:column;gap:16px;min-width:0}
.prose{max-width:72ch;display:flex;flex-direction:column;gap:12px}
.prose ul,.prose ol{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px}
.grid-table{background:var(--sheet);border:1px solid var(--line);border-radius:6px}
.grid-table td.num.hl{color:var(--accent);font-weight:600;background:var(--accent-soft)}
.faq{display:flex;flex-direction:column;max-width:72ch;border-top:1px solid var(--line)}
.faq details{border-bottom:1px solid var(--line);padding:14px 0}
.faq summary{cursor:pointer;font-weight:600;list-style:none;display:flex;justify-content:space-between;gap:12px}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";font-family:var(--mono);color:var(--accent)}
.faq details[open] summary::after{content:"–"}
.faq details p{margin-top:10px;color:var(--muted)}
.note{max-width:72ch;font-size:13.5px;color:var(--muted);display:flex;flex-direction:column;gap:6px}

/* Accueil */
.hero{display:flex;flex-direction:column;gap:14px;max-width:62ch;padding-top:16px}
.hero h1{font-size:clamp(34px,6vw,58px)}
.group{display:flex;flex-direction:column;gap:14px}
.group-title{font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}
.card{background:var(--sheet);border:1px solid var(--line);border-radius:10px;padding:18px;display:flex;flex-direction:column;gap:8px;text-decoration:none;color:var(--ink);transition:border-color .15s,transform .15s}
.card:hover{border-color:var(--accent);transform:translateY(-2px)}
.card .figure{font-family:var(--mono);font-size:13px;color:var(--accent)}
.card h3{font-family:var(--display);font-size:20px;font-weight:600}
.card p{font-size:14.5px;color:var(--muted)}
.soon{display:flex;flex-wrap:wrap;gap:8px}
.soon span{border:1px dashed var(--line);border-radius:999px;padding:6px 12px;font-size:14px;color:var(--muted)}
.related{display:flex;flex-wrap:wrap;gap:10px}
.related a{border:1.5px solid var(--line);background:var(--sheet);border-radius:999px;padding:8px 14px;text-decoration:none;color:var(--ink);font-size:15px}
.related a:hover{border-color:var(--accent)}

/* Pied de page */
.footer{max-width:1080px;margin:0 auto;padding-block:28px 40px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;font-size:14px;color:var(--muted)}
.footer nav{display:flex;gap:16px;flex-wrap:wrap}
.footer a{color:var(--muted)}

@media (prefers-reduced-motion:reduce){*{transition:none!important}.card:hover{transform:none}}
