:root {
  --docs-bg: #050505;
  --docs-surface: #0d0d0d;
  --docs-surface-raised: #151515;
  --docs-border: rgba(255, 255, 255, .11);
  --docs-border-strong: rgba(255, 255, 255, .2);
  --docs-text: #f5f5f5;
  --docs-muted: #a2a2aa;
  --docs-violet: #8b5cf6;
  --docs-violet-soft: rgba(139, 92, 246, .13);
  --docs-green: #57f287;
  --docs-warning: #ffd166;
  --docs-danger: #f87171;
  --docs-sidebar-width: 292px;
  --docs-topbar-height: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body.docs-page {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 74% -12%, rgba(124, 58, 237, .18), transparent 30rem),
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 24rem),
    var(--docs-bg) !important;
  color: var(--docs-text) !important;
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.65;
}

.docs-skip {
  position: fixed;
  z-index: 1600;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: #08080a;
  font-weight: 800;
  transform: translateY(-150%);
}
.docs-skip:focus { transform: translateY(0); }

.docs-topbar {
  position: fixed;
  z-index: 1300;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--docs-topbar-height);
  padding: 0 24px;
  border-bottom: 1px solid var(--docs-border);
  background: rgba(5, 5, 5, .96);
}
.docs-brand { display: inline-flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; font-weight: 750; }
.docs-brand img { width: 108px; height: 42px; object-fit: contain; filter: brightness(0) invert(1); }
.docs-brand span { padding-left: 14px; border-left: 1px solid var(--docs-border-strong); color: #c9c9ce; font-size: .88rem; }
.docs-top-actions { display: flex; align-items: center; gap: 7px; }
.docs-top-actions a { min-height: 40px; padding: 9px 12px; border-radius: 9px; color: var(--docs-muted); text-decoration: none; font-size: .82rem; font-weight: 700; }
.docs-top-actions a:hover, .docs-top-actions a:focus-visible { background: var(--docs-surface-raised); color: #fff; }
.docs-top-actions .docs-dashboard-link { padding-inline: 15px; background: #fff; color: #08080a; }
.docs-top-actions .docs-dashboard-link:hover { background: #e8e8eb; color: #08080a; }

.docs-shell {
  display: grid;
  grid-template-columns: var(--docs-sidebar-width) minmax(0, 1fr) 220px;
  width: min(1600px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding-top: var(--docs-topbar-height);
}

.docs-sidebar {
  position: sticky;
  z-index: 10;
  top: var(--docs-topbar-height);
  height: calc(100vh - var(--docs-topbar-height));
  padding: 20px 16px;
  overflow-y: auto;
  border-right: 1px solid var(--docs-border);
  background: rgba(8, 8, 8, .86);
  transition: width 180ms cubic-bezier(.23,1,.32,1), transform 180ms cubic-bezier(.23,1,.32,1);
}
.docs-sidebar-head { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.docs-search { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; height: 42px; padding: 0 10px; border: 1px solid var(--docs-border); border-radius: 9px; background: var(--docs-surface); }
.docs-search:focus-within { border-color: var(--docs-violet); box-shadow: 0 0 0 3px rgba(139,92,246,.2); }
.docs-search svg { width: 17px; fill: none; stroke: var(--docs-muted); stroke-width: 2; }
.docs-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; font-size: .82rem; }
.docs-search input::placeholder { color: #a2a2aa; }
.docs-search kbd { padding: 2px 6px; border: 1px solid var(--docs-border); border-radius: 4px; color: var(--docs-muted); font: 600 .68rem/1.3 Inter, sans-serif; }
.docs-collapse { width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid var(--docs-border); border-radius: 8px; background: var(--docs-surface); color: #fff; font-size: 1.4rem; cursor: pointer; }
.docs-collapse:hover, .docs-collapse:focus-visible { border-color: var(--docs-violet); }
.docs-nav-group { margin: 0 0 22px; }
.docs-nav-group-title { margin: 0 10px 7px; color: #c8c8cf; font-size: .72rem; font-weight: 800; }
.docs-nav-link { display: flex; align-items: center; gap: 9px; min-height: 38px; margin: 2px 0; padding: 8px 10px; border-radius: 8px; color: var(--docs-muted); text-decoration: none; font-size: .81rem; font-weight: 600; line-height: 1.35; }
.docs-nav-link::before { content: ''; width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: #55555d; }
.docs-nav-link:hover { background: rgba(255,255,255,.045); color: #fff; }
.docs-nav-link.active { background: var(--docs-violet-soft); color: #fff; }
.docs-nav-link.active::before { background: var(--docs-violet); box-shadow: 0 0 9px rgba(139,92,246,.75); }
.docs-search-empty { margin: 20px 10px; color: var(--docs-muted); font-size: .8rem; }
.docs-sidebar-support { display: grid; gap: 5px; margin-top: 26px; padding: 14px; border: 1px solid var(--docs-border); border-radius: 10px; background: var(--docs-surface); }
.docs-sidebar-support strong { font-size: .82rem; }
.docs-sidebar-support span { color: var(--docs-muted); font-size: .74rem; line-height: 1.45; }
.docs-sidebar-support a { margin-top: 5px; color: #c4b5fd; font-size: .76rem; font-weight: 750; }

.docs-shell.is-collapsed { grid-template-columns: 72px minmax(0, 1fr) 220px; }
.docs-shell.is-collapsed .docs-sidebar { padding-inline: 12px; }
.docs-shell.is-collapsed .docs-search,
.docs-shell.is-collapsed .docs-nav-group-title,
.docs-shell.is-collapsed .docs-nav-link span,
.docs-shell.is-collapsed .docs-sidebar-support { display: none; }
.docs-shell.is-collapsed .docs-sidebar-head { justify-content: center; }
.docs-shell.is-collapsed .docs-collapse { transform: rotate(180deg); }
.docs-shell.is-collapsed .docs-nav-link { justify-content: center; padding-inline: 0; }
.docs-shell.is-collapsed .docs-nav-link::before { width: 8px; height: 8px; flex-basis: 8px; }

.docs-main { width: 100%; min-width: 0; padding: 42px clamp(28px, 5vw, 82px) 40px; }
.docs-breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; color: var(--docs-muted); font-size: .76rem; }
.docs-breadcrumbs a { color: var(--docs-muted); text-decoration: none; }
.docs-breadcrumbs a:hover { color: #fff; }
.docs-breadcrumbs span[aria-current] { color: #dddde2; }

.docs-article { width: min(780px, 100%); outline: 0; }
.docs-article-header { margin-bottom: 42px; }
.docs-article-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; color: #c4b5fd; font-size: .78rem; font-weight: 800; }
.docs-article-kicker::before { content: ''; width: 18px; height: 2px; background: var(--docs-violet); }
.docs-article h1, .docs-article h2, .docs-article h3 { color: #fff; font-family: "Space Grotesk", Inter, sans-serif; text-wrap: balance; }
.docs-article h1 { max-width: 15ch; margin: 0 0 16px; font-size: clamp(2.3rem, 5vw, 4.4rem); line-height: 1.02; letter-spacing: -.035em !important; }
.docs-article-header > p { max-width: 64ch; margin: 0; color: #b7b7bf; font-size: 1.04rem; line-height: 1.75; text-wrap: pretty; }
.docs-updated { display: flex; align-items: center; gap: 8px; margin-top: 18px; color: #85858e; font-size: .74rem; }
.docs-updated::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--docs-green); }
.docs-article section { margin: 50px 0; scroll-margin-top: 90px; }
.docs-article h2 { margin: 0 0 16px; font-size: 1.65rem; line-height: 1.2; letter-spacing: -.02em !important; }
.docs-article h3 { margin: 28px 0 10px; font-size: 1.02rem; line-height: 1.35; }
.docs-article p, .docs-article li { color: #b7b7bf; font-size: .93rem; }
.docs-article p { max-width: 72ch; margin: 0 0 16px; }
.docs-article ul, .docs-article ol { display: grid; gap: 9px; margin: 14px 0 20px; padding-left: 22px; }
.docs-article li::marker { color: var(--docs-violet); font-weight: 800; }
.docs-article strong { color: #f5f5f7; }
.docs-article a { color: #c4b5fd; text-underline-offset: 3px; }
.docs-article code { padding: 2px 6px; border: 1px solid rgba(139,92,246,.22); border-radius: 5px; background: rgba(139,92,246,.09); color: #d8ccff; font: 600 .84em Consolas, monospace; }
.docs-code { position: relative; margin: 18px 0; padding: 18px 20px; overflow-x: auto; border: 1px solid var(--docs-border); border-radius: 10px; background: #09090b; color: #dddde3; font: 500 .82rem/1.65 Consolas, monospace; white-space: pre-wrap; }
.docs-code .prompt { color: var(--docs-green); }
.docs-callout { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 12px; margin: 22px 0; padding: 16px 18px; border: 1px solid rgba(139,92,246,.3); border-radius: 10px; background: rgba(139,92,246,.075); }
.docs-callout.warning { border-color: rgba(255,209,102,.3); background: rgba(255,209,102,.07); }
.docs-callout.danger { border-color: rgba(248,113,113,.3); background: rgba(248,113,113,.07); }
.docs-callout-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--docs-violet); color: #fff; font-weight: 900; }
.docs-callout.warning .docs-callout-icon { background: var(--docs-warning); color: #17120a; }
.docs-callout.danger .docs-callout-icon { background: var(--docs-danger); color: #210909; }
.docs-callout strong, .docs-callout p { display: block; margin: 0; }
.docs-callout p { margin-top: 3px; font-size: .84rem; line-height: 1.55; }
.docs-steps { counter-reset: docs-step; display: grid; gap: 22px; margin: 22px 0; }
.docs-step { counter-increment: docs-step; display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 14px; }
.docs-step::before { content: counter(docs-step); display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(139,92,246,.45); border-radius: 9px; background: var(--docs-violet-soft); color: #d9ccff; font-weight: 850; }
.docs-step h3 { margin: 3px 0 5px; }
.docs-step p { margin: 0; }
.docs-table-wrap { margin: 20px 0; overflow-x: auto; border: 1px solid var(--docs-border); border-radius: 10px; }
.docs-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: .82rem; }
.docs-table th, .docs-table td { padding: 13px 15px; border-bottom: 1px solid var(--docs-border); text-align: left; vertical-align: top; }
.docs-table tr:last-child td { border-bottom: 0; }
.docs-table th { background: var(--docs-surface-raised); color: #f5f5f7; font-weight: 800; }
.docs-table td { color: #b7b7bf; }
.docs-checklist { list-style: none; padding: 0 !important; }
.docs-checklist li { position: relative; padding-left: 28px; }
.docs-checklist li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--docs-green); font-weight: 900; }
.docs-link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 22px 0; }
.docs-link-card { display: block; min-height: 116px; padding: 16px; border: 1px solid var(--docs-border); border-radius: 10px; background: var(--docs-surface); color: #fff !important; text-decoration: none; }
.docs-link-card:hover, .docs-link-card:focus-visible { border-color: var(--docs-violet); background: var(--docs-violet-soft); }
.docs-link-card strong, .docs-link-card span { display: block; }
.docs-link-card span { margin-top: 7px; color: var(--docs-muted); font-size: .78rem; line-height: 1.45; }
.docs-loading { display: flex; align-items: center; gap: 10px; color: var(--docs-muted); }
.docs-loading span { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.16); border-top-color: var(--docs-violet); border-radius: 50%; animation: docs-spin .8s linear infinite; }
@keyframes docs-spin { to { transform: rotate(360deg); } }

.docs-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(780px, 100%); margin-top: 62px; padding-top: 24px; border-top: 1px solid var(--docs-border); }
.docs-page-link { display: grid; gap: 3px; min-height: 74px; padding: 13px 15px; border: 1px solid var(--docs-border); border-radius: 10px; color: #fff; text-decoration: none; }
.docs-page-link.next { text-align: right; }
.docs-page-link:hover { border-color: var(--docs-violet); background: var(--docs-violet-soft); }
.docs-page-link span { color: var(--docs-muted); font-size: .7rem; }
.docs-page-link strong { font-size: .82rem; }
.docs-footer { display: flex; flex-wrap: wrap; gap: 18px; width: min(780px,100%); margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--docs-border); color: #777780; font-size: .74rem; }
.docs-footer a { color: #9999a2; }

.docs-on-page { position: sticky; top: calc(var(--docs-topbar-height) + 40px); align-self: start; max-height: calc(100vh - 120px); padding: 42px 20px 30px 0; overflow-y: auto; }
.docs-on-page > strong { color: #d4d4d9; font-size: .72rem; }
.docs-on-page nav { display: grid; gap: 9px; margin-top: 12px; }
.docs-on-page a { color: #85858f; font-size: .72rem; line-height: 1.4; text-decoration: none; }
.docs-on-page a:hover, .docs-on-page a.active { color: #d7ccff; }
.docs-on-page .docs-feedback { display: block; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--docs-border); color: #a998df; }

.docs-menu-button { display: none; }
.docs-sidebar-backdrop { display: none; }

html[data-yk-theme="light"] body.docs-page { --docs-bg:#f7f7f9; --docs-surface:#fff; --docs-surface-raised:#ececf1; --docs-border:rgba(0,0,0,.11); --docs-border-strong:rgba(0,0,0,.18); --docs-text:#17171b; --docs-muted:#5f5f68; background: radial-gradient(circle at 74% -12%,rgba(124,58,237,.11),transparent 30rem),#f7f7f9 !important; color:var(--docs-text)!important; }
html[data-yk-theme="light"] .docs-topbar { background:rgba(250,250,252,.97); }
html[data-yk-theme="light"] .docs-brand img { filter:none; }
html[data-yk-theme="light"] .docs-brand, html[data-yk-theme="light"] .docs-article h1, html[data-yk-theme="light"] .docs-article h2, html[data-yk-theme="light"] .docs-article h3, html[data-yk-theme="light"] .docs-article strong { color:#17171b; }
html[data-yk-theme="light"] .docs-sidebar { background:rgba(247,247,249,.95); }
html[data-yk-theme="light"] .docs-search input { color:#17171b; }
html[data-yk-theme="light"] .docs-nav-link.active, html[data-yk-theme="light"] .docs-link-card:hover { color:#1d132f!important; }
html[data-yk-theme="light"] .docs-link-card { color:#17171b!important; }
html[data-yk-theme="light"] .docs-article p, html[data-yk-theme="light"] .docs-article li, html[data-yk-theme="light"] .docs-article-header>p { color:#565660; }
html[data-yk-theme="light"] .docs-code { background:#111116; color:#ededf2; }

@media (max-width: 1180px) {
  .docs-shell { grid-template-columns: var(--docs-sidebar-width) minmax(0,1fr); }
  .docs-on-page { display: none; }
  .docs-shell.is-collapsed { grid-template-columns: 72px minmax(0,1fr); }
}

@media (max-width: 760px) {
  :root { --docs-topbar-height: 58px; }
  .docs-topbar { padding: 0 14px; }
  .docs-brand img { width: 94px; }
  .docs-brand span { display: none; }
  .docs-top-actions > a:not(.docs-dashboard-link) { display: none; }
  .docs-top-actions .docs-dashboard-link { min-height: 38px; padding: 8px 11px; font-size: .74rem; }
  .docs-menu-button { position: sticky; z-index: 20; top: var(--docs-topbar-height); display: flex; align-items: center; gap: 8px; width: 100%; min-height: 46px; padding: 9px 16px; border: 0; border-bottom: 1px solid var(--docs-border); background: rgba(10,10,11,.97); color:#fff; font-weight:750; }
  html[data-yk-theme="light"] .docs-menu-button { background:rgba(247,247,249,.98); color:#17171b; }
  .docs-shell, .docs-shell.is-collapsed { display: block; padding-top: 0; }
  .docs-sidebar { position: fixed; z-index: 1250; top: var(--docs-topbar-height); bottom: 0; left: 0; width: min(320px, 88vw); height: auto; padding: 18px 14px; transform: translateX(-105%); box-shadow: 12px 0 32px rgba(0,0,0,.36); }
  .docs-sidebar.is-open { transform: translateX(0); }
  .docs-collapse { display: none; }
  .docs-sidebar-backdrop { position: fixed; z-index: 1240; inset: var(--docs-topbar-height) 0 0; display: block; width: 100%; border: 0; background: rgba(0,0,0,.62); }
  .docs-sidebar-backdrop[hidden] { display: none; }
  .docs-main { padding: 34px 20px 28px; }
  .docs-article h1 { font-size: clamp(2.2rem, 13vw, 3.45rem); }
  .docs-article section { margin: 42px 0; }
  .docs-pagination { grid-template-columns: 1fr; }
  .docs-page-link.next { text-align: left; }
}

/* Cohérence avec le reste du produit et lecture plus confortable. */
.docs-shell a:focus-visible,.docs-shell button:focus-visible,.docs-shell input:focus-visible { outline:3px solid #a78bfa; outline-offset:3px; }
.docs-shell button,.docs-shell a { min-height:42px; }
.docs-search { border-color:rgba(167,139,250,.35); box-shadow:0 8px 26px rgba(0,0,0,.16); }
@media (max-width:760px) { .docs-shell [class*="blur"],.docs-shell { backdrop-filter:none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .docs-sidebar { transition: none; }
  .docs-loading span { animation-duration: 1.6s; }
}
