[hidden] { display: none !important; }
:root {
  --ink: #1d2433; --ink-2: #4a5468; --muted: #7a8396;
  --paper: #f7f4ee; --card: #ffffff; --line: #e3ddd2;
  --accent: #1f4e79; --accent-2: #163a5b; --gold: #b08a3e;
  --ok: #2f6b3f; --ok-bg: #edf6ef; --ko: #9b2c2c; --ko-bg: #fbeeee; --warn: #8a5a00; --warn-bg: #fdf5e4;
  --radius: 10px;
  /* Polices système : aucune requête vers un service tiers (pas de transfert d'IP à Google Fonts, RGPD) */
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--sans); }
a { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.9rem; } h3 { font-size: 1.15rem; }
.container { max-width: 1240px; margin: 0 auto; padding: 24px 16px 48px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; background: var(--ink); color: #fff; }
.topbar a { color: #fff; text-decoration: none; margin-left: 18px; }
.brand { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; margin-left: 0 !important; display: flex; align-items: center; gap: 10px; }
.seal { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--ink); font-size: 1rem; }
.pill { background: rgba(255,255,255,.15); padding: 3px 10px; border-radius: 99px; margin-left: 18px; font-size: .85rem; }
.footer { border-top: 1px solid var(--line); padding: 20px 24px; color: var(--muted); font-size: .82rem; max-width: 1240px; margin: 0 auto; }

.btn { display: inline-block; background: var(--accent); color: #fff !important; border: 0; border-radius: 8px; padding: 10px 18px; font: 600 .95rem var(--sans); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--accent-2); }
.btn-small { padding: 6px 12px; font-size: .85rem; }
.btn-ghost { background: transparent; color: var(--accent) !important; border: 1px solid var(--accent); }
.btn-ghost:hover { background: #eaf0f6; }
.btn-danger { background: transparent; color: var(--ko) !important; border: 1px solid #e1b4b4; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.lead { font-size: 1.05rem; color: var(--ink-2); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--gold); font-weight: 600; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; }
.flash-info { background: #eef3f8; border-color: #c9d8e6; }
.flash-success { background: var(--ok-bg); border-color: #bcdcc4; color: var(--ok); }
.flash-error { background: var(--ko-bg); border-color: #e9c1c1; color: var(--ko); }
.flash-warning { background: var(--warn-bg); border-color: #edd8a6; color: var(--warn); }

.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; padding: 30px 0 40px; }
.hero h1 { font-size: 2.7rem; }
.hero-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: 0 20px 40px -24px rgba(29,36,51,.35); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.auth { max-width: 460px; margin: 30px auto; }
label { display: block; font-weight: 500; margin-bottom: 12px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea, input:not([type]) {
  display: block; width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid #cfc8ba; border-radius: 7px; font: inherit; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid #b9cde2; border-color: var(--accent); }
label.check, label.radio { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; }
label.check input, label.radio input { margin-top: 4px; }
.req { color: var(--ko); }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.inline-form { display: flex; gap: 8px; } .inline-form input { margin: 0; min-width: 280px; }
.projects { display: grid; gap: 12px; }
.project { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin: 0; }
.project .actions { display: flex; gap: 8px; } .project .actions form { margin: 0; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; background: #eef1f6; font-size: .75rem; font-weight: 600; margin-right: 6px; }
.tag-paye { background: var(--ok-bg); color: var(--ok); } .tag-genere { background: #eaf0f6; color: var(--accent); }

/* Assistant */
.wizard { display: grid; grid-template-columns: 240px 1fr; gap: 26px; align-items: start; }
.steps { position: sticky; top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.steps ol { list-style: none; padding: 0; margin: 12px 0; counter-reset: s; }
.steps li { counter-increment: s; margin: 2px 0; }
.steps li a { display: flex; gap: 10px; padding: 7px 8px; border-radius: 7px; text-decoration: none; color: var(--ink-2); }
.steps li a::before { content: counter(s); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); font-size: .75rem; flex: none; }
.steps li.done a::before { content: "✓"; background: var(--ok-bg); border-color: #bcdcc4; color: var(--ok); }
.steps li.current a { background: #eaf0f6; color: var(--accent); font-weight: 600; }
.steps li.current a::before { background: var(--accent); color: #fff; border-color: var(--accent); }
.proj-name { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; margin: 0; }
.panel { min-width: 0; }
.wizard-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.section-title { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--accent-2); }
.section-title:first-of-type { margin-top: 0; border: 0; padding-top: 0; }
.field { margin-bottom: 18px; }
.field .label, p.label { font-weight: 600; margin: 0 0 8px; }
.help { color: var(--muted); font-size: .84rem; margin: 4px 0 0; font-weight: 400; }
.legal { color: var(--accent-2); font-size: .8rem; margin: 4px 0 0; font-style: italic; }
.legal::before { content: "⚖ "; font-style: normal; }
.conseil { font-size: .84rem; color: var(--warn); background: var(--warn-bg); padding: 6px 9px; border-radius: 6px; margin: 6px 0 0; }
.conseil::before { content: "Conseil : "; font-weight: 600; }
.note { background: #eef3f8; border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; }
.impact { list-style: none; padding: 0; margin: 6px 0 0; font-size: .84rem; font-weight: 400; }
.impact li { padding-left: 20px; position: relative; margin: 2px 0; }
.impact.ok li::before { content: "✓"; position: absolute; left: 2px; color: var(--ok); font-weight: 700; }
.impact.ko li::before { content: "✗"; position: absolute; left: 2px; color: var(--ko); font-weight: 700; }
.impact.ok li { color: #2b4f35; } .impact.ko li { color: #7a2a2a; }
.impact-box:empty { display: none; } .impact-box { margin-top: 6px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cards.two { grid-template-columns: 1fr 1fr; }
.cards.forms { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.opt-card { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 14px; cursor: pointer; font-weight: 400; margin: 0; background: #fffdf9; transition: border-color .15s, box-shadow .15s; }
.opt-card:hover { border-color: #b9c6d6; }
.opt-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px #cfdcea; background: #fff; }
.opt-card input { margin-top: 4px; flex: none; }
.opt-card .desc { display: block; font-style: normal; color: var(--ink-2); font-size: .88rem; margin-top: 4px; }
.opt-card .facts { display: block; color: var(--muted); margin-top: 6px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 16px; }
.radios label { margin-bottom: 8px; }
.wizard-nav { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.wizard-nav button[name=prev] { margin-right: auto; }

.associe { position: relative; border-left: 4px solid var(--gold); }
.associe legend { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; padding: 0 6px; }
.associe .remove-associe { position: absolute; top: 14px; right: 14px; }
.associe h4 { margin-top: 10px; color: var(--accent-2); }
.row { display: flex; gap: 12px; flex-wrap: wrap; } .row > label { flex: 1 1 180px; }
.row > label.xs { flex: 0 1 120px; } .row > label.wide { flex: 2 1 320px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.table tfoot th { border-top: 2px solid var(--ink); }
.table tr.me td { background: #eaf0f6; font-weight: 600; }

.analyse { border-top: 4px solid var(--accent); background: #fbfcfe; margin-top: 18px; }
.powers { list-style: none; padding: 0; margin: 12px 0; }
.powers li { padding: 8px 10px 8px 34px; border-radius: 7px; margin-bottom: 6px; position: relative; font-size: .92rem; }
.powers li::before { position: absolute; left: 11px; top: 8px; font-weight: 700; }
.powers .ok { background: var(--ok-bg); } .powers .ok::before { content: "✓"; color: var(--ok); }
.powers .ko { background: var(--ko-bg); } .powers .ko::before { content: "✗"; color: var(--ko); }
.alert-line { background: var(--warn-bg); border-left: 3px solid #d9a441; padding: 8px 12px; border-radius: 6px; font-size: .9rem; }
.err-line { background: var(--ko-bg); border-left: 3px solid var(--ko); padding: 8px 12px; border-radius: 6px; font-size: .9rem; }
.ok-line { background: var(--ok-bg); border-left: 3px solid var(--ok); padding: 8px 12px; border-radius: 6px; }
.recap-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 18px; }
.dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; margin: 0; } .dl dt { color: var(--muted); } .dl dd { margin: 0; }
.doc-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.disclaimer { border-left: 4px solid var(--warn); }
.aide-form { margin-top: 18px; } .aide-form label { max-width: 520px; }
.reco { margin-top: 14px; display: grid; gap: 10px; }
.reco-item { border: 1px solid var(--line); border-radius: 8px; padding: 12px; } .reco-item.best { border-color: var(--ok); background: var(--ok-bg); }
.prose { max-width: 860px; } .prose h2 { margin-top: 1.4em; font-size: 1.2rem; }
.empty { text-align: center; color: var(--muted); }

@media (max-width: 900px) {
  .hero, .grid3, .wizard, .recap-grid, .cards.two { grid-template-columns: 1fr; }
  .steps { position: static; } .project { flex-direction: column; align-items: flex-start; }
  .inline-form { flex-direction: column; width: 100%; } .inline-form input { min-width: 0; }
}

/* Sécurité / formulaires sans JavaScript inline */
.nav-form { display: inline; margin: 0 0 0 18px; }
.linklike { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; }
.topbar .linklike { text-decoration: none; color: #fff; }
.inline-btn { display: inline; margin: 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.danger-zone { border-color: #e9c1c1; }
.btn.btn-danger:hover { background: var(--ko-bg); }
.install { max-width: 900px; }
code { background: #f0ece4; padding: 1px 5px; border-radius: 4px; font-size: .88em; }
button[disabled] { opacity: .5; cursor: not-allowed; }
