/* ===========================================================
   TCF EO Simulator — styles (multi-task + exam blanc)
   =========================================================== */

.tcf-eos-wrap,
.tcf-eo-simulator,
.tcf-eo-history {
    /* Charte TCF Academy — réutilise --mci-* si Mon Compte est chargé */
    --eos-primary: var(--mci-primary-blue, #1363DF);
    --eos-navy: var(--mci-navy-blue, #082A5E);
    --eos-green: var(--mci-green, #12BB6A);
    --eos-red: var(--mci-red, #EF4444);
    --eos-text: var(--mci-text, #0F172A);
    --eos-text-secondary: #475569;
    --eos-muted: #64748B;
    --eos-border: var(--mci-border-light, #E5E7EB);
    --eos-page-bg: var(--mci-background, #F8F9FA);
    --eos-card: var(--mci-white, #fff);
    --eos-shadow: var(--mci-shadow, 0 2px 8px rgba(0, 0, 0, 0.08));
    --eos-radius: var(--mci-border-radius-large, 12px);
    --eos-radius-sm: var(--mci-border-radius, 8px);
    --eos-tint-blue: #EEF2FF;
    --eos-tint-warm: #FFFBEB;
    --eos-tint-tip: #FFF7ED;
    --eos-tip-border: #FED7AA;

    font-family: 'Poppins', system-ui, sans-serif;
    max-width: 1200px;
    margin: 0 auto 48px;
    color: var(--eos-text);
}

/* ── Exam blanc : plein écran (viewport) ───────────────────────────── */
.tcf-eos-wrap.tcf-eos-wrap--exam-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 100000;
    max-width: none;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding-top: max(clamp(12px, 2.5vw, 24px), env(safe-area-inset-top));
    padding-right: max(clamp(12px, 2.5vw, 24px), env(safe-area-inset-right));
    padding-bottom: max(clamp(12px, 2.5vw, 24px), env(safe-area-inset-bottom));
    padding-left: max(clamp(12px, 2.5vw, 24px), env(safe-area-inset-left));
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--eos-page-bg, #f8f9fa);
}

body.admin-bar .tcf-eos-wrap.tcf-eos-wrap--exam-fullscreen {
    top: 32px;
    min-height: calc(100vh - 32px);
    min-height: calc(100dvh - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .tcf-eos-wrap.tcf-eos-wrap--exam-fullscreen {
        top: 46px;
        min-height: calc(100vh - 46px);
        min-height: calc(100dvh - 46px);
    }
}

html.tcf-eos-exam-fullscreen-active,
body.tcf-eos-exam-fullscreen-active {
    overflow: hidden;
    height: 100%;
}

/* Plein écran navigateur (API Fullscreen) — même #tcf-eos-wrap */
.tcf-eos-wrap.tcf-eos-wrap--exam-fullscreen:fullscreen,
.tcf-eos-wrap.tcf-eos-wrap--exam-fullscreen:-webkit-full-screen {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-width: none;
    margin: 0;
    z-index: auto;
    padding: max(clamp(12px, 2.5vw, 24px), env(safe-area-inset-top))
        max(clamp(12px, 2.5vw, 24px), env(safe-area-inset-right))
        max(clamp(12px, 2.5vw, 24px), env(safe-area-inset-bottom))
        max(clamp(12px, 2.5vw, 24px), env(safe-area-inset-left));
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--eos-page-bg, #f8f9fa);
}

.tcf-eos-exam-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.tcf-eos-exam-header-actions .tcf-eos-exam-badge {
    margin-bottom: 0;
}

.tcf-eos-browser-fs-btn {
    appearance: none;
    -webkit-appearance: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.tcf-eos-browser-fs-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.7);
}

.tcf-eos-browser-fs-btn.tcf-eos-browser-fs-btn--visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.tcf-eos-browser-fs-btn:active {
    transform: scale(0.98);
}

.tcf-eos-exit-browser-fs-btn {
    appearance: none;
    -webkit-appearance: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #FECACA;
    background: rgba(239, 68, 68, 0.22);
    border: 1px solid rgba(252, 165, 165, 0.85);
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.tcf-eos-exit-browser-fs-btn:hover {
    color: #fff;
    background: rgba(220, 38, 38, 0.45);
    border-color: rgba(254, 202, 202, 0.95);
}

.tcf-eos-exit-browser-fs-btn:active {
    transform: scale(0.98);
}

.tcf-eo-btn.tcf-eos-modal-confirm--danger {
    background: #DC2626;
    border-color: #DC2626;
    color: #fff;
}

.tcf-eo-btn.tcf-eos-modal-confirm--danger:hover {
    background: #B91C1C;
    border-color: #B91C1C;
    color: #fff;
}

/* ── State visibility ───────────────────────────────────── */
.tcf-eo-state-hidden { display: none !important; }

/* ── Header ─────────────────────────────────────────────── */
.tcf-eo-header {
    background: #082A5E;
    padding: 24px 28px;
    border-radius: 12px;
    text-align: left;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.tcf-eo-header-circles::before,
.tcf-eo-header-circles::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.tcf-eo-header-circles::before {
    top: -60px; right: -40px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,.06);
}
.tcf-eo-header-circles::after {
    bottom: -40px; left: 40%;
    width: 140px; height: 140px;
    background: rgba(255,255,255,.035);
}

.tcf-eos-header-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    margin: 0 0 6px;
    position: relative;
    z-index: 1;
}

.tcf-eo-header-title {
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.tcf-eo-header-subtitle {
    color: rgba(255,255,255,.86);
    font-size: .9rem;
    margin: 0;
    position: relative;
    z-index: 1;
    font-weight: 400;
}

.tcf-eo-header-recording {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 50%, #dc2626 100%);
}

.tcf-eo-header-detail { margin-bottom: 28px; }

/* ── Task tabs (exam mode) ──────────────────────────────── */
.tcf-eos-task-tabs {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.tcf-eos-tab {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
    color: rgba(255,255,255,.6);
    border: 1px solid rgba(255,255,255,.2);
    cursor: pointer;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.tcf-eos-tab.active {
    background: rgba(255,255,255,.2);
    color: #fff;
    border-color: rgba(255,255,255,.5);
}

.tcf-eos-tab.done {
    background: rgba(34,197,94,.2);
    color: #86efac;
    border-color: rgba(34,197,94,.4);
}

/* ── Badges ─────────────────────────────────────────────── */
.tcf-eos-exam-badge {
    display: inline-block;
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 999px;
    padding: 3px 14px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.tcf-eos-mode-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    font-size: .82rem;
    color: rgba(255,255,255,.75);
    position: relative;
    z-index: 1;
}

.tcf-eos-mode-badge--chips {
    flex-direction: column;
    align-items: stretch;
    align-self: flex-start;
    max-width: 100%;
    gap: 0;
    color: rgba(255, 255, 255, 0.88);
}

.tcf-eos-indiv-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    justify-content: flex-start;
}

.tcf-eos-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.26);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    font-size: clamp(0.6875rem, 0.66rem + 0.18vw, 0.75rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.94);
    letter-spacing: 0.01em;
    line-height: 1.25;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.tcf-eos-meta-chip:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.36);
}

.tcf-eos-meta-chip-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.96);
    flex-shrink: 0;
}

.tcf-eos-meta-chip-ic svg {
    width: 12px;
    height: 12px;
    display: block;
}

.tcf-eos-meta-chip-txt {
    padding-right: 1px;
}

.tcf-eos-credits-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    flex-shrink: 0;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 999px;
    padding: 4px 12px 4px 10px;
    color: #fff;
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 1.2;
    white-space: nowrap;
}

.tcf-eos-credits-pill__n {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    font-size: 0.9375rem;
}

.tcf-eos-credits-pill__lbl {
    font-weight: 600;
    opacity: 0.95;
}

/* ── Cartes « hub » (sujet, consigne, conseil) — même langage que Mon Compte ── */
.tcf-eos-wrap .tcf-eos-panel {
    background: var(--eos-card);
    border: 1px solid var(--eos-border);
    border-radius: var(--eos-radius);
    box-shadow: var(--eos-shadow);
    margin-bottom: clamp(16px, 2.5vw, 20px);
    overflow: hidden;
}

.tcf-eos-wrap .tcf-eos-panel__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: clamp(14px, 2.2vw, 16px) clamp(16px, 2.5vw, 20px);
    background: var(--eos-tint-blue);
    border-bottom: 1px solid var(--eos-border);
}

.tcf-eos-wrap .tcf-eos-panel__body {
    padding: clamp(16px, 2.5vw, 22px) clamp(16px, 2.5vw, 22px) clamp(18px, 2.5vw, 24px);
}

.tcf-eos-wrap .tcf-eos-panel__head--tip {
    background: var(--eos-tint-tip);
    border-bottom-color: var(--eos-tip-border);
}

.tcf-eos-wrap .tcf-eos-panel__body--tip {
    padding-top: clamp(12px, 2vw, 16px);
}

.tcf-eos-wrap .tcf-eos-tip-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.875rem, 0.82rem + 0.2vw, 0.9375rem);
    font-weight: 700;
    color: var(--eos-navy);
    margin: 0;
    line-height: 1.3;
}

