/* docs.css — Mise en page des pages de documentation générées à partir
   des exports Markdown (AFFiNE). Un seul gabarit pour toutes les pages
   sous /docs/**, indépendant du contenu. */

.doc-shell {
  max-width: 53.75rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.2rem, 5vw, 2rem) 6rem;
}

.doc-breadcrumbs {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.5rem;
}
.doc-breadcrumbs a { color: var(--ink-dim); }
.doc-breadcrumbs a:hover { color: var(--gold-ink); }
.doc-breadcrumbs .sep { margin: 0 0.5em; color: var(--ink-ghost); }

.doc-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.2rem;
}

.doc-article {
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.7;
}

.doc-article h1,
.doc-article h2,
.doc-article h3 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 2.2em 0 0.8em;
  line-height: 1.25;
}
.doc-article h1 { font-size: 1.5rem; }
.doc-article h2 {
  font-size: 1.25rem;
  border-left: 3px solid var(--gold);
  padding-left: 0.6em;
}
.doc-article h3 { font-size: 1.05rem; color: var(--ink-dim); }

.doc-article p { margin: 0 0 1em; }
.doc-article p:empty { display: none; }

.doc-article a {
  color: var(--gold-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.doc-article a:hover { color: var(--ink); }

.doc-article strong { color: var(--ink); }

.doc-article ul,
.doc-article ol {
  margin: 0 0 1.2em 2em;
  padding-left: 1.4em;
}
.doc-article li { margin-bottom: 0.4em; }
/* Sous-listes : alignées sous le texte du parent, sans marge supplémentaire. */
.doc-article li > ul,
.doc-article li > ol {
  margin: 0.4em 0 0 0;
  padding-left: 0;
}

/* Puces hexagonales, en écho au marqueur des ".eyebrow" du reste du site. */
.doc-article ul { list-style: none; padding-left: 0; }
.doc-article ul > li {
  position: relative;
  padding-left: 1.4em;
}
.doc-article ul > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.625rem;
  height: 0.625rem;
  background: var(--gold);
  clip-path: var(--hex);
}

.doc-article ol { list-style: none; counter-reset: doc-ol; padding-left: 0; }
.doc-article ol > li {
  position: relative;
  padding-left: 1.9em;
  counter-increment: doc-ol;
}
.doc-article ol > li::before {
  content: counter(doc-ol);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.4em;
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--gold-ink);
}

.doc-article code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.1em 0.4em;
}
.doc-article pre {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  margin: 0 0 1.4em;
}
.doc-article pre code { background: none; border: none; padding: 0; }

.doc-article blockquote {
  border-left: 3px solid var(--line);
  margin: 0 0 1.4em;
  padding: 0.2em 0 0.2em 1.2em;
  color: var(--ink-dim);
}

/* Callout : converti depuis les blocs "> [!type]" exportés par AFFiNE.
   Le marqueur "#WARNING#/#INFO#/#HELP#/#DANGER#" en tête du texte choisit
   l'icône et le liseret ; sans marqueur, on garde le style neutre (doré). */
.doc-article .callout {
  display: block;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  padding: 1rem 1.2rem;
  margin: 0 0 1.4em;
  color: var(--ink-dim);
}
.doc-article .callout p:last-child { margin-bottom: 0; }

.doc-article .callout-with-icon {
  display: flex;
  align-items: flex-start;
  gap: 0.8em;
}
.doc-article .callout-icon {
  flex: 0 0 auto;
  font-size: 1.2em;
  line-height: 1.6;
}
.doc-article .callout-body { flex: 1 1 auto; min-width: 0; }
.doc-article .callout-body p:last-child { margin-bottom: 0; }

.doc-article .callout-info    { border-left-color: var(--gold); }
.doc-article .callout-warning { border-left-color: var(--warning); }
.doc-article .callout-help    { border-left-color: var(--bim); }
.doc-article .callout-danger  { border-left-color: var(--dev); }

.doc-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.6em;
  font-size: 0.92rem;
}
.doc-article th,
.doc-article td {
  border: 1px solid var(--line);
  padding: 0.6em 0.8em;
  text-align: left;
  white-space: pre-line;
  vertical-align: top;
}
.doc-article th {
  background: var(--bg-raised);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.doc-article table tr:nth-child(even) td { background: var(--stripe); }

.doc-article hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

.doc-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.doc-footer a { color: var(--ink-dim); }
.doc-footer a:hover { color: var(--gold-ink); }

/* Accueil /docs : dossiers en titres, documents en liens */
.doc-index > .doc-index-section:first-child > h2 { margin-top: 0; }
.doc-index-section .doc-index-section { margin-left: 1.2rem; }
.doc-article ul.doc-index-list { margin-left: 0; }
.doc-article .doc-index-list a { text-decoration: none; }
.doc-article .doc-index-list a:hover { text-decoration: underline; }
