/* Wiki et FAQ RÉSOTIK : même identité que le site (clair par défaut, sombre au choix). */
:root[data-theme="light"] { --bg:#eef3f6; --bg2:#e4ecf1; --surface:#fff; --line:#d2e0e8; --fg:#0e2230; --dim:#50707f; --acc:#0089ab; --acc2:#2f9bff; --code:#e9f1f5; --warn:#fff5db; --warnl:#e0b84c; }
:root[data-theme="dark"]  { --bg:#08161f; --bg2:#0b1f2d; --surface:#102a3b; --line:#1f3f54; --fg:#eaf2f7; --dim:#9bb3c2; --acc:#00b0d8; --acc2:#2f9bff; --code:#0d2433; --warn:#2a2410; --warnl:#8a6f20; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.65 "IBM Plex Sans", Roboto, "Segoe UI", system-ui, sans-serif; }
a { color: var(--acc); text-decoration: none; } a:hover { text-decoration: underline; }
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 22px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.brand img { height: 38px; background: #fff; border-radius: 10px; padding: 4px 10px; display: block; }
.bar nav { margin-left: auto; display: flex; gap: 2px; }
.bar nav a { color: var(--dim); padding: 8px 12px; border-radius: 9px; font-weight: 500; font-size: .92rem; }
.bar nav a:hover { color: var(--fg); background: var(--surface); text-decoration: none; }
.btn { background: linear-gradient(180deg, #2f9bff, #1f7fe0); color: #fff !important; padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: .9rem; }
.btn:hover { filter: brightness(1.08); text-decoration: none !important; }
.icon { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; font-size: 1rem; }
.layout { display: flex; max-width: 1180px; margin: 0 auto; padding: 24px 22px 60px; gap: 34px; align-items: flex-start; }
.side { width: 250px; flex: 0 0 250px; position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; }
.side input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; font-size: .92rem; }
.menu { margin-top: 14px; display: flex; flex-direction: column; }
.menu a { padding: 8px 12px; border-radius: 9px; color: var(--dim); font-size: .93rem; }
.menu a:hover { background: var(--surface); color: var(--fg); text-decoration: none; }
.menu a.on { background: color-mix(in srgb, var(--acc2) 16%, transparent); color: var(--fg); font-weight: 600; box-shadow: inset 3px 0 0 var(--acc2); }
.results { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.results a { display: block; padding: 9px 12px; color: var(--fg); border-bottom: 1px solid var(--line); font-size: .88rem; }
.results a:last-child { border-bottom: 0; } .results a small { display: block; color: var(--dim); margin-top: 2px; }
.doc { flex: 1; min-width: 0; max-width: 780px; }
.doc h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 18px; letter-spacing: -.01em; }
.doc h2 { font-size: 1.4rem; margin: 34px 0 10px; padding-top: 6px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 1.12rem; margin: 24px 0 8px; }
.doc p, .doc li { color: var(--fg); } .doc li { margin: 4px 0; }
.doc ul, .doc ol { padding-left: 24px; }
.doc code { background: var(--code); padding: 2px 6px; border-radius: 6px; font: .88em "IBM Plex Mono", Consolas, monospace; }
.doc pre { background: var(--code); padding: 14px; border-radius: 10px; overflow-x: auto; } .doc pre code { padding: 0; background: none; }
.doc blockquote { margin: 18px 0; padding: 4px 16px; background: var(--warn); border-left: 4px solid var(--warnl); border-radius: 0 10px 10px 0; }
.doc blockquote p { margin: 10px 0; }
.tw { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg2); font-weight: 600; } tr:last-child td { border-bottom: 0; }
.lead { color: var(--dim); }
details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin: 10px 0; }
summary { cursor: pointer; padding: 13px 16px; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "＋"; margin-right: 10px; color: var(--acc2); }
details[open] > summary::before { content: "－"; }
details[open] > summary { border-bottom: 1px solid var(--line); }
.ans { padding: 4px 18px 12px; }
.foot { margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--dim); font-size: .85rem; }
@media (max-width: 860px) {
  .layout { flex-direction: column; padding: 16px 16px 50px; gap: 16px; }
  .side { width: 100%; flex: none; position: static; max-height: none; }
  .menu { flex-direction: row; flex-wrap: wrap; gap: 4px; } .menu a { border: 1px solid var(--line); }
  .bar nav { display: none; } .bar { padding: 8px 14px; } .brand { margin-right: auto; }
  .doc h1 { font-size: 1.6rem; }
}
