/* ==========================================================================
   Documentation Thérapeute.ma — Guide du thérapeute
   ========================================================================== */

:root {
    --doc-orange: #c9762f;
    --doc-orange-dark: #a85f21;
    --doc-green: #5b6b45;
    --doc-bg: #f7f3ec;
    --doc-card-bg: #ffffff;
    --doc-text: #2b2b2b;
    --doc-text-muted: #6b6b6b;
    --doc-border: #e4dccb;
    --doc-warning-bg: #fdf1e3;
    --doc-warning-border: #e3a15c;
    --doc-gated-bg: #f2f0eb;
    --doc-toc-width: 280px;
}

.doc-therapeute-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 80px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--doc-text);
    line-height: 1.6;
}

/* ---------- Contenu principal ---------- */

.doc-therapeute-content {
    flex: 1 1 auto;
    min-width: 0;
}

.doc-section {
    background: var(--doc-card-bg);
    border: 1px solid var(--doc-border);
    border-radius: 10px;
    padding: 28px 32px;
    margin-bottom: 24px;
    scroll-margin-top: 20px;
}

.doc-section h2 {
    margin-top: 0;
    color: var(--doc-orange-dark);
    font-size: 1.5em;
    border-bottom: 2px solid var(--doc-border);
    padding-bottom: 10px;
}

.doc-section h3 {
    margin-top: 34px;
    margin-bottom: 10px;
    color: var(--doc-text);
    font-size: 1.15em;
    scroll-margin-top: 20px;
}

.doc-section h3:first-of-type {
    margin-top: 20px;
}

.doc-section p,
.doc-section li {
    color: var(--doc-text);
}

.doc-section ul,
.doc-section ol {
    padding-left: 22px;
}

.doc-screenshot {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 14px 0 6px;
    border: 1px solid var(--doc-border);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.doc-warning {
    background: var(--doc-warning-bg);
    border: 1px solid var(--doc-warning-border);
    border-left: 4px solid var(--doc-warning-border);
    border-radius: 6px;
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 0.96em;
}

/* ---------- Placeholder contenu réservé ---------- */

.doc-gated {
    background: var(--doc-gated-bg);
    border: 1px dashed #b9b09a;
    border-radius: 8px;
    padding: 36px 20px;
    text-align: center;
    color: var(--doc-text-muted);
}

.doc-gated-icon {
    font-size: 2em;
    display: block;
    margin-bottom: 8px;
}

.doc-gated-link {
    display: inline-block;
    margin-top: 6px;
    padding: 8px 18px;
    background: var(--doc-orange);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.doc-gated-link:hover {
    background: var(--doc-orange-dark);
    color: #fff;
}

/* ---------- FAQ ---------- */

.doc-faq-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--doc-border);
}

.doc-faq-item:last-child {
    border-bottom: none;
}

.doc-faq-q {
    font-weight: 700;
    margin: 0 0 6px;
}

.doc-faq-r {
    margin: 0;
    color: var(--doc-text-muted);
}

/* ---------- Menu vertical (sommaire) ---------- */

.doc-therapeute-toc {
    flex: 0 0 var(--doc-toc-width);
    width: var(--doc-toc-width);
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: var(--doc-card-bg);
    border: 1px solid var(--doc-border);
    border-radius: 10px;
    padding: 18px;
    font-size: 0.92em;
}

.doc-toc-title {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 0.04em;
    color: var(--doc-text-muted);
    margin-bottom: 10px;
}

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

.doc-therapeute-toc > ul > li {
    margin-bottom: 4px;
}

.doc-therapeute-toc ul ul {
    padding-left: 14px;
    margin-top: 2px;
    margin-bottom: 6px;
}

.doc-toc-link {
    display: block;
    padding: 6px 8px;
    border-radius: 6px;
    color: var(--doc-text);
    text-decoration: none;
    line-height: 1.35;
}

.doc-therapeute-toc ul ul .doc-toc-link {
    font-size: 0.94em;
    color: var(--doc-text-muted);
    padding: 4px 8px;
}

.doc-toc-link:hover {
    background: var(--doc-bg);
    color: var(--doc-orange-dark);
}

.doc-toc-link.is-active {
    background: var(--doc-orange);
    color: #fff !important;
}

.doc-toc-lock {
    font-size: 0.85em;
    opacity: 0.7;
}

/* ---------- Bouton mobile pour le sommaire ---------- */

.doc-toc-toggle {
    display: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .doc-therapeute-wrapper {
        flex-direction: column;
        gap: 16px;
        padding: 16px 14px 60px;
    }

    .doc-section {
        padding: 20px;
    }

    .doc-therapeute-toc {
        position: fixed;
        right: 14px;
        bottom: 70px;
        top: auto;
        max-height: 60vh;
        width: min(80vw, 320px);
        z-index: 9999;
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
        display: none;
    }

    .doc-therapeute-toc.is-open {
        display: block;
    }

    .doc-toc-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        right: 14px;
        bottom: 14px;
        z-index: 10000;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: var(--doc-orange);
        color: #fff;
        border: none;
        font-size: 1.4em;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
        cursor: pointer;
    }
}
