:root {
  --bg: #ffffff;
  --bg-soft: #f4f7fd;
  --bg-card: #ffffff;
  --text: #1b2433;
  --text-dim: #4b5668;
  --line: #dbe3f0;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #e0ecff;
  --accent: #f59e0b;
  --on-brand: #ffffff;
  --shadow: 0 18px 50px rgba(15, 23, 42, .18);
  --radius: 14px;
  --max: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1422;
    --bg-soft: #131b2d;
    --bg-card: #172036;
    --text: #e8edf7;
    --text-dim: #aab4c6;
    --line: #26324d;
    --brand: #6b9bff;
    --brand-dark: #8bb0ff;
    --brand-soft: #1c2c52;
    --on-brand: #0e1422;
    --shadow: 0 18px 50px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  --bg: #0e1422;
  --bg-soft: #131b2d;
  --bg-card: #172036;
  --text: #e8edf7;
  --text-dim: #aab4c6;
  --line: #26324d;
  --brand: #6b9bff;
  --brand-dark: #8bb0ff;
  --brand-soft: #1c2c52;
  --on-brand: #0e1422;
  --shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
code, kbd {
  font: .92em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .1em .4em;
}
kbd { border-bottom-width: 2px; }
pre {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: .92rem;
  line-height: 1.5;
}
pre code { background: none; border: 0; padding: 0; }
.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--bg-card); padding: 8px 12px; z-index: 10; }