/* ── Body panel ─────────────────────────────────────────── */
.tcf-eo-body {
    background: var(--eos-card);
    border: 1px solid var(--eos-border);
    border-radius: var(--eos-radius);
    padding: clamp(16px, 3vw, 24px);
}

/* ── Subject box ─────────────────────────────────────────── */
.tcf-eos-subject-box.tcf-eos-panel--subject {
    padding: 0;
    text-align: left;
    /* Fond coloré pour mieux faire ressortir le sujet (sans dégradé) */
    background: #EFF6FF;
    border-color: #BFDBFE;
    box-shadow:
        var(--eos-shadow),
        0 0 0 1px rgba(19, 99, 223, 0.06);
}

.tcf-eos-subject-box-prep.tcf-eos-panel--subject {
    background: #FFFBEB;
    border-color: #FCD34D;
    box-shadow:
        var(--eos-shadow),
        0 0 0 1px rgba(217, 119, 6, 0.08);
}

.tcf-eos-subject-box-prep.tcf-eos-panel--subject > .tcf-eos-subject-title {
    background: #FEF3C7;
    border-bottom-color: #FCD34D;
    color: #92400E;
}

.tcf-eos-subject-box:not(.tcf-eos-subject-box-prep) > .tcf-eos-subject-title {
    background: #DBEAFE;
    border-bottom-color: #BFDBFE;
}

.tcf-eos-subject-box > .tcf-eos-subject-title {
    margin: 0;
    padding: clamp(14px, 2.2vw, 16px) clamp(16px, 2.5vw, 20px);
    background: var(--eos-tint-blue);
    border-bottom: 1px solid var(--eos-border);
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.6875rem, 0.65rem + 0.15vw, 0.75rem);
    font-weight: 700;
    color: var(--eos-navy);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.35;
}

.tcf-eos-subject-box > .tcf-eos-subject-content {
    padding: clamp(16px, 2.5vw, 22px) clamp(16px, 2.5vw, 22px) clamp(18px, 2.5vw, 24px);
    font-size: clamp(0.875rem, 0.82rem + 0.25vw, 0.9375rem);
    line-height: 1.65;
    color: var(--eos-text-secondary);
}

.tcf-eos-subject-content {
    font-family: 'Poppins', sans-serif;
}

.tcf-eos-subject-content p { margin: 0 0 10px; }
.tcf-eos-subject-content p:last-child { margin-bottom: 0; }
.tcf-eos-subject-content img { max-width: 100%; border-radius: var(--eos-radius-sm); }

