:root {
  /* Same palette as the app (src/assets/css/operator.css). */
  --bg: #ffffff;
  --bg-alt: #f6f8fa;
  --surface: #ffffff;
  --surface-1: #e9edf2;
  --text: #000000;
  --muted: #53585f;
  --mute-2: #6e7681;
  --line: #dfe3e8;
  --line-strong: #ccd2da;
  --live: #22c55e;
  --accent: #2563eb;
  --button: #000000;
  --button-text: #ffffff;
  --shot-edge: rgba(0, 0, 0, .1);
  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 19px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }

h1, h2 {
  font-weight: 700;
  letter-spacing: -.025em;
  margin: 0;
}

code {
  font-family: var(--font);
  font-size: .92em;
  background: var(--bg-alt);
  padding: .1em .35em;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Layout */
.top, main, .bottom {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
}
.brand img { border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.nav { display: flex; align-items: center; gap: 28px; font-size: .95rem; }
.nav > a { text-decoration: none; color: var(--muted); }
.nav > a:hover { color: var(--text); }
.nav > a[aria-current="page"] { color: var(--text); }
.lang { display: flex; gap: 2px; }
.lang button {
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}
.lang button[aria-pressed="true"] { color: var(--text); background: var(--bg-alt); }

/* Hero */
.hero { padding: 64px 0 40px; }
h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.4rem);
  line-height: 1.04;
  max-width: 15em;
}
.lead {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 36em;
  margin: 26px 0 36px;
}
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--button);
  color: var(--button-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 16px 28px;
  border-radius: 10px;
}
.button:hover { opacity: .88; }
.button svg { width: 22px; height: 22px; flex: none; }
.cta-meta { margin: 0; color: var(--muted); font-size: 1rem; }
.cta-meta span + a::before { content: "·"; display: inline-block; margin: 0 .6em; color: var(--muted); }
.cta-meta a { text-underline-offset: 3px; }
#version-line:empty { display: none; }

/* Operator window + projected slide */
.stage {
  position: relative;
  margin-top: 72px;
  padding-bottom: 120px;
}
.stage-operator { width: 84%; }
.stage-screen {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42%;
}
.shot {
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--shot-edge), 0 30px 70px -30px rgba(15, 23, 42, .3);
  background: #fff;
}
.slide {
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--shot-edge), 0 20px 50px -24px rgba(15, 23, 42, .35);
  background: #fff;
}

figcaption {
  margin-top: 12px;
  font-size: .9rem;
  color: var(--muted);
}

/* Features */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 72px;
  align-items: start;
  padding: 96px 0;
  border-top: 1px solid var(--line);
}
.feature h2, .speed h2, .download h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.12;
  margin-bottom: 22px;
}
.feature-text p { margin: 0 0 18px; font-size: 1.12rem; }
.aside { color: var(--muted); font-size: 1rem !important; }
.feature-wide { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
.feature-flip .feature-text { order: 2; }
.feature-flip { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }

.keys {
  border-collapse: collapse;
  width: 100%;
  font-size: 1.02rem;
}
.keys th, .keys td { padding: 13px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.keys tr:first-child th, .keys tr:first-child td { border-top: 1px solid var(--line); }
.keys th { text-align: left; font-weight: 400; padding-right: 20px; }
.keys td { text-align: right; white-space: nowrap; }
kbd {
  display: inline-block;
  min-width: 2em;
  margin-left: 4px;
  padding: 3px 8px;
  font: 600 .85rem/1.4 var(--font);
  text-align: center;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
}
.or { color: var(--muted); font-size: .9rem; margin: 0 2px; }

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
}

/* Speed */
.speed {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}
.speed > p { font-size: 1.12rem; max-width: 40em; margin: 0; }
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 56px 0 0;
}
.facts div { border-top: 2px solid var(--live); padding-top: 16px; }
.facts dt { font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.facts dd { margin: 6px 0 0; color: var(--muted); }

/* Download */
.download {
  padding: 96px 0 80px;
  border-top: 1px solid var(--line);
}
.download-head .aside { margin: -8px 0 32px; }
.platforms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.platforms a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
}
.platforms a:hover { border-color: var(--text); }
.platforms a.recommended { border-color: var(--live); box-shadow: inset 0 0 0 1px var(--live); }
.platforms strong { font-size: 1.15rem; }
.platforms span { color: var(--muted); }
.platforms small { margin-top: 10px; color: var(--muted); font-size: .9rem; }
.platforms small:empty { display: none; }

