/* Trouve l'erreur : s'appuie sur les styles des parcours et du QCM */

.te-etapes {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 22px 0 0;
    padding: 0;
}

.te-etapes li {
    display: grid;
    grid-template-columns: 34px 1fr;
    column-gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    font-size: 12px;
    color: var(--text-dim);
}

.te-etapes span {
    grid-row: 1 / 3;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
    background: var(--accent);
}

.te-etapes strong { color: var(--text); font-size: 13px; }

.te-options { margin-top: 0; }

.te-objectif {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.te-objectif .mdi { color: var(--pc, var(--accent)); margin-right: 4px; }

.te-consigne { margin: 0 0 14px; font-size: 12.5px; color: var(--text-dim); }

/* Programme numéroté */
.te-code {
    list-style: none;
    margin: 0 0 16px;
    padding: 10px 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface2);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.55;
    overflow-x: auto;
}

.te-ligne > label,
.te-ligne:not(:has(label)) {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 2px 14px 2px 0;
    border-left: 3px solid transparent;
}

.te-num {
    flex-shrink: 0;
    width: 34px;
    text-align: right;
    color: var(--text-dimmer);
    user-select: none;
    font-size: 11.5px;
}

.te-ligne-code {
    white-space: pre;
    background: none;
    padding: 0;
    border: 0;
    font-size: inherit;
    color: var(--text);
}

.te-code.is-choix label { cursor: pointer; }
.te-code.is-choix label:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); border-left-color: color-mix(in srgb, var(--accent) 50%, transparent); }

.te-code.is-choix input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.te-code.is-choix label:has(input:checked) {
    background: color-mix(in srgb, var(--accent3) 14%, transparent);
    border-left-color: var(--accent3);
}

.te-code.is-choix label:has(input:checked) .te-num { color: var(--accent3); font-weight: 700; }
.te-code.is-choix label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }


.te-ligne.is-fautive { background: color-mix(in srgb, var(--accent3) 14%, transparent); border-left-color: var(--accent3); }
.te-ligne.is-fautive .te-num { color: var(--accent3); font-weight: 700; }
.te-ligne.is-choisie { background: color-mix(in srgb, var(--accent4) 14%, transparent); border-left-color: var(--accent4); }
.te-ligne.is-corrigee { background: color-mix(in srgb, var(--accent2) 14%, transparent); border-left-color: var(--accent2); }
.te-ligne.is-corrigee .te-num { color: var(--accent2); font-weight: 700; }

.te-valider[disabled] { opacity: .55; cursor: not-allowed; }
.te-form .te-valider { margin-top: 2px; }
.te-suite { margin-top: 18px; text-align: right; }

.te-verdict {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
}

.te-verdict .mdi { font-size: 18px; line-height: 1.2; }
.te-verdict.is-bon { color: var(--accent2); background: color-mix(in srgb, var(--accent2) 10%, transparent); }
.te-verdict.is-faux { color: var(--accent3); background: color-mix(in srgb, var(--accent3) 10%, transparent); }
.te-verdict code { font-family: var(--font-mono); font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--surface); color: var(--text); }

.te-choix code {
    font-family: var(--font-mono);
    font-size: 12.5px;
    background: none;
    border: 0;
    padding: 0;
    color: var(--text);
    white-space: pre-wrap;
}

.te-sous-titre {
    margin: 18px 0 10px;
    font-size: 13px;
    font-weight: 700;
}

.te-sous-titre .mdi { color: var(--accent2); }

/* Récapitulatif */
.te-recap { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.te-recap li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: 12.5px;
}

.te-recap-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
    background: var(--surface2);
    border: 1px solid var(--border);
}

.te-recap-obj { flex: 1 1 240px; }

.te-recap-pt {
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.te-recap-pt.is-bon { color: var(--accent2); background: color-mix(in srgb, var(--accent2) 12%, transparent); }
.te-recap-pt.is-faux { color: var(--accent3); background: color-mix(in srgb, var(--accent3) 12%, transparent); }

@media (max-width: 600px) {
    .te-code { font-size: 12px; }
    .te-num { width: 26px; }
    .te-suite { text-align: center; }
    .te-valider { width: 100%; justify-content: center; }
}
