/**
 * Examen blanc complet — interface orchestrateur.
 * Style sobre et professionnel, sans dégradé de fond, aligné au design TCF Academy.
 */

/* Le bandeau du thème (.breadcrumb-area) n'est plus affiché : body.mci-eb-page + en-tête .tcf-eb-hero */

.tcf-eb {
    --eb-blue: #1363df;
    --eb-blue-dark: #0f4fb0;
    --eb-ink: #0f172a;
    --eb-muted: #64748b;
    --eb-line: #e2e8f0;
    --eb-bg: #f8fafc;
    --eb-green: #12bb6a;
    box-sizing: border-box;
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    padding: 8px 16px 40px;
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--eb-ink);
}

.tcf-eb *,
.tcf-eb *::before,
.tcf-eb *::after {
    box-sizing: border-box;
}

/* ── Carte ─────────────────────────────────────────────── */
.tcf-eb-card {
    background: #ffffff;
    border: 1px solid var(--eb-line);
    border-radius: 16px;
    padding: 32px;
    /* Les cartes chevauchent l'en-tête bleu : ombre douce, neutre */
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.tcf-eb-card--center {
    text-align: center;
}

/* ── En-tête ───────────────────────────────────────────── */
.tcf-eb-head {
    margin-bottom: 24px;
    text-align: center;
}

.tcf-eb-head--center {
    text-align: center;
}

.tcf-eb-kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--eb-blue);
    background: #eef4ff;
    border: 1px solid #d6e4ff;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 0;
}

.tcf-eb-title {
    font-size: 26px;
    line-height: 1.25;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--eb-ink);
    display: none;
}

.tcf-eb-title--sm {
    font-size: 21px;
    margin-top: 6px;
}

.tcf-eb-lead {
    font-size: 15px;
    line-height: 1.6;
    color: var(--eb-muted);
    margin: 0;
}

.tcf-eb-dev-start-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 12px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    text-decoration: none;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.tcf-eb-dev-start-btn:hover {
    background: #fde68a;
    color: #92400e;
    text-decoration: none;
}

/* Statut d'une épreuve dont la note n'est pas encore disponible (correction EO en arrière-plan) */
.tcf-eb-status {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    line-height: 1.4;
    white-space: nowrap;
}

.tcf-eb-status--pending {
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
}

