:root {
  --brand: #1f5fd6;
  --brand-dark: #184bb0;
  --brand-soft: #e9f0fc;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --text: #191c24;
  --muted: #5d6475;
  --border: #e3e6eb;
  --border-strong: #c9ced8;
  --danger: #d93d3d;
  --ok: #1f8f55;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #4c86f0; --brand-dark: #3a72dc; --brand-soft: #1b2a45;
    --bg: #111318; --surface: #191c23; --surface-2: #22262f; --text: #e9ebf0;
    --muted: #9aa1b2; --border: #2b303b; --border-strong: #3c4352;
    --shadow: none; --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --brand: #4c86f0; --brand-dark: #3a72dc; --brand-soft: #1b2a45;
  --bg: #111318; --surface: #191c23; --surface-2: #22262f; --text: #e9ebf0;
  --muted: #9aa1b2; --border: #2b303b; --border-strong: #3c4352;
  --shadow: none; --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5; font-size: 15px;
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.ui-ico { flex: none; display: inline-block; vertical-align: middle; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1320px; margin: 0 auto; padding: 0 20px; height: 64px;
  display: flex; align-items: center; gap: 28px;
}
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--text); flex: none; }
.logo-word { font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.logo-word b { color: var(--brand); font-weight: 800; }
.nav { display: flex; gap: 2px; flex: 1; }
.nav-item { position: relative; }
.nav-item > button {
  background: none; border: 0; padding: 8px 12px; border-radius: 8px; cursor: pointer;
  font-weight: 600; font-size: 14.5px; color: var(--text); display: inline-flex; align-items: center; gap: 4px;
}
.nav-item > button .ui-ico { opacity: .55; }
.nav-item > button:hover { background: var(--surface-2); }
.dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; min-width: 270px; display: none;
}
.dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown { display: block; }
.dropdown a {
  display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 8px;
  color: var(--text); font-size: 14.5px; font-weight: 500;
}
.dropdown a:hover { background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; display: grid; place-items: center; color: var(--text);
}
.icon-btn:hover { background: var(--surface-2); }
.burger { display: none; }

/* ---------- Icônes d'outils ---------- */
.ico, .mini-ico { display: inline-grid; place-items: center; flex: none; }
.ico svg { width: 62px; height: 62px; display: block; margin-left: -4px; }
.ico-lg svg { width: 84px; height: 84px; margin-left: 0; }
.mini-ico svg { width: 30px; height: 30px; display: block; }

/* ---------- Main ---------- */
main { flex: 1; }
.container { max-width: 1320px; margin: 0 auto; padding: 0 20px; }

.hero { text-align: center; padding: 56px 0 8px; }
.hero h1 { font-size: clamp(28px, 4.2vw, 44px); margin: 0 0 12px; line-height: 1.15; font-weight: 700; letter-spacing: -.025em; }
.hero p { color: var(--muted); font-size: 18px; max-width: 680px; margin: 0 auto; }

.toolbar { display: flex; flex-direction: column; gap: 18px; align-items: center; margin: 30px 0 32px; }
.search {
  display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; width: min(440px, 100%); color: var(--muted);
}
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search input { border: 0; outline: 0; background: transparent; flex: 1; font-size: 15px; color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  border: 1px solid var(--border); background: var(--surface); padding: 9px 20px; border-radius: 999px;
  cursor: pointer; font-size: 15px; font-weight: 500; color: var(--text);
}
.chip:hover { border-color: var(--border-strong); }
.chip.active { background: var(--text); color: var(--surface); border-color: var(--text); }

