/* Documentation client — layout dédié /docs */

.docs-layout {
    --docs-header-h: 3.75rem;
    --docs-sidebar-w: 260px;
    --docs-toc-w: 220px;
    --docs-content-w: 820px;
    --docs-column-gap: 0.75rem;
    --docs-layout-w: calc(var(--docs-sidebar-w) + var(--docs-column-gap) + var(--docs-content-w));
    --docs-layout-inline-start: 0px;
    min-height: max(100vh, var(--docs-preserve-min-h, 0px));
    display: flex;
    flex-direction: column;
}

.docs-layout-main {
    flex: 1;
    padding: 0 0 2.5rem;
}

.docs-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    width: 100%;
    margin: 0 auto;
    position: relative;
    padding: 0 1.25rem;
}

.docs-shell-toolbar {
    display: flex;
    grid-column: 1 / -1;
    padding: 0.65rem 0;
}

.docs-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(139, 92, 246, 0.28);
    background: rgba(26, 11, 46, 0.72);
    color: var(--neon-text);
    font-size: 0.9rem;
    cursor: pointer;
}

.docs-menu-toggle-icon {
    width: 1rem;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.docs-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 45;
    border: 0;
    background: rgba(7, 0, 18, 0.62);
    cursor: pointer;
}

/* Mobile drawer */
.docs-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: min(88vw, 300px);
    height: 100vh;
    padding: calc(var(--docs-header-h) + 0.75rem) 0.85rem 1.25rem;
    border-right: 1px solid rgba(139, 92, 246, 0.22);
    background: rgba(10, 1, 24, 0.97);
    transform: translateX(-105%);
    transition: transform 220ms ease;
    overflow-y: auto;
}

.docs-sidebar.is-open {
    transform: translateX(0);
}

.docs-article-column {
    grid-column: 1;
    min-width: 0;
    padding: 0.75rem 0 1.5rem;
}

.docs-toc-column {
    display: none;
}

@media (min-width: 768px) {
    .docs-layout {
        --docs-layout-inline-start: max(0px, calc((100vw - var(--docs-layout-w)) / 2));
    }

    .docs-shell-toolbar {
        display: none;
    }

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

    .docs-shell {
        grid-template-columns: var(--docs-sidebar-w) minmax(0, var(--docs-content-w));
        column-gap: var(--docs-column-gap);
        width: min(100%, var(--docs-layout-w));
        padding: 0;
    }

    .docs-sidebar {
        position: fixed;
        top: var(--docs-header-h);
        left: var(--docs-layout-inline-start);
        z-index: 40;
        width: var(--docs-sidebar-w);
        height: calc(100vh - var(--docs-header-h));
        padding: 0.75rem 0.85rem 1.25rem;
        border-right: 1px solid rgba(139, 92, 246, 0.22);
        border-radius: 0;
        background: rgba(10, 1, 24, 0.92);
        transform: none;
        overflow-y: auto;
    }

    .docs-article-column {
        grid-column: 2;
        min-width: 0;
        max-width: var(--docs-content-w);
        padding: 0.75rem 0 2rem;
    }
}

@media (min-width: 1280px) {
    .docs-layout {
        --docs-layout-w: calc(var(--docs-sidebar-w) + var(--docs-column-gap) + var(--docs-content-w) + var(--docs-column-gap) + var(--docs-toc-w));
    }

    .docs-shell {
        grid-template-columns: var(--docs-sidebar-w) minmax(0, var(--docs-content-w)) var(--docs-toc-w);
    }

    .docs-toc-column {
        display: block;
        grid-column: 3;
        position: fixed;
        top: var(--docs-header-h);
        right: var(--docs-layout-inline-start);
        left: auto;
        width: var(--docs-toc-w);
        height: calc(100vh - var(--docs-header-h));
        padding: 0.75rem 0.85rem 1.25rem;
        overflow-y: auto;
        border-left: 1px solid rgba(139, 92, 246, 0.22);
        background: rgba(10, 1, 24, 0.92);
    }
}

@media (max-width: 1279px) {
    .docs-toc-column {
        display: block;
        position: static;
        grid-column: 1 / -1;
        order: 3;
        width: auto;
        height: auto;
        padding: 0 0 1rem;
        border-left: 0;
        background: transparent;
    }
}

.docs-nav-section + .docs-nav-section {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(139, 92, 246, 0.15);
}

.docs-nav-section-title {
    margin: 0 0 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--neon-muted);
}

.docs-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.docs-nav-link {
    display: block;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    color: #cfd7fb;
    text-decoration: none;
    font-size: 0.88rem;
    line-height: 1.35;
    transition: background 120ms ease, color 120ms ease;
    cursor: pointer;
}

.docs-nav-link:hover {
    color: var(--neon-accent);
    background: rgba(49, 46, 129, 0.45);
}

.docs-nav-link.is-active {
    color: var(--neon-accent);
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.22);
}