.tcf-eb-status--failed {
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

/* ── Actions / boutons ─────────────────────────────────── */
.tcf-eb-actions {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.tcf-eb-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    padding: 13px 26px;
    min-height: 48px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
    border: 1px solid transparent;
}

.tcf-eb-btn--primary {
    background: var(--eb-blue);
    color: #ffffff;
}

.tcf-eb-btn--primary:hover {
    background: var(--eb-blue-dark);
    color: #ffffff;
    transform: translateY(-1px);
}

.tcf-eb-btn--primary:active {
    transform: translateY(0);
}

.tcf-eb-btn:focus-visible {
    outline: 2px solid var(--eb-blue);
    outline-offset: 2px;
}

.tcf-eb-btn--ghost {
    background: #ffffff;
    color: var(--eb-blue);
    border-color: #cdddf7;
    padding: 9px 16px;
    font-size: 13px;
}

.tcf-eb-btn--ghost:hover {
    background: #eef4ff;
    color: var(--eb-blue-dark);
}

/* Indication après le libellé du bouton, séparée par un point médian (jamais de trait vertical) */
.tcf-eb-next-hint {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.85;
    margin-left: 2px;
}

.tcf-eb-next-hint::before {
    content: "·";
    margin-right: 8px;
}

/* ── Pastille validée ──────────────────────────────────── */
.tcf-eb-check {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: var(--eb-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tcf-eb-check svg {
    width: 28px;
    height: 28px;
}

.tcf-eb-warn {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #fffaf0;
    border: 1px solid #fde4ba;
    color: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tcf-eb-warn svg {
    width: 28px;
    height: 28px;
}

/* ── Scores ────────────────────────────────────────────── */

/* Carte résultats */
.tcf-eb-card--results {
    padding: 0;
    overflow: hidden;
}

/* En-tête clair : la couleur est portée par l'en-tête de page (.tcf-eb-hero) */
.tcf-eb-results-header {
    text-align: center;
    padding: 28px 32px 22px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.tcf-eb-results-emblem {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #eef4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    color: var(--eb-blue);
}

.tcf-eb-results-header .tcf-eb-kicker {
    margin-bottom: 10px;
    border: 0;
    border-radius: 6px;
}

.tcf-eb-results-header .tcf-eb-title {
    font-size: 24px;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    color: var(--eb-ink);
}

.tcf-eb-results-header .tcf-eb-lead {
    font-size: 14px;
    margin: 0;
    color: var(--eb-muted);
}

/* Kicker vert pour "terminé" */
.tcf-eb-kicker--success {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0f7a47;
    background: #dcfce7;
    border-color: #bbf7d0;
}

/* Message d'état au-dessus des résultats (correction EO en cours / échouée) */
.tcf-eb-status-note {
    margin: 20px 24px 0;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.55;
}

.tcf-eb-status-note--pending {
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.tcf-eb-status-note--failed {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

/* Lien de retour vers l'espace membre, sous chaque écran */
.tcf-eb-back {
    margin: 18px 0 0;
    text-align: center;
}

.tcf-eb-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--eb-muted, #64748b);
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
}

.tcf-eb-back-link:hover {
    color: var(--eb-blue, #1363df);
    background: #eef4ff;
    text-decoration: none;
}

.tcf-eb-back-link:focus-visible {
    outline: 2px solid var(--eb-blue, #1363df);
    outline-offset: 2px;
}

/* Abonnement expiré en cours d'examen (vue d'accueil) */
.tcf-eb-expired {
    margin-top: 24px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    text-align: left;
}

.tcf-eb-expired-title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: #9a3412;
}

.tcf-eb-expired-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #7c2d12;
}

/* ── Notices ───────────────────────────────────────────── */
.tcf-eb-notice {
    max-width: 720px;
    margin: 24px auto;
    padding: 18px 20px;
    border: 1px solid #FED7AA;
    background: #FFF7ED;
    border-radius: 12px;
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: #334155;
}

.tcf-eb-notice a {
    color: var(--eb-blue);
    font-weight: 600;
}

/* Notice « connexion requise » : message + bouton de connexion (retour auto) */
.tcf-eb-notice--login {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
}

.tcf-eb-notice--login p {
    margin: 0;
    flex: 1 1 260px;
}

.tcf-eb-notice-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 20px;
    background: var(--eb-blue, #1363DF);
    color: #fff !important;
    border-radius: 8px;
    font-family: "Poppins", sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.15s ease;
}

.tcf-eb-notice-btn:hover {
    background: #0F52C0;
    color: #fff;
    transform: translateY(-1px);
}

.tcf-eb-notice-btn:focus-visible {
    outline: 2px solid var(--eb-blue, #1363DF);
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .tcf-eb-notice-btn {
        width: 100%;
        justify-content: center;
    }

    .tcf-eb-status-note {
        margin: 16px 16px 0;
    }
}

@media (max-width: 768px) {
    .tcf-eb {
        padding: 0;
    }
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
    .tcf-eb-card {
        padding: 22px 18px;
    }

    .tcf-eb-results-header {
        padding: 20px 18px 18px;
    }

    .tcf-eb-title {
        font-size: 22px;
    }

    .tcf-eb-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════
   INTRO CARD — Design Premium
   ═══════════════════════════════════════════════════════════ */

.tcf-eb-card--intro {
    position: relative;
}

/* ── Head meta : kicker + badge plan ──────────────────── */

.tcf-eb-head-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.tcf-eb-plan-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: #6d28d9;
    background: rgba(109, 40, 217, 0.07);
    border: 1px solid rgba(109, 40, 217, 0.15);
    padding: 4px 11px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* ── Step code badge (CO / CE / EO / EE) ─────────────── */

.tcf-eb-step-code {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 6px;
    flex-shrink: 0;
    line-height: 1.5;
}

[data-step="co"] .tcf-eb-step-code {
    color: #0a6b3a;
    background: rgba(18, 187, 106, 0.12);
}

[data-step="ce"] .tcf-eb-step-code {
    color: #0f4fb0;
    background: rgba(19, 99, 223, 0.10);
}

[data-step="eo"] .tcf-eb-step-code {
    color: #92400e;
    background: rgba(245, 158, 11, 0.13);
}

[data-step="ee"] .tcf-eb-step-code {
    color: #5b21b6;
    background: rgba(139, 92, 246, 0.10);
}

/* ── Transition card ─────────────────────────────────── */

.tcf-eb-card--transition {
    background: #fff;
    border-color: rgba(19, 99, 223, 0.35);
}

.tcf-eb-card--transition .tcf-eb-check {
    width: 72px;
    height: 72px;
    background: #eef4ff;
    border: 2px solid #d6e4ff;
    box-shadow: 0 0 0 8px rgba(19, 99, 223, 0.07);
    color: var(--eb-blue);
    margin-bottom: 20px;
}

.tcf-eb-card--transition .tcf-eb-check svg {
    width: 34px;
    height: 34px;
}

.tcf-eb-card--transition .tcf-eb-step-code {
    color: #0f4fb0;
    background: rgba(19, 99, 223, 0.10);
}

.tcf-eb-transition-kicker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--eb-ink);
    margin: 0 0 14px;
}

/* ── Icône flèche dans le bouton CTA ─────────────────── */

.tcf-eb-btn-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-left: 2px;
    opacity: 0.9;
    transition: transform 0.18s ease;
}

.tcf-eb-btn--primary:hover .tcf-eb-btn-icon {
    transform: translateX(3px);
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   EN-TÊTE DE PAGE + SCÈNE (tous les écrans de l'orchestrateur)
   ═══════════════════════════════════════════════════════════ */

/* L'en-tête remplace le bandeau du thème : la zone de page démarre sous le menu.
   !important nécessaire : tcf-global-styles.css impose « padding: 60px 0 !important » à .section-py-120. */
.mci-eb-page .tg-page-area.section-py-120 {
    padding-top: 0 !important;
}

/* Le contenu reste dans le conteneur de la page (aligné sur la carte) ;
   seuls le fond et la trame débordent sur toute la largeur de l'écran. */
.tcf-eb-hero {
    position: relative;
    isolation: isolate;
    color: #ffffff;
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tcf-eb-hero::before,
.tcf-eb-hero::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    z-index: -1;
    pointer-events: none;
}

.tcf-eb-hero::before {
    background: #1363df;
}

/* Trame fine, surtout visible à droite : de la profondeur sans dégradé de couleur */
.tcf-eb-hero::after {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: linear-gradient(90deg, transparent 15%, #000 75%);
    mask-image: linear-gradient(90deg, transparent 15%, #000 75%);
}

.tcf-eb-hero-inner {
    position: relative;
    box-sizing: border-box;
    max-width: 880px;
    margin: 0 auto;
    /* Le bas est la zone chevauchée par la carte (.tcf-eb-stage) */
    padding: 36px 16px 104px;
}

.tcf-eb-hero-eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.tcf-eb-hero-title {
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.tcf-eb-hero-lead {
    max-width: 560px;
    margin: 12px 0 0;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
}

.tcf-eb-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.tcf-eb-hero-meta li {
    position: relative;
    padding-left: 14px;
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
}

/* Petit losange en guise de puce */
.tcf-eb-hero-meta li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    background: rgba(255, 255, 255, 0.55);
    transform: rotate(45deg);
}

/* Le thème (eduvalt-unit.css : .eduvalt-page-content ul) indente et espace les listes du contenu */
.tcf-eb-hero .tcf-eb-hero-meta,
.tcf-eb .tcf-eb-guide-list {
    padding-left: 0;
    margin-bottom: 0;
}

.tcf-eb-hero .tcf-eb-hero-meta li,
.tcf-eb .tcf-eb-guide-list li {
    margin-bottom: 0;
    list-style: none;
}

/* Carte « Votre progression » (ou durée de l'examen) : verre dépoli sur l'en-tête bleu */
.tcf-eb-hero-card {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
    padding: 14px 18px 14px 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 16px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #ffffff;
}

/* Anneau : épreuves terminées sur 4 (blanc, vert une fois l'examen terminé) */
.tcf-eb-hero-ring {
    position: relative;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}

.tcf-eb-hero-ring svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.tcf-eb-hero-ring-track,
.tcf-eb-hero-ring-value {
    fill: none;
    stroke-width: 6;
}

.tcf-eb-hero-ring-track {
    stroke: rgba(255, 255, 255, 0.22);
}

.tcf-eb-hero-ring-value {
    stroke: #ffffff;
    stroke-linecap: round;
}

.tcf-eb-hero-card.is-complete .tcf-eb-hero-ring-value {
    stroke: #4ade80;
}

.tcf-eb-hero-ring b {
    position: relative;
    font-family: "Poppins", sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.tcf-eb-hero-ring b small {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.7;
}

/* Variante sans progression : icône horloge dans un rond */
.tcf-eb-hero-ring--icon {
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

.tcf-eb-hero-ring--icon svg {
    position: static;
    width: 26px;
    height: 26px;
    transform: none;
}

.tcf-eb-hero-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tcf-eb-hero-card-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.tcf-eb-hero-card-text b {
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #ffffff;
}

.tcf-eb-hero-card-text > span:last-child {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.82);
}

/* La carte (ou la notice) remonte sur le bas de l'en-tête */
.tcf-eb-stage {
    position: relative;
    margin-top: -72px;
}

.tcf-eb-stage > .tcf-eb-notice {
    position: relative;
    margin-top: 8px;
    background: #ffffff;
    border-color: var(--mci-border, #e2e8f0);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

@media (min-width: 900px) {
    .tcf-eb-hero-inner {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 40px;
        padding: 52px 16px 132px;
    }

    .tcf-eb-hero-title {
        font-size: 36px;
    }

    .tcf-eb-hero-lead {
        font-size: 16px;
    }

    /* Grand écran : la carte se place à droite du texte, alignée sur le bas */
    .tcf-eb-hero-card {
        flex-shrink: 0;
        margin-top: 0;
        margin-bottom: 4px;
    }

    .tcf-eb-stage {
        margin-top: -100px;
    }
}

/* ── Progression (écran d'accueil) ────────────────────────── */
.tcf-eb-progress {
    margin: 0 0 22px;
}

.tcf-eb-progress-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.tcf-eb-progress-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.tcf-eb-progress-count {
    font-size: 13px;
    color: var(--eb-muted);
    white-space: nowrap;
}

.tcf-eb-progress-count strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--eb-ink);
}

/* ── Parcours CO → CE → EO → EE (écran d'accueil) ─────────── */
/* Deux colonnes (sessions) × deux lignes (épreuves) */
.tcf-eb-track {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    margin: 0 0 32px;
}

.tcf-eb-track-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    min-height: 24px;
    margin-bottom: 6px;
}

.tcf-eb .tcf-eb-track-name {
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--eb-ink);
}

.tcf-eb-track-state {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--eb-muted);
}

.tcf-eb-track-session.is-done .tcf-eb-track-state {
    color: #0f7a47;
}

.tcf-eb-track-session.is-current .tcf-eb-track-state {
    color: var(--eb-blue);
}

.tcf-eb-track-steps {
    display: flex;
    flex-direction: column;
}

/* Ligne d'épreuve : icône | code + nom, « Passée le … » | échelle A1 → C2 | niveau CECR + note (pas de trait latéral).
   Couleur du niveau obtenu : vert = C1-C2 (NCLC 10+), orange = C1, rouge = en dessous. */
.tcf-eb-track-step {
    --lvl-bg: #f8fafc;
    --lvl-line: #e2e8f0;
    --lvl-ink: var(--eb-ink);
    --lvl-fill: #cbd5e1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    column-gap: 14px;
    padding: 14px 0;
    border-top: 1px solid #f1f5f9;
}

.tcf-eb-track-step.is-tone-good {
    --lvl-bg: #ecfdf5;
    --lvl-line: #a7f3d0;
    --lvl-ink: #047857;
    --lvl-fill: #12bb6a;
}

.tcf-eb-track-step.is-tone-mid {
    --lvl-bg: #fff7ed;
    --lvl-line: #fed7aa;
    --lvl-ink: #c2410c;
    --lvl-fill: #f97316;
}

.tcf-eb-track-step.is-tone-low {
    --lvl-bg: #fef2f2;
    --lvl-line: #fecaca;
    --lvl-ink: #b91c1c;
    --lvl-fill: #ef4444;
}

/* Icône de l'épreuve en tête de ligne : bleu de la marque une fois commencée, grise à venir */
.tcf-eb-track-icon {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #94a3b8;
}

.tcf-eb-track-icon svg {
    width: 21px;
    height: 21px;
}

.tcf-eb-track-step.is-done .tcf-eb-track-icon,
.tcf-eb-track-step.is-next .tcf-eb-track-icon {
    background: #eef4ff;
    box-shadow: inset 0 0 0 1px #d6e4fb;
    color: var(--eb-blue);
}

.tcf-eb-track-body {
    grid-column: 2;
}

/* Échelle des niveaux : six cases remplies jusqu'au niveau obtenu */
.tcf-eb-track-scale {
    grid-column: 3;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 240px;
}

.tcf-eb-track-scale-bar,
.tcf-eb-track-scale-labels {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
}

.tcf-eb-track-scale-bar i {
    display: block;
    height: 8px;
    border-radius: 4px;
    background: #eef2f7;
}

.tcf-eb-track-scale-bar i.is-on {
    background: var(--lvl-fill);
}

.tcf-eb-track-scale-labels b {
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    color: #94a3b8;
}

.tcf-eb-track-scale-labels b.is-current {
    font-weight: 800;
    color: var(--lvl-ink);
}

@media (max-width: 640px) {
    /* Téléphone : 1re ligne = icône + nom et date sur toute la largeur (pas de coupure du nom),
       2e ligne = échelle A1 → C2 et pastille de note côte à côte */
    .tcf-eb-track-step {
        grid-template-columns: auto minmax(0, 1fr) auto;
        column-gap: 12px;
        row-gap: 12px;
    }

    .tcf-eb-track-body {
        grid-column: 2 / -1;
        grid-row: 1;
    }

    .tcf-eb-track-scale {
        grid-column: 2;
        grid-row: 2;
        width: auto;
    }

    /* .tcf-eb-track-step devant : la règle de base de la pastille est plus bas dans le fichier */
    .tcf-eb-track-step .tcf-eb-track-level {
        grid-column: 3;
        grid-row: 2;
    }

    .tcf-eb-track-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .tcf-eb-track-icon svg {
        width: 18px;
        height: 18px;
    }
}

.tcf-eb-track-step:first-child {
    border-top: 0;
}

.tcf-eb-track-body {
    min-width: 0;
}

.tcf-eb .tcf-eb-track-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--eb-ink);
}

.tcf-eb-track-code {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

.tcf-eb-track-step.is-done[data-step="co"] .tcf-eb-track-code {
    color: #0a6b3a;
}

.tcf-eb-track-step.is-done[data-step="ce"] .tcf-eb-track-code {
    color: #0f4fb0;
}

.tcf-eb-track-step.is-done[data-step="eo"] .tcf-eb-track-code {
    color: #92400e;
}

.tcf-eb-track-step.is-done[data-step="ee"] .tcf-eb-track-code {
    color: #5b21b6;
}

.tcf-eb-track-step.is-next .tcf-eb-track-code {
    color: var(--eb-blue);
}

/* Épreuve à venir : en retrait */
.tcf-eb .tcf-eb-track-step:not(.is-done):not(.is-next) .tcf-eb-track-title {
    color: #94a3b8;
}

.tcf-eb-track-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--eb-muted);
}

.tcf-eb-track-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--eb-blue);
    text-decoration: none;
    transition: color 0.15s ease;
}

.tcf-eb-track-link:hover {
    color: var(--eb-blue-dark);
    text-decoration: underline;
}

.tcf-eb-track-next {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--eb-blue);
}

.tcf-eb-track-todo {
    font-size: 12px;
    color: #94a3b8;
}

/* Niveau CECR + note : pastille compacte à droite, couleur du niveau obtenu (voir .is-tone-*) */
.tcf-eb-track-level {
    grid-column: 4;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 64px; /* largeur fixe : les échelles A1 → C2 restent alignées d'une ligne à l'autre */
    padding: 5px 6px 6px;
    border-radius: 9px;
    background: var(--lvl-bg);
    border: 1px solid var(--lvl-line);
    font-family: "Poppins", sans-serif;
    text-align: center;
}

.tcf-eb-track-level-value {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--lvl-ink);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.tcf-eb-track-level-note {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--lvl-ink);
    opacity: 0.8;
}

