/* ===== TO2026 — documentation des langages ===== */
.to-doc { padding: 48px 0 64px; }
html body .to-doc h1 { font-size: 40px; line-height: 1.17; margin: 0; }
.to-doc-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: end; margin-bottom: 32px; }
html body .to-doc-head p { margin: 0; color: var(--to-muted); }
.to-doc-switch { display: flex; gap: 0; margin: 0 0 32px; border-bottom: 2px solid var(--to-ink); }
html body .to-doc-switch a { text-decoration: none; color: var(--to-ink); padding: 12px 20px 10px; border: 2px solid transparent; border-bottom: 0; font-size: 16px; }
html body .to-doc-switch a[aria-current="page"] { background: var(--to-ink); color: var(--to-paper); }
html body .to-doc-switch a:not([aria-current]):hover { border-color: var(--to-ink); }

.to-doc-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; align-items: start; }

/* colonne de gauche : recherche et sommaire */
.to-doc-side { position: sticky; top: 96px; max-height: calc(100vh - 112px); display: flex; flex-direction: column; }
.to-doc-search { position: relative; margin-bottom: 16px; }
html body .to-doc-q {
  width: 100%; box-sizing: border-box; font-size: 16px; padding: 12px 40px 12px 14px; border: 2px solid var(--to-ink);
  background: #fff; color: var(--to-ink); border-radius: 0; outline: none; box-shadow: 4px 4px 0 var(--to-ink);
}
html body .to-doc-q:focus { border-color: var(--to-blue); box-shadow: 4px 4px 0 var(--to-blue); }
.to-doc-q:focus ~ kbd, .to-doc-q:not(:placeholder-shown) ~ kbd { display: none; }
.to-doc-search kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: inherit; font-size: 12px; color: var(--to-muted); border: 1px solid var(--to-rule); padding: 2px 6px; }
.to-doc-nav, .to-doc-results { overflow: auto; padding-right: 8px; scrollbar-width: thin; }
.to-doc-nav[hidden], .to-doc-results[hidden] { display: none; }
.to-doc-nav ul, .to-doc-results ul { list-style: none; margin: 0; padding: 0; }
html body .to-doc-nav a { text-decoration: none; color: var(--to-ink); display: block; padding: 5px 8px; font-size: 12px; line-height: 1.5; }
html body .to-doc-nav a:hover { background: var(--to-rule); }
html body .to-doc-nav a[aria-current="page"] { background: var(--to-ink); color: var(--to-paper); }
html body .to-doc-nav code { font-family: var(--to-pixel); font-size: 12px; background: none; color: inherit; padding: 0; }
.to-doc-navh { margin: 20px 0 6px; font-size: 12px; color: var(--to-muted); letter-spacing: .05em; }
html body .to-doc-nav .to-doc-navhome { font-size: 16px; padding: 6px 8px; }
.to-doc-nav details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; }
.to-doc-nav details > summary::-webkit-details-marker { display: none; }
.to-doc-nav details > summary::before { content: "▸"; width: 14px; flex: none; font-size: 12px; color: var(--to-muted); }
.to-doc-nav details[open] > summary::before { content: "▾"; }
.to-doc-nav details > summary > a { flex: 1; }
.to-doc-nav details > ul { margin-left: 14px; border-left: 2px dotted var(--to-rule); padding-left: 4px; }
.to-doc-navend { margin-top: 16px !important; border-top: 2px solid var(--to-rule) !important; padding-top: 8px !important; }
.to-doc-count, .to-doc-none { font-size: 12px; color: var(--to-muted); margin: 0 0 8px; }
html body .to-doc-results a { display: block; text-decoration: none; color: var(--to-ink); padding: 8px 10px; border-left: 4px solid transparent; }
html body .to-doc-results a b { display: block; font-weight: 400; font-size: 16px; }
html body .to-doc-results a span { display: block; font-size: 12px; color: var(--to-muted); }
html body .to-doc-results a.is-sel, html body .to-doc-results a:hover { background: #fff; border-left-color: var(--to-blue); }

/* colonne principale */
.to-doc-main { min-width: 0; min-height: 60vh; }
.to-doc-loading { color: var(--to-muted); }
html body .to-doc-main h2 { font-size: 32px; margin: 0 0 16px; line-height: 1.25; }
html body .to-doc-main h2.to-doc-name { font-size: 40px; overflow-wrap: anywhere; }
html body .to-doc-main h2 small { font-size: 16px; color: var(--to-muted); margin-left: 12px; }
html body .to-doc-h { font-size: 16px; margin: 40px 0 12px; padding-top: 12px; border-top: 2px solid var(--to-ink); }
.to-doc-k { font-size: 12px; color: var(--to-muted); margin: 0 0 8px; letter-spacing: .05em; }
html body .to-doc-k a { color: var(--to-muted); }
.to-doc-lead { font-size: 16px; line-height: 1.75; margin: 0 0 16px; max-width: 760px; }
.to-doc-tags { display: flex; gap: 8px; margin: 0 0 16px; }
.to-doc-tags span { font-size: 12px; border: 2px solid var(--to-ink); padding: 3px 8px; }
.to-doc-tags .is-partiel { background: var(--to-yellow); }
.to-doc-tags .is-absent { background: #e8341c; border-color: #e8341c; color: #fff; }

.to-doc-text { max-width: 820px; font-size: 16px; line-height: 1.75; }
.to-doc-text p { margin: 0 0 16px; }
.to-doc-text ul, .to-doc-text ol { margin: 0 0 16px; padding-left: 24px; }
.to-doc-text li { margin: 0 0 6px; }
html body .to-doc-main code { font-family: var(--to-pixel); font-size: .95em; background: #fff; border: 1px solid var(--to-rule); padding: 1px 5px; color: var(--to-ink); }
html body .to-doc-main a code { color: var(--to-blue); border-color: #b9bdf7; }
html body .to-doc-main a:hover code { background: var(--to-blue); color: #fff; }
.to-doc-text table, .to-doc-params, .to-doc-err { border-collapse: collapse; margin: 0 0 16px; font-size: 12px; line-height: 1.6; width: 100%; max-width: 820px; }
.to-doc-text th, .to-doc-text td, .to-doc-params th, .to-doc-params td, .to-doc-err th, .to-doc-err td { border: 2px solid var(--to-ink); padding: 8px 10px; text-align: left; vertical-align: top; }
.to-doc-text th, .to-doc-err thead th { background: var(--to-ink); color: var(--to-paper); font-weight: 400; }
.to-doc-params th { width: 1%; white-space: nowrap; background: #fff; font-weight: 400; }

html body pre.to-doc-syntax { font-family: var(--to-pixel); font-size: 16px; line-height: 1.75; background: #fff; border: 2px solid var(--to-ink); padding: 12px 16px; margin: 0 0 16px; white-space: pre-wrap; color: var(--to-ink); }

/* exemples : le code en couleurs, puis ce qu'affiche la machine */
.to-doc-code { position: relative; margin: 0 0 12px; max-width: 900px; }
html body .to-doc-code pre.to-code {
  margin: 0; background: #101010; border: 2px solid var(--to-ink); border-top: 0; padding: 14px 18px; font-family: var(--to-mono); font-size: 16px; line-height: 1.5;
  overflow-x: auto; white-space: pre; tab-size: 2;
}
.to-doc-bar { display: flex; justify-content: space-between; align-items: center; background: var(--to-ink); color: var(--to-paper); padding: 0 0 0 10px; }
.to-doc-bar span { font-size: 12px; }
.to-doc-copy { font-size: 12px; border: 0; background: var(--to-ink); color: var(--to-yellow); padding: 6px 12px; cursor: pointer; }
.to-doc-copy:hover, .to-doc-copy:focus { background: var(--to-blue); color: #fff; outline: none; }
.to-doc-note, .to-doc-in { font-size: 12px; line-height: 1.75; color: var(--to-muted); margin: 0 0 12px; max-width: 820px; }
.to-doc-result { font-size: 12px; line-height: 1.75; margin: 0 0 12px; max-width: 820px; }
.to-doc-screen { max-width: 900px; margin: 0 0 16px; border: 2px solid var(--to-ink); }
.to-doc-screen span { display: block; font-size: 12px; padding: 4px 10px; background: var(--to-ink); color: var(--to-paper); }
html body .to-doc-screen pre { margin: 0; padding: 14px 18px; font-family: var(--to-mono); font-size: 16px; line-height: 1.25; white-space: pre; overflow-x: auto; }
html body .to-doc-screen.is-128 pre { background: #00ffff; color: #0000ff; }   /* écran du BASIC 128 : cyan, texte bleu */
html body .to-doc-screen.is-2026 pre { background: #aaaaaa; color: #111111; }  /* écran du BASIC 2026 : gris, texte noir */

.to-doc-see { display: flex; flex-wrap: wrap; gap: 8px; }
html body .to-doc-see a, .to-doc-see span { font-family: var(--to-pixel); font-size: 16px; text-decoration: none; border: 2px solid var(--to-ink); padding: 4px 10px; color: var(--to-ink); }
html body .to-doc-see a:hover { background: var(--to-ink); color: var(--to-paper); }
.to-doc-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 16px; border-top: 2px solid var(--to-ink); }
html body .to-doc-pager a { text-decoration: none; color: var(--to-ink); font-size: 16px; }
html body .to-doc-pager a:hover { color: var(--to-blue); }

/* accueil de la documentation */
.to-doc-hero { margin-bottom: 8px; }
.to-doc-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
html body .to-doc-steps a { display: flex; gap: 16px; align-items: baseline; text-decoration: none; color: var(--to-ink); padding: 10px 0; border-bottom: 2px dotted var(--to-rule); font-size: 16px; }
.to-doc-steps a span { color: var(--to-blue); font-size: 12px; }
html body .to-doc-steps a:hover { color: var(--to-blue); }
.to-doc-cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
html body .to-doc-cats a { display: block; height: 100%; box-sizing: border-box; text-decoration: none; color: var(--to-ink); border: 2px solid var(--to-ink); padding: 16px; background: #fff; }
html body .to-doc-cats a:hover { box-shadow: 6px 6px 0 var(--to-ink); transform: translate(-2px, -2px); }
.to-doc-cats b { display: block; font-weight: 400; font-size: 16px; margin-bottom: 4px; }
.to-doc-cats small { display: block; font-size: 12px; color: var(--to-blue); margin-bottom: 8px; }
.to-doc-cats span { display: block; font-size: 12px; line-height: 1.6; color: var(--to-muted); }
.to-doc-more { margin-top: 24px; display: flex; gap: 24px; }
html body .to-doc-more a { color: var(--to-ink); }
.to-doc-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--to-ink); }
html body .to-doc-list a { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; text-decoration: none; color: var(--to-ink); padding: 10px 8px; border-bottom: 2px dotted var(--to-rule); }
html body .to-doc-list a:hover { background: #fff; }
html body .to-doc-list a code { border: 0; background: none; padding: 0; font-size: 16px; color: var(--to-blue); }
.to-doc-list span { font-size: 12px; line-height: 1.6; }
.to-doc-list em { font-style: normal; font-size: 12px; color: var(--to-muted); }
.to-doc-list.is-compact a { grid-template-columns: 220px minmax(0, 1fr); }
.to-doc-az { display: flex; flex-wrap: wrap; gap: 4px; }
html body .to-doc-az a { text-decoration: none; color: var(--to-ink); border: 2px solid var(--to-ink); width: 32px; text-align: center; padding: 4px 0; font-size: 16px; }
html body .to-doc-az a:hover { background: var(--to-ink); color: var(--to-paper); }
.to-doc-err td:first-child { width: 1%; white-space: nowrap; }

@media (max-width: 1099px) {
  .to-doc-head { grid-template-columns: 1fr; gap: 16px; }
  html body .to-doc h1 { font-size: 32px; }
  .to-doc-grid { grid-template-columns: 240px minmax(0, 1fr); gap: 32px; }
  .to-doc-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html body .to-doc-list a { grid-template-columns: 160px minmax(0, 1fr); }
  .to-doc-list em { display: none; }
}
@media (max-width: 760px) {
  html body .to-doc h1 { font-size: 24px; }
  .to-doc-grid { grid-template-columns: 1fr; gap: 24px; }
  .to-doc-side { position: static; max-height: none; }
  .to-doc-nav { max-height: 50vh; border: 2px solid var(--to-ink); padding: 8px; }
  .to-doc-results { max-height: 60vh; }
  .to-doc-steps, .to-doc-cats { grid-template-columns: 1fr; }
  html body .to-doc-list a, .to-doc-list.is-compact a { grid-template-columns: 1fr; gap: 4px; }
  html body .to-doc-main h2.to-doc-name { font-size: 28px; }
  .to-doc-q:focus ~ kbd, .to-doc-q:not(:placeholder-shown) ~ kbd { display: none; }
.to-doc-search kbd { display: none; }
}
