/* Paie Juste v2 — feuille de style unique (aucune police ni ressource externe) */
:root {
  --ink: #0f172a; --ink-2: #334155; --muted: #475569; --faint: #64748b;
  --bg: #f6f8fb; --card: #ffffff; --line: #e2e8f0; --line-2: #cbd5e1;
  --brand: #1d4ed8; --brand-ink: #1e3a8a; --brand-soft: #eaf0ff; --navy: #0b1b3a; --navy-2: #12306b;
  --ok: #047857; --ok-bg: #ecfdf5; --ok-line: #a7f3d0;
  --bad: #b91c1c; --bad-bg: #fef2f2; --bad-line: #fecaca;
  --warn: #92400e; --warn-bg: #fffbeb; --warn-line: #fde68a;
  --info: #1e40af; --info-bg: #eff6ff; --info-line: #bfdbfe;
  --r: 14px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); }
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-ink); }
:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 8px; z-index: 100; box-shadow: var(--shadow); }
.skip:focus { left: 8px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.num { font-variant-numeric: tabular-nums; }

/* en-tête */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; min-width: 44px; text-decoration: none; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--navy-2)); display: grid; place-items: center; }
.brand-mark svg { width: 20px; height: 20px; }
.nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 10px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
@media (max-width: 560px) { .nav a { padding: 10px 8px; font-size: .88rem; } .brand span:not(.brand-mark) { display: none; } }