/* Épreuve passée, examen pas encore fini : pastille « Terminée » à la place de la note */
.tcf-eb-track-done {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    color: #334155;
}

.tcf-eb-track-done svg {
    color: #12bb6a;
}

/* Rappel sous la progression : les résultats arrivent à la fin de l'examen */
.tcf-eb-progress-note {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--eb-muted);
}

@media (max-width: 640px) {
    /* Téléphone : sous le nom et la date (le nom occupe toute la 1re ligne) */
    .tcf-eb-track-step .tcf-eb-track-done {
        grid-column: 2 / -1;
        grid-row: 2;
        justify-self: start;
    }
}

/* Accueil : les deux sessions sont côte à côte sur grand écran, donc chaque colonne est étroite →
   même disposition que sur téléphone (nom et date sur toute la largeur, échelle / note / « Terminée » dessous) */
.tcf-eb-track-session .tcf-eb-track-step {
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 12px;
    row-gap: 10px;
}

.tcf-eb-track-session .tcf-eb-track-step .tcf-eb-track-body {
    grid-column: 2 / -1;
    grid-row: 1;
}

.tcf-eb-track-session .tcf-eb-track-step .tcf-eb-track-scale {
    grid-column: 2;
    grid-row: 2;
    width: auto;
}

.tcf-eb-track-session .tcf-eb-track-step .tcf-eb-track-level {
    grid-column: 3;
    grid-row: 2;
}