.grid {
  display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  padding-bottom: 56px;
}
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 26px 28px; cursor: pointer; transition: border-color .15s, box-shadow .15s;
  color: var(--text); display: block; min-height: 230px;
}
.card:hover { border-color: var(--text); }
.card h3 { margin: 18px 0 8px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.badge {
  position: absolute; top: 22px; right: 52px; font-size: 11.5px; font-weight: 600; padding: 2px 9px;
  border-radius: 6px; background: var(--brand-soft); color: var(--brand);
}
.fav {
  position: absolute; top: 18px; right: 16px; border: 0; background: none; cursor: pointer;
  color: var(--border-strong); padding: 4px; opacity: 0; transition: opacity .15s; display: grid;
}
.fav.on { color: #e6a700; opacity: 1; }
.fav.on svg path { fill: currentColor; }
.card:hover .fav { opacity: 1; }
.fav:hover { color: #e6a700; }
.section-title { font-size: 19px; font-weight: 700; margin: 8px 0 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.features { background: var(--surface); border-top: 1px solid var(--border); padding: 64px 0; }
.feat-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.feat-head h2 { margin: 0 0 10px; font-size: 30px; letter-spacing: -.02em; font-weight: 700; }
.feat-head p { margin: 0; color: var(--muted); font-size: 17px; }
.feat-grid { display: grid; gap: 32px 28px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.feat h3 { margin: 14px 0 6px; font-size: 16.5px; font-weight: 600; }
.feat p { margin: 0; color: var(--muted); font-size: 14.5px; }
.feat .em {
  width: 44px; height: 44px; border-radius: 10px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center;
}

/* ---------- Tool page ---------- */
.tool-hero { text-align: center; padding: 56px 0 8px; }
.tool-hero .ico { margin-bottom: 14px; }
.tool-hero h1 { font-size: clamp(28px, 4vw, 42px); margin: 0 0 10px; font-weight: 700; letter-spacing: -.02em; }
.tool-hero p { color: var(--muted); font-size: 18px; max-width: 680px; margin: 0 auto; }
.dropzone {
  margin: 32px auto 64px; max-width: 760px; border: 2px dashed var(--border-strong); border-radius: 16px;
  padding: 52px 20px; text-align: center; background: var(--surface); transition: .15s;
}
.dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); cursor: pointer;
  border-radius: 9px; padding: 10px 16px; font-weight: 600; font-size: 14.5px;
  background: var(--surface); color: var(--text); text-decoration: none;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-big { font-size: 19px; padding: 17px 38px; border-radius: 12px; }
.btn-sm { padding: 7px 12px; font-size: 13.5px; border-radius: 8px; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.dz-hint { color: var(--muted); margin-top: 14px; font-size: 14px; }
.dz-lock { margin-top: 14px; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }

.workspace { display: grid; grid-template-columns: 1fr 360px; min-height: calc(100vh - 64px); }
.ws-main { padding: 24px; overflow: auto; }
.ws-side {
  background: var(--surface); border-left: 1px solid var(--border); padding: 24px;
  display: flex; flex-direction: column; gap: 16px; position: sticky; top: 64px; height: calc(100vh - 64px); overflow: auto;
}
.ws-side h2 { margin: 0 0 4px; font-size: 22px; text-align: center; font-weight: 700; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.ws-side .grow { flex: 1; }
.ws-side .btn-big { width: 100%; }
.ws-top { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.ws-top .spacer { flex: 1; }

.files { display: flex; flex-wrap: wrap; gap: 18px; }
.fcard {
  width: 176px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px;
  position: relative; cursor: grab;
}
.fcard:hover { border-color: var(--border-strong); }
.fcard .thumb {
  height: 210px; border-radius: 6px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden;
}
.fcard .thumb img, .fcard .thumb canvas { max-width: 100%; max-height: 100%; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.fcard .name { font-size: 12.5px; font-weight: 500; margin-top: 8px; word-break: break-all; line-height: 1.3; max-height: 33px; overflow: hidden; }
.fcard .meta { font-size: 11.5px; color: var(--muted); }
.fcard .rm {
  position: absolute; top: -9px; right: -9px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface);
  background: var(--text); color: var(--surface); cursor: pointer; font-weight: 700; display: grid; place-items: center; font-size: 14px; line-height: 1;
}
.fcard .rm:hover { background: var(--danger); color: #fff; }
.fcard .idx {
  position: absolute; top: 16px; left: 16px; background: var(--text); color: var(--surface); border-radius: 6px;
  font-size: 11px; font-weight: 700; padding: 1px 7px;
}
.sortable-ghost { opacity: .35; }

.pages { display: flex; flex-wrap: wrap; gap: 14px; }
.pcard {
  width: 140px; background: var(--surface); border: 2px solid var(--border); border-radius: 10px; padding: 8px;
  position: relative; cursor: pointer; user-select: none; transition: border-color .1s;
}
.pcard:hover { border-color: var(--border-strong); }
.pcard .thumb { height: 170px; display: grid; place-items: center; overflow: hidden; }
.pcard .thumb canvas, .pcard .thumb img { max-width: 100%; max-height: 100%; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform .2s; }
.pcard .num { text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; }
.pcard.sel { border-color: var(--brand); background: var(--brand-soft); }
.pcard .tools { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: .1s; }
.pcard:hover .tools { opacity: 1; }
.pcard .tools button {
  width: 28px; height: 28px; border-radius: 7px; border: 0; background: var(--text); color: var(--surface);
  cursor: pointer; display: grid; place-items: center;
}
.pcard .check {
  position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border-strong);
  background: var(--surface); display: grid; place-items: center; color: transparent;
}
.pcard.sel .check { background: var(--brand); border-color: var(--brand); color: #fff; }
.pcard.blank .thumb { background: #fff; }

/* options */
.opt { display: flex; flex-direction: column; gap: 6px; }
.opt > label, .opt-label { font-weight: 600; font-size: 14px; }
.opt small { color: var(--muted); font-size: 12.5px; }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); outline: 0;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg.wrap { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
.seg button {
  padding: 10px 8px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; font-weight: 600; font-size: 13.5px; line-height: 1.25;
}
.seg button:hover { border-color: var(--border-strong); }
.seg button small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }
.seg button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 150px; }
.pos-grid button { aspect-ratio: 1.3; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; }
.pos-grid button.on { border-color: var(--brand); background: var(--brand); }
.pos-grid button.off { visibility: hidden; }
input[type=range] { accent-color: var(--brand); width: 100%; }
input[type=color] { width: 48px; height: 36px; border: 1px solid var(--border); border-radius: 8px; padding: 2px; background: var(--surface); }
.info { background: var(--surface-2); color: var(--muted); border-radius: 9px; padding: 11px 13px; font-size: 13.5px; line-height: 1.45; }
.info b { color: var(--text); }
.warn { background: #fff6e0; color: #6b4e00; border-radius: 9px; padding: 11px 13px; font-size: 13.5px; line-height: 1.45; }
:root[data-theme="dark"] .warn { background: #33290f; color: #f0d48a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .warn { background: #33290f; color: #f0d48a; } }

/* signature pad */
.sigpad { border: 1px dashed var(--border-strong); border-radius: 9px; background: #fff; width: 100%; height: 150px; touch-action: none; cursor: crosshair; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tabs button { border: 0; background: none; padding: 8px 10px; cursor: pointer; font-weight: 600; border-bottom: 2px solid transparent; color: var(--muted); margin-bottom: -1px; }
.tabs button.on { color: var(--brand); border-color: var(--brand); }

/* page editor */
.editor-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; font-weight: 500; }
.editor-stage { display: flex; justify-content: center; }
.page-wrap { position: relative; box-shadow: 0 2px 12px rgba(16,24,40,.12); background: #fff; line-height: 0; }
.page-wrap canvas { display: block; max-width: 100%; height: auto; }
.layer { position: absolute; inset: 0; }
.layer.drawing { cursor: crosshair; }
.layer.placing { cursor: copy; }
.item { position: absolute; border: 1.5px dashed transparent; cursor: move; line-height: 1.2; }
.item:hover, .item.active { border-color: var(--brand); }
.item img { width: 100%; height: 100%; display: block; pointer-events: none; }
.item .txt { white-space: pre; pointer-events: none; }
.item .h { position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; background: var(--brand); border-radius: 50%; cursor: nwse-resize; display: none; }
.item .x {
  position: absolute; right: -10px; top: -10px; width: 20px; height: 20px; border-radius: 50%; border: 0;
  background: var(--danger); color: #fff; cursor: pointer; font-size: 12px; display: none; line-height: 20px; padding: 0;
}
.item.active .h, .item.active .x, .item:hover .x, .item:hover .h { display: block; }
.toolpick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.toolpick button {
  padding: 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px;
}
.toolpick button.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }

/* progress / result */
.overlay {
  position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 94%, transparent); z-index: 100;
  display: grid; place-items: center;
}
.prog-box { text-align: center; width: min(460px, 90vw); }
.prog-box h2 { margin: 0 0 18px; font-weight: 700; }
.bar { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.bar > div { height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.prog-txt { margin-top: 12px; color: var(--muted); font-size: 14px; }
.spinner {
  width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--border); border-top-color: var(--brand);
  animation: spin .9s linear infinite; margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.result { text-align: center; padding: 56px 20px 72px; max-width: 920px; margin: 0 auto; }
.ok-badge {
  width: 68px; height: 68px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok);
  display: grid; place-items: center; margin: 0 auto 18px;
}
.result h1 { margin: 0 0 8px; font-weight: 700; letter-spacing: -.02em; }
.result .stats { color: var(--muted); margin-bottom: 28px; }
.result .stats b { color: var(--ok); }
.res-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 24px; }
.res-list { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 0 auto 28px; max-width: 640px; }
.res-list .r { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--border); }
.res-list .r:last-child { border-bottom: 0; }
.res-list .r .n { flex: 1; word-break: break-all; font-size: 14px; font-weight: 500; }
.res-list .r .s { color: var(--muted); font-size: 13px; white-space: nowrap; }
.continue { border-top: 1px solid var(--border); margin-top: 32px; padding-top: 8px; }
.continue h3 { margin: 24px 0 16px; font-weight: 700; }
.continue .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); padding: 0; gap: 12px; }
.continue .card { padding: 14px; display: flex; align-items: center; gap: 12px; min-height: 0; text-align: left; }
.continue .card h3 { margin: 0; font-size: 15px; }
.continue .card .ico svg { width: 38px; height: 38px; }
.preview-text {
  text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px;
  max-height: 420px; overflow: auto; white-space: pre-wrap; font-family: ui-monospace, Consolas, monospace; font-size: 13px; line-height: 1.5;
}
.diff-add { background: color-mix(in srgb, var(--ok) 20%, transparent); display: block; }
.diff-del { background: color-mix(in srgb, var(--danger) 20%, transparent); display: block; text-decoration: line-through; }
.diff-page { font-weight: 700; color: var(--brand); display: block; margin-top: 10px; }

/* history */
.hist { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 0; margin-bottom: 40px; }
.hist .r { display: flex; gap: 12px; align-items: center; padding: 8px 16px; font-size: 14px; border-bottom: 1px solid var(--border); }
.hist .r:last-child { border-bottom: 0; }
.hist .r a { font-weight: 600; white-space: nowrap; }
.hist .r span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist .r .t { font-size: 12.5px; margin-left: auto; flex: none; }
.hist .mini-ico svg { width: 24px; height: 24px; }

/* toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--surface);
  padding: 12px 18px; border-radius: 10px; z-index: 200; box-shadow: var(--shadow-lg); font-size: 14px; max-width: 90vw;
}
.toast.err { background: var(--danger); color: #fff; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(10,14,22,.5); z-index: 150; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; padding: 24px; width: min(460px, 100%); box-shadow: var(--shadow-lg); }
.modal h3 { margin: 0 0 14px; font-weight: 700; }
.modal .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.modal .card { min-height: 0; }

/* footer */
.footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(7, 1fr); gap: 28px; padding-top: 48px; padding-bottom: 36px; }
.foot-brand p { margin: 12px 0 0; max-width: 260px; line-height: 1.5; }
.foot-col .foot-h { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text); }
.foot-col a { display: block; color: var(--muted); padding: 3px 0; font-size: 13.5px; }
.foot-col a:hover { color: var(--text); }
.foot-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 18px; padding-bottom: 22px; font-size: 13px; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-legal a { color: var(--muted); }
.foot-legal a:hover { color: var(--text); }

/* ---------- Contenu SEO (sous l'outil) ---------- */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 300; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
body.working .seo-content { display: none; }
.crumbs { font-size: 13.5px; color: var(--muted); padding-top: 8px; padding-bottom: 8px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.seo-block { padding-top: 24px; padding-bottom: 56px; }
.seo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.seo-grid h2, .faq h2, .related h2 { font-size: 24px; font-weight: 700; letter-spacing: -.015em; margin: 0 0 14px; }
.seo-grid p { color: var(--muted); font-size: 16px; line-height: 1.65; margin: 0 0 12px; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding: 2px 0 0 46px; font-size: 16px; min-height: 32px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-weight: 700; display: grid; place-items: center; font-size: 14px;
}
.faq { padding-top: 56px; padding-bottom: 40px; max-width: 860px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  cursor: pointer; padding: 18px 32px 18px 0; font-weight: 600; font-size: 16.5px; list-style: none; position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 22px; font-weight: 400; color: var(--muted); }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0 0 18px; color: var(--muted); line-height: 1.65; }
.related { padding-bottom: 16px; }
.related .grid { padding-bottom: 40px; }

/* ---------- Pages légales ---------- */
.legal { max-width: 860px; padding-top: 24px; padding-bottom: 72px; }
.legal h1 { font-size: clamp(28px, 4vw, 38px); margin: 12px 0 6px; letter-spacing: -.02em; }
.legal-date { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.legal h2 { font-size: 20px; margin: 34px 0 10px; }
.legal p, .legal li { line-height: 1.7; color: var(--text); }
.legal ul { padding-left: 22px; }
.legal-highlight { background: var(--brand-soft); border-radius: 10px; padding: 14px 16px; margin: 18px 0; line-height: 1.6; }
.legal-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14.5px; }
.legal-table th, .legal-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.legal-table th { background: var(--surface-2); }
mark.todo { background: #fff1b8; color: #6b4e00; padding: 1px 4px; border-radius: 4px; }
.notfound { text-align: center; padding-top: 64px; padding-bottom: 72px; }
.nf-code { font-size: 72px; font-weight: 800; color: var(--brand); margin: 0; line-height: 1; }
.notfound .grid { text-align: left; margin: 28px 0 8px; padding-bottom: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .foot-grid { grid-template-columns: repeat(3, 1fr); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); flex-direction: column; padding: 10px; border-bottom: 1px solid var(--border); max-height: calc(100vh - 64px); overflow: auto; }
  .nav.open { display: flex; }
  .nav-item > button { width: 100%; justify-content: space-between; }
  .nav-item:hover .dropdown { display: none; }
  .nav-item.open .dropdown { display: block; position: static; box-shadow: none; border: 0; }
  .burger { display: grid; }
  .workspace { grid-template-columns: 1fr; }
  .ws-side { position: static; height: auto; border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 560px) {
  .header-inner, .container { padding-left: 16px; padding-right: 16px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card { padding: 18px; min-height: 0; }
  .card h3 { font-size: 16px; margin-top: 12px; }
  .card p { display: none; }
  .ico svg { width: 44px; height: 44px; }
  .fcard { width: calc(50% - 9px); }
  .pcard { width: calc(50% - 7px); }
  .btn-big { width: 100%; }
  .badge { display: none; }
  .fav { opacity: 1; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .hist .r span:not(.t) { display: none; }
}
@media (max-width: 860px) {
  .seo-grid { grid-template-columns: 1fr; gap: 28px; }
  .legal-table { display: block; overflow-x: auto; }
}

/* Liste « Ce que vous pouvez faire » + liens par catégorie (SEO) */
.uses-block { padding-top: 0; }
.uses { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px 28px; }
.uses li { position: relative; padding-left: 28px; font-size: 15.5px; line-height: 1.5; }
.uses li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft);
  box-shadow: inset 0 0 0 5px var(--brand-soft), inset 0 0 0 9px var(--brand);
}
.cat-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; margin-top: 18px; }
.cat-links h3 { font-size: 15px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cat-links ul { list-style: none; margin: 0; padding: 0; }
.cat-links li { padding: 3px 0; }
.cat-links a { color: var(--text); font-size: 14.5px; }
.cat-links a:hover { color: var(--brand); }
