/* Politique de confidentialité : en-tête, encadrés « en bref », sommaire et texte. */

html { scroll-behavior: smooth; }
body { line-height: 1.65; }
.backdrop { --backdrop-height: 30rem; }
code {
  font-family: ui-monospace, "SF Mono", "DejaVu Sans Mono", monospace; font-size: 0.875em;
  padding: 0.1em 0.35em; border: 1px solid var(--border); border-radius: 6px; background: var(--chip);
  overflow-wrap: anywhere;
}

/* En-tête de page */
.head { padding-top: 3.5rem; padding-bottom: 2.5rem; text-align: center; }
h1 { margin: 0 0 0.75rem; font-size: clamp(2rem, 6vw, 3rem); line-height: 1.1; letter-spacing: -0.03em; }
.head p { max-width: 56ch; margin: 0 auto; color: var(--muted); font-size: 1.075rem; }

/* En bref */
.brief { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 3.5rem; }
.brief-item {
  display: flex; gap: 0.85rem; align-items: flex-start;
  padding: 1.1rem 1.2rem; border: 1px solid var(--border); border-radius: 1rem;
  background: var(--card); box-shadow: var(--shadow);
}
.brief-item strong { display: block; margin-bottom: 0.15rem; }
.brief-item span { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

/* Sommaire + texte : mise en page inspirée de « Table of Contents » (21st.dev) */
.layout { display: grid; grid-template-columns: 13rem minmax(0, 70ch); gap: 3.5rem; justify-content: center; }
.toc { position: sticky; top: 1.5rem; align-self: start; font-size: 0.9rem; }
.toc-title { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.75rem; font-weight: 600; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc a {
  display: block; margin-left: -1px; padding: 0.3rem 0 0.3rem 0.9rem;
  border-left: 1px solid transparent; color: var(--muted); text-decoration: none;
}
.toc a:hover { color: var(--fg); border-left-color: var(--fg); }

article section {
  scroll-margin-top: 1.5rem; padding-bottom: 1.75rem; margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}
article section:last-child { border-bottom: 0; }
h2 { display: flex; align-items: center; gap: 0.7rem; margin: 0 0 0.85rem; font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.015em; }
.num {
  display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; flex: none;
  border: 1px solid var(--border); border-radius: 0.5rem; background: var(--chip);
  color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums;
}
article p, article ul { margin: 0 0 0.9rem; }
article p:last-child, article ul:last-child { margin-bottom: 0; }
article ul { padding-left: 1.2rem; }
article li { margin-bottom: 0.3rem; }
blockquote {
  position: relative; margin: 0; padding: 1.1rem 1.25rem;
  border: 1px solid var(--border); border-radius: 1rem; background: var(--card); box-shadow: var(--shadow);
}
blockquote::before {
  content: ""; position: absolute; left: -1px; top: 1rem; bottom: 1rem; width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, #dd7bbb, #d79f1e, #5a922c, #4c7894);
}
blockquote p { margin: 0; }
footer { margin-top: 4rem; }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 70ch); gap: 2rem; }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 0.4rem; border-left: 0; }
  .toc a { margin: 0; padding: 0.25rem 0.7rem; border: 1px solid var(--border); border-radius: 999px; background: var(--card); }
  .toc a:hover { border-color: var(--fg); }
}
@media (max-width: 760px) {
  .head { padding-top: 2rem; }
  .brief { grid-template-columns: 1fr; margin-bottom: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
