/* tm-exclusions — page de présentation.
   Thème clair/sombre via color-scheme + light-dark() (suit prefers-color-scheme).
   Mise en page fluide (clamp, grilles auto-fit) : aucune largeur fixe. */

:root {
  color-scheme: light dark;
  --bg: light-dark(#fbfaf7, #12151a);
  --surface: light-dark(#ffffff, #1b2028);
  --text: light-dark(#1c2128, #e6e8eb);
  --muted: light-dark(#4f5862, #a9b1bb);
  --line: light-dark(#d9dde2, #333b46);
  --accent: light-dark(#0b6b5e, #5fd3bf);
  --accent-soft: light-dark(#e3f3ef, #173a35);
  --warn: light-dark(#8a4b00, #f2b866);
  --node: light-dark(#f2f5f8, #222a34);
  --node-accent: light-dark(#e3f3ef, #173a35);
  --radius: 0.6rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 100%;
  line-height: 1.6;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-wrap: anywhere;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--accent-soft);
  padding: 0.05em 0.3em;
  border-radius: 0.25em;
}

.skip {
  position: absolute;
  left: -999rem;
}

.skip:focus {
  left: var(--gutter);
  top: 0.5rem;
  background: var(--surface);
  padding: 0.4rem 0.8rem;
  z-index: 1;
}

.wrap {
  width: min(100% - 2 * var(--gutter), 60rem);
  margin-inline: auto;
}

header.hero {
  padding-block: clamp(2rem, 7vw, 4.5rem) clamp(1.5rem, 5vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.15;
}

.lead {
  margin: 0;
  max-width: 42rem;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 1.25rem 0 0;
  list-style: none;
}

.tags li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.cta a {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  font-weight: 600;
  text-decoration: none;
}

nav.toc {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

nav.toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  padding: 0.75rem 0;
  margin: 0;
  list-style: none;
  font-size: 0.95rem;
}

main section {
  padding-block: clamp(1.75rem, 5vw, 3rem);
  border-bottom: 1px solid var(--line);
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  line-height: 1.25;
}

h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

p {
  margin: 0 0 1rem;
  max-width: 44rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 1rem;
  padding: 0;
  margin: 0 0 1rem;
  list-style: none;
}

.stats li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

.stats strong {
  display: block;
  font-size: 1.9rem;
  line-height: 1.1;
  color: var(--accent);
}

.stats span {
  color: var(--muted);
  font-size: 0.95rem;
}

.note {
  color: var(--muted);
  font-size: 0.92rem;
}

ul.plain {
  padding-left: 1.2rem;
  margin: 0 0 1rem;
  max-width: 44rem;
}

ul.plain li {
  margin-bottom: 0.45rem;
}

.limits li::marker {
  color: var(--warn);
}

/* Schéma d'architecture */
figure.diagram {
  margin: 0 0 1.5rem;
  max-width: 30rem;
}

figure.diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

figure.diagram figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.d-node {
  fill: var(--node);
  stroke: var(--line);
  stroke-width: 1.5;
}

.d-node-accent {
  fill: var(--node-accent);
  stroke: var(--accent);
  stroke-width: 1.5;
}

.d-title {
  fill: var(--text);
  font: 600 15px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.d-sub {
  fill: var(--muted);
  font: 13px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.d-arrow {
  stroke: var(--muted);
  stroke-width: 2;
  fill: none;
}

.d-head {
  fill: var(--muted);
}

footer {
  padding-block: 2rem 3rem;
  color: var(--muted);
  font-size: 0.92rem;
}

footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 0.75rem 0;
}

.demo {
  margin: 1.5rem 0 0;
  max-width: 100%;
}

.demo details {
  max-width: 100%;
}

.demo summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
}

.demo summary:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.demo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.demo figcaption {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.install {
  margin-top: 1.5rem;
}

.install h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.install pre {
  margin: 0 0 0.75rem;
  max-width: 42rem;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.5;
}

.install pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

nav.lang {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

nav.lang .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.5rem;
  font-size: 0.95rem;
}

nav.lang a {
  font-weight: 600;
  text-decoration: none;
  padding: 0.2rem 0.35rem;
}

nav.lang a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
