/* Le site de Lineside : la palette de l'application (src/renderer/style.css), Catppuccin
   Mocha, pour qu'une capture ait le fond de la page qui l'entoure. Aucune couleur hors de
   :root — test/site.test.ts le vérifie. Servi sous une CSP stricte : aucun style en ligne. */
:root {
  color-scheme: dark;
  --base: #1e1e2e;
  --mantle: #181825;
  --crust: #11111b;
  --surface: rgba(49, 50, 68, 0.72);
  --filet: rgba(205, 214, 244, 0.1);
  --text: #cdd6f4;
  --secondary: #a6adc8;
  --neutre: #9399b2;
  --rail: #6c7086;
  --accent: #89b4fa;
  --green: #a6e3a1;
  --attention: #f9e2af;
  --mauve: #cba6f7;
  --rouge: #f38ba8;
  --ui: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --largeur: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font: 17px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 0.9rem; }
h3 { font-size: 1.12rem; margin: 1.6rem 0 0.5rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }
strong { color: var(--text); }

code, kbd, pre { font-family: var(--mono); font-size: 0.88em; }
code { color: var(--green); }
pre {
  margin: 0 0 1rem;
  padding: 0.9rem 1.1rem;
  overflow-x: auto;
  background: var(--mantle);
  border: 1px solid var(--filet);
  border-radius: 10px;
}
pre code { color: var(--text); font-size: 0.92rem; }
kbd {
  display: inline-block;
  padding: 0.05em 0.45em;
  color: var(--text);
  background: var(--mantle);
  border: 1px solid var(--filet);
  border-bottom-width: 2px;
  border-radius: 6px;
  white-space: nowrap;
}

.wrap { max-width: var(--largeur); margin: 0 auto; padding: 0 1.25rem; }

/* L'en-tête, recopié dans chaque page : la navigation existe sans JavaScript. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--mantle);
  border-bottom: 1px solid var(--filet);
}
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.75rem; min-height: 3.75rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); font-size: 1.1rem; font-weight: 700; text-decoration: none; }
/* L'icône est décorative : un fond, pas une <img>, qui exigerait un texte de remplacement. */
.brand::before { content: ""; width: 1.75rem; height: 1.75rem; background: url(/icon.svg) center / contain no-repeat; }
.site-header nav { display: flex; gap: 1.25rem; margin-right: auto; }
.site-header nav a { padding: 0.3rem 0; color: var(--secondary); text-decoration: none; border-bottom: 2px solid transparent; }
.site-header nav a:hover { color: var(--text); }
.site-header nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
/* Le choix de langue ne vit qu'avec JavaScript : sans lui, les boutons ne feraient rien. */
.lang { display: none; gap: 0.25rem; }
.js .lang { display: flex; }
.lang button {
  padding: 0.2rem 0.55rem;
  color: var(--secondary);
  background: transparent;
  border: 1px solid var(--filet);
  border-radius: 6px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { color: var(--base); background: var(--accent); border-color: var(--accent); }

/* L'accueil */
.hero { padding: 4.5rem 0 3.5rem; }
.eyebrow { display: block; margin-bottom: 1rem; color: var(--mauve); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.02em; }
.lede { max-width: 42rem; color: var(--secondary); font-size: 1.22rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 2.75rem; }
.button {
  display: inline-block;
  padding: 0.6rem 1.15rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--filet);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { color: var(--text); border-color: var(--accent); }
.button.primary { color: var(--base); background: var(--accent); border-color: var(--accent); }
.button.primary:hover { color: var(--base); background: var(--text); border-color: var(--text); }
.pastille {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.7rem;
  color: var(--secondary);
  background: var(--surface);
  border: 1px solid var(--filet);
  border-radius: 999px;
  font-size: 0.85rem;
}
.pastille::before { content: ""; width: 0.5rem; height: 0.5rem; background: var(--attention); border-radius: 50%; }

/* Les sections : chacune est une station du rail, son titre porte le nœud à sa teinte. */
.section { padding: 3.75rem 0; border-top: 1px solid var(--filet); }
.section h2 { display: flex; align-items: center; gap: 0.75rem; }
.section h2::before {
  content: "";
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--teinte, var(--accent));
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--surface);
}
.t-vert { --teinte: var(--green); }
.t-jaune { --teinte: var(--attention); }
.t-mauve { --teinte: var(--mauve); }
.t-rouge { --teinte: var(--rouge); }
.intro { max-width: 46rem; color: var(--secondary); font-size: 1.08rem; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 2rem 3rem; align-items: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); gap: 1rem; margin-top: 1.5rem; }
.card { padding: 1.2rem 1.35rem; background: var(--surface); border: 1px solid var(--filet); border-radius: 12px; }
.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.shot { margin: 1.5rem 0 0; }
.shot img { width: 100%; border: 1px solid var(--filet); border-radius: 12px; box-shadow: 0 28px 60px -24px var(--crust); }
.shot figcaption { margin-top: 0.7rem; color: var(--neutre); font-size: 0.9rem; }

.etats { display: grid; gap: 0.45rem; padding: 0; list-style: none; }
.etats li { margin: 0; }

/* Le guide */
.hero-court { padding-bottom: 2rem; }
.lecture { max-width: 52rem; }
.toc { columns: 2 15rem; column-gap: 2rem; padding-left: 1.2rem; }
.steps { padding: 0; list-style: none; counter-reset: etape; }
.steps li { position: relative; margin-bottom: 0.75rem; padding-left: 2.4rem; counter-increment: etape; }
.steps li::before {
  content: counter(etape);
  position: absolute;
  top: 0.12rem;
  left: 0;
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  color: var(--base);
  background: var(--accent);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
}
.exemple, .note { margin: 1.25rem 0; padding: 1rem 1.25rem; border-radius: 0 10px 10px 0; }
.exemple { background: var(--mantle); border-left: 3px solid var(--green); }
.note { background: var(--surface); border-left: 3px solid var(--attention); }
.exemple > :last-child, .note > :last-child { margin-bottom: 0; }
.etiquette { display: block; margin-bottom: 0.35rem; color: var(--green); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.note .etiquette { color: var(--attention); }

.table-scroll { overflow-x: auto; }
.keys { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.keys th, .keys td { padding: 0.55rem 0.75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--filet); }
.keys th { color: var(--neutre); font-size: 0.85rem; font-weight: 600; }

.site-footer { padding: 2rem 0 3rem; color: var(--neutre); font-size: 0.9rem; border-top: 1px solid var(--filet); }
.site-footer p { margin: 0; }

@media (max-width: 56rem) {
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 40rem) {
  body { font-size: 16px; }
  .header-inner { gap: 0.25rem 1rem; padding-block: 0.5rem; }
  .lang { margin-left: auto; }
  .site-header nav { order: 3; width: 100%; margin-right: 0; }
  .hero { padding: 2.5rem 0 2rem; }
  .section { padding: 2.75rem 0; }
}