/* ── Preparation screen ─────────────────────────────────── */
.tcf-eos-prep-header {
    text-align: center;
    margin-bottom: 24px;
}

.tcf-eos-prep-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
}

.tcf-eos-prep-header p {
    color: #64748b;
    font-size: .85rem;
    margin: 0;
}

.tcf-eos-prep-timer {
    text-align: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
}

.tcf-eos-prep-timer-label {
    font-size: .8rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 8px;
}

.tcf-eos-prep-timer-display {
    font-size: 3rem;
    font-weight: 800;
    color: #0f172a;
    font-family: 'Poppins', monospace;
    letter-spacing: -2px;
}

.tcf-eos-prep-timer-display.warning { color: #d97706; }
.tcf-eos-prep-timer-display.danger  { color: #ef4444; }

/* ── Credits badge ──────────────────────────────────────── */
.tcf-eo-credits-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: .82rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 24px;
}

/* ── Instructions ───────────────────────────────────────── */
.tcf-eo-instructions.tcf-eos-panel--instructions {
    padding: 0;
    text-align: center;
}

.tcf-eo-instructions-title:empty {
    display: none;
}

.tcf-eo-instructions-title:not(:empty) {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1rem, 0.95rem + 0.35vw, 1.125rem);
    font-weight: 700;
    color: var(--eos-navy);
    margin: 0;
    padding: clamp(18px, 2.5vw, 22px) clamp(16px, 2.5vw, 22px) clamp(12px, 2vw, 16px);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.tcf-eos-instructions--task1 .tcf-eo-steps {

}
.tcf-eos-instructions--task3 .tcf-eo-steps {
    padding: 0 clamp(12px, 2.5vw, 20px) clamp(18px, 2.5vw, 24px);
}

.tcf-eos-instructions--task2 .tcf-eo-steps {
    margin: 0;
    padding: 0;
    gap: 0;
}

.tcf-eos-instructions--task2 .tcf-eo-instructions-title:empty + .tcf-eo-steps {
    margin-top: 0;
}

/* T1 — circle progress layout */
.tcf-eos-t1-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 25px;
    /* margin-bottom: 28px; */
}

.tcf-eos-t1-circle-wrap {
    position: relative;
    width: 165px;
    height: 165px;
    border-radius: 50%;
    background: #F5F8FF;
    border: 1px solid #D4E1F7;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.tcf-eos-t1-circle-svg {
    width: 165px;
    height: 165px;
    filter: none;
}

.tcf-eos-t1-circle-bg {
    fill: none;
    stroke: #E4ECFA;
    stroke-width: 8;
}

.tcf-eos-t1-circle-arc {
    fill: none;
    stroke: #1D5FD3;
    stroke-width: 6;
    stroke-linecap: round;
    animation: tcf-eos-drawCircle 1.1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.1s;
}

@keyframes tcf-eos-drawCircle {
    from { stroke-dashoffset: 314.16; }
    to   { stroke-dashoffset: 0; }
}

.tcf-eos-t1-circle-inner {
    position: absolute;
    inset: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #EEF4FF;
    border: 1px solid #D2DFF6;
    border-radius: 50%;
}

.tcf-eos-t1-dur-val {
    font-size: 1.7rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.4px;
    line-height: 1;
    color: #0B1F45;
    text-transform: uppercase;
}

.tcf-eos-t1-dur-lbl {
    font-size: .66rem;
    font-weight: 600;
    color: #5E759B;
    text-transform: uppercase;
    letter-spacing: .07em;
    text-align: center;
    max-width: 110px;
    line-height: 1.3;
}

.tcf-eos-t1-credit {
    font-size: .78rem;
    color: #94A3B8;
    margin: 0;
}

/* T2/T3 — steps list */
.tcf-eo-steps {
    list-style: none;
    /* margin: 0 0 28px; */
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.tcf-eo-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--eos-page-bg);
    border: 1px solid var(--eos-border);
    border-radius: var(--eos-radius-sm);
    padding: clamp(12px, 2vw, 14px) clamp(14px, 2.2vw, 16px);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tcf-eo-step-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    background: var(--eos-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.tcf-eo-steps li div { display: flex; flex-direction: column; gap: 4px; }
.tcf-eo-steps li strong { font-size: clamp(0.875rem, 0.82rem + 0.15vw, 0.88rem); color: var(--eos-text); font-weight: 600; }
.tcf-eo-steps li span  { font-size: clamp(0.875rem, 0.82rem + 0.15vw, 0.9rem); color: var(--eos-text-secondary); line-height: 1.55; }

/* Task 2 guidance — intégré à la carte « instructions » */
.tcf-eos-instructions--task2 .tcf-eos-task2-banner {
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.tcf-eos-task2-banner-head.tcf-eos-panel__head {
    background: var(--eos-tint-blue);
}

.tcf-eos-task2-banner-body.tcf-eos-panel__body {
    background: var(--eos-card);
}

.tcf-eos-task2-banner-icon {
    width: 22px;
    height: 22px;
    color: var(--eos-primary);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tcf-eos-task2-banner-icon svg {
    width: 22px;
    height: 22px;
}

.tcf-eos-task2-banner-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.9375rem, 0.88rem + 0.25vw, 1.0625rem);
    font-weight: 700;
    color: var(--eos-navy);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.tcf-eos-task2-banner-body p {
    margin: 0 0 14px;
    color: var(--eos-text-secondary);
    font-size: clamp(0.875rem, 0.82rem + 0.2vw, 0.9375rem);
    line-height: 1.65;
    font-family: 'Poppins', sans-serif;
}

.tcf-eos-task2-banner-body ul {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.5vw, 12px);
}

.tcf-eos-task2-banner-body li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: clamp(14px, 2vw, 16px) clamp(14px, 2.2vw, 18px);
    margin: 0;
    background: var(--eos-page-bg);
    border: 1px solid var(--eos-border);
    border-radius: var(--eos-radius-sm);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tcf-eos-task2-step-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--eos-card);
    border: 1px solid var(--eos-border);
    color: var(--eos-primary) !important;
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem !important;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.tcf-eos-task2-step-text {
    color: var(--eos-text);
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.875rem, 0.82rem + 0.2vw, 0.9375rem);
    line-height: 1.6;
}