.install-title { font-size: 1.3rem; margin: 64px 0 10px; }
.install-lead { color: var(--muted); max-width: 44em; margin: 0 0 32px; }
.install-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.install-grid > div { min-width: 0; }
.install-grid h4 { margin: 0 0 12px; font-size: 1.05rem; }
.install-grid ol { margin: 0; padding-left: 1.3em; }
.install-grid li { margin-bottom: 10px; }

.cmd { display: flex; gap: 8px; margin-top: 12px; }
.cmd code {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: nowrap;
}
.copy {
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  cursor: pointer;
}
.copy:hover { border-color: var(--text); }

/* Footer */
.bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 28px;
  padding-bottom: 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .95rem;
}
.bottom .copyright { margin-right: auto; }
.bottom a { text-decoration: none; }
.bottom a:hover { color: var(--text); }

/* User guide (guide.html), rendered from the README */
.guide-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 72px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 96px;
}
.toc {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  font-size: .9rem;
}
.toc[hidden] { display: none; }
.toc-title {
  margin: 0 0 10px;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--mute-2);
}
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li.sub { padding-left: 14px; font-size: .86rem; }
.toc a {
  display: block;
  padding: 4px 0;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.35;
}
.toc a:hover { color: var(--text); }

.guide { grid-column: 2; min-width: 0; max-width: 40em; }
.guide h1 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); line-height: 1.08; margin-bottom: 32px; }
.guide h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  line-height: 1.15;
  margin: 64px 0 16px;
  scroll-margin-top: 24px;
}
.guide h3 { font-size: 1.2rem; margin: 40px 0 10px; scroll-margin-top: 24px; }
.guide h4 { font-size: 1.05rem; margin: 28px 0 8px; }
.guide p, .guide ul, .guide ol { margin: 0 0 16px; }
.guide ul, .guide ol { padding-left: 1.3em; }
.guide li { margin-bottom: 6px; }
.guide a { color: var(--accent); text-underline-offset: 3px; }
.guide hr { display: none; }
.guide pre {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}
.guide pre code {
  padding: 0;
  background: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem;
}
.guide blockquote {
  margin: 0 0 16px;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--line-strong);
  color: var(--muted);
}
.guide table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0 0 16px;
  font-size: .95rem;
}
.guide th, .guide td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; }
.guide th { background: var(--bg-alt); }
.guide-status { color: var(--muted); }
.guide-more {
  margin: 64px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.guide-more[hidden] { display: none; }

@media (max-width: 980px) {
  .feature, .feature-wide, .feature-flip { grid-template-columns: 1fr; gap: 40px; padding: 72px 0; }
  .feature-flip .feature-text { order: 0; }
  .stage-operator { width: 100%; }
  .stage { padding-bottom: 0; }
  .stage-screen { position: relative; width: 62%; margin: -18% 0 0 auto; }
  .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 16px; }
  .guide { grid-column: auto; }
  .toc {
    position: static;
    max-height: none;
    padding: 18px 20px;
    background: var(--bg-alt);
    border-radius: 10px;
  }
}

@media (max-width: 680px) {
  body { font-size: 18px; }
  .top, main, .bottom { padding-left: 16px; padding-right: 16px; }
  .nav { gap: 16px; }
  .nav > a[href$="#telecharger"] { display: none; }
  .hero { padding-top: 32px; }
  .stage { margin-top: 48px; }
  .stage-screen { width: 72%; }
  .button { width: 100%; justify-content: center; }
  .compare, .platforms, .install-grid, .facts { grid-template-columns: 1fr; }
  .facts { gap: 24px; }
  .keys th { font-size: .95rem; }
}
