/* ===== TO2026 — feuille de style du site ===== */
/* Police du BASIC 128 de TO2026 : glyphes de 8 x 8 points, nets aux tailles multiples de 8 px.
   Les sélecteurs commencent par "html body" pour passer devant /theme.css, ajouté après cette feuille. */
@font-face {
  font-family: "TO2026 BASIC";
  src: url("/fonts/to2026-basic.woff2") format("woff2");
  font-display: block;
}
/* même dessin, chasse fixe de 8 points, pour le code et l'écran du BASIC */
@font-face {
  font-family: "TO2026 BASIC Mono";
  src: url("/fonts/to2026-basic-mono.woff2") format("woff2");
  font-display: block;
}

:root {
  --to-paper: #f3f2ec;
  --to-ink: #121212;
  --to-muted: #55565c;
  --to-rule: #d9d7cd;
  --to-blue: #0010f0;
  --to-yellow: #ffff00;
  --to-pixel: "TO2026 BASIC", "Courier New", monospace;
  --to-mono: "TO2026 BASIC Mono", "Courier New", monospace;
  --to-wrap: 1440px;
}

html { background: var(--to-paper); }
html body {
  margin: 0;
  background: var(--to-paper);
  color: var(--to-ink);
  font-family: var(--to-pixel);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: none;
  font-smooth: never;
}
html body :is(h1, h2, h3, h4) { font-family: var(--to-pixel); font-weight: 400; color: var(--to-ink); line-height: 1.2; }
html body :is(button, input, select, textarea) { font-family: var(--to-pixel); }
html body a { color: inherit; }
html body img { max-width: 100%; height: auto; }

.to-wrap { max-width: var(--to-wrap); margin: 0 auto; padding: 0 32px; box-sizing: border-box; }

/* ---------- en-tête ---------- */
.to-header { position: sticky; top: 0; z-index: 50; background: var(--to-paper); border-bottom: 2px solid transparent; }
.to-header.is-scrolled { border-bottom-color: var(--to-ink); }
.to-header .to-wrap { display: flex; align-items: center; gap: 32px; min-height: 96px; position: relative; }
.to-logo { display: block; flex: 0 0 auto; line-height: 0; }
.to-logo img { height: 32px; width: auto; }

.to-nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.to-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 24px; }
html body .to-nav a, .to-nav .to-drop-btn { text-decoration: none; color: var(--to-ink); font-size: 16px; line-height: 1; white-space: nowrap; }
.to-nav > ul > li > a, .to-drop-btn { display: inline-flex; align-items: center; padding: 12px 0; border-bottom: 2px solid transparent; }
.to-nav > ul > li > a:hover, .to-drop-btn:hover, .to-nav a[aria-current="page"], .to-drop.is-current > .to-drop-btn { border-bottom-color: var(--to-ink); }

/* menu déroulant LANGAGES */
.to-drop { position: relative; }
.to-drop-btn { background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; gap: 10px; color: var(--to-ink); }
.to-caret { display: inline-block; width: 8px; height: 8px; transition: transform .15s; }
.to-drop:hover .to-caret, .to-drop:focus-within .to-caret { transform: rotate(180deg); }
.to-drop-panel {
  position: absolute; top: 100%; left: -24px; min-width: 220px;
  background: var(--to-paper); border: 2px solid var(--to-ink);
  box-shadow: 8px 8px 0 var(--to-ink);
  list-style: none; margin: 8px 0 0; padding: 12px 0;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .12s, transform .12s, visibility .12s;
}
.to-drop-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.to-drop:hover .to-drop-panel, .to-drop:focus-within .to-drop-panel { opacity: 1; visibility: visible; transform: none; }
html body .to-drop-panel a { display: block; padding: 12px 24px; }
html body .to-drop-panel a:hover, html body .to-drop-panel a:focus { background: var(--to-ink); color: var(--to-paper); outline: none; }

