.sidebar .inside-right-sidebar {
    position: sticky;
    top: 40px;
}

/* Container */
.toc-wrapper {
    background: linear-gradient(180deg, #ffffff 0%, #f7f7fb 100%);
    border: 1px solid #e8e8ef;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 30px;

    box-shadow:
        0 1px 2px rgba(0,0,0,0.04),
        0 6px 18px rgba(0,0,0,0.06);
}


.toc-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 700;
}

/* Barre de progression globale */
.toc-progress-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-bottom: 15px;
    overflow: hidden;
}

.toc-progress-fill {
    height: 100%;
    background: #7a7a7a;
    width: 0%;
    transition: width 0.15s linear;
}

/* Scroll interne */
.toc-content {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
}

.toc-content::-webkit-scrollbar { width: 6px; }
.toc-content::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
.toc-content::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }

/* Liste */
.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-list li { margin-bottom: 8px; }

/* Remplissage par section */
.toc-list a {
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: #333;

    /* couche violette (progress) */
    background-image: linear-gradient(#857DFF, #857DFF);
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 0% 100%;

    transition: background-size .08s linear,
                background-color .12s ease,
                color .08s linear;
}

/* fond violet uniquement quand actif/rempli */
.toc-list a.is-active,
.toc-list a.is-filled {
    background-color: #B4BAFF;
    color: #fff;
}

.toc-list a:hover {
    color: #0073aa;
}

/* H2 / H3 */
.toc-h2 { font-weight: 600; }

.toc-h3 {
    padding-left: 20px;
    font-weight: 400;
    font-size: 0.95em;
}

.toc-h3 a { color: #666; }

@media (max-width: 768px) {
    .toc-wrapper {
        display: none;
    }
}