.tcf-eb-track-session .tcf-eb-track-step .tcf-eb-track-done {
    grid-column: 2 / -1;
    grid-row: 2;
    justify-self: start;
}

/* « Passée le … à … » sous le nom de l'épreuve */
.tcf-eb-track-when {
    font-size: 12px;
    color: var(--eb-muted);
    font-variant-numeric: tabular-nums;
}

/* Bouton DEV (admins) : sous les épreuves, pour ne pas décaler l'alignement des colonnes */
.tcf-eb-track-session > .tcf-eb-dev-start-btn {
    margin-top: 6px;
}

/* ── Résumé de session (fin de la session 1) ───────────────── */
.tcf-eb-summary-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
}

.tcf-eb-summary-check {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0fdf4;
    color: #12bb6a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tcf-eb .tcf-eb-summary-title {
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--eb-ink);
}

.tcf-eb .tcf-eb-summary-lead {
    margin: 4px 0 0;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: var(--eb-muted);
}

.tcf-eb-summary-steps {
    margin-bottom: 4px;
}

/* Résultats finaux : mêmes lignes que l'accueil, dans le corps de la carte */
.tcf-eb-results-steps {
    padding: 6px 32px 22px;
}

@media (max-width: 640px) {
    .tcf-eb-results-steps {
        padding: 4px 16px 18px;
    }
}