/* bouton principal */
html body .to-nav .to-cta, html body .to-cta {
  display: inline-flex; align-items: center; gap: 16px;
  background: var(--to-ink); color: var(--to-paper); text-decoration: none;
  font-size: 16px; line-height: 1; padding: 20px 24px; white-space: nowrap;
  border: 2px solid var(--to-ink);
}
html body .to-nav .to-cta:hover, html body .to-cta:hover, html body .to-nav .to-cta[aria-current="page"] { background: var(--to-blue); border-color: var(--to-blue); }
.to-cta .to-arrow { color: var(--to-yellow); }

/* choix de la langue */
html body .to-nav .to-lang { font-size: 12px; text-decoration: none; border: 2px solid var(--to-ink); padding: 8px 8px 7px; line-height: 1; }
html body .to-nav .to-lang:hover { background: var(--to-ink); color: var(--to-paper); }

/* menu sur petit écran */
.to-burger { display: none; margin-left: auto; background: none; border: 2px solid var(--to-ink); padding: 10px 12px; cursor: pointer; font-size: 16px; color: var(--to-ink); }

@media (max-width: 1599px) {
  html body .to-nav a, .to-nav .to-drop-btn, html body .to-nav .to-cta { font-size: 12px; }
  .to-nav, .to-nav > ul { gap: 22px; }
  html body .to-nav .to-cta { padding: 16px 18px; }
}
@media (max-width: 1339px) {
  .to-burger { display: block; }
  .to-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--to-paper); border-top: 2px solid var(--to-ink); border-bottom: 2px solid var(--to-ink); padding: 16px 32px 24px; flex-direction: column; align-items: stretch; gap: 16px; }
  .to-header.is-open .to-nav { display: flex; }
  .to-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  html body .to-nav a, .to-nav .to-drop-btn, html body .to-nav .to-cta { font-size: 16px; }
  .to-nav > ul > li > a, .to-drop-btn { padding: 14px 0; width: 100%; }
  .to-drop-panel { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-left: 2px solid var(--to-ink); margin: 0 0 8px; padding: 0; }
  .to-drop-panel::before { display: none; }
  .to-caret { display: none; }
  html body .to-nav .to-cta { justify-content: space-between; }
  html body .to-nav .to-lang { align-self: flex-start; }
}

/* ---------- accueil : les ordinateurs Thomson ---------- */
.to-hero { padding: 56px 0 32px; }
html body .to-kicker { font-size: 16px; color: var(--to-blue); margin: 0 0 16px; }
html body .to-hero h1 { font-size: 48px; line-height: 1.17; margin: 0 0 24px; max-width: 21em; }
.to-cursor { display: inline-block; width: .75em; height: .875em; background: var(--to-ink); vertical-align: -0.08em; margin-left: .2em; animation: to-blink 1s steps(1) infinite; }
@keyframes to-blink { 50% { opacity: 0; } }
html body .to-lede { font-size: 16px; color: var(--to-muted); max-width: 62ch; margin: 0; }

.to-panorama { margin: 40px 0 0; }
.to-panorama-frame { background: #c9c9cf; border: 2px solid var(--to-ink); box-shadow: 8px 8px 0 var(--to-ink); line-height: 0; }
html body .to-panorama-frame img { width: 100%; height: auto; display: block; }
.to-panorama figcaption { font-size: 12px; color: var(--to-muted); margin-top: 20px; }

.to-machines { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); border-top: 2px solid var(--to-ink); }
.to-machines li { padding: 16px 12px 20px 0; border-right: 2px dotted var(--to-rule); }
.to-machines li + li { padding-left: 16px; }
.to-machines li:last-child { border-right: 0; }
.to-machines b { display: block; font-weight: 400; font-size: 16px; }
.to-machines span { display: block; font-size: 12px; color: var(--to-muted); }
.to-machines .is-key b { color: var(--to-blue); }
.to-machines em { display: inline-block; margin-top: 8px; font-style: normal; font-size: 12px; background: var(--to-yellow); padding: 2px 6px; }
@media (max-width: 1099px) {
  html body .to-hero h1 { font-size: 32px; }
  .to-machines { grid-template-columns: repeat(2, 1fr); }
  .to-machines li, .to-machines li + li { border-right: 0; border-bottom: 2px dotted var(--to-rule); padding-left: 0; }
}
@media (max-width: 600px) {
  .to-wrap { padding: 0 16px; }
  html body .to-hero h1 { font-size: 24px; }
  .to-logo img { height: 24px; }
}

