/* Voktora — site statique. Polices système, aucune dépendance. */
:root {
  --bg: #fafaf8; --surface: #ffffff; --surface-2: #f1f0ec; --line: #deddd7;
  --fg: #1b1b1d; --muted: #5c5c63;
  --accent: #8f5400; --accent-ink: #ffffff; --accent-soft: rgba(143, 84, 0, .09);
  --term-bg: #16161a; --term-fg: #ebebee; --term-muted: #9d9da8; --term-line: #2a2a31; --term-accent: #e3a857;
  --ok: #1f7a46;
  --radius: 10px; --max: 960px;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111113; --surface: #18181b; --surface-2: #1f1f23; --line: #2b2b31;
    --fg: #ececee; --muted: #a1a1ab;
    --accent: #e3a857; --accent-ink: #1a1205; --accent-soft: rgba(227, 168, 87, .1);
    --term-bg: #0c0c0e; --term-line: #26262c; --ok: #6fcf97;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111113; --surface: #18181b; --surface-2: #1f1f23; --line: #2b2b31;
  --fg: #ececee; --muted: #a1a1ab;
  --accent: #e3a857; --accent-ink: #1a1205; --accent-soft: rgba(227, 168, 87, .1);
  --term-bg: #0c0c0e; --term-line: #26262c; --ok: #6fcf97;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.65 var(--sans); overflow-wrap: break-word;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
img { max-width: 100%; height: auto; }
a { color: var(--fg); text-decoration-color: color-mix(in srgb, var(--fg) 30%, transparent); text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code, kbd { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .1em .4em; border-radius: 5px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); font-weight: 650; }
h2 { font-size: 1.35rem; font-weight: 620; }
h3 { font-size: 1.02rem; font-weight: 600; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 6px; z-index: 50; transition: top .15s; }
.skip:focus { top: 10px; color: var(--accent-ink); }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 1.05rem; text-decoration: none; letter-spacing: -.01em; }
.brand img { display: block; width: 28px; height: 28px; }
.brand:hover { color: var(--fg); }
.nav { display: flex; flex-wrap: wrap; gap: 2px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: .93rem; color: var(--muted); position: relative; }
.nav a:hover { color: var(--fg); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--fg); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 1px; height: 2px; background: var(--accent); border-radius: 2px; }
.icon-btn { font: inherit; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 6px; width: 34px; height: 34px; display: none; align-items: center; justify-content: center; cursor: pointer; transition: color .15s, border-color .15s; }
.icon-btn:hover { color: var(--fg); border-color: var(--muted); }
.js .icon-btn { display: inline-flex; }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Sections */
main { display: block; }
.hero { padding: 72px 0 36px; }
.hero .badge { margin-bottom: 18px; }
.hero h1 { max-width: 16ch; }
.hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 52ch; }
.badge { display: inline-block; font: 500 .8rem var(--mono); border: 1px solid var(--line); border-radius: 99px; padding: 2px 11px; color: var(--muted); background: var(--surface); }
.page-head { padding: 56px 0 14px; }
.page-head .lead { color: var(--muted); max-width: 60ch; font-size: 1.05rem; }
section.block { padding: 30px 0; }
section.block > h2 { margin-bottom: .8em; }
.sub { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 600; margin: 0 0 10px; }