/* héro */
.hero { background: radial-gradient(1100px 420px at 85% -10%, rgba(59,130,246,.35), transparent 60%), linear-gradient(160deg, var(--navy), var(--navy-2)); color: #fff; padding: 56px 0 72px; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3.1rem); line-height: 1.1; letter-spacing: -.03em; margin: 12px 0 16px; max-width: 18ch; }
.hero p.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: #dbe5ff; max-width: 60ch; margin: 0 0 24px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #bcd0ff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); padding: 5px 12px; border-radius: 99px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.trust { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: #dbe5ff; font-size: .95rem; }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; flex: none; color: #86efac; }

/* boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: 600 1rem var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { background: #f1f5f9; color: var(--ink); }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
.btn-on-dark { background: #fff; color: var(--navy); border-color: #fff; }
.btn-on-dark:hover { background: #e0e9ff; color: var(--navy); }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: .92rem; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--brand); }

/* outil */
.tool { margin-top: -40px; position: relative; padding-bottom: 24px; }
.tool-grid { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .tool-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } .results-col { position: sticky; top: 76px; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.card h2, .card h3 { margin: 0 0 4px; letter-spacing: -.01em; }
.card h2 { font-size: 1.15rem; }
.step-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-ink); font-size: .85rem; font-weight: 700; margin-right: 8px; }
.card .sub { color: var(--muted); font-size: .92rem; margin: 0 0 14px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
label, .lbl { display: block; font-weight: 600; font-size: .93rem; margin: 0 0 6px; color: var(--ink); }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; margin-top: 4px; }
.row { display: grid; gap: 14px; grid-template-columns: 1fr; margin-bottom: 14px; }
@media (min-width: 520px) { .row.two { grid-template-columns: 1fr 1fr; } .row.three { grid-template-columns: 1fr 1fr 1fr; } }
input[type="text"], select, textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--ink); font: 1rem var(--font); }
input[type="text"]:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 3px solid rgba(29,78,216,.25); outline-offset: 0; }
input[aria-invalid="true"] { border-color: var(--bad); background: var(--bad-bg); }
.field-err { color: var(--bad); font-size: .85rem; margin-top: 4px; }
.unit { position: relative; }
.unit input { padding-right: 52px; }
.unit::after { content: attr(data-unit); position: absolute; right: 14px; top: 13px; color: var(--faint); font-size: .95rem; pointer-events: none; }
.unit.has-label::after { top: 39px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 10px; cursor: pointer; font-weight: 600; font-size: .95rem; color: var(--ink-2); background: #fff; border-right: 1px solid var(--line-2); text-align: center; }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--brand); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid #f59e0b; outline-offset: -3px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; font-weight: 500; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.check small { display: block; color: var(--muted); font-weight: 400; font-size: .85rem; }
.weeks { display: grid; gap: 10px; margin-bottom: 10px; }
.week { display: grid; grid-template-columns: 1fr 92px; gap: 8px; align-items: end; }
.week .unit { margin: 0; }
.week .unit.has-label::after { top: 39px; }
.sub-block { border-left: 3px solid var(--brand-soft); padding-left: 14px; margin: 6px 0 14px; }
details.more { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
details.more > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; color: var(--brand-ink); list-style-position: inside; }

/* résultats */
.res-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.big { font-size: clamp(2rem, 6vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); }
.verdict { border-radius: 12px; padding: 14px 16px; margin: 14px 0; border: 1px solid; }
.verdict strong { display: block; font-size: 1.05rem; margin-bottom: 2px; }
.verdict.ok { background: var(--ok-bg); border-color: var(--ok-line); color: #064e3b; }
.verdict.bad { background: var(--bad-bg); border-color: var(--bad-line); color: #7f1d1d; }
.verdict.warn { background: var(--warn-bg); border-color: var(--warn-line); color: #78350f; }
.verdict.info { background: var(--info-bg); border-color: var(--info-line); color: #1e3a8a; }
.verdict p { margin: 4px 0 0; font-size: .92rem; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
caption { text-align: left; font-weight: 700; padding: 10px 0 6px; }
th, td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .82rem; }
td.r, th.r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.total td, tr.total th { font-weight: 800; border-top: 2px solid var(--ink); border-bottom: 0; color: var(--ink); font-size: 1rem; }
td small { display: block; color: var(--muted); }
.neg { color: var(--ok); }
.table-scroll { overflow-x: auto; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.legal { font-size: .83rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.empty { text-align: center; color: var(--muted); padding: 28px 8px; }
.errs { margin: 0; padding-left: 20px; color: var(--bad); }
.sticky-bar { display: none; }
@media (max-width: 959px) {
  .sticky-bar { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; align-items: center; justify-content: space-between; gap: 12px; background: var(--navy); color: #fff; border-radius: 14px; padding: 10px 14px; box-shadow: 0 8px 28px rgba(15,23,42,.35); text-decoration: none; min-height: 52px; }
  .sticky-bar:hover { color: #fff; }
  .sticky-bar b { font-size: 1.1rem; }
  body.has-bar { padding-bottom: 80px; }
}

/* sections de contenu */
.section { padding: 56px 0; }
.section.alt { background: #fff; border-block: 1px solid var(--line); }
.section h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); letter-spacing: -.02em; margin: 0 0 12px; line-height: 1.2; }
.section p.lead { color: var(--muted); max-width: 65ch; margin-top: 0; }
.cols { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 22px; }
@media (min-width: 760px) { .cols.c3 { grid-template-columns: repeat(3, 1fr); } .cols.c2 { grid-template-columns: repeat(2, 1fr); } }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.section.alt .tile { background: var(--bg); }
.tile h3 { margin: 0 0 6px; font-size: 1.05rem; }
.tile p { margin: 0; color: var(--muted); font-size: .95rem; }
.tile .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); display: grid; place-items: center; margin-bottom: 12px; color: var(--brand); }
.tile .ico svg { width: 22px; height: 22px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; min-height: 52px; display: flex; align-items: center; }
.faq details[open] { padding-bottom: 14px; }
.faq details p { margin: 0 0 8px; color: var(--ink-2); }

/* pages de texte */
.prose { max-width: 760px; padding: 40px 0 64px; }
.prose h1 { font-size: clamp(1.8rem, 4.4vw, 2.5rem); line-height: 1.15; letter-spacing: -.03em; margin: 0 0 12px; }
.prose h2 { font-size: 1.45rem; margin: 40px 0 10px; letter-spacing: -.02em; }
.prose h3 { font-size: 1.1rem; margin: 24px 0 6px; }
.prose p, .prose li { color: var(--ink-2); }
.prose .meta { color: var(--muted); font-size: .9rem; }
.prose table { margin: 12px 0 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.prose th, .prose td { padding: 10px 12px; }
.prose .note { background: var(--info-bg); border: 1px solid var(--info-line); border-radius: 12px; padding: 14px 16px; color: #1e3a8a; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.cta-band { background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #fff; border-radius: var(--r); padding: 28px; margin: 36px 0; }
.cta-band h2 { color: #fff; margin: 0 0 8px; font-size: 1.4rem; }
.cta-band p { color: #dbe5ff; margin: 0 0 16px; }

/* pied de page */
.site-footer { background: var(--navy); color: #cbd5f5; padding: 36px 0 28px; font-size: .92rem; }
.site-footer a { color: #e0e9ff; }
.site-footer .cols { margin-top: 0; }
.site-footer p { margin: 0 0 8px; max-width: 70ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 14px; }

/* dialogue lettre */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(720px, calc(100% - 24px)); box-shadow: 0 24px 80px rgba(15,23,42,.4); }
dialog::backdrop { background: rgba(15,23,42,.55); }
.dlg-in { padding: 20px; }
.dlg-in textarea { min-height: 320px; font: 1rem/1.5 var(--font); resize: vertical; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 60; font-size: .92rem; }
.toast[hidden] { display: none; }
noscript .card { margin: 16px auto; max-width: 640px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
@media print { .site-header, .site-footer, .sticky-bar, .hero, .form-col, .actions, .section { display: none !important; } .tool { margin: 0; } }

.btn-on-dark-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-on-dark-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.actions.tight { margin-top: 0; }
.mt12 { margin-top: 12px; } .mt20 { margin-top: 20px; }
[hidden] { display: none !important; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
