/* Documentation publique : mêmes couleurs et polices que le synthé (src/ui/theme.css). */
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 400; font-display: swap; src: url('/docs/fonts/barlow-semi-condensed-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 600; font-display: swap; src: url('/docs/fonts/barlow-semi-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 700; font-display: swap; src: url('/docs/fonts/barlow-semi-condensed-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Michroma'; font-weight: 400; font-display: swap; src: url('/docs/fonts/michroma-latin-400-normal.woff2') format('woff2'); }

:root {
  --bg: #16171c;
  --bg-raised: #1c1d23;
  --line: #2a2c35;
  --text: #d6d8e0;
  --text-dim: #8b8e9a;
  --accent: #4fc3ff;
  --warn: #ffb44f;
  --cat-source: #4fc3ff;
  --cat-process: #7dff7a;
  --cat-control: #ffb44f;
  --cat-output: #ff7ac8;
  --cat-effect: #c77dff;
  --cat: var(--accent);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 4rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 'Barlow Semi Condensed', system-ui, sans-serif; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; }

.top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 1rem; padding: 0.6rem 1.25rem; background: var(--bg-raised); border-bottom: 1px solid var(--line); }
.logo { font-family: 'Michroma', sans-serif; font-size: 13px; letter-spacing: 0.04em; color: var(--text); text-decoration: none; white-space: nowrap; }
.logo:hover { color: var(--accent); }
.logo span { font-family: 'Barlow Semi Condensed', sans-serif; font-size: 15px; letter-spacing: 0; color: var(--text-dim); margin-left: 0.35rem; }
.logo::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); vertical-align: 2px; }
.search { position: relative; flex: 1; max-width: 22rem; }
.search input { width: 100%; padding: 0.3rem 0.7rem; border-radius: 3px; border: 1px solid #000; background: #0e0f13; box-shadow: inset 0 2px 3px #000b, 0 1px 0 #ffffff12; color: var(--text); font: inherit; font-size: 15px; }
.results { position: absolute; left: 0; right: 0; top: 2.4rem; margin: 0; padding: 0.3rem; list-style: none; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 30px #0008; }
.results a { display: block; padding: 0.35rem 0.6rem; border-radius: 5px; color: var(--text); text-decoration: none; }
.results a small { color: var(--text-dim); margin-left: 0.4rem; }
.results [aria-selected='true'] a, .results a:hover { background: #23384a; color: #fff; }
.lang { color: var(--text-dim); white-space: nowrap; }
.lang b { color: #fff; }
.lang a { color: var(--text-dim); text-decoration: none; }
/* Boutons : des touches de façade qui s'enfoncent ; l'action principale a son voyant allumé (comme dans le synthé). */
.cta, .button { display: inline-block; padding: 0.3rem 0.85rem; border-radius: 4px; border: 1px solid #0b0c0f; background: linear-gradient(180deg, #363841, #2a2c33); box-shadow: inset 0 1px 0 #ffffff1c, 0 2px 0 #0b0c0f, 0 3px 6px #0005; color: var(--text); font-weight: 500; font-size: 15px; letter-spacing: 0.01em; text-decoration: none; white-space: nowrap; transition: transform 60ms, box-shadow 60ms; }
.cta:hover, .button:hover { background: linear-gradient(180deg, #3d4049, #30323a); color: #fff; }
.cta:active, .button:active { transform: translateY(2px); box-shadow: inset 0 1px 0 #ffffff0d, 0 0 0 #0b0c0f; }
.cta::before, .button::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 7px 1px 0; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #e9faff, var(--accent) 60%); box-shadow: 0 0 6px var(--accent); }
.cta { margin-left: auto; }
.menu { display: none; }

.body { display: flex; align-items: flex-start; }
.side { position: sticky; top: 3.2rem; flex: none; width: 16rem; max-height: calc(100vh - 3.2rem); overflow-y: auto; padding: 1.1rem 0.9rem 2rem; border-right: 1px solid var(--line); font-size: 15px; }
/* Sommaire : sections en lettrage de façade, séparées par un filet ; pages rattachées par un trait ; familles de modules à leur couleur. */
.side section + section { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.side h2 { margin: 0 0 0.5rem; font-family: 'Michroma', sans-serif; font-size: 10px; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; }
.side ul { margin: 0; padding: 0; list-style: none; }
.side section > ul { margin-left: 0.2rem; border-left: 1px solid #2f313b; }
.side a { display: block; margin-left: -1px; padding: 0.15rem 0.7rem; border-left: 2px solid transparent; color: var(--text-dim); text-decoration: none; }
.side a:hover { color: #fff; border-left-color: #4c5060; }
.side a[aria-current='page'] { color: #fff; font-weight: 600; border-left-color: var(--accent); background: linear-gradient(90deg, #4fc3ff1f, transparent); }
.side .group { margin: 0.7rem 0 0.2rem; }
.side .group > span { display: flex; align-items: center; gap: 0.45rem; padding-left: 0.7rem; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cat); }
.side .group > span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cat); box-shadow: 0 0 5px var(--cat); }
.side .group ul { margin: 0.25rem 0 0 1.05rem; border-left: 1px solid color-mix(in srgb, var(--cat) 35%, transparent); }
.side .group a[aria-current='page'] { border-left-color: var(--cat); background: linear-gradient(90deg, color-mix(in srgb, var(--cat) 14%, transparent), transparent); }

main { flex: 1; min-width: 0; max-width: 50rem; padding: 1.5rem 2.5rem 3rem; }
.crumbs { color: var(--text-dim); font-size: 0.9rem; min-height: 1.2rem; }
.crumbs a { color: var(--text-dim); }
h1 { margin: 0.3rem 0 0.8rem; color: #fff; font-size: 2.1rem; line-height: 1.15; }
.module-head h1 { border-left: 4px solid var(--cat); padding-left: 0.7rem; }
.content h3 { margin: 2rem 0 0.6rem; color: #fff; font-size: 1.45rem; }
.content h4 { margin: 1.6rem 0 0.5rem; color: #fff; font-size: 1.2rem; }
.content strong { color: #fff; }
code { padding: 0.05rem 0.3rem; border-radius: 4px; background: #22242c; font-size: 0.9em; white-space: nowrap; }
figure { margin: 1.2rem 0; }
figure img { display: block; border-radius: 8px; border: 1px solid var(--line); }
.module-head { display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 1rem; }
.module-head .face { flex: none; max-width: 12rem; max-height: 22rem; width: auto; border-radius: 4px; box-shadow: 0 6px 20px #000a; }
.tags { margin: 0 0 0.9rem; }
.tags span:first-child { border-color: var(--cat); color: var(--cat); }
.tags span { display: inline-block; margin: 0 0.35rem 0.35rem 0; padding: 0.05rem 0.6rem; border-radius: 1rem; background: #22242c; border: 1px solid #2f313b; color: #b9bcc8; font-size: 0.9rem; }
.try { margin: 1.6rem 0; padding: 0.2rem 1.2rem 0.6rem; border-left: 3px solid var(--cat); border-radius: 4px; background: linear-gradient(180deg, #2a2c34, #1f2027); box-shadow: inset 0 1px 0 #ffffff12; }
.lessons li { margin-bottom: 0.6rem; }
.lessons .outcome { color: var(--text-dim); }
.presets { display: grid; gap: 1.2rem; margin-top: 1.5rem; }
.preset { display: grid; grid-template-columns: 14rem 1fr; gap: 1rem; align-items: start; }
.preset img { border-radius: 6px; border: 1px solid var(--line); }
.preset h3 { margin: 0 0 0.3rem; color: #fff; font-size: 1.2rem; }
.preset p { margin: 0 0 0.6rem; }
html:not(.js) [data-copy-mail] { display: none; }
.contact .button { margin: 0 0.5rem 0.5rem 0; font: inherit; font-size: 15px; cursor: pointer; }
.release .date { margin: -0.4rem 0 0; color: var(--text-dim); }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); }
footer { margin-top: 2rem; color: var(--text-dim); font-size: 0.9rem; }
.chooser main { margin: 4rem auto; text-align: center; }

@media (max-width: 800px) {
  .top { flex-wrap: wrap; gap: 0.6rem; }
  .search { order: 5; flex-basis: 100%; max-width: none; }
  .js .menu { display: inline-block; padding: 0.3rem 0.6rem; border-radius: 6px; border: 1px solid var(--line); background: none; color: var(--text); font: inherit; }
  .body { display: block; }
  .side { position: static; width: auto; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .js .side:not(.open) { display: none; }
  main { padding: 1rem 1.1rem 2rem; }
  .module-head { flex-direction: column; }
  .preset { grid-template-columns: 1fr; }
}