/* Petit écran : le bouton tient sur une ligne (l'épreuve suivante reste indiquée dans les lignes) */
@media (max-width: 480px) {
    .tcf-eb-btn .tcf-eb-next-hint {
        display: none;
    }
}

/* ── Déroulement de l'examen : 4 repères ───────────────────── */
.tcf-eb-guide {
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
}

.tcf-eb .tcf-eb-guide-label {
    margin: 0 0 16px;
    font-family: "Poppins", sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.tcf-eb-guide-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px 32px;
    margin: 0;
}

.tcf-eb-guide-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.tcf-eb-guide-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #eef4ff;
    color: var(--eb-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tcf-eb-guide-list strong {
    display: block;
    margin-bottom: 2px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--eb-ink);
}

.tcf-eb-guide-list li div span {
    display: block;
    font-size: 13px;
    line-height: 1.55;
    color: var(--eb-muted);
}

@media (min-width: 720px) {
    /* Deux sessions côte à côte, séparées par un filet */
    /* Deux colonnes de sessions séparées par un espace (pas de trait vertical) */
    .tcf-eb-track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 56px;
    }

    .tcf-eb-guide-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .tcf-eb-card--intro {
        padding: 20px 16px;
    }
}
/* ── Appels à l'action (audit UX du 2026-10-10 : H3, H5, L2) ──────────────── */
.tcf-eb-stage > .tcf-eb-cta {
    position: relative;
    max-width: 720px;
    margin: 8px auto 32px;
    padding: 0 16px;
}

.tcf-eb-stage > .tcf-eb-cta .mci-cta {
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.tcf-eb-stage > .mci-gate {
    position: relative;
    padding-top: 8px;
}

.tcf-eb-stage .mci-gate-card {
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.tcf-eb .tcf-eb-next {
    margin-top: 20px;
}
