/*
 * Documentation développeur Kamazeole.
 *
 * Feuille unique, sans dépendance, sans build. Le site marketing est en hébreu
 * RTL et taillé pour de la conversion ; une documentation technique a d'autres
 * contraintes — chasse fixe lisible, code sélectionnable, densité plus élevée,
 * ancres stables. Aucune ligne n'est partagée avec le site, volontairement :
 * c'est ce couplage qui l'avait cassé le 09/08/2026.
 */

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

:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --ink-soft: #424245;
  --ink-mute: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --line-soft: rgba(0, 0, 0, 0.05);
  --accent: #0071e3;
  --green: #248a3d;
  --amber: #bf8700;
  --red: #d70015;
  --code-bg: #1d1d1f;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── En-tête ───────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(1.8) blur(20px);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
}

.topbar__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }
.brand img { height: 26px; width: auto; display: block; }
.brand__tag {
  border-left: 1px solid var(--line);
  padding-left: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-mute);
}

.topnav { margin-left: auto; display: flex; gap: 24px; font-size: 13px; }
.topnav a { color: var(--ink-soft); }
.topnav a:hover { color: var(--accent); text-decoration: none; }

/* ── Structure ─────────────────────────────────────────────────────────── */

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 40px;
}

.sidebar { width: 224px; flex: none; padding: 32px 0 96px; }
.sidebar__sticky { position: sticky; top: 80px; }
.sidebar__group + .sidebar__group { margin-top: 28px; }

.sidebar__title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.sidebar__list { list-style: none; margin: 0; padding: 0; }

.sidebar__list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}
.sidebar__list a:hover { background: rgba(0, 0, 0, 0.04); text-decoration: none; }
.sidebar__list a.is-active {
  background: rgba(0, 113, 227, 0.08);
  color: var(--accent);
  font-weight: 500;
}

.badge-mini {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
  font-size: 10px;
  color: var(--ink-mute);
}

.content { flex: 1; min-width: 0; padding: 40px 0 96px; max-width: 46rem; }

/* ── Typographie ───────────────────────────────────────────────────────── */

.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 8px 0 0;
  font-size: 40px;
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 600;
}

h2 {
  margin: 56px 0 0;
  padding-top: 40px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  font-size: 26px;
  letter-spacing: -0.02em;
  font-weight: 600;
  scroll-margin-top: 88px;
}
h2 a { color: inherit; }
h2 a:hover { text-decoration: none; }
h2 .anchor { color: var(--accent); opacity: 0; margin-left: 8px; }
h2:hover .anchor { opacity: 1; }

h3 {
  margin: 36px 0 0;
  font-size: 17px;
  letter-spacing: -0.01em;
  font-weight: 600;
  scroll-margin-top: 88px;
}

p { margin: 14px 0 0; color: var(--ink-soft); }
.lead { margin-top: 16px; font-size: 17px; color: var(--ink-soft); }

strong { color: var(--ink); font-weight: 600; }

ol, ul { margin: 14px 0 0; padding-left: 22px; color: var(--ink-soft); }
li { margin-top: 8px; }

/* ── Code ──────────────────────────────────────────────────────────────── */

code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: rgba(0, 0, 0, 0.035);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--ink);
}

.codeblock {
  margin: 20px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--code-bg);
}

.codeblock__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.codeblock__lang {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

.codeblock__copy {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font: inherit;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.codeblock__copy:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.codeblock pre { margin: 0; padding: 14px 16px; overflow-x: auto; }

.codeblock code {
  background: none;
  border: 0;
  padding: 0;
  color: #e8e8ed;
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre;
}

/* ── Tableaux ──────────────────────────────────────────────────────────── */

.table-wrap {
  margin: 20px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

th {
  text-align: left;
  font-weight: 600;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.025);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  padding: 10px 16px;
  white-space: nowrap;
}

td {
  vertical-align: top;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 16px;
  line-height: 1.55;
}
tr:last-child td { border-bottom: 0; }

/* ── Encadrés ──────────────────────────────────────────────────────────── */

.callout {
  margin: 20px 0 0;
  border: 1px solid;
  border-radius: 12px;
  padding: 14px 16px;
}
.callout__label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.callout p { margin-top: 6px; font-size: 14px; }

.callout--note { border-color: rgba(0, 113, 227, 0.25); background: rgba(0, 113, 227, 0.05); }
.callout--warn { border-color: rgba(191, 135, 0, 0.3); background: rgba(191, 135, 0, 0.07); }
.callout--crit { border-color: rgba(215, 0, 21, 0.25); background: rgba(215, 0, 21, 0.05); }

/* ── Divers ────────────────────────────────────────────────────────────── */

.pillrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.pill {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
}
.pill--stable { background: rgba(36, 138, 61, 0.1); color: var(--green); }
.pill--version {
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--mono);
  color: var(--ink-mute);
  padding: 1px 6px;
}
.pill--date { font-size: 12px; color: var(--ink-mute); }

.method {
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 10px 14px;
}
.method__verb {
  border-radius: 4px;
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.method__verb--get { background: var(--accent); }
.method__verb--post { background: var(--green); }
.method__verb--patch { background: var(--amber); }
.method__path { font-family: var(--mono); font-size: 13px; word-break: break-all; }

.card {
  display: block;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 20px;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover {
  border-color: rgba(0, 113, 227, 0.4);
  box-shadow: 0 1px 16px rgba(0, 0, 0, 0.06);
  text-decoration: none;
}
.card h2 { margin: 0; padding: 0; border: 0; font-size: 17px; letter-spacing: -0.01em; }

.steps { list-style: none; margin: 16px 0 0; padding: 0; counter-reset: step; }
.steps li {
  position: relative;
  padding-left: 30px;
  margin-top: 10px;
  color: var(--ink-soft);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.1);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.footer {
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  background: var(--surface);
}
.footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px;
  font-size: 12px;
  color: var(--ink-mute);
}

/* ── Mobile ────────────────────────────────────────────────────────────── */

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 6px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

@media (max-width: 820px) {
  .topnav { display: none; }
  .menu-toggle { display: block; }
  .shell { flex-direction: column; gap: 0; }
  .sidebar { width: 100%; padding: 16px 0 0; display: none; }
  .sidebar.is-open { display: block; }
  .sidebar__sticky { position: static; }
  .content { padding-top: 24px; }
  h1 { font-size: 32px; }
}