/* ---------- pages en préparation ---------- */
.to-soon { padding: 96px 0 128px; }
html body .to-soon h1 { font-size: 32px; margin: 0 0 24px; }
html body .to-soon p { color: var(--to-muted); }
html body .to-soon pre { font-family: var(--to-mono); font-size: 16px; background: var(--to-blue); color: var(--to-yellow); padding: 24px; margin: 32px 0 0; max-width: 640px; line-height: 1.5; white-space: pre-wrap; }

/* ---------- sections de l'accueil ---------- */
.to-section { padding: 120px 0 40px; }
html body .to-label { font-size: 12px; color: var(--to-muted); margin: 0 0 48px; }
.to-split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
html body .to-big { font-size: 48px; line-height: 1.17; margin: 0; }
.to-dim { color: #9a9a92; }
.to-split-text p { color: var(--to-muted); margin: 0 0 24px; }
html body .to-split-text .to-intro { font-size: 24px; line-height: 1.5; color: var(--to-ink); margin-bottom: 32px; }
html body .to-link { display: inline-flex; gap: 12px; margin-top: 16px; color: var(--to-blue); text-decoration: none; padding-bottom: 10px; border-bottom: 2px solid var(--to-ink); }
html body .to-link:hover { border-bottom-color: var(--to-blue); }

/* 02 · la machine en plan */
.to-blueprint {
  margin-top: 120px; padding: 96px 0 104px; color: #fff;
  background-color: #1029d8;
  background-image:
    linear-gradient(rgba(255,255,255,.14) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255,255,255,.14) 2px, transparent 2px),
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 128px 128px, 128px 128px, 16px 16px, 16px 16px;
}
html body .to-blueprint .to-label { color: #b9c3ff; }
html body .to-blueprint .to-big { color: #fff; max-width: 18em; }
.to-bp-head { display: grid; grid-template-columns: 1.3fr 1fr; gap: 64px; align-items: end; }
.to-bp-head p { margin: 0; color: #dfe4ff; }
.to-bp-figure { margin: 56px 0 0; border: 2px solid #fff; box-shadow: 8px 8px 0 #000a8a; line-height: 0; }
html body .to-bp-figure img { width: 100%; display: block; }
.to-bp-figure figcaption { line-height: 1.5; font-size: 12px; padding: 12px 16px; border-top: 2px solid #fff; background: #0a1db0; color: #fff; }
.to-specs { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid #fff; border-left: 2px solid #fff; }
.to-specs li { padding: 24px 24px 28px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; }
.to-specs span { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #fff; }
.to-specs span::before { content: ""; width: 8px; height: 8px; background: var(--to-yellow); }
.to-specs b { display: block; font-weight: 400; font-size: 32px; line-height: 1.25; color: var(--to-yellow); margin: 16px 0 12px; }
.to-specs p { margin: 0; color: #dfe4ff; font-size: 12px; line-height: 1.75; }

/* 03 · comprendre */
.to-stack { list-style: none; margin: 72px 0 0; padding: 0; }
.to-stack li { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: center; padding: 20px 24px; border: 2px solid var(--to-ink); background: #fff; }
.to-stack li + li { margin-top: -2px; }
.to-stack li:nth-child(1) { background: var(--to-yellow); }
.to-stack li:nth-child(2) { background: var(--to-ink); color: var(--to-paper); }
.to-stack li:nth-child(2) span { color: var(--to-yellow); }
.to-stack li:nth-child(3) { background: #fff; }
.to-stack li:nth-child(4) { background: #e6e4da; }
.to-stack span { font-size: 12px; }
.to-stack b { font-weight: 400; }
.to-stack i { font-style: normal; opacity: .6; }

.to-cards { margin: 72px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
html body .to-card { display: flex; flex-direction: column; text-decoration: none; color: var(--to-ink); background: #fff; border: 2px solid var(--to-ink); padding: 28px; transition: transform .12s, box-shadow .12s; }
html body .to-card:hover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 var(--to-ink); }
.to-card-k { font-size: 12px; color: var(--to-blue); }
html body .to-card h3 { font-size: 24px; line-height: 1.33; margin: 12px 0 20px; white-space: nowrap; }
/* les trois visuels ont la même hauteur : un écran 4:3 */
html body .to-card pre { font-family: var(--to-mono); font-size: 16px; line-height: 1.5; margin: 0 0 20px; padding: 16px; background: var(--to-blue); color: var(--to-yellow); white-space: pre; overflow: hidden; aspect-ratio: 4 / 3; box-sizing: border-box; border: 2px solid var(--to-ink); }
.to-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; box-sizing: border-box; border: 2px solid var(--to-ink); margin: 0 0 20px; }
.to-card p { margin: 0 0 20px; color: var(--to-muted); font-size: 12px; line-height: 1.75; flex: 1; }
.to-card em { font-style: normal; color: var(--to-blue); }

.to-try { margin: 96px 0 0; display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.to-try-screen { border: 2px solid var(--to-ink); box-shadow: 8px 8px 0 var(--to-ink); line-height: 0; }
.to-try-screen img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
html body .to-try h3 { font-size: 32px; margin: 0 0 32px; }
.to-try ol { margin: 0 0 40px; padding: 0; list-style: none; counter-reset: s; }
.to-try li { counter-increment: s; display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; padding: 14px 0; border-bottom: 2px dotted var(--to-rule); color: var(--to-muted); }
.to-try li::before { content: counter(s); font-family: var(--to-mono); font-size: 16px; color: var(--to-paper); background: var(--to-blue); width: 32px; text-align: center; line-height: 32px; }
.to-try li b { font-weight: 400; color: var(--to-ink); }
html body .to-try code { font-family: var(--to-mono); background: var(--to-ink); color: var(--to-yellow); padding: 2px 8px; white-space: nowrap; }

.to-figures { list-style: none; margin: 120px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--to-ink); }
.to-figures li { padding: 24px 24px 0 0; }
.to-figures b { display: block; font-weight: 400; font-size: 48px; line-height: 1.17; }
.to-figures span { display: block; margin-top: 8px; font-size: 12px; color: var(--to-muted); }

@media (max-width: 1099px) {
  .to-split, .to-bp-head, .to-try { grid-template-columns: 1fr; gap: 40px; }
  html body .to-big { font-size: 32px; }
  .to-specs { grid-template-columns: repeat(2, 1fr); }
  .to-cards { grid-template-columns: 1fr; }
  .to-figures { grid-template-columns: repeat(2, 1fr); }
  .to-stack li { grid-template-columns: 1fr; gap: 8px; }
  html body .to-card pre { font-size: 12px; aspect-ratio: auto; }
}
@media (max-width: 600px) {
  .to-section { padding-top: 80px; }
  html body .to-big { font-size: 24px; }
  .to-specs { grid-template-columns: 1fr; }
  .to-figures b { font-size: 32px; }
  html body .to-split-text .to-intro { font-size: 16px; }
}

/* ---------- pied de page ---------- */
.to-footer { margin-top: 120px; padding: 40px 0 48px; border-top: 2px solid var(--to-ink); font-size: 12px; color: var(--to-muted); }
.to-footer .to-wrap { display: grid; grid-template-columns: auto 1fr auto auto; gap: 48px; align-items: center; }
.to-foot-logo { line-height: 0; }
.to-foot-logo img { height: 24px; width: auto; }
.to-footer p { margin: 0; line-height: 1.75; }
html body .to-foot-top { color: var(--to-ink); text-decoration: none; }
html body .to-foot-top:hover { color: var(--to-blue); }
.to-foot-c { color: var(--to-ink); }
@media (max-width: 800px) {
  .to-footer .to-wrap { grid-template-columns: 1fr auto; gap: 24px; }
  .to-footer p { grid-column: 1 / -1; order: 3; }
}