/* 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);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; color: var(--text); text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand:hover { color: var(--text); }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: var(--text-dim); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .98rem;
}
.nav a:hover { background: var(--bg-soft); color: var(--text); }
.nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
.nav a.external::after { content: " ↗"; font-size: .8em; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; border-radius: 10px; padding: 12px 20px;
  font-weight: 600; text-decoration: none; border: 2px solid var(--brand); font-size: 1rem; cursor: pointer;
  background: var(--brand); color: var(--on-brand); transition: transform .12s, box-shadow .12s;
}
.btn:hover { color: var(--on-brand); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(37, 99, 235, .3); }
.btn.secondary { background: transparent; color: var(--brand); }
.btn.secondary:hover { color: var(--brand); background: var(--brand-soft); box-shadow: none; }
.btn small { font-weight: 400; opacity: .85; }

/* Accueil */
.hero { background: radial-gradient(1200px 500px at 50% -10%, var(--brand-soft), transparent 70%), var(--bg); padding: 64px 0 32px; text-align: center; }
.hero .lead { font-size: 1.25rem; color: var(--text-dim); max-width: 46rem; margin: 0 auto 28px; }
.hero .name-note { color: var(--text-dim); font-size: .98rem; margin: -10px 0 26px; }
.hero .name-note strong { color: var(--brand); }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.hero .meta { color: var(--text-dim); font-size: .92rem; }
.shot { margin: 0; }
.window {
  border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--bg-card);
}
.window .bar { position: relative; display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 8px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.window .bar b { font-weight: 600; font-size: .85rem; line-height: 1; color: var(--text-dim); }
.window .bar span { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: flex; gap: 6px; }
.window .bar i { position: relative; width: 24px; height: 24px; border-radius: 50%; background: color-mix(in srgb, var(--text) 9%, transparent); display: block; }
.window .bar i::before, .window .bar i::after { content: ""; position: absolute; left: 50%; top: 50%; box-sizing: border-box; border: 0 solid var(--text-dim); }
.window .bar i:nth-child(1)::before { width: 9px; height: 0; border-top-width: 1.6px; transform: translate(-50%, 3px); }
.window .bar i:nth-child(2)::before { width: 9px; height: 9px; border-width: 1.6px; transform: translate(-50%, -50%); }
.window .bar i:nth-child(3)::before, .window .bar i:nth-child(3)::after { width: 11px; height: 0; border-top-width: 1.6px; transform: translate(-50%, -50%) rotate(45deg); }
.window .bar i:nth-child(3)::after { transform: translate(-50%, -50%) rotate(-45deg); }
.window img { display: block; width: 100%; }
.window a.zoom { display: block; cursor: zoom-in; }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
dialog.lightbox::backdrop { background: rgba(8, 12, 24, .82); }
dialog.lightbox img { display: block; max-width: 96vw; max-height: 94vh; width: auto; height: auto; border-radius: 10px; cursor: zoom-out; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.hero .window { max-width: 980px; margin: 36px auto 0; }
figcaption { color: var(--text-dim); font-size: .92rem; margin-top: 10px; text-align: center; }

section.block { padding: 64px 0; }
section.soft { background: var(--bg-soft); }
.section-head { max-width: 44rem; margin: 0 auto 36px; text-align: center; }
.section-head p { color: var(--text-dim); font-size: 1.1rem; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.card h3 { margin-bottom: .35em; }
.card p { color: var(--text-dim); margin: 0; font-size: .98rem; }
.card .ico {
  width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; margin-bottom: 14px;
}
.card .ico svg { width: 24px; height: 24px; }
.split { display: grid; gap: 40px; grid-template-columns: 1fr 1.25fr; align-items: center; }
.split.flip { grid-template-columns: 1.25fr 1fr; }
.split.flip > :first-child { order: 2; }
.split ul { padding-left: 1.2em; margin: 0 0 1em; }
.split li { margin-bottom: .45em; }
.tag { display: inline-block; font-size: .8rem; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 3px 10px; margin-bottom: 10px; }
.notice {
  border: 1px solid var(--line); border-left: 5px solid var(--accent); background: var(--bg-card);
  border-radius: 10px; padding: 18px 22px; max-width: 52rem; margin: 0 auto;
}
.cta-band { text-align: center; padding: 56px 0; background: var(--brand); color: #fff; }
.cta-band h2 { color: #fff; }
.cta-band .btn { background: #fff; color: #1d4ed8; border-color: #fff; }
.cta-band .btn:hover { color: #1d4ed8; }

/* Pages intérieures */
.page-head { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 44px 0 32px; }
.page-head p { color: var(--text-dim); max-width: 46rem; font-size: 1.1rem; margin: 0; }
.page-body { padding: 40px 0 72px; }
.prose { max-width: 50rem; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }

/* Téléchargement */
.os-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.os-card { background: var(--bg-card); border: 2px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.os-card.detected { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.os-card .os-name { display: flex; align-items: center; gap: 12px; font-size: 1.4rem; font-weight: 700; }
.os-card .os-name svg { width: 34px; height: 34px; color: var(--brand); }
.os-card .req { color: var(--text-dim); font-size: .92rem; margin-bottom: 10px; }
.dl { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 12px; }
.dl a { text-align: left; justify-content: space-between; }
.dl .btn small { display: block; }
.badge-detected { display: none; font-size: .78rem; background: var(--brand); color: var(--on-brand); border-radius: 999px; padding: 2px 10px; margin-left: auto; }
.os-card.detected .badge-detected { display: inline-block; }
table { width: 100%; border-collapse: collapse; margin: 1em 0 1.6em; font-size: .97rem; }
th, td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
th { background: var(--bg-soft); }

/* Documentation */
.doc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; }
.toc { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; font-size: .95rem; }
.toc strong { display: block; margin-bottom: 8px; }
.toc a { display: block; padding: 5px 10px; color: var(--text-dim); text-decoration: none; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--brand); border-left-color: var(--brand); }
.toc a.active { color: var(--brand); border-left-color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.doc h2 { margin-top: 2em; padding-top: .4em; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.doc h2:first-child { margin-top: 0; border-top: 0; }
.doc h3 { scroll-margin-top: 80px; }
.doc .window { margin: 18px 0 26px; }

/* Logos */

/* Pied de page */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--text-dim); font-size: .94rem; }
.site-footer .wrap { display: flex; gap: 16px 28px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--brand); }

@media (max-width: 860px) {
  .split, .split.flip { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
  .doc-layout { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
  .nav { margin-left: 0; width: 100%; }
  .site-header .wrap { padding-block: 8px; gap: 4px 12px; }
  section.block { padding: 44px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
