/* ==========================================================================
   MeeDoo Documentation Page Styles - Dark Theme
   ========================================================================== */

.docs-page {
    background-color: var(--bg-color);
    color: var(--text-main);
    padding-top: 100px;
    padding-bottom: 6rem;
}

.docs-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    gap: 4rem;
}

/* --- Header de la Documentation --- */
.docs-header {
    background-color: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1001;
}

.docs-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.docs-nav-main {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; box-shadow: 0 0 8px var(--accent); }
    50% { opacity: 0.5; box-shadow: 0 0 0px var(--accent); }
    100% { opacity: 1; box-shadow: 0 0 8px var(--accent); }
}

/* --- Sidebar --- */
.docs-sidebar {
    flex: 0 0 300px;
    position: sticky;
    top: 120px;
    height: fit-content;
    border-right: 1px solid var(--card-border);
    padding-right: 2rem;
}

.docs-search input {
    width: 100%;
    padding: 1rem;
    border-radius: 50px;
    border: 1px solid var(--card-border);
    background: rgba(255,255,255,0.03);
    color: var(--text-main);
    margin-bottom: 2rem;
    font-family: var(--font-display);
    transition: border-color 0.3s;
}
.docs-search input:focus { outline: none; border-color: var(--accent); }

.docs-nav ul { list-style: none; }
.docs-nav > ul > li { margin-bottom: 1.5rem; }
.docs-nav > ul > li > a {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
    display: block;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.docs-nav > ul > li > a:hover { color: var(--accent); }

.docs-nav ul ul {
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 1px solid var(--card-border);
}

.docs-nav ul ul a {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: block;
    padding: 0.3rem 0;
    transition: color 0.3s ease;
}
.docs-nav ul ul a:hover { color: var(--text-main); }

/* --- Main Content --- */
.docs-content { flex: 1; }

.docs-content h1, .docs-content h2, .docs-content h3 {
    font-family: var(--font-display);
    font-weight: 500;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    scroll-margin-top: 120px;
}

.docs-content h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1.5rem;
    margin-top: 0;
}
.docs-content h2 { font-size: 2rem; color: var(--text-main); }
.docs-content h3 { font-size: 1.25rem; color: var(--accent); }

.docs-content p, .docs-content ul, .docs-content ol { max-width: 800px; }
.docs-content p { margin-bottom: 1.5rem; line-height: 1.7; font-size: 1.05rem; }
.docs-content ul, .docs-content ol { margin-left: 2rem; margin-bottom: 1.5rem; }
.docs-content li { margin-bottom: 0.8rem; color: var(--text-muted); }

.docs-content code {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* --- Re-usable Cards for Docs Content --- */
.docs-content .card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    border-left: 4px solid var(--accent);
}

.docs-content .card h4 {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.docs-content .card code {
    font-family: var(--font-display);
    font-size: 1rem;
    padding: 0;
    background: none;
    color: var(--text-main);
}

/* --- Code Blocks --- */
.code-block-container { position: relative; margin: 2.5rem 0; }
.code-block-container pre {
    background-color: #0f0f12;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.7;
}

.copy-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}
.copy-button:hover { background-color: var(--accent); color: #000; }
.copy-button.copied { background-color: #28a745; color: #fff; }

/* --- Tableaux Responsives (Request Body) --- */
.table-responsive {
    width: 100%;
    overflow-x: auto; /* Active le scroll horizontal sur mobile */
    -webkit-overflow-scrolling: touch; /* Scroll fluide sur iOS */
    margin: 2.5rem 0;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.params-table {
    width: 100%;
    min-width: 600px; /* Empêche le tableau d'être écrasé, force le scroll si l'écran est plus petit */
    border-collapse: collapse;
    margin: 0; /* La marge est gérée par le wrapper .table-responsive */
    border: none;
    box-shadow: none;
}

.params-table th, .params-table td {
    padding: 1.25rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.params-table th {
    background-color: var(--light-bg);
    font-family: var(--font-family-sans);
    font-weight: 600;
    color: var(--text-color);
}

.params-table td { color: var(--text-color-light); }
.params-table tr:last-child td { border-bottom: none; }

/* --- Responsive Design for Docs --- */
@media (max-width: 1024px) {
    .docs-layout {
        flex-direction: column;
        padding: 2rem 1.5rem;
        gap: 2rem;
    }
    .docs-sidebar {
        flex: none;
        width: 100%;
        position: static;
        order: 2;
        border-right: none;
        padding-right: 0;
    }
    .docs-content { order: 1; padding: 0; }
    .docs-content h1 { font-size: 2rem; }
}
