<style>
/* ============================================
   PAGE DOCUMENTATION - Axes ERP Style
   ============================================ */

.docs-layout {
    display: flex;
    min-height: calc(100vh - 80px);
}

/* Sidebar gauche */
.docs-sidebar {
    width: 320px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 24px 0;
    overflow-y: auto;
    position: fixed;
    height: 100vh;
    top: 0;
    left: var(--sidebar-width);
    z-index: 50;
}

.docs-sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 16px;
}

.docs-sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.docs-sidebar-header h2 i {
    color: #2d8a4e;
}

/* Catégories */
.docs-category {
    margin-bottom: 4px;
}

.docs-category-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.docs-category-toggle:hover {
    background: #f0fdf4;
}

.docs-category-toggle.active {
    background: #dcfce7;
    border-left: 3px solid #2d8a4e;
}

.docs-category-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.9rem;
}

.docs-category-toggle.active .docs-category-icon {
    background: #2d8a4e;
    color: #fff;
    border-color: #2d8a4e;
}

.docs-category-info {
    flex: 1;
}

.docs-category-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: #1e293b;
}

.docs-category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: #3b82f6;
    color: #fff;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Liste articles */
.docs-articles-list {
    display: none;
    padding: 4px 0 8px 68px;
}

.docs-articles-list.open {
    display: block;
}

.docs-article-link {
    display: block;
    padding: 8px 16px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.88rem;
    border-radius: 8px;
    margin-right: 12px;
    transition: all 0.2s;
    line-height: 1.4;
}

.docs-article-link:hover {
    background: #f0fdf4;
    color: #2d8a4e;
}

.docs-article-link.active {
    background: #dcfce7;
    color: #15803d;
    font-weight: 600;
}

.docs-article-link i {
    margin-right: 8px;
    font-size: 0.8rem;
}

/* Contenu principal */
.docs-content {
    margin-left: 320px;
    flex: 1;
    padding: 32px 48px;
    max-width: 900px;
}

/* Breadcrumb */
.docs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 0.88rem;
    color: #64748b;
}

.docs-breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
}

.docs-breadcrumb a:hover {
    text-decoration: underline;
}

.docs-breadcrumb .current {
    color: #2d8a4e;
    font-weight: 600;
}

/* Titre article */
.docs-article-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 24px;
    line-height: 1.3;
}

/* Table of Contents */
.docs-toc {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 32px;
    max-width: 400px;
}

.docs-toc h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.docs-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-toc li {
    padding: 6px 0;
}

.docs-toc a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.docs-toc a:hover {
    color: #2d8a4e;
}

.docs-toc a::before {
    content: attr(data-num) ". ";
    color: #2d8a4e;
    font-weight: 600;
}

/* Sections contenu */
.docs-section {
    margin-bottom: 32px;
}

.docs-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #dcfce7;
}

.docs-section p {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 16px;
}

.docs-section ol {
    padding-left: 24px;
    margin-bottom: 20px;
}

.docs-section ol li {
    padding: 8px 0;
    color: #475569;
    line-height: 1.6;
}

.docs-section ol li strong {
    color: #1e293b;
}

/* Image documentation */
.docs-image {
    margin: 24px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.docs-image img {
    width: 100%;
    display: block;
}

.docs-image-caption {
    padding: 12px 16px;
    background: #f8fafc;
    font-size: 0.85rem;
    color: #64748b;
    text-align: center;
}

/* Tags */
.docs-tags {
    display: flex;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.docs-tag {
    padding: 6px 14px;
    background: #f0fdf4;
    color: #15803d;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
}

/* Navigation article */
.docs-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.docs-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.2s;
    max-width: 45%;
}

.docs-nav-btn:hover {
    border-color: #2d8a4e;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.docs-nav-btn.prev {
    text-align: left;
}

.docs-nav-btn.next {
    text-align: right;
    flex-direction: row-reverse;
}

.docs-nav-btn i {
    color: #2d8a4e;
    font-size: 1.2rem;
}

.docs-nav-btn small {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.docs-nav-btn span {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .docs-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        left: 0;
    }
    .docs-sidebar.open {
        transform: translateX(0);
    }
    .docs-content {
        margin-left: 0;
        padding: 24px;
    }
}
</style>