.progress_container{
    position: relative;
    height: calc(20px * var(--scale)); /* légèrement augmenté */
    background: #ddd;
    border-radius: calc(10px * var(--scale));
    overflow: hidden;
    max-width: calc(240px * var(--scale));
}

.progress_bar{
    height: 100%;
    background: #4caf50;
}

.progress_text{
    position: absolute;
    width: 100%;
    text-align: center;

    font-size: clamp(
        calc(15px * var(--scale)),
        calc(3.5vw * var(--scale)),
        calc(19px * var(--scale))
    ) !important;

    line-height: calc(20px * var(--scale));
    font-weight: bold;
    text-shadow: 0 calc(1px * var(--scale)) calc(1px * var(--scale)) rgba(255,255,255,0.45);
}

.progress_small{
    font-size: clamp(
        calc(13px * var(--scale)),
        calc(3vw * var(--scale)),
        calc(16px * var(--scale))
    );
    color: #666;
}

.chapitre_ligne{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(12px * var(--scale));
    margin-bottom: calc(18px * var(--scale));
}

.chapitre_gauche{
    flex: 1;
    min-width: 0;
    display: flex;
    gap: calc(8px * var(--scale));
    padding-top: calc(1.2em * var(--scale));
}

.chapitre_droite{
    flex: 0 0 40vw;
    max-width: calc(420px * var(--scale));
}

/* =========================
   BADGES : BARRE MODERNE
========================= */

.badge-lock{
    background:#eee;
    border-radius:calc(20px * var(--scale));
    padding:calc(10px * var(--scale));
    text-align:center;
    color:#666;
    max-width:calc(600px * var(--scale));
    margin:auto;
    font-weight:700;

    font-size: calc(18px * var(--scale));
    line-height: 1.4;
}

.badge-bar{
    width:90%;
    height:calc(56px * var(--scale)); /* un peu plus haut */
    margin:auto;
    background:#e5e5e5;
    border-radius:calc(26px * var(--scale));
    overflow:hidden;
    box-shadow:
        inset 0 calc(6px * var(--scale)) calc(12px * var(--scale)) rgba(0,0,0,0.35),
        0 calc(4px * var(--scale)) calc(8px * var(--scale)) rgba(0,0,0,0.3);
    position:relative;
    cursor:pointer;
}

.badge-bar-fill{
    height:100%;
    box-shadow:
        inset 0 calc(8px * var(--scale)) calc(10px * var(--scale)) rgba(255,255,255,0.5),
        inset 0 calc(-8px * var(--scale)) calc(12px * var(--scale)) rgba(0,0,0,0.4);
    transition:width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.badge-bar-red{
    background:linear-gradient(to bottom, red 0%, #a00000 100%);
}

.badge-bar-yellow{
    background:linear-gradient(to bottom, #ffe066 0%, #d6a600 100%);
}

.badge-bar-green{
    background:linear-gradient(to bottom, #4be06c 0%, #1c8f39 100%);
}

.badge-bar-text{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    font-weight:700;

    font-size: clamp(
        calc(19px * var(--scale)),
        calc(5vw * var(--scale)),
        calc(28px * var(--scale))
    );

    color:black;
    pointer-events:none;
    white-space:nowrap;
    max-width:calc(100% - calc(56px * var(--scale)));
    overflow:hidden;
    text-overflow:ellipsis;
    line-height:1.1;
}

.badge-bar-text-danger{
    color:tomato;
}

.badge-bar-icon{
    position:absolute;
    right:calc(12px * var(--scale));
    top:50%;
    transform:translateY(-50%);
    height:calc(32px * var(--scale));
    filter:drop-shadow(0 calc(2px * var(--scale)) calc(4px * var(--scale)) rgba(0,0,0,0.4));
    pointer-events:none;
}

/* =========================
   MOBILE
========================= */

@media screen and (max-width: 700px){

    .progress_container{
        height: calc(22px * var(--scale));
        max-width: 100%;
    }

    .progress_text{
        font-size: calc(17px * var(--scale)) !important;
        line-height: calc(22px * var(--scale));
    }

    .progress_small{
        font-size: calc(14px * var(--scale));
    }

    .badge-lock{
        font-size: calc(16px * var(--scale));
        padding:calc(9px * var(--scale));
    }

    .badge-bar{
        width:100%;
        height:calc(58px * var(--scale));
        border-radius:calc(26px * var(--scale));
    }

    .badge-bar-text{
        font-size: calc(20px * var(--scale));
        max-width:calc(100% - calc(48px * var(--scale)));
    }

    .badge-bar-icon{
        right:calc(10px * var(--scale));
        height:calc(28px * var(--scale));
    }

    .chapitre_ligne{
        flex-direction: column;
        align-items: stretch;
        gap: calc(10px * var(--scale));
    }

    .chapitre_droite{
        flex: none;
        max-width: 100%;
    }
}