/* =====================================================
   CONVERSA.OVH — DOCUMENTATION PAGE
   Palette : vert #6B4BD8 + orange #E51D75
   Polices : Barlow, Barlow Condensed
   ===================================================== */

/* --- LAYOUT --- */
.doc-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR --- */
.doc-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 280px;
    background: #050826;
    color: #fff;
    overflow-y: auto;
    z-index: 100;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.2) transparent;
}
.doc-sidebar::-webkit-scrollbar { width: 4px; }
.doc-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 4px; }

.doc-sidebar-header {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.doc-sidebar-header .doc-logo {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700; font-size: 22px;
    color: #fff; text-decoration: none; letter-spacing: 1px;
    display: block; margin-bottom: 6px;
}
.doc-sidebar-header .doc-logo-dot {
    display: inline-block; width: 6px; height: 6px;
    background: #E51D75; border-radius: 50%;
    margin-left: 2px; vertical-align: super;
}
.doc-sidebar-header .doc-label {
    font-size: 11px; text-transform: uppercase;
    letter-spacing: 1.5px; color: rgba(255,255,255,.5);
    font-weight: 600;
}

.doc-nav { padding: 16px 0; }
.doc-nav-section {
    padding: 0 20px; margin-bottom: 4px;
}
.doc-nav-section-title {
    font-size: 11px; text-transform: uppercase;
    letter-spacing: 1px; color: rgba(255,255,255,.6);
    font-weight: 600; padding: 12px 0 6px;
    border-top: 1px solid rgba(255,255,255,.1);
}
.doc-nav-section:first-child .doc-nav-section-title {
    border-top: none;
}
.doc-nav a {
    display: block;
    color: rgba(255,255,255,.85) !important;
    text-decoration: none !important;
    font-size: 13px;
    padding: 5px 0;
    transition: color .2s, padding-left .2s;
    line-height: 1.4;
}
.doc-nav a:hover {
    color: #fff !important;
    text-decoration: none !important;
    padding-left: 4px;
}
.doc-nav a.active {
    color: #E51D75;
    font-weight: 600;
}
.doc-nav a.doc-nav-sub {
    padding-left: 12px;
    font-size: 12px;
    color: rgba(255,255,255,.7) !important;
}
.doc-nav a.doc-nav-sub:hover {
    color: rgba(255,255,255,.85) !important;
    padding-left: 16px;
}

/* --- MAIN CONTENT --- */
.doc-main {
    flex: 1;
    margin-left: 280px;
    padding: 0;
    background: #fff;
}

.doc-hero {
    background: linear-gradient(135deg, #050826 0%, #6B4BD8 50%, #8262E9 100%);
    color: #fff;
    padding: 60px 48px;
}
.doc-hero h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 42px; font-weight: 700;
    margin-bottom: 12px;
    color: #fff !important;
}
.doc-hero p {
    font-size: 17px; line-height: 1.6;
    color: rgba(255,255,255,.8);
    max-width: 700px;
}
.doc-hero-links {
    margin-top: 20px;
    display: flex; gap: 12px; flex-wrap: wrap;
}
.doc-hero-links a {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.9) !important;
    padding: 8px 18px; border-radius: 6px;
    font-size: 13px; font-weight: 500;
    text-decoration: none !important;
    transition: background .2s;
}
.doc-hero-links a:hover {
    background: rgba(255,255,255,.22);
    color: #fff !important;
    text-decoration: none !important;
}

.doc-content {
    max-width: 860px;
    padding: 48px;
}