/* Carte contenu central */

.docs-article {
    display: block;
}

.docs-article-card {
    background: var(--neon-panel-bg);
    border: 1px solid var(--neon-panel-border);
    border-radius: 16px;
    box-shadow: var(--neon-panel-shadow);
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.docs-page-header h1 {
    margin: 0.2rem 0 0;
}

.docs-page-header .hero-support-copy {
    max-width: 52rem;
    margin: 0.35rem 0 0;
}

.docs-page-header .eyebrow {
    margin-bottom: 0;
}

.docs-article .breadcrumb {
    margin-bottom: 0.15rem;
    --bs-breadcrumb-divider-color: var(--neon-muted);
}

.docs-article .breadcrumb-item,
.docs-article .breadcrumb-item.active {
    color: var(--neon-muted);
    font-size: 0.85rem;
}

.docs-toc-nav .docs-nav-section {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.docs-nav-list li.docs-toc-level-3 .docs-nav-link {
    padding-left: 1.1rem;
    font-size: 0.84rem;
}

.docs-article-intro {
    margin-bottom: 0;
}

.docs-markdown--sectioned {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.docs-content-section {
    background: var(--neon-panel-bg);
    border: 1px solid var(--neon-panel-border);
    border-radius: 20px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--neon-panel-shadow);
}

.docs-markdown--sectioned .docs-content-section h2:first-child,
.docs-markdown--sectioned .docs-content-section .docs-heading:first-child {
    margin-top: 0.25rem;
}

/* Markdown Neon */

.docs-markdown {
    color: var(--neon-text);
    font-size: 0.98rem;
    line-height: 1.65;
    max-width: 100%;
}

.docs-markdown .docs-heading,
.docs-markdown h2,
.docs-markdown h3 {
    scroll-margin-top: calc(var(--docs-header-h) + 0.75rem);
    color: #f0f4ff;
}

.docs-markdown h2,
.docs-markdown .docs-heading {
    margin: 1.1rem 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 600;
}

.docs-markdown h3 {
    margin: 0.85rem 0 0.3rem;
    font-size: 1.08rem;
    font-weight: 600;
}

.docs-markdown h2:first-child,
.docs-markdown .docs-heading:first-child,
.docs-markdown h3:first-child {
    margin-top: 0.25rem;
}

.docs-markdown h2 + p,
.docs-markdown h3 + p,
.docs-markdown .docs-heading + p {
    margin-top: 0;
}

.docs-markdown p {
    margin: 0 0 0.75rem;
}

.docs-markdown ul,
.docs-markdown ol {
    margin: 0 0 0.85rem;
    padding-left: 1.35rem;
}

.docs-markdown li + li {
    margin-top: 0.25rem;
}

.docs-markdown a {
    color: var(--neon-accent);
    text-decoration-color: rgba(6, 182, 212, 0.35);
}

.docs-markdown a:hover {
    color: #7ce9ff;
}

.docs-markdown blockquote {
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    border-left: 3px solid rgba(6, 182, 212, 0.55);
    border-radius: 0 12px 12px 0;
    background: rgba(26, 11, 46, 0.65);
    color: #dbeafe;
}

.docs-markdown blockquote p:last-child {
    margin-bottom: 0;
}

.docs-markdown code {
    padding: 0.12rem 0.35rem;
    border-radius: 6px;
    background: rgba(30, 27, 75, 0.65);
    border: 1px solid rgba(139, 92, 246, 0.2);
    font-size: 0.88em;
    color: #c4b5fd;
}

.docs-markdown pre {
    margin: 0.75rem 0;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.22);
    background: rgba(10, 1, 24, 0.85);
    overflow-x: auto;
}

.docs-markdown pre code {
    padding: 0;
    border: 0;
    background: transparent;
    color: #e0e7ff;
}

.docs-markdown-table {
    width: 100%;
    margin: 0.75rem 0;
    border-color: rgba(139, 92, 246, 0.25);
    color: var(--neon-text);
}

.docs-markdown-table th {
    background: rgba(49, 46, 129, 0.35);
    color: #f0f4ff;
    border-color: rgba(139, 92, 246, 0.25);
}

.docs-markdown-table td {
    border-color: rgba(139, 92, 246, 0.18);
    vertical-align: top;
}

.docs-markdown img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0.75rem 0;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.22);
    box-shadow: var(--neon-panel-shadow);
}

.docs-markdown hr {
    border: 0;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    margin: 1.1rem 0;
}

.docs-markdown .docs-screenshot-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 12rem;
    margin: 0.75rem 0;
    border-radius: 14px;
    border: 1px dashed rgba(139, 92, 246, 0.35);
    background: rgba(26, 11, 46, 0.45);
    color: var(--neon-muted);
    font-size: 0.88rem;
    text-align: center;
    padding: 1rem;
}

@media (prefers-reduced-motion: reduce) {
    .docs-sidebar {
        transition: none;
    }
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