.tcf-eos-task2-time-note {
    margin: 0 !important;
    padding: clamp(12px, 2vw, 14px) clamp(14px, 2vw, 16px);
    background: var(--eos-tint-blue);
    border: 1px solid var(--eos-border);
    border-radius: var(--eos-radius-sm);
    color: var(--eos-text-secondary);
    font-size: clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
    line-height: 1.55;
}

.tcf-eos-task2-time-note strong {
    color: var(--eos-navy);
    font-weight: 700;
}

/* ── Buttons ─────────────────────────────────────────────── */
.tcf-eo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 20px;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
    line-height: 1;
}

.tcf-eo-btn-primary  { background: #1363DF; color: #fff; }
.tcf-eo-btn-primary:hover  { background: #0D3B7A; color: #fff; }
.tcf-eo-btn-secondary { background: #0f172a; color: #fff; }
.tcf-eo-btn-secondary:hover { background: #1e293b; color: #fff; }
.tcf-eo-btn-outline  { background: transparent; color: #1363DF; border: 2px solid #1363DF; }
.tcf-eo-btn-outline:hover  { background: #eff6ff; }
.tcf-eo-btn-stop     { background: #ef4444; color: #fff; }
.tcf-eo-btn-stop:hover     { background: #dc2626; color: #fff; }
.tcf-eo-btn-sm       { padding: 8px 16px; font-size: .8rem; }
.tcf-eo-btn-next     { background: #16a34a; color: #fff; }
.tcf-eo-btn-next:hover     { background: #15803d; color: #fff; }
.tcf-eo-btn-record   { background: #EF4444; color: #fff; }
.tcf-eo-btn-record:hover   { background: #DC2626; color: #fff; transform: translateY(-1px); }

.tcf-eo-actions-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

#tcf-eos-listen-wrap {
    margin-bottom: 10px;
    padding: 12px 14px;
    border: 1px solid var(--eos-border);
    border-radius: var(--eos-radius-sm);
    background: var(--eos-card);
    box-shadow: var(--eos-shadow);
}

.tcf-eos-listen-label {
    margin: 0 0 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--eos-navy);
    line-height: 1.45;
}

#tcf-eos-audio {
    width: 100%;
    height: 40px;
}

.tcf-eo-notice-info {
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: .82rem;
    color: #854d0e;
}

.tcf-eo-notice-blue.tcf-eos-panel--tip {
    max-width: none;
    margin: clamp(16px, 2.5vw, 20px) 0 0;
    padding: 0;
    background: var(--eos-card);
    border: 1px solid var(--eos-tip-border);
    border-radius: var(--eos-radius);
    box-shadow: var(--eos-shadow);
}

.tcf-eo-notice-blue.tcf-eos-panel--tip .tcf-eo-notice-icon {
    color: #EA580C;
    margin-right: 0;
    vertical-align: middle;
}

.tcf-eo-notice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tcf-eo-notice-blue.tcf-eos-panel--tip .tcf-eos-panel__body--tip p {
    margin: 0;
    color: var(--eos-text-secondary);
    font-size: clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
    line-height: 1.6;
    font-family: 'Poppins', sans-serif;
}

/* Anciennes règles regroupées ci-dessus pour le bloc conseil */
.tcf-eo-notice-blue:not(.tcf-eos-panel--tip) {
    background: var(--eos-tint-tip);
    border: 1px solid var(--eos-tip-border);
    border-radius: var(--eos-radius-sm);
    padding: 12px 14px;
    margin: 16px auto 0;
    max-width: 500px;
}

.tcf-eo-notice-blue:not(.tcf-eos-panel--tip) strong {
    display: block;
    color: var(--eos-navy);
    font-size: 0.84rem;
    font-weight: 700;
    margin-bottom: 4px;
    font-family: 'Poppins', sans-serif;
}

.tcf-eo-notice-blue:not(.tcf-eos-panel--tip) p {
    margin: 0;
    color: var(--eos-text-secondary);
    font-size: 0.84rem;
    line-height: 1.55;
    font-family: 'Poppins', sans-serif;
}

/* ── No credits ─────────────────────────────────────────── */
.tcf-eo-no-credits { text-align: center; padding: 24px 0; }
.tcf-eo-no-credits-icon { font-size: 3rem; margin-bottom: 12px; }
.tcf-eo-no-credits h3 { font-size: 1.1rem; color: #0f172a; margin: 0 0 8px; }
.tcf-eo-no-credits p  { color: #64748b; font-size: .9rem; margin: 0 0 20px; }

/* ── Recording state ─────────────────────────────────────── */
.tcf-eo-body-recording {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 28px 24px;
}

.tcf-eo-recording-dot {
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 2;
    animation: tcf-eo-pulse 1.2s infinite;
}

@keyframes tcf-eo-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: .7; }
}

/* ── Circular timer ─────────────────────────────────────── */
.tcf-eo-timer-wrap {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.tcf-eo-timer-bg { fill: none; stroke: #e2e8f0; stroke-width: 10; }
.tcf-eo-timer-progress {
    fill: none;
    stroke: #1363DF;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset .5s linear, stroke .3s;
}
.tcf-eo-timer-progress.warning { stroke: #f59e0b; }
.tcf-eo-timer-progress.danger  { stroke: #ef4444; }

.tcf-eo-timer-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    font-family: 'Poppins', monospace;
    letter-spacing: -1px;
}

/* ── Waveform (niveau micro — barres fines, réponse dynamique) ─ */
.tcf-eo-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 34px;
    padding: 0 6px;
    flex-wrap: nowrap;
}

.tcf-eo-wave-bar {
    width: 2px;
    min-width: 2px;
    height: 26px;
    border-radius: 999px;
    background: linear-gradient(180deg, #bfdbfe 0%, #3b82f6 38%, #1363DF 72%, #0c4a9e 100%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
    transform-origin: center center;
    transform: scaleY(0.12);
    animation: tcf-eo-wave 1.05s ease-in-out infinite;
    animation-play-state: paused;
    will-change: transform;
}

.tcf-eo-wave-bar:nth-child(odd) { animation-delay: 0.08s; }
.tcf-eo-wave-bar:nth-child(3n)  { animation-delay: 0.22s; }
.tcf-eo-wave-bar:nth-child(5n)  { animation-delay: 0.38s; }
.tcf-eo-wave-bar.active { animation-play-state: running; }

@keyframes tcf-eo-wave {
    0%, 100% { transform: scaleY(0.12); }
    50% { transform: scaleY(0.88); }
}

/* ── Loading state ──────────────────────────────────────── */
.tcf-eo-body-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 48px 36px;
    text-align: center;
}

.tcf-eo-body-processing {
    max-width: 460px;
    margin: 0 auto;
    padding: 30px 24px;
    text-align: center;
}

.tcf-eo-processing-icon {
    width: 44px;
    height: 44px;
    color: #4F46E5;
}

.tcf-eo-processing-icon svg {
    width: 44px;
    height: 44px;
}

.tcf-eo-processing-title {
    margin: 2px 0 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1.08rem;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.25;
}

.tcf-eo-processing-subtitle {
    margin: 0;
    max-width: 410px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    color: #64748B;
    line-height: 1.6;
}

.tcf-eo-processing-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    border-radius: 8px;
    padding: 7px 12px;
}

.tcf-eo-processing-status-dot {
    width: 12px;
    height: 12px;
    border: 2px solid #6366F1;
    border-top-color: transparent;
    border-radius: 50%;
    animation: tcf-eo-spin 0.9s linear infinite;
}

.tcf-eo-spinner {
    width: 52px;
    height: 52px;
    border: 5px solid #e2e8f0;
    border-top-color: #1363DF;
    border-radius: 50%;
    animation: tcf-eo-spin 1s linear infinite;
}

@keyframes tcf-eo-spin { to { transform: rotate(360deg); } }

.tcf-eo-loading-text { color: #4338CA; font-size: .84rem; margin: 0; font-weight: 600; font-family: 'Poppins', sans-serif; }

.tcf-eo-loading-steps { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.tcf-eo-loading-step {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: .78rem;
    color: #94a3b8;
    font-weight: 600;
    transition: all .3s;
}
.tcf-eo-loading-step.active { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.tcf-eo-loading-step.done   { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }

/* ── Results ─────────────────────────────────────────────── */
.tcf-eo-score-summary {
    display: flex;
    align-items: center;
    gap: 24px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0eaff 100%);
    border: 1px solid #c7d9ff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.tcf-eo-score-big { font-size: 2.8rem; font-weight: 800; color: #1363DF; font-family: 'Poppins', sans-serif; line-height: 1; }
.tcf-eo-score-big sub { font-size: 1.2rem; font-weight: 600; color: #64748b; }

.tcf-eo-score-summary-right { flex: 1; }
.tcf-eo-score-label { font-weight: 700; font-size: .95rem; color: #0f172a; margin-bottom: 8px; }

.tcf-eo-score-bar-wrap {
    background: #e2e8f0;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}
.tcf-eo-score-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #1363DF, #3b82f6);
    transition: width .6s ease;
}
.tcf-eo-score-bar-wrap.good   .tcf-eo-score-bar { background: linear-gradient(90deg, #16a34a, #22c55e); }
.tcf-eo-score-bar-wrap.medium .tcf-eo-score-bar { background: linear-gradient(90deg, #d97706, #f59e0b); }
.tcf-eo-score-bar-wrap.low    .tcf-eo-score-bar { background: linear-gradient(90deg, #dc2626, #ef4444); }

/* Criteria grid */
.tcf-eo-criteria-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 560px) { .tcf-eo-criteria-grid { grid-template-columns: 1fr; } }

.tcf-eo-criterion-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
}

.tcf-eo-criterion-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tcf-eo-criterion-icon  { font-size: 1rem; }
.tcf-eo-criterion-label { flex: 1; font-size: .8rem; font-weight: 600; color: #374151; }
.tcf-eo-criterion-score { font-size: .9rem; font-weight: 700; white-space: nowrap; }

.tcf-eo-criterion-bar-wrap { background: #e2e8f0; border-radius: 999px; height: 6px; overflow: hidden; margin-bottom: 10px; }
.tcf-eo-criterion-bar { height: 100%; border-radius: 999px; transition: width .4s ease; }
.tcf-eo-criterion-comment { font-size: .78rem; color: #64748b; margin: 0; line-height: 1.5; }

.tcf-eo-score-good   { color: #16a34a; }
.tcf-eo-score-medium { color: #d97706; }
.tcf-eo-score-low    { color: #dc2626; }

.tcf-eo-bar-good    { background: linear-gradient(90deg, #16a34a, #22c55e); }
.tcf-eo-bar-medium  { background: linear-gradient(90deg, #d97706, #f59e0b); }
.tcf-eo-bar-low     { background: linear-gradient(90deg, #dc2626, #ef4444); }

/* Global comment */
.tcf-eo-global-comment {
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
.tcf-eo-global-comment h3 { font-size: .85rem; font-weight: 700; color: #1363DF; margin: 0 0 10px; font-family: 'Poppins', sans-serif; }
.tcf-eo-global-comment p  { font-size: 1rem; color: #082A5E; margin: 0; line-height: 1.7; }
.tcf-eo-global-comment ul { margin: 0; padding-left: 18px; }
.tcf-eo-global-comment li { color: #082A5E; font-size: .95rem; line-height: 1.65; margin-bottom: 6px; font-family: 'Poppins', sans-serif; }

/* Feedback grid — full-width stacked */
.tcf-eo-feedback-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.tcf-eo-feedback-block { border-radius: 10px; padding: 16px 18px; border: 1px solid; }
.tcf-eo-strengths    { background: #F0FDF4; border-color: #BBF7D0; }
.tcf-eo-improvements { background: #FFF7ED; border-color: #FED7AA; }
.tcf-eo-feedback-block h3 { font-size: .85rem; font-weight: 700; margin: 0 0 10px; font-family: 'Poppins', sans-serif; }
.tcf-eo-strengths h3    { color: #166534; }
.tcf-eo-improvements h3 { color: #9A3412; }
.tcf-eo-feedback-block ul { margin: 0; padding-left: 18px; }
.tcf-eo-feedback-block li { font-size: .85rem; line-height: 1.65; margin-bottom: 6px; color: #0F172A; }
.tcf-eo-strengths li    { color: #14532D; }
.tcf-eo-improvements li { color: #7C2D12; }

.tcf-eo-errors-block {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 20px;
    display: none;
}
.tcf-eo-errors-block h3 {
    font-size: .85rem;
    font-weight: 700;
    color: #991B1B;
    margin: 0 0 10px;
    font-family: 'Poppins', sans-serif;
}
.tcf-eo-errors-block ul { margin: 0; padding-left: 18px; }
.tcf-eo-errors-block li {
    color: #7F1D1D;
    font-size: .84rem;
    line-height: 1.6;
    margin-bottom: 6px;
    font-family: 'Poppins', sans-serif;
}
.tcf-eo-errors-block p {
    margin: 0;
    color: #7F1D1D;
    font-size: .84rem;
    line-height: 1.5;
    font-family: 'Poppins', sans-serif;
}

.tcf-eo-error-item {
    background: #FFFFFF;
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.tcf-eo-error-title {
    font-family: 'Poppins', sans-serif;
    font-size: .9rem;
    font-weight: 700;
    color: #991B1B;
    margin-bottom: 4px;
}

.tcf-eo-error-explanation {
    font-family: 'Poppins', sans-serif;
    font-size: .84rem;
    color: #7F1D1D;
    line-height: 1.55;
    margin-bottom: 4px;
}

.tcf-eo-error-correction {
    font-family: 'Poppins', sans-serif;
    font-size: .84rem;
    font-weight: 600;
    color: #16A34A;
    line-height: 1.5;
}

/* EO correction sections — cartes lisibles (charte TCF, sans dégradé) */
.correction-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.points-forts,
.conseils {
    border-radius: 8px;
    padding: 14px 16px;
    border: 1px solid;
    margin: 0 0 25px;
}

.points-forts {
    background: #D1FAE5;
    border-color: #c3e6cb;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.16);
}

/* Commentaire global (tâches 2/3) : reste distinct des « points à améliorer » */
.conseils:not(.tcf-eos-improvements) {
    background: #E0E7FF;
    border-color: #818CF8;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.12);
}

.conseils.tcf-eos-improvements {
    background: #fff3cd;
    border-color: #ffeeba;
    box-shadow: 0 2px 10px rgba(251, 146, 60, 0.14);
}

.points-forts ul,
.conseils ul {
    margin: 0;
    padding-left: 18px;
}

.points-forts li,
.conseils li {
    font-family: 'Poppins', sans-serif;
    font-size: .9rem;
    line-height: 1.65;
    margin-bottom: 6px;
    color: #155724;
}

.conseils li {
    color: #856404;
}

.tcf-eo-user-excerpt {
    font-weight: 700;
    color: inherit;
}

.conseils li.tcf-eo-comment-negative {
    color: #991B1B;
}

.conseils li.tcf-eo-comment-positive {
    color: #047857;
}

.tcf-eo-corrected-version {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 0 0 16px;
    color: #0F172A;
    font-family: 'Poppins', sans-serif;
    font-size: .92rem;
    line-height: 1.75;
}

/* Task 3 breakdown scorecard */
.tcf-eos-t3-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 16px;
}
.tcf-eos-t3-item {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 10px 14px;
}
.tcf-eos-t3-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.tcf-eos-t3-label {
    font-family: 'Poppins', sans-serif;
    font-size: .88rem;
    font-weight: 700;
    color: #0F172A;
}
.tcf-eos-t3-score {
    font-family: 'Poppins', sans-serif;
    font-size: .88rem;
    font-weight: 800;
}
.tcf-eos-t3-comment {
    font-family: 'Poppins', sans-serif;
    font-size: .95rem;
    color: #475569;
    line-height: 1.55;
    margin: 0;
}
.tcf-eos-t3-item--arguments .tcf-eos-t3-comment {
    white-space: pre-line;
}

/* Transcription */
.tcf-eo-transcription { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 18px 20px; }
.tcf-eo-transcription h3 { font-size: .9rem; font-weight: 700; color: #374151; margin: 0 0 10px; }
.tcf-eo-transcription p  { font-size: .85rem; color: #4b5563; margin: 0 0 10px; line-height: 1.7; }
.tcf-eo-word-count { font-size: .75rem; color: #94a3b8; text-align: right; }

/* Results footer */
.tcf-eo-results-footer { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* ── Exam task details ───────────────────────────────────── */
.tcf-eos-task-detail-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.tcf-eos-task-detail-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 700;
    font-size: .95rem;
    list-style: none;
}

.tcf-eos-task-detail-summary::-webkit-details-marker { display: none; }

.tcf-eos-task-score {
    font-size: 1.1rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
}

.tcf-eos-task-detail-inner {
    padding: 0 20px 20px;
    border-top: 1px solid #e2e8f0;
}

/* ── Error banner ────────────────────────────────────────── */
.tcf-eo-error-banner {
    background: #FFF7F7;
    border: 1px solid #FECACA;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: .9rem;
    color: #991B1B;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.tcf-eo-error-banner__icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 8px;
    background: #FEE2E2;
    border: 1px solid #FECACA;
    color: #B91C1C;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tcf-eo-error-banner__icon svg {
    width: 16px;
    height: 16px;
}

.tcf-eo-error-banner__content {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 4px;
}

.tcf-eo-error-banner__text {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #7F1D1D;
}

.tcf-eo-error-banner__actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.tcf-eo-error-banner #tcf-eos-err-retry-btn {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 0.82rem;
    border-radius: 8px;
    white-space: nowrap;
}

.tcf-eo-error-banner #tcf-eos-error-close {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: none;
    cursor: pointer;
    color: #991B1B;
    font-size: 1.1rem;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.tcf-eo-error-banner #tcf-eos-error-close:hover {
    background: #FEE2E2;
    color: #7F1D1D;
}

/* ── History list ────────────────────────────────────────── */
.tcf-eo-history-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.tcf-eo-history-header-text { min-width: 0; }
.tcf-eo-history-title {
    font-size: clamp(1.25rem, 2.5vw, 1.55rem);
    font-weight: 700;
    color: var(--eos-ink, #0F172A);
    margin: 0 0 6px;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.tcf-eo-history-lead {
    margin: 0;
    font-size: 0.94rem;
    color: #64748b;
    line-height: 1.5;
    max-width: 42rem;
}
.tcf-eo-history-count {
    flex-shrink: 0;
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    color: #1e40af;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    align-self: center;
}

.tcf-eo-history-empty { text-align: center; padding: 48px 24px; background: #f8fafc; border: 1px dashed #e2e8f0; border-radius: 16px; }
.tcf-eo-history-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.tcf-eo-history-empty h3 { font-size: 1.1rem; color: #374151; margin: 0 0 8px; }
.tcf-eo-history-empty p  { color: #64748b; font-size: .9rem; margin: 0 0 20px; }

.tcf-eo-history-list { display: flex; flex-direction: column; gap: 16px; }

.tcf-eo-history-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: stretch;
    gap: 0 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: box-shadow .2s ease, border-color .2s ease, transform .15s ease;
}
.tcf-eo-history-card:hover {
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.tcf-eo-history-card-score {
    width: 76px;
    min-height: 76px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 3px solid currentColor;
    align-self: center;
    box-sizing: border-box;
}
.tcf-eo-history-card-score.tcf-eo-score-good   { color: #16a34a; background: #f0fdf4; }
.tcf-eo-history-card-score.tcf-eo-score-medium { color: #d97706; background: #fffbeb; }
.tcf-eo-history-card-score.tcf-eo-score-low    { color: #dc2626; background: #fef2f2; }

.tcf-eo-history-card-score-val {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
    font-family: 'Poppins', sans-serif;
}
.tcf-eo-history-card-score-max {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.75;
    margin-top: 2px;
}

.tcf-eo-history-card-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.tcf-eo-history-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.tcf-eo-history-card-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.tcf-eo-history-task {
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.tcf-eos-badge-exam {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid #fcd34d;
}
.tcf-eo-history-audio-pill {
    font-size: 0.72rem;
    font-weight: 600;
    color: #0369a1;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    padding: 3px 10px;
}

.tcf-eo-history-date {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}

.tcf-eo-history-excerpt {
    font-size: 0.92rem;
    line-height: 1.55;
    color: #475569;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tcf-eo-history-excerpt-muted { color: #94a3b8; font-style: italic; }

.tcf-eo-history-criteria-mini { display: flex; gap: 10px 14px; flex-wrap: wrap; }
.tcf-eo-mini-criterion { font-size: 0.8rem; color: #64748b; }
.tcf-eo-mini-criterion strong { color: #334155; font-weight: 700; }

.tcf-eos-exam-mini { gap: 16px; }

.tcf-eo-history-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.tcf-eo-history-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 10px;
    white-space: nowrap;
}
.tcf-eo-history-view-arrow { font-weight: 700; opacity: 0.85; }

/* Historique : lecteur audio */
.tcf-eo-history-audio-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 20px;
}
.tcf-eo-history-audio-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 10px;
}
.tcf-eo-history-audio {
    width: 100%;
    height: 40px;
    border-radius: 8px;
}

/* Historique : sujet enregistré */
.tcf-eo-history-subject-card {
    margin-bottom: 20px;
    text-align: left;
}
.tcf-eo-history-subject-card.tcf-eos-panel--subject {
    padding: clamp(16px, 2.5vw, 20px);
}
.tcf-eo-history-subject-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--eos-ink, #0F172A);
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}
.tcf-eo-history-exam-task .tcf-eo-history-subject-card {
    margin-bottom: 16px;
}

.tcf-eo-history-transcription { margin-top: 24px; }

.tcf-eo-history-exam-task .tcf-eos-task-detail-inner {
    padding-top: 16px;
}

/* ── Detail view (legacy blocks still used outside result wrapper) ─ */
.tcf-eo-back-link { display: inline-block; color: #1363DF; font-size: .85rem; font-weight: 600; text-decoration: none; margin-bottom: 20px; }
.tcf-eo-back-link:hover { text-decoration: underline; }

.tcf-eo-score-global {
    text-align: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
}
.tcf-eo-score-global.tcf-eo-score-good   { background: #f0fdf4; border-color: #bbf7d0; }
.tcf-eo-score-global.tcf-eo-score-medium { background: #fffbeb; border-color: #fde047; }
.tcf-eo-score-global.tcf-eo-score-low    { background: #fef2f2; border-color: #fecaca; }

.tcf-eo-score-global-number { font-size: 3.5rem; font-weight: 800; font-family: 'Poppins', sans-serif; line-height: 1; margin-bottom: 4px; }
.tcf-eo-score-global-number span { font-size: 1.5rem; font-weight: 600; color: #64748b; }
.tcf-eo-score-global.tcf-eo-score-good   .tcf-eo-score-global-number { color: #16a34a; }
.tcf-eo-score-global.tcf-eo-score-medium .tcf-eo-score-global-number { color: #d97706; }
.tcf-eo-score-global.tcf-eo-score-low    .tcf-eo-score-global-number { color: #dc2626; }

.tcf-eo-score-global-label { font-size: .85rem; color: #64748b; font-weight: 600; margin-bottom: 16px; }
.tcf-eo-score-global .tcf-eo-score-bar-wrap { max-width: 300px; margin: 0 auto; background: #e2e8f0; border-radius: 999px; height: 10px; overflow: hidden; }
.tcf-eo-score-global .tcf-eo-score-bar  { height: 100%; border-radius: 999px; }
.tcf-eo-score-good   .tcf-eo-score-bar  { background: linear-gradient(90deg, #16a34a, #22c55e); }
.tcf-eo-score-medium .tcf-eo-score-bar  { background: linear-gradient(90deg, #d97706, #f59e0b); }
.tcf-eo-score-low    .tcf-eo-score-bar  { background: linear-gradient(90deg, #dc2626, #ef4444); }

/* ── Error page ─────────────────────────────────────────── */
.tcf-eos-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 24px 28px;
    color: #991b1b;
}

/* ── Result wrapper (CE/CO-style unified card) ──────────── */
.tcf-eos-result-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 0;
}

.tcf-eos-result-header {
    background: #082A5E;
    padding: 40px 40px 40px 40px;
    position: relative;
    overflow: hidden;
}

.tcf-eos-result-title {
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 6px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.tcf-eos-result-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 400;
    margin: 0;
    position: relative;
    z-index: 1;
    line-height: 1.5;
}

.tcf-eos-header-score {
    position: absolute;
    right: 18px;
    top: 12px;
    z-index: 2;
}

.tcf-eos-header-circle-wrap {
    position: relative;
    width: 90px;
    height: 90px;
}

.tcf-eos-header-circle-svg {
    width: 90px;
    height: 90px;
}

.tcf-eos-header-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.25);
    stroke-width: 7;
}

.tcf-eos-header-circle-arc {
    fill: none;
    stroke-width: 7;
    stroke-linecap: round;
}

.tcf-eos-header-circle-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
}

.tcf-eos-header-level {
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1;
}

.tcf-eos-header-score-text {
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Poppins', sans-serif;
    font-size: .65rem;
    font-weight: 600;
    line-height: 1;
}

.tcf-eos-result-body {
    border-radius: 0 !important;
    border: none !important;
    border-top: 1px solid #E2E8F0 !important;
}

/* ── Recording actions row ──────────────────────────────── */
.tcf-eo-recording-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── NCLC circle progress bar ───────────────────────────── */
.tcf-eo-nclc-wrap {
    display: flex;
    justify-content: center;
    padding: 12px 0 20px;
}

.tcf-eo-nclc-circle-wrap {
    position: relative;
    width: 150px;
    height: 150px;
}

.tcf-eo-nclc-svg {
    width: 150px;
    height: 150px;
}

.tcf-eo-nclc-bg {
    fill: none;
    stroke: #E2E8F0;
    stroke-width: 10;
}

.tcf-eo-nclc-arc {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.7s ease;
}

.tcf-eo-nclc-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.tcf-eo-nclc-level {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}

.tcf-eo-nclc-score {
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    line-height: 1;
}

.tcf-eo-nclc-max {
    font-weight: 500;
    color: #94A3B8;
}

/* ── Confirmation modal ─────────────────────────────────── */
.tcf-eos-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 42, 94, 0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: tcf-eo-fadeIn 0.15s ease;
}

@keyframes tcf-eo-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.tcf-eos-modal {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 24px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    animation: tcf-eo-slideUp 0.2s ease;
}

@keyframes tcf-eo-slideUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tcf-eos-modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}

.tcf-eos-modal-text {
    font-size: 0.96rem;
    color: #475569;
    margin: 0 0 26px;
    line-height: 1.6;
}

.tcf-eos-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
    .tcf-eo-error-banner {
        align-items: stretch;
        flex-direction: column;
        padding: 12px;
    }
    .tcf-eo-error-banner__content {
        padding-top: 0;
    }
    .tcf-eo-error-banner__actions {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
    }
    .tcf-eo-error-banner #tcf-eos-err-retry-btn {
        min-height: 40px;
        flex: 1 1 auto;
    }

    .tcf-eo-header { padding: 20px 16px; }
    .tcf-eo-body   { padding: 20px 16px; }
    .tcf-eos-result-header { 
        padding: 20px 16px;
        display: flex;
        flex-direction: column-reverse; 
        align-items: center;
    }
    .tcf-eos-header-score { position: static; margin: 0 0 10px; display: flex; justify-content: center; }
    .tcf-eo-history-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .tcf-eo-history-card-score { margin: 0 auto; }
    .tcf-eo-history-card-top { flex-direction: column; align-items: center; }
    .tcf-eo-history-card-actions { justify-content: center; padding-top: 4px; }
    .tcf-eo-results-footer  { flex-direction: column; padding: 15px;}
    .tcf-eo-actions-initial { flex-direction: column; }
    .tcf-eo-recording-actions { flex-direction: column; }
    .tcf-eo-btn { width: 100%; justify-content: center; }
    .tcf-eos-task-tabs { flex-wrap: wrap; }
    .tcf-eos-wrap, .tcf-eo-simulator, .tcf-eo-history{
        padding: 10px;
    }
}