.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 550 .95rem var(--sans); text-decoration: none; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); transition: transform .15s var(--ease), border-color .15s, background-color .15s; cursor: pointer; }
.btn:hover { border-color: var(--muted); color: var(--fg); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { color: var(--accent-ink); filter: brightness(1.07); }

/* Onglets */
.tabs { position: relative; display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { font: 550 .93rem var(--sans); background: none; border: 0; color: var(--muted); padding: 9px 14px; cursor: pointer; white-space: nowrap; border-radius: 6px 6px 0 0; transition: color .15s; }
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] { color: var(--fg); }
.tab-ind { position: absolute; bottom: 0; left: 0; height: 2px; width: 0; background: var(--accent); border-radius: 2px; transition: transform .3s var(--ease), width .3s var(--ease); }
.tabs.sub-tabs { border-bottom: 0; margin: 0 0 10px; gap: 6px; }
.sub-tabs .tab { border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: .85rem; font-weight: 500; }
.sub-tabs .tab[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.sub-tabs .tab-ind { display: none; }
html:not(.js) .tabs { display: none; }
[role="tabpanel"][hidden] { display: none; }
.panel-title { margin: 22px 0 8px; }
.js .panel-title { display: none; }
.panel.in-anim { animation: panel-in .3s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* Terminal */
.term { background: var(--term-bg); color: var(--term-fg); border: 1px solid var(--term-line); border-radius: var(--radius); overflow: hidden; margin: 0 0 12px; box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px -14px rgba(0, 0, 0, .45); }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--term-line); font: .78rem var(--mono); color: var(--term-muted); }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a3a42; display: block; }
.term-bar .t { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-bar .copy { margin-left: auto; }
.term pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: .88rem/1.7 var(--mono); tab-size: 2; scrollbar-width: thin; }
.term pre code { background: none; padding: 0; font: inherit; color: inherit; }
.term .c { color: var(--term-muted); }
.term .p { color: var(--term-accent); user-select: none; }
.cursor { display: inline-block; width: .55em; height: 1.05em; background: var(--term-accent); vertical-align: text-bottom; margin-left: 1px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.copy { font: 500 .78rem var(--sans); color: var(--term-muted); background: transparent; border: 1px solid var(--term-line); border-radius: 6px; padding: 2px 10px; cursor: pointer; transition: color .15s, border-color .15s; }
.copy:hover { color: var(--term-fg); border-color: var(--term-muted); }
.copy.done { color: #6fcf97; border-color: #6fcf97; }
html:not(.js) .copy { display: none; }
.hint { color: var(--muted); font-size: .92rem; margin: 0 0 8px; }

/* Listes / cartes */
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 9px 0; border-top: 1px solid var(--line); display: flex; gap: 14px; }
.plain li:last-child { border-bottom: 1px solid var(--line); }
.plain li > :first-child { flex: 0 0 11.5em; font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; min-width: 0; }
.card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 10px 24px -16px rgba(0, 0, 0, .35); }
.card h3 { margin-bottom: .3em; }
.card p { color: var(--muted); font-size: .93rem; margin: 0 0 .6em; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.tag { font: .74rem var(--mono); border: 1px solid var(--line); color: var(--muted); border-radius: 99px; padding: 1px 9px; background: transparent; }
button.tag { cursor: pointer; font-family: var(--mono); transition: color .15s, border-color .15s; }
button.tag:hover { color: var(--fg); border-color: var(--muted); }
.tag.lang { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.tag.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

/* Tableau de formats */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; white-space: nowrap; }

.callout { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 10px 16px; border-radius: 0 8px 8px 0; margin: 0 0 1.2em; font-size: .94rem; }
.callout p:last-child { margin: 0; }

/* Recherche / filtres */
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 14px; }
input[type="search"] { font: inherit; padding: 8px 12px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 8px; width: min(100%, 320px); }
input[type="search"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.status { color: var(--muted); font-size: .9rem; margin: 0 0 12px; min-height: 1.5em; }
.counts { display: flex; flex-wrap: wrap; gap: 28px; margin: 0 0 8px; }
.counts div { min-width: 7em; }
.counts b { display: block; font: 600 1.9rem/1.1 var(--sans); letter-spacing: -.02em; }
.counts span { color: var(--muted); font-size: .9rem; }

/* Maquettes (illustrations HTML/CSS) */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 34px 0; border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: 0; }
.feature h2 { margin-bottom: .4em; }
.feature ul { margin: .4em 0 0; padding-left: 1.1em; color: var(--muted); font-size: .94rem; }
.feature .copy-col p { color: var(--muted); }
.mock { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .84rem; box-shadow: 0 10px 28px -20px rgba(0, 0, 0, .4); }
.mock-bar { display: flex; gap: 6px; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font: .76rem var(--mono); }
.mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); display: block; }
.mock-bar span { margin-left: 6px; }
.mock-body { padding: 10px 12px; display: grid; gap: 6px; }
.row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; font-family: var(--mono); font-size: .8rem; min-width: 0; }
.row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.sel { border-color: var(--accent); background: var(--accent-soft); }
.row em { font-style: normal; color: var(--muted); white-space: nowrap; }
.dots { letter-spacing: .15em; color: var(--muted); }
.meter { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; width: var(--w, 50%); transform-origin: left; }
.reveal.in .meter > i { animation: grow .9s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.fig-cap { color: var(--muted); font-size: .78rem; padding: 6px 12px 9px; border-top: 1px solid var(--line); }

.doc-list { display: grid; gap: 0; }
.doc-list a.item { display: grid; grid-template-columns: 11em 1fr; gap: 14px; padding: 11px 6px; border-top: 1px solid var(--line); text-decoration: none; transition: background-color .15s, padding-left .2s var(--ease); }
.doc-list a.item:last-child { border-bottom: 1px solid var(--line); }
.doc-list a.item:hover { background: var(--surface-2); padding-left: 12px; color: var(--fg); }
.doc-list a.item b { font-family: var(--mono); font-size: .86rem; font-weight: 600; color: var(--accent); overflow-wrap: anywhere; }
.doc-list a.item span { color: var(--muted); font-size: .94rem; }

/* Journal des versions */
.release { border-top: 1px solid var(--line); padding: 22px 0; }
.release h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.release time { font: .85rem var(--mono); color: var(--muted); font-weight: 400; }
.release h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1.1em 0 .4em; }
.release ul { margin: 0; padding-left: 1.2em; }
.release li { margin: .3em 0; }
.release details > summary { cursor: pointer; color: var(--muted); font-size: .92rem; padding: 4px 0; }
.release details > summary:hover { color: var(--fg); }

footer.site-footer { margin-top: 56px; border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: .9rem; }
footer.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }
footer.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* Apparition au défilement (uniquement si JS actif) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--ease), transform .55s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 720px) {
  .hero { padding-top: 44px; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .plain li { flex-direction: column; gap: 0; }
  .plain li > :first-child { flex-basis: auto; }
  .doc-list a.item { grid-template-columns: 1fr; gap: 2px; }
  .nav { margin-left: 0; width: 100%; order: 3; }
  .icon-btn { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .cursor { animation: none; }
}
