/* WASDEV — sit dokimantasyon. Menm koulè ak sit prensipal la. */
:root {
  --bg: #0a0a0d; --bg2: #0f0e15; --card: #14131b; --card2: #191823; --line: #262433;
  --fg: #ece9f5; --dim: #a8a4b8; --mute: #6f6b82;
  --purple: #8b5cf6; --purple-l: #b794ff; --purple-d: #5b21b6; --blue: #0098ff;
  --grad: linear-gradient(100deg, #8b5cf6 0%, #6d8bff 55%, #0098ff 100%);
  --font: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, ui-monospace, monospace;
  --top: 60px; --side: 360px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16.5px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.18; letter-spacing: -0.015em; font-weight: 750; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--purple-l); outline-offset: 3px; border-radius: 6px; }
code { font-family: var(--mono); font-size: .9em; background: rgba(139, 92, 246, .14); color: #d9c8ff; padding: 2px 6px; border-radius: 6px; }
b { color: #fff; font-weight: 650; }

/* ---------- ba anlè a */
.top { position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 40; display: flex; align-items: center; gap: 18px; padding: 0 22px; background: rgba(10, 10, 13, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .06em; }
.brand em { font-style: normal; font-weight: 650; letter-spacing: 0; color: var(--purple-l); background: rgba(139, 92, 246, .14); border: 1px solid rgba(139, 92, 246, .3); padding: 2px 9px; border-radius: 7px; font-size: .8rem; }
.top__sp { flex: 1; }
.top__link { color: var(--dim); font-size: .93rem; }
.top__link:hover { color: var(--fg); }
.langsel { appearance: none; -webkit-appearance: none; font: inherit; font-size: .86rem; font-weight: 650; color: var(--fg); background: rgba(255, 255, 255, .04) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8a4b8' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 9px center / 14px no-repeat; border: 1px solid var(--line); border-radius: 10px; padding: 7px 30px 7px 12px; cursor: pointer; }
.langsel option { background: #14131b; color: var(--fg); }
.burger { all: unset; display: none; cursor: pointer; width: 38px; height: 38px; }
.burger span { display: block; width: 20px; height: 2px; background: var(--fg); margin: 5px auto; border-radius: 2px; }

/* ---------- de kolòn */
.layout { display: flex; padding-top: var(--top); }
.side { position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--side); overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg2); padding: 18px 12px 40px; }
.side a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--dim); font-size: .95rem; line-height: 1.3; }
.side a:hover { color: var(--fg); background: rgba(255, 255, 255, .04); }
.side a.is-active { color: #fff; background: rgba(139, 92, 246, .18); }
.side i { font-style: normal; flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: .78rem; font-weight: 700; color: var(--purple-l); background: rgba(139, 92, 246, .12); }
/* meni an = pye bwa (tankou eksploratè VS Code): ti flèch pou louvri / fèmen + tras vètikal pou chak nivo */
.side nav > a { margin-left: 22px; padding-left: 6px; gap: 10px; }
.side .row { display: flex; align-items: center; }
.side .row a { flex: 1; min-width: 0; padding-left: 6px; gap: 10px; }
.side .tw { all: unset; box-sizing: border-box; flex: none; width: 22px; height: 30px; display: grid; place-items: center; cursor: pointer; color: var(--mute); border-radius: 6px; }
.side .tw::before { content: ""; width: 7px; height: 7px; margin-left: -3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; }
.side .tw:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.side .tw:focus-visible { outline: 2px solid var(--purple-l); }
.side .tw--none { cursor: default; visibility: hidden; }
.side .node.is-open > .row > .tw { color: var(--purple-l); }
.side .node.is-open > .row > .tw::before { transform: rotate(45deg); margin: -3px 0 0 0; }
.side .kids { display: none; margin: 1px 0 5px 10px; padding-left: 5px; border-left: 1px solid var(--line); }
.side .node.is-open > .kids { display: block; }
.side:hover .kids { border-left-color: #3a3750; }
.side .node.is-path > .kids { border-left-color: rgba(139, 92, 246, .75); }      /* tras branch kote ou ye a */
.side a.grp { color: var(--fg); font-weight: 700; }
.side a.grp i { color: #fff; background: var(--grad); }
.side a.sub { padding-top: 7px; padding-bottom: 7px; font-size: .9rem; }
.side a.sub i { width: 20px; height: 20px; border-radius: 6px; font-size: .7rem; }
.side a.leaf { position: relative; padding: 5px 10px 5px 14px; font-size: .86rem; border-radius: 8px; }
.side a.leaf.is-here { color: #fff; background: rgba(139, 92, 246, .12); }
.side a.leaf.is-here::before { content: ""; position: absolute; left: -6px; top: 4px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--purple-l); }
.eyebrow a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.chapters--sub { margin-top: 44px; }
.main { margin-left: var(--side); flex: 1; min-width: 0; padding: 48px clamp(20px, 5vw, 72px) 30px; max-width: calc(var(--side) + 1040px); }
.eyebrow { color: var(--purple-l); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .76rem; margin-bottom: 12px; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.lead { color: var(--dim); font-size: 1.1rem; margin-top: 14px; max-width: 760px; }

/* ---------- paj akèy: chapit yo */
.filter { width: 100%; max-width: 520px; margin-top: 28px; font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.filter:focus { outline: none; border-color: var(--purple); }
.chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-top: 28px; }
.chapter { position: relative; display: block; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, var(--card2), var(--card)); padding: 22px 22px 20px; transition: transform .2s ease, border-color .2s ease; }
.chapter:hover { transform: translateY(-3px); border-color: rgba(139, 92, 246, .55); }
.chapter__n { position: absolute; top: 18px; right: 20px; font-weight: 800; font-size: 1.4rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chapter h3 { font-size: 1.14rem; padding-right: 40px; }
.chapter p { color: var(--dim); font-size: .93rem; margin-top: 8px; }
.chapter ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.chapter li { color: var(--mute); font-size: .86rem; padding-left: 16px; position: relative; }
.chapter li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--purple); }

/* ---------- chapit */
.onpage { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 28px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.onpage b { width: 100%; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.onpage a { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .86rem; color: var(--dim); }
.onpage a:hover { border-color: var(--purple); color: var(--fg); }
.tut { margin-top: 56px; padding-top: 34px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--top) + 10px); }
.tut h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
.tut > p { color: var(--dim); margin-top: 14px; max-width: 800px; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; max-width: 860px; }
.steps li { counter-increment: step; position: relative; padding: 13px 18px 13px 60px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 12px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem; color: #fff; background: var(--grad); }
.notes { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; max-width: 860px; }
.notes li { position: relative; padding-left: 22px; color: var(--dim); }
.notes li::before { content: ""; position: absolute; left: 3px; top: .68em; width: 7px; height: 7px; border-radius: 2px; background: var(--purple-l); }
/* blòk kòd (kòd GAD, sa tèminal la ekri): menm nan tout lang */
pre.code { position: relative; margin: 20px 0 0; max-width: 860px; overflow-x: auto; padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--purple); border-radius: 12px; background: #0c0b12; }
pre.code code { display: block; padding: 0; background: none; color: #e6defa; font-size: .88rem; line-height: 1.6; white-space: pre; tab-size: 4; }
pre.code[data-lang]::before { content: attr(data-lang); position: absolute; top: 6px; right: 12px; font: 700 .68rem var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
pre.code[data-lang="output"] { border-left-color: #2f7d5b; }
pre.code[data-lang="output"] code { color: #b9d8c8; }
/* fichye pou telechaje / louvri (egzanp GAD yo) */
a.dl { display: inline-flex; align-items: center; gap: 8px; margin: 14px 10px 0 0; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--dim); font-family: var(--mono); font-size: .86rem; }
a.dl::before { content: "↗"; color: var(--purple-l); font-family: var(--font); }
a.dl:hover { border-color: var(--purple); color: var(--fg); }
a.dl--zip { padding: 12px 20px; font-family: var(--font); font-size: 1rem; font-weight: 700; color: #fff; background: var(--grad); border: 0; }
a.dl--zip::before { content: "⬇"; color: #fff; }
.shot { margin: 24px 0 0; }
.shot img { border-radius: 12px; border: 1px solid #2c2940; background: #0c0c10; cursor: zoom-in; box-shadow: 0 30px 80px -40px rgba(109, 40, 217, .7); }
.shot figcaption { color: var(--mute); font-size: .88rem; margin-top: 10px; }
.tablewrap { overflow-x: auto; margin-top: 22px; max-width: 860px; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th, td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); }
th { color: var(--mute); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; background: var(--card); }
tr:last-child td { border-bottom: 0; }
td:not(:first-child) { font-family: var(--mono); font-size: .88rem; color: #d9c8ff; white-space: nowrap; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; }
.pager a { padding: 12px 20px; border: 1px solid var(--line); border-radius: 12px; color: var(--dim); font-weight: 600; }
.pager a:hover { border-color: var(--purple); color: var(--fg); }
.foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 60px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--mute); font-size: .86rem; }
.foot a:hover { color: var(--fg); }
.zoom { position: fixed; inset: 0; z-index: 100; background: rgba(5, 5, 8, .95); display: grid; place-items: center; padding: 18px 18px 54px; cursor: zoom-out; overflow: hidden; }
.zoom img { max-width: 100%; max-height: calc(100vh - 72px); width: auto; height: auto; border-radius: 8px; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; will-change: transform; }
.zoom__bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 14px; align-items: center; justify-content: center; padding: 12px 16px; font-size: .86rem; color: var(--dim); background: linear-gradient(0deg, rgba(5, 5, 8, .95), rgba(5, 5, 8, 0)); pointer-events: none; }
.zoom__pct { min-width: 64px; text-align: center; padding: 3px 10px; border-radius: 999px; font-weight: 700; color: #fff; background: rgba(139, 92, 246, .35); border: 1px solid rgba(139, 92, 246, .6); }

@media (max-width: 900px) {
  .burger { display: block; }
  .side { transform: translateX(-100%); transition: transform .2s ease; z-index: 30; width: min(var(--side), 86vw); }
  .side.is-open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .6); }
  .main { margin-left: 0; padding-top: 32px; }
  .top { gap: 12px; padding: 0 14px; }
  .top__link { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .chapter, .side { transition: none; } }
/* ---------- fon dekoratif (ekla, dlo, kòd — mov sonm, nwa, blan): yon sèl kouch fiks dèyè tout paj la */
.deco { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url("../assets/brand/bg-deco.svg") center / cover no-repeat,
    radial-gradient(1100px 700px at 12% -8%, rgba(91, 33, 182, .30), transparent 70%),
    radial-gradient(900px 640px at 100% 100%, rgba(59, 15, 143, .34), transparent 70%),
    linear-gradient(180deg, #0a0a0d 0%, #0d0a16 55%, #08080b 100%); }
.side { background: rgba(15, 14, 21, .9); }

/* ---------- banyè anlè chak paj */
.banner { margin: 0 0 34px; border-radius: 16px; overflow: hidden; border: 1px solid #2c2940; background: #0c0c10; aspect-ratio: 21 / 9; box-shadow: 0 30px 90px -40px rgba(109, 40, 217, .8); }
.banner img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) { .banner { aspect-ratio: 2 / 1; margin-bottom: 26px; border-radius: 12px; } }
/* banyè v2: foto a ANTYE nan yon kat (pa koupe, pa agrandi), sou menm foto a an flou */
.banner { position: relative; aspect-ratio: auto; display: flex; align-items: center; justify-content: center; padding: clamp(12px, 2vw, 22px); }
.banner .banner__bg { position: absolute; inset: -10%; width: 120%; height: 120%; max-width: none; object-fit: cover; filter: blur(26px) brightness(.68) saturate(1.25); }
.banner .banner__img { position: relative; width: 100%; height: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 24px 70px -20px rgba(0, 0, 0, .85), 0 0 0 1px rgba(183, 148, 255, .2); }
@media (max-width: 900px) { .banner { aspect-ratio: auto; } }

/* kontni an nan MITAN espas ki adwat meni an (gwo ekran: li pa kole sou bò goch ankò) */
.main { max-width: none; padding-inline: max(clamp(20px, 5vw, 72px), calc((100vw - var(--side) - 1100px) / 2)); }
@media (max-width: 900px) { .main { padding-inline: clamp(16px, 5vw, 40px); } }
/* meni agoch la: yon ti ba pou rale sou bò dwat li (elaji / ratresi) */
.side__grip { position: fixed; top: var(--top); bottom: 0; left: calc(var(--side) - 4px); width: 9px; z-index: 35; cursor: col-resize; touch-action: none; }
.side__grip::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 3px; border-radius: 3px; background: var(--purple-l); opacity: 0; transition: opacity .15s ease; }
.side__grip:hover::after, .side__grip:focus-visible::after, .is-sizing .side__grip::after { opacity: .9; }
.is-sizing { cursor: col-resize; user-select: none; -webkit-user-select: none; }
.is-sizing .main { pointer-events: none; }
@media (max-width: 900px) { .side__grip { display: none; } }

/* ba defile yo: ba a mov, fon an mov fonse (paj la + meni + tout bwat ki defile) */
html, * { scrollbar-color: #8b5cf6 #170d2e; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #170d2e; }
::-webkit-scrollbar-thumb { background: #8b5cf6; border-radius: 8px; border: 2px solid #170d2e; }
::-webkit-scrollbar-thumb:hover { background: #b794ff; }
::-webkit-scrollbar-corner { background: #170d2e; }

/* ---------- PYE PAJ TOUJOU ANBA: yon paj kout pa kite pye paj la monte ---------- */
.main { display: flex; flex-direction: column; min-height: calc(100vh - var(--top)); }
.main__body { flex: 1 0 auto; min-width: 0; }

/* DEVIZ mak la, tou piti bò kote non WASDEV */
.brand__motto { font-size: .62em; font-weight: 600; letter-spacing: .01em; opacity: .72; white-space: nowrap; margin-left: -2px; }