/* --- SECTIONS --- */
.doc-section {
    margin-bottom: 56px;
    scroll-margin-top: 20px;
}
.doc-section h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 30px; font-weight: 700;
    color: #050826;
    padding-bottom: 12px;
    border-bottom: 3px solid #6B4BD8;
    margin-bottom: 24px;
}
.doc-section h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 22px; font-weight: 600;
    color: #6B4BD8;
    margin: 32px 0 12px;
    scroll-margin-top: 20px;
}
.doc-section h4 {
    font-size: 16px; font-weight: 600;
    color: #050826;
    margin: 20px 0 8px;
}
.doc-section p {
    font-size: 15px; line-height: 1.7;
    color: #3a3a3a;
    margin-bottom: 12px;
}
.doc-section ul, .doc-section ol {
    margin: 8px 0 16px 20px;
    font-size: 15px; line-height: 1.7;
    color: #3a3a3a;
}
.doc-section li { margin-bottom: 4px; }
.doc-section strong { color: #050826; }

/* --- TABLE --- */
.doc-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0 24px;
}
.doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 480px;
}
.doc-table th {
    background: #6B4BD8;
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
}
.doc-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #ECEEF3;
    color: #3a3a3a;
}
.doc-table tr:hover td { background: #F5F7F9; }

/* --- CODE BLOCK --- */
.doc-code {
    background: #050826;
    color: #c8e6d0;
    padding: 20px 24px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0 24px;
    white-space: pre;
    max-width: 100%;
}

/* --- INFO CARDS --- */
.doc-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin: 16px 0 24px;
}
.doc-info-card {
    background: #F5F7F9;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #6B4BD8;
}
.doc-info-card.orange { border-left-color: #E51D75; }
.doc-info-card h4 {
    font-size: 14px; font-weight: 600;
    color: #050826; margin: 0 0 6px;
}
.doc-info-card p {
    font-size: 13px; color: #4A4D66;
    margin: 0; line-height: 1.5;
}

/* --- BADGE --- */
.doc-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.doc-badge.green { background: #d4edda; color: #155724; }
.doc-badge.orange { background: #fff3cd; color: #856404; }
.doc-badge.red { background: #f8d7da; color: #721c24; }

/* --- DIVIDER --- */
.doc-divider {
    border: none;
    border-top: 2px solid #ECEEF3;
    margin: 48px 0;
}

/* --- BACK TO TOP --- */
.doc-back-top {
    position: fixed;
    bottom: 24px; right: 24px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #6B4BD8;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 16px rgba(107,75,216,.25);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .3s, transform .3s, background .2s;
    z-index: 50;
}
.doc-back-top.visible {
    opacity: 1;
    transform: translateY(0);
}
.doc-back-top:hover { background: #8262E9; }

/* --- MOBILE SIDEBAR TOGGLE --- */
.doc-mobile-toggle {
    display: none;
    position: fixed;
    top: 12px; left: 12px;
    z-index: 200;
    background: #6B4BD8;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,.2);
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .doc-sidebar {
        transform: translateX(-100%);
        transition: transform .3s;
    }
    .doc-sidebar.open {
        transform: translateX(0);
    }
    .doc-main {
        margin-left: 0;
    }
    .doc-mobile-toggle { display: block; }
    .doc-hero { padding: 60px 24px 40px; }
    .doc-hero h1 { font-size: 32px; }
    .doc-content { padding: 32px 20px; }
    .doc-section h2 { font-size: 24px; }
    .doc-section h3 { font-size: 19px; }
}

@media (max-width: 600px) {
    .doc-hero { padding: 48px 16px 32px; }
    .doc-hero h1 { font-size: 26px; }
    .doc-hero p { font-size: 14px; }
    .doc-hero-links { gap: 8px; }
    .doc-hero-links a { padding: 6px 12px; font-size: 12px; }
    .doc-content { padding: 24px 16px; }
    .doc-info-grid { grid-template-columns: 1fr; }
    .doc-table { font-size: 12px; display: block; overflow-x: auto; }
    .doc-table th, .doc-table td { padding: 8px 10px; }
    .doc-section h2 { font-size: 22px; }
    .doc-section h3 { font-size: 17px; }
    .doc-code { font-size: 10px; padding: 12px 12px; }
    .doc-main { min-width: 0; overflow-x: hidden; }
    .doc-content { min-width: 0; overflow-x: hidden; }
}
