/* =====================================================================
   IELTS General Training — styles spécifiques
   À placer dans : /home/lebo4464/test.erosophia.eu/ielts-general/css/ielts-general.css

   Refonte session 3 (28/05/2026) : affichage des résultats harmonisé sur
   le rendu TOEFL iBT, en une passe cohérente sur les 4 surfaces :
     - passation Listening / Reading  (.ielts-listening-main / .ielts-reading-main)
     - résultats section isolée        (.ielts-results-main)
     - test complet enchaîné           (.ielts-results-main)
     - Writing (passation + correction).ielts-writing-main)

   Tous les tokens sont recopiés depuis toefl-ibt.css et préfixés --w- pour
   garder cette feuille TOTALEMENT indépendante de toefl-ibt.css (zéro import,
   zéro couplage). NE PAS référencer de variable --xxx non préfixée ici.
   ===================================================================== */

/* ── Tokens (recopiés de toefl-ibt.css, préfixe --w-) ───────────────────
   Définis sur les 4 conteneurs <main> du parcours IELTS afin que toutes
   les classes harmonisées (results-header, trainer-score-card, blocs
   réponse/exemple, cartes Q/Q, critères…) soient disponibles partout —
   et plus uniquement sous .ielts-writing-main comme en session 2. */
.ielts-writing-main,
.ielts-results-main,
.ielts-listening-main,
.ielts-reading-main,
.ielts-speaking-main {
    --w-blue:         #1f7cff;
    --w-blue-dark:    #1260d4;
    --w-blue-light:   #e8f1ff;
    --w-blue-mid:     #c2d9ff;
    --w-orange:       #ff8c00;
    --w-orange-light: #fff3e0;
    --w-green:        #10b981;
    --w-green-dark:   #059669;
    --w-green-light:  #d1fae5;
    --w-red:          #ef4444;
    --w-red-light:    #fee2e2;
    --w-red-dark:     #b91c1c;
    --w-teal:         #06b6d4;
    --w-surface:      #ffffff;
    --w-surface-2:    #f8faff;
    --w-border:       #e2e8f8;
    --w-border-strong:#c5d0f0;
    --w-text:         #1a2340;
    --w-text-2:       #4a5578;
    --w-text-3:       #8892b0;
    --w-radius-sm:    6px;
    --w-radius:       12px;
    --w-radius-lg:    20px;
    --w-shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --w-shadow:       0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
    --w-shadow-lg:    0 12px 40px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.08);
    --w-font:         'Inter', 'Inter-fallback', system-ui, sans-serif;
    --w-font-mono:    ui-monospace, 'DM Mono', 'SF Mono', Menlo, Consolas, monospace;
    --w-transition:   0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Police de corps moderne. Le body global est en `font-family: sans-serif`
   (générique) → sur Windows le navigateur rend Arial. Le TOEFL y échappe en
   forçant `system-ui` (= Segoe UI). On applique donc system-ui à TOUS les
   descendants des conteneurs IELTS pour battre l'héritage Arial, et on évite
   'DM Sans' en tête puisqu'aucune @font-face ne la charge sur le site. */
.ielts-writing-main,
.ielts-writing-main *,
.ielts-results-main,
.ielts-results-main *,
.ielts-listening-main,
.ielts-listening-main *,
.ielts-reading-main,
.ielts-reading-main *,
.ielts-speaking-main,
.ielts-speaking-main * {
    font-family: var(--w-font);
}
/* Les pastilles/numéros gardent la police mono */
.ielts-qq-num,
.trainer-score-big,
.results-header-score {
    font-family: var(--w-font-mono);
}

/* Reset <p> recopié EXACTEMENT du TOEFL : margin 0 mais on garde un
   padding-bottom de 12px (le TOEFL ne colle pas les paragraphes). */
.ielts-results-main p,
.ielts-listening-main p,
.ielts-reading-main p,
.ielts-speaking-main p {
    margin: 0;
    padding-bottom: 12px;
    text-align: justify;
}

/* ── Conteneurs principaux (largeur + écart haut calqués TOEFL) ────────── */
.ielts-listening-main .contenu-principal,
.ielts-reading-main   .contenu-principal,
.ielts-results-main   .contenu-principal,
.ielts-writing-main   .contenu-principal,
.ielts-speaking-main  .contenu-principal {
    max-width: 900px;
    margin: 32px auto 0;
    /* margin-top : espace AU-DESSUS du bloc de contenu, entre la navbar
       sombre (.navbar, position:relative, dans le flux) et le début du
       contenu. Le <main> global n'a pas de marge haute (main{margin:0}),
       donc sans ça le contenu colle à la barre. Le padding ne gère QUE
       l'air intérieur du bloc. */
    padding: 24px 16px 32px;
}

/* Titres de page : sobres, alignés sur le TOEFL (texte sombre, pas orange) */
.ielts-listening-main h1,
.ielts-reading-main   h1,
.ielts-results-main   h1,
.ielts-writing-main   h1,
.ielts-speaking-main  h1 {
    color: var(--w-text);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: left;
    margin: 0 0 20px;
}

/* ── Titre de partie (« Listening — Section 1 », « Task 1 »…) ───────────
   Calque exact de .part-title TOEFL : 1.25rem / 700 / bleu, sobre. */
.ielts-part-title {
    margin: 0 0 8px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--w-blue);
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
}

/* ── Bandeau d'instructions / thème (passation) ─────────────────────────── */
.ielts-topic,
.ielts-instructions {
    margin: 8px 0;
    color: var(--w-text-2);
    text-align: left;
}
.ielts-topic strong { color: var(--w-text); }

.ielts-instructions-block {
    background: var(--w-surface-2);
    border: 1px solid var(--w-border);
    padding: 12px 16px;
    margin: 18px 0 12px;
    border-radius: var(--w-radius-sm);
    color: var(--w-text-2);
    font-style: italic;
    text-align: left;
}

/* Indicateur d'étape du test enchaîné (pastille) */
.ielts-test-progress {
    display: inline-block;
    margin: 8px 0 4px;
    padding: 4px 12px;
    background: var(--w-blue-light);
    color: var(--w-blue-dark);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Audio « manquant » (placeholder) ─────────────────────────────────── */
.ielts-audio {
    display: block;
    width: 100%;
    margin: 20px 0;
}
.ielts-audio-missing {
    background: var(--w-orange-light);
    border: 1px solid var(--w-orange);
    color: #856404;
    padding: 12px 16px;
    border-radius: var(--w-radius-sm);
    margin: 20px 0;
    text-align: left;
}

/* =====================================================================
   PASSATION — groupes de questions (classes émises par
   ielts-question-renderer.php : qg-*, q-*, passage-*). Markup INCHANGÉ ;
   seul le style est rebranché sur les tokens --w- pour aligner le rendu
   sur le langage visuel TOEFL.
   ===================================================================== */
.qg-heading {
    margin: 24px 0 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--w-blue-dark);
    text-align: left;
}
.qg-subheading {
    margin: 16px 0 6px;
    font-size: 1rem;
    color: var(--w-text-2);
    text-align: left;
}
.qg-example {
    background: var(--w-surface-2);
    border: 1px solid var(--w-border);
    padding: 8px 12px;
    border-radius: var(--w-radius-sm);
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--w-text-2);
    text-align: left;
}
.qg-shared-prompt {
    margin: 12px 0 6px;
    font-weight: 600;
    color: var(--w-text);
    text-align: left;
}
.qg-headings-list,
.qg-shared-options {
    background: var(--w-surface-2);
    border: 1px solid var(--w-border);
    padding: 10px 16px;
    margin: 8px 0;
    border-radius: var(--w-radius-sm);
    text-align: left;
}
.qg-options-list {
    list-style: none;
    padding-left: 0;
    margin: 6px 0;
}
.qg-options-list li {
    margin: 4px 0;
    color: var(--w-text-2);
}

/* Carte d'une question : reprend le langage .question-block TOEFL
   (fond surface-2, bordure douce, hover ombre). */
.qg-question {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--w-surface-2);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    padding: 16px 20px;
    margin-bottom: 10px;
    box-shadow: var(--w-shadow-sm);
    transition: box-shadow var(--w-transition);
}
.qg-question:hover {
    box-shadow: var(--w-shadow);
}
.q-number {
    /* Pastille identique à celle des résultats (.ielts-qq-num), mais calée
       sur la hauteur d'une ligne du corps pour un alignement vertical fiable
       (indépendant des baselines de police). */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 1.6em;          /* = 1 ligne de .q-body (font-size 1rem × line-height 1.6) */
    background: #1a2340;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    font-family: var(--w-font-mono);
    padding: 2px 9px;
    border-radius: 10px;
    letter-spacing: .3px;
    line-height: 1.6;
}
.q-body {
    flex: 1;
    font-size: 1rem;
    line-height: 1.6;
    text-align: left;
}
.q-prompt {
    margin: 0 0 8px;
    color: var(--w-text);
    text-align: left;
}
.q-text {
    color: var(--w-text);
}

/* Saisie texte (gap-fill) */
.q-input {
    border: none;
    border-bottom: 2px solid var(--w-border-strong);
    background: transparent;
    padding: 4px 6px;
    min-width: 120px;
    font-size: 1rem;
    color: var(--w-text);
    transition: border-color var(--w-transition);
}
.q-input:focus {
    outline: none;
    border-bottom-color: var(--w-blue);
}

/* Options radio/checkbox */
.q-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}
/* ── Options QCM : pastilles A/B/C calquées sur le TOEFL ───────────────
   (rendu repris de .toefl-question label / .option-letter, variables
   remappées sur les tokens --w-). Radio réel masqué ; la pastille bleue
   se remplit quand l'option est sélectionnée. */
.q-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    margin-bottom: 0;
    border-radius: var(--w-radius-sm);
    font-weight: 400;
    font-size: .95rem;
    color: var(--w-text-2);
    transition: background var(--w-transition), color var(--w-transition);
    line-height: 1.45;
}
.q-option:hover {
    /* Fond bleu clair retiré (décision Boris 08/2026) : alignement sur le
       style TOEIC — seule la pastille-lettre se remplit, le texte passe en bleu. */
    color: var(--w-blue);
    font-weight: 600;
}
.q-option input[type="radio"],
.q-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.q-option .option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    border: 2px solid var(--w-blue);
    background: var(--w-surface);
    color: var(--w-blue);
    font-weight: 700;
    font-size: .75em;
    font-family: var(--w-font-mono);
    overflow: hidden;
    white-space: nowrap;
    transition: all var(--w-transition);
}
.q-option:has(input[type="radio"]:checked),
.q-option:has(input[type="checkbox"]:checked) {
    /* Fond bleu clair retiré (décision Boris 08/2026) : alignement sur le
       style TOEIC — seule la pastille-lettre se remplit, le texte passe en bleu. */
    color: var(--w-blue);
    font-weight: 600;
}
.q-option:has(input[type="radio"]:checked) .option-letter,
.q-option:has(input[type="checkbox"]:checked) .option-letter {
    background: var(--w-blue);
    border-color: var(--w-blue);
    color: #fff;
    transform: scale(1.12);
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

/* ── Multiple-select (« Which TWO… ») : cases à cocher ─────────────────
   Convention IELTS : pastilles CARRÉES (vs rondes pour le choix unique)
   pour signaler que plusieurs réponses sont possibles. */
.qg-msq-hint {
    margin: 0 0 8px;
    font-size: .85rem;
    font-weight: 700;
    color: var(--w-blue-dark);
    letter-spacing: .2px;
    text-transform: uppercase;
}
.q-options--checkbox .option-letter {
    border-radius: 5px;          /* carré arrondi (≠ rond du QCM) */
}
/* Quand 2 cases sont déjà cochées, les autres sont désactivées : on l'indique
   visuellement sans casser la lisibilité. */
.q-option--disabled {
    opacity: .5;
    cursor: not-allowed;
}
.q-option--disabled:hover {
    background: transparent;
    color: var(--w-text-2);
}
.q-select {
    padding: 6px 10px;
    font-size: 1rem;
    border-radius: var(--w-radius-sm);
    border: 1.5px solid var(--w-border-strong);
    color: var(--w-text);
    background: var(--w-surface);
}
.q-select:focus {
    outline: none;
    border-color: var(--w-blue);
}

/* ── Matching DRAG-AND-DROP (IELTS computer-delivered) ─────────────────── */
.qg-dnd {
    margin: 8px 0 16px;
}
.qg-dnd-hint {
    margin: 0 0 8px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--w-text-2);
    letter-spacing: .2px;
}
/* Banque d'étiquettes */
.dnd-bank {
    background: var(--w-surface-2);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    padding: 8px 10px;
    margin-bottom: 10px;
    box-shadow: var(--w-shadow-sm);
    /* Fidélité IELTS computer-delivered : la banque d'étiquettes reste visible
       (sticky) pendant le défilement des questions, pour TOUS les types de
       drag-and-drop (matching, person, paragraph ET headings). Si elle est trop
       haute, elle défile en interne (hauteur bornée) au lieu d'allonger la page. */
    position: sticky;
    top: 0;
    z-index: 20;
    max-height: 42vh;
    overflow-y: auto;
}
/* Le timer report est fixe en haut (64px) : on cale la banque sticky dessous. */
body.ielts-has-timer .dnd-bank { top: 64px; }
.dnd-bank-label {
    display: block;
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--w-text-3);
    margin-bottom: 7px;
    /* L'étiquette reste collée en haut de la banque pendant son défilement interne. */
    position: sticky;
    top: 0;
    background: var(--w-surface-2);
    padding-bottom: 4px;
    z-index: 1;
}
.dnd-bank-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 30px;
}
/* Étiquette */
.dnd-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 4px 10px 4px 5px;
    background: var(--w-surface);
    border: 1.5px solid var(--w-border-strong);
    border-radius: var(--w-radius-sm);
    cursor: grab;
    font-size: .88rem;
    color: var(--w-text);
    box-shadow: var(--w-shadow-sm);
    transition: border-color var(--w-transition), box-shadow var(--w-transition), background var(--w-transition);
    user-select: none;
    touch-action: none;
    overflow-wrap: anywhere;
}
.dnd-chip:hover {
    border-color: var(--w-blue);
    box-shadow: var(--w-shadow);
}
.dnd-chip:active { cursor: grabbing; }
.dnd-chip.is-dragging { opacity: .45; }
/* Sélection (clic-clic) ET logée dans un slot : même traitement que le QCM
   sélectionné — fond bleu clair, texte bleu, pastille lettre bleue pleine. */
.dnd-chip.is-selected,
.dnd-chip.is-in-slot {
    border-color: var(--w-blue);
    color: var(--w-blue);
    font-weight: 600;
}
.dnd-chip.is-selected .dnd-chip-letter,
.dnd-chip.is-in-slot .dnd-chip-letter {
    background: var(--w-blue);
    border-color: var(--w-blue);
    color: #fff;
    transform: scale(1.12);
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.dnd-chip-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--w-blue);
    background: var(--w-surface);
    color: var(--w-blue);
    font-weight: 700;
    font-size: .72em;
    font-family: var(--w-font-mono);
    transition: all var(--w-transition);
}
.dnd-chip-text { line-height: 1.3; }
/* Liste des items */
.dnd-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.dnd-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--w-surface-2);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    padding: 7px 12px;
    box-shadow: var(--w-shadow-sm);
}
.dnd-row-item {
    flex: 1;
    font-size: .95rem;
    line-height: 1.4;
    color: var(--w-text);
    text-align: left;
}
/* Zone de dépôt : compacte par défaut, mais élastique pour héberger des
   étiquettes longues (noms d'organismes en person_matching, etc.) sans
   déborder. Elle peut grandir et le texte wrappe au besoin. */
.dnd-slot {
    flex: 0 1 auto;
    min-width: 130px;
    max-width: 60%;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    border: 2px dashed var(--w-border-strong);
    border-radius: var(--w-radius-sm);
    background: var(--w-surface);
    cursor: pointer;
    transition: border-color var(--w-transition), background var(--w-transition);
}
.dnd-slot.is-over {
    border-color: var(--w-blue);
    background: var(--w-blue-light);
}
.dnd-slot.is-filled {
    border-style: solid;
    border-color: var(--w-blue);
    background: var(--w-surface);
}
/* Par défaut le chip logé est centré (étiquettes courtes : lettres A-F).
   Les types à libellé long (heading, person) l'alignent à gauche + pleine
   largeur (règles dédiées plus bas). */
.dnd-slot.is-filled .dnd-chip { width: auto; }
/* Si le chip logé porte un libellé texte (heading/person/matching avec
   texte), on l'aligne à gauche et il occupe toute la largeur du slot ; les
   chips lettre-seule (paragraph_matching) restent centrés. */
.dnd-slot.is-filled:has(.dnd-chip-text) { justify-content: flex-start; }
.dnd-slot.is-filled:has(.dnd-chip-text) .dnd-chip { width: 100%; text-align: left; }
/* Slot rempli d'une lettre seule (pas de texte) : le resserrer autour de la
   lettre plutôt que de laisser un grand cadre presque vide. Le slot vide
   garde sa largeur (130px) pour afficher "Déposez ici". */
.dnd-slot.is-filled:not(:has(.dnd-chip-text)) { min-width: 0; }
.dnd-slot-placeholder {
    font-size: .76rem;
    color: var(--w-text-3);
    pointer-events: none;
}
.dnd-slot.is-filled .dnd-slot-placeholder { display: none; }
.dnd-slot .dnd-chip {
    cursor: grab;
    box-shadow: none;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
}

/* ── Variant heading_matching (IELTS computer-delivered) ───────────────
   Les titres sont des phrases : la BANQUE les empile (lisibles), mais les
   LIGNES de section restent compactes côte à côte comme person/paragraph
   (Section A | zone de dépôt fine à droite) pour éviter un défilement
   interminable. Le titre logé reste affiché en entier dans le slot
   élastique. Scoring inchangé (mêmes champs answer_{n}). */
.qg-dnd--headings .dnd-bank-chips {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}
/* La banque headings hérite du sticky de base (.dnd-bank). Rien de spécifique
   ici : seules les chips en colonne (ci-dessus) la distinguent. */
.qg-dnd--headings .dnd-bank-label {
    margin-bottom: 4px;
}
.qg-dnd--headings .dnd-bank .dnd-chip {
    width: auto;
    max-width: 100%;
    align-items: flex-start;
    gap: 7px;
    padding: 4px 11px 4px 5px;
    font-size: .85rem;
    line-height: 1.3;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
}
/* Pastille du chiffre romain : pilule (pour "viii"), ne rétrécit pas. */
.qg-dnd--headings .dnd-chip-letter {
    width: auto;
    min-width: 22px;
    padding: 0 5px;
    border-radius: 11px;
    margin-top: 1px;
}
.qg-dnd--headings .dnd-chip-text { flex: 1; }
/* Titre logé dans un slot : peut wrapper si très long, sinon tient sur une
   ligne fine (le slot générique gère déjà la largeur élastique). */
.qg-dnd--headings .dnd-slot .dnd-chip {
    white-space: normal;
    overflow-wrap: anywhere;
}

/* ── Reading : passages (textes à lire) ───────────────────────────────── */
.ielts-passage {
    background: var(--w-surface-2);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    padding: 20px 24px;
    margin: 20px 0 28px;
    text-align: justify;
    line-height: 1.65;
    color: var(--w-text);
}
.passage-title {
    margin: 0 0 4px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--w-blue-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}
.passage-source {
    margin: 0 0 16px;
    font-size: 0.82rem;
    color: var(--w-text-3);
    font-style: italic;
    text-align: left;
}
.passage-source-url {
    word-break: break-all;
}
.passage-section {
    position: relative;
    margin: 16px 0;
}
.passage-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    margin-bottom: 6px;
    background: var(--w-blue);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: var(--w-radius-sm);
}
.passage-heading {
    margin: 6px 0 8px;
    font-size: 1rem;
    color: var(--w-text-2);
    text-align: left;
}
.passage-paragraph {
    margin: 10px 0;
    line-height: 1.7;
    color: var(--w-text);
    text-align: justify;
}
.passage-emphasis {
    font-style: italic;
    color: var(--w-orange);
}

/* ── Actions de formulaire / navigation ───────────────────────────────── */
.ielts-form-actions {
    margin: 32px 0 16px;
    text-align: center;
}
.ielts-nav {
    margin-top: 24px;
    text-align: center;
}

/* =====================================================================
   RÉSULTATS — classes harmonisées TOEFL, disponibles sur TOUTES les
   pages de résultats (section isolée, test enchaîné, Writing).
   ===================================================================== */

/* ── Titre de section de résultats (« Score global », « Détail »…) ─────
   Calque .results-header TOEFL. */
.results-header {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--w-blue);
    display: block;
    margin: 24px 0 4px;
    padding-bottom: 0;
}
.results-header:first-child { margin-top: 4px; }

/* ── Bandeau hero (carte de score dégradée) ─────────────────────────────
   IMPORTANT : le dégradé de fond (background:linear-gradient(...)) et la
   couleur de texte sont injectés INLINE par le PHP, exactement comme le
   TOEFL, car ils dépendent de la band. Voir le mapping côté PHP :
       band ≥ 7   → vert   #d1fae5 → #a7f3d0   (texte #065f46)
       band ≥ 5.5 → bleu   #dbeafe → #bfdbfe   (texte #1e3a8a)
       band ≥ 4   → ambre  #fef3c7 → #fde68a   (texte #92400e)
       sinon      → rouge  #fee2e2 → #fecaca   (texte #991b1b)
   Cette feuille ne fixe QUE la structure (layout, tailles, rayons). */
.trainer-score-card {
    text-align: left;
    padding: 22px 28px;
    margin: 14px 0 28px;
    border-radius: var(--w-radius-lg);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: var(--w-shadow-sm);
}
.trainer-score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    width: 100%;
}
.trainer-score-toplabel {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.85;
}
.trainer-score-sublabel {
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.8;
    margin-top: 6px;
    font-style: italic;
}
.trainer-score-value {
    margin-top: 6px;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}
.trainer-score-big {
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    margin-top: 4px;
}
.trainer-score-max {
    font-size: 1.3rem;
    font-weight: 600;
    opacity: 0.55;
    margin-left: 4px;
}
.trainer-score-note {
    font-size: 0.78rem;
    opacity: 0.7;
    margin-top: 8px;
    line-height: 1.5;
}

/* Deux héros côte à côte (test enchaîné : Listening + Reading) */
.ielts-hero-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 14px 0 28px;
}
.ielts-hero-grid .trainer-score-card { margin: 0; }

/* ── Carte de score « simple » (fallback non-dégradé : correction IA KO) ─ */
.ielts-score-summary {
    background: var(--w-surface);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    padding: 18px;
    margin: 14px 0 28px;
}
.ielts-band-note {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--w-text-3);
}
.score-band { color: var(--w-blue); font-weight: 800; }

/* ── Détail question-par-question (Listening / Reading) ─────────────────
   Calque FIDÈLE du rendu TOEFL (capture validée) : carte sobre fond clair
   sans bord coloré, pastille Q ronde sombre, options colorées, et
   explication = label « 💡 Explication » + texte NU (aucun fond, aucune
   bordure). */
.ielts-qq-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 8px 0 24px;
}
.ielts-qq-card {
    background: var(--w-surface-2);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    padding: 10px 14px;
    box-shadow: var(--w-shadow-sm);
    margin-bottom: 8px;
    transition: box-shadow var(--w-transition);
}
.ielts-qq-card:hover { box-shadow: var(--w-shadow); }

/* Énoncé : pastille Q ronde sombre + texte de la question (valeurs TOEFL) */
.ielts-qq-prompt {
    font-weight: 700;
    font-size: 1rem;
    color: var(--w-text);
    margin: 0;
    padding-bottom: 0;
    text-align: left;
    line-height: 1.45;
}
.ielts-qq-num {
    display: inline-block;
    background: #1a2340;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    font-family: var(--w-font-mono);
    padding: 2px 7px;
    border-radius: 10px;
    margin-right: 6px;
    vertical-align: middle;
    letter-spacing: .3px;
}

/* Liste d'options colorées (types à choix) */
.ielts-qq-options {
    list-style: none;
    padding: 0;
    margin: 5px 0 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ielts-qq-options li {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 8px 4px 22px; /* 22px = couloir réservé au chevron + espace avant la pastille */
    font-size: 0.92rem;
    line-height: 1.4;
    text-align: left;
}

.ielts-opt-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-weight: 700;
    font-size: .75em;
    font-family: var(--w-font-mono);
    overflow: hidden;
    white-space: nowrap;
    margin-top: -1px;        /* remonte la pastille pour l'aligner sur la 1re ligne du texte */
}
.ielts-opt-badge--neutral   { background: var(--w-blue);  border: 2px solid var(--w-blue);  color: #fff; }
.ielts-opt-badge--correct   { background: var(--w-green); border: 2px solid var(--w-green); color: #fff; }
.ielts-opt-badge--incorrect { background: var(--w-red);   border: 2px solid var(--w-red);   color: #fff; }
.ielts-opt-badge--expected  { background: var(--w-blue);  border: 2px solid var(--w-blue);  color: #fff; }
.ielts-opt-text--correct    { color: var(--w-green-dark); font-weight: 700; }
.ielts-opt-text--incorrect  { color: var(--w-red-dark);   font-weight: 700; }
.ielts-opt-text--expected   { color: var(--w-blue-dark);  font-weight: 700; }

/* ── Résultats MATCHING (rendu compact : pas de banque répétée) ───────── */
.ielts-qq-match {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}
.ielts-qq-match-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: .9rem;
    line-height: 1.4;
    text-align: left;
}
.ielts-qq-match-label {
    color: var(--w-text-2);
    font-weight: 600;
}
.ielts-qq-match-empty {
    color: var(--w-text-3);
    font-style: italic;
}
.ielts-match-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 10px 3px 4px;
    border-radius: var(--w-radius-sm);
    border: 1.5px solid var(--w-border);
}
.ielts-match-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-weight: 700;
    font-size: .72em;
    font-family: var(--w-font-mono);
    color: #fff;
}
.ielts-match-text { line-height: 1.3; }
.ielts-match-chip.is-correct  { border-color: var(--w-green); }
.ielts-match-chip.is-correct  .ielts-match-letter { background: var(--w-green); }
.ielts-match-chip.is-correct  .ielts-match-text   { color: var(--w-green-dark); font-weight: 700; }
.ielts-match-chip.is-incorrect { border-color: var(--w-red); }
.ielts-match-chip.is-incorrect .ielts-match-letter { background: var(--w-red); }
.ielts-match-chip.is-incorrect .ielts-match-text   { color: var(--w-red-dark); font-weight: 700; }
.ielts-match-chip.is-expected { border-color: var(--w-blue); }
.ielts-match-chip.is-expected .ielts-match-letter { background: var(--w-blue); }
.ielts-match-chip.is-expected .ielts-match-text   { color: var(--w-blue-dark); font-weight: 700; }

/* Chevron → devant la réponse attendue : positionné en ABSOLU dans le
   couloir de 18px réservé par le padding-left du <li>, pour ne PAS pousser
   la pastille (sinon la pastille de l'attendue se désaligne des autres). */
.ielts-opt-expected::before {
    content: '\2192';
    position: absolute;
    left: 0;
    top: 4px;                /* = padding-top du li */
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--w-blue);
    font-weight: 800;
    font-size: 1.15em;
    height: 23px;            /* = pastille 22px + margin-top 1px : centrage vertical */
    width: 16px;             /* < 22px du padding : laisse ~6px d'air avant la pastille */
}
/* ✅ après l'option correcte cochée, ❌ après l'option fausse cochée */
.ielts-opt-correct::after {
    content: '✅';
    display: inline-flex;
    align-items: center;
    font-size: 1.05em;
    flex-shrink: 0;
    margin-left: 6px;
}
.ielts-opt-incorrect::after {
    content: '❌';
    display: inline-flex;
    align-items: center;
    font-size: 1.05em;
    flex-shrink: 0;
    margin-left: 6px;
}

/* Réponse/attendue (types à saisie libre) */
.ielts-qq-detail {
    line-height: 1.5;
    font-size: 0.88rem;
    color: var(--w-text);
    text-align: left;
}
.ielts-qq-detail > div { margin: 1px 0; }
.ielts-qq-detail strong { color: var(--w-text); }
.ielts-qq-user-empty { color: var(--w-text-3); font-style: italic; }
.ielts-answer-correct   { color: var(--w-green-dark); font-weight: 700; }
.ielts-answer-incorrect { color: var(--w-red-dark);   font-weight: 700; }
.ielts-answer-expected  { color: var(--w-blue-dark);  font-weight: 700; }

/* Réponse insérée dans le trou d'une question completion */
.ielts-fill-correct {
    color: var(--w-green-dark);
    font-weight: 700;
    background: var(--w-green-light);
    border-radius: var(--w-radius-sm);
    padding: 1px 7px;
}
.ielts-fill-incorrect {
    color: var(--w-red-dark);
    font-weight: 700;
    background: var(--w-red-light);
    border-radius: var(--w-radius-sm);
    padding: 1px 7px;
}
.ielts-fill-empty {
    color: var(--w-text-3);
    letter-spacing: 1px;
    padding: 0 2px;
}
.ielts-qq-expected-line {
    margin: 6px 0 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--w-text);
    text-align: left;
}

/* Explication : label en taille normale + texte NU justifié (calque TOEFL) */
.ielts-qq-explanation {
    margin-top: 8px;
}
.ielts-qq-explanation-label {
    display: inline;
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--w-text);
}
.ielts-qq-explanation-text {
    margin: 4px 0 0;
    padding: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.55;
    color: var(--w-text);
    text-align: justify;
}

/* ── Actions de page de résultats ─────────────────────────────────────── */
.ielts-results-actions {
    margin-top: 32px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Bouton principal + lien secondaire : repris de test-start.css pour que les
   pages résultats/Writing soient autonomes (elles ne chargent plus
   test-start.css, qui saboterait .contenu-principal). */
.ielts-results-main .btn-start,
.ielts-writing-main .btn-start,
.ielts-listening-main .btn-start,
.ielts-reading-main .btn-start,
.ielts-speaking-main .btn-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--w-blue), #4ab3ff);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    border-radius: var(--w-radius);
    box-shadow: 0 6px 20px rgba(31,124,255,.35);
    transition: all .3s ease;
    cursor: pointer;
}
.ielts-results-main .btn-start:hover,
.ielts-writing-main .btn-start:hover,
.ielts-listening-main .btn-start:hover,
.ielts-reading-main .btn-start:hover,
.ielts-speaking-main .btn-start:hover {
    background: linear-gradient(135deg, #0056b3, var(--w-blue));
    box-shadow: 0 10px 25px rgba(0,86,179,.4);
    transform: translateY(-2px);
}
.ielts-results-main .sugg,
.ielts-writing-main .sugg,
.ielts-listening-main .sugg,
.ielts-reading-main .sugg,
.ielts-speaking-main .sugg {
    color: var(--w-blue);
    font-weight: 600;
    text-decoration: none;
}
.ielts-results-main .sugg:hover,
.ielts-writing-main .sugg:hover,
.ielts-listening-main .sugg:hover,
.ielts-reading-main .sugg:hover,
.ielts-speaking-main .sugg:hover {
    color: #0056b3;
    text-decoration: underline;
}
.ielts-results-main .centrer,
.ielts-writing-main .centrer,
.ielts-listening-main .centrer,
.ielts-reading-main .centrer,
.ielts-speaking-main .centrer {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

/* =====================================================================
   WRITING — passation (les deux tâches)
   ===================================================================== */
.ielts-writing-task {
    background: var(--w-surface);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    box-shadow: var(--w-shadow-sm);
    padding: 22px;
    margin: 24px 0;
}
.ielts-writing-task h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--w-blue);
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
}
.ielts-writing-instr {
    color: var(--w-text-2);
    margin: 0 0 12px;
    text-align: left;
}
.ielts-writing-prompt {
    background: var(--w-surface-2);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    padding: 14px 18px;
    margin-bottom: 16px;
    text-align: left;
}
.ielts-writing-prompt p  { text-align: left; }
.ielts-writing-prompt ul { margin: 8px 0; padding-left: 20px; }
.ielts-writing-statement { font-weight: 700; font-style: italic; color: var(--w-text); }
.ielts-writing-opening   { color: var(--w-text-2); font-size: 0.92rem; }

.ielts-writing-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.6;
    color: var(--w-text);
    border: 1.5px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    resize: vertical;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.ielts-writing-textarea:focus {
    outline: none;
    border-color: var(--w-blue-mid);
    box-shadow: 0 0 0 3px rgba(31,124,255,.12);
}
.ielts-wordcount {
    margin-top: 6px;
    font-size: 0.88rem;
    color: var(--w-text-3);
    text-align: left;
}
.ielts-wordcount.is-ok { color: var(--w-green); font-weight: 700; }
.ielts-writing-note { color: #856404; font-size: 0.9rem; margin-top: 12px; }

/* =====================================================================
   WRITING — correction IA : carte de résultat par tâche
   ===================================================================== */
.ielts-writing-result {
    background: var(--w-surface);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    box-shadow: var(--w-shadow-sm);
    padding: 22px;
    margin: 24px 0;
}
.ielts-writing-result h2 {
    margin: 0 0 4px;
    color: var(--w-blue);
    text-align: left;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
}
.ielts-wordcount-final {
    color: var(--w-text-3);
    font-size: 0.9rem;
    margin: 0 0 16px;
    text-align: left;
}

/* Grille des 4 critères */
.ielts-criteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.ielts-criterion {
    background: var(--w-surface-2);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    padding: 14px;
}
.ielts-criterion-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}
.ielts-criterion-label {
    font-weight: 600;
    color: var(--w-text);
    font-size: 0.95rem;
    line-height: 1.3;
    text-align: left;
    text-wrap: balance;
}
.ielts-criterion-band {
    flex: 0 0 auto;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--w-blue);
    line-height: 1;
}
.ielts-criterion-comment {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--w-text-2);
    text-align: left;
}

/* Erreurs de langue + suggestion */
.ielts-errors { margin: 16px 0; text-align: left; }
.ielts-errors h3 { font-size: 1rem; color: var(--w-red-dark); margin: 0 0 6px; }
.ielts-errors ul { margin: 0; padding-left: 20px; }
.ielts-errors li { font-size: 0.9rem; margin-bottom: 3px; color: var(--w-text-2); }
.ielts-suggestion {
    background: var(--w-blue-light);
    border: 1px solid var(--w-border);
    padding: 12px 16px;
    border-radius: var(--w-radius-sm);
    font-size: 0.95rem;
    color: var(--w-text);
    text-align: left;
}

/* =====================================================================
   BLOCS RÉPONSE / EXEMPLE (réponses ouvertes : Writing, à terme Speaking)
   Spécification arrêtée par l'utilisateur (≠ rendu coloré du TOEFL) :
     - les DEUX boîtes au même fond gris clair (--w-surface-2)
     - bordure TRÈS discrète (--w-border), PAS de border-left vif
     - VOTRE RÉPONSE : label bleu + texte bleu gras
     - EXEMPLE DE RÉPONSE : label vert + texte vert gras
     - les deux textes justifiés
   ===================================================================== */
.ielts-sample { margin-top: 16px; }
.ielts-sample > summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--w-blue);
    padding: 6px 0;
    list-style: none;
}
.ielts-sample > summary::-webkit-details-marker { display: none; }
.ielts-sample > summary::marker { content: ''; }
.ielts-sample > summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 8px;
    transition: transform var(--w-transition);
    color: var(--w-blue-dark);
}
.ielts-sample[open] > summary::before { transform: rotate(90deg); }
.ielts-sample-body { margin-top: 12px; }

/* Labels uppercase (calque .toefl-open-label) */
.toefl-open-label,
.ielts-open-label {
    font-weight: 800;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin: 12px 0 4px;
    text-align: left;
}
.toefl-open-label--user,
.ielts-open-label--user   { color: var(--w-blue-dark); }
.toefl-open-label--sample,
.ielts-open-label--sample { color: var(--w-green-dark); }

/* Boîte « Votre réponse » : fond gris, bordure discrète, texte bleu gras */
.toefl-passage,
.ielts-answer-box {
    background: var(--w-surface-2);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    padding: 12px 14px;
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: normal;
    text-align: justify;
    color: var(--w-text);
}
.toefl-open-answer--user,
.ielts-answer-box--user {
    color: var(--w-blue-dark);
    font-weight: 700;
}

/* Boîte « Exemple de réponse » : MÊME fond gris, texte vert gras */
.toefl-sample-answer,
.ielts-answer-box--sample {
    background: var(--w-surface-2);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    padding: 12px 14px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--w-green-dark);
    font-weight: 700;
    white-space: normal;
    text-align: justify;
}
.ielts-sample-analysis {
    color: var(--w-text-2);
    font-size: 0.9rem;
    text-align: left;
    margin-top: 8px;
}

/* =====================================================================
   PAGE « avant départ » : menu des sections
   ===================================================================== */
.ielts-section-menu { max-width: 820px; margin: 24px auto 8px; }
.ielts-section-group { margin-bottom: 28px; }
.ielts-section-group-title {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 1.25rem;
    color: var(--w-blue-dark);
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--w-border);
}
.ielts-section-group-duration {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--w-text-3);
}
.ielts-section-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
}
.ielts-section-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    background: var(--w-surface);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.ielts-section-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--w-shadow);
    border-color: var(--w-blue);
}
.ielts-section-card-num   { font-weight: 700; color: var(--w-blue-dark); font-size: 0.95rem; }
.ielts-section-card-topic { font-size: 1rem; line-height: 1.4; color: var(--w-text); }
.ielts-section-card-meta  { font-size: 0.8rem; color: var(--w-text-3); }

/* =====================================================================
   Lecteur audio Listening — lecture unique (page de passation)
   ===================================================================== */
.ielts-audio-player {
    margin: 20px 0;
    padding: 18px 16px;
    background: var(--w-blue-light);
    border: 1px solid var(--w-blue-mid);
    border-radius: var(--w-radius-sm);
    text-align: center;
}
.ielts-audio-start-btn {
    display: inline-block;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    background: var(--w-blue);
    border: none;
    border-radius: var(--w-radius-sm);
    cursor: pointer;
    transition: background 0.2s ease;
}
.ielts-audio-start-btn:hover { background: var(--w-blue-dark); }

/* Audio masqué pendant le test : aucun contrôle visible */
.ielts-audio-hidden { display: none !important; }

.ielts-audio-status {
    margin-top: 12px;
    font-weight: 600;
    color: var(--w-blue-dark);
    min-height: 1.4em;
}
.ielts-audio-player[data-state="ended"] .ielts-audio-status { color: var(--w-text-2); }
.ielts-audio-hint {
    margin: 12px 0 0;
    font-size: 0.9rem;
    color: var(--w-text-2);
    font-style: italic;
}

/* =====================================================================
   Lecteur audio de réécoute (page de correction Listening)
   ===================================================================== */
.ielts-replay-block {
    margin: 24px 0;
    padding: 16px;
    background: var(--w-surface-2);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
}
.ielts-replay-block h2 {
    margin: 0 0 6px;
    font-size: 1.1rem;
    color: var(--w-blue-dark);
}
.ielts-replay-hint { margin: 0 0 12px; font-size: 0.9rem; color: var(--w-text-2); }

/* =====================================================================
   Décompte pendant les pauses du Listening (inline, dans le bloc audio)
   Remplace temporairement le statut « lecture en cours ».
   ===================================================================== */
.ielts-audio-countdown[hidden] { display: none; }
.ielts-audio-countdown { margin-top: 12px; }
.ielts-audio-countdown-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--w-blue-dark);
    margin-bottom: 6px;
}
.ielts-audio-countdown-number {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1;
    color: var(--w-blue);
    text-shadow: 0 2px 10px rgba(31, 124, 255, 0.25);
}
.ielts-audio-countdown-bar {
    margin: 12px auto 0;
    width: min(360px, 80%);
    height: 8px;
    background: rgba(31, 124, 255, 0.15);
    border-radius: 4px;
    overflow: hidden;
}
.ielts-audio-countdown-bar span {
    display: block;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--w-blue), #60a5fa);
    border-radius: 4px;
    transition: width 0.25s linear;
}

/* =====================================================================
   Chrono de report des réponses (test enchaîné) — barre fixe en haut
   ===================================================================== */
.ielts-report-timer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--w-blue-dark);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.ielts-report-timer[hidden] { display: none; }
.ielts-report-timer-label { font-size: 0.95rem; }
.ielts-report-timer-value {
    font-size: 1.25rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    min-width: 4ch;
    text-align: center;
}
.ielts-report-timer.is-urgent {
    background: var(--w-red-dark);
    animation: ielts-timer-pulse 1s ease-in-out infinite;
}
@keyframes ielts-timer-pulse {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(1.25); }
}
/* Quand le chrono fixe est visible, on évite qu'il masque le haut du contenu */
body.ielts-has-timer .contenu-principal { padding-top: 64px; }

/* ── Navigation inter-tâches « Toutes les tâches » (bas de page) ──────── */
.ielts-task-nav {
    margin: 28px 0 8px;
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    background: var(--w-surface-2);
    padding: 10px 14px;
}
.ielts-task-nav-summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--w-text);
    font-size: .95rem;
    padding: 2px 0;
}
.ielts-task-nav-test {
    font-weight: 500;
    color: var(--w-text-3);
    font-size: .85rem;
}
.ielts-task-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.ielts-task-nav-col {
    background: var(--w-surface);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    padding: 9px 11px;
}
.ielts-task-nav-cat {
    margin: 0 0 6px;
    font-weight: 700;
    color: var(--w-text);
    font-size: .82rem;
}
.ielts-task-nav-link {
    display: block;
    font-size: .8rem;
    line-height: 1.35;
    padding: 3px 0;
    color: var(--w-text-2);
    text-decoration: none;
    overflow-wrap: anywhere;
}
.ielts-task-nav-link:hover { color: var(--w-blue); }
.ielts-task-nav-link.is-active {
    font-weight: 700;
    color: var(--w-blue);
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 640px) {
    .qg-question { flex-direction: column; gap: 8px; }
    .ielts-passage { padding: 16px 14px; }
    .passage-paragraph { text-align: left; }
    .ielts-section-cards { grid-template-columns: 1fr; }
    .trainer-score-big { font-size: 2.8rem; }
    .ielts-hero-grid { grid-template-columns: 1fr; }
    .ielts-task-nav-grid { grid-template-columns: 1fr; }
    /* Matching drag-and-drop sur écran étroit.
       - person/paragraph : items longs -> empiler item puis zone de dépôt,
         mais garder la pastille Q EN LIGNE avec l'item (économise une ligne).
       - heading : "Section X" est court -> garder tout côte à côte (compact). */
    .dnd-row {
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 8px;
        padding: 6px 10px;
    }
    .dnd-row-item { font-size: .9rem; flex: 1 1 auto; }
    .dnd-slot {
        flex: 1 1 100%;
        min-width: 0;
        max-width: none;
        order: 3;            /* la zone de dépôt passe sous la ligne Q+item */
    }
    .dnd-chip { font-size: .82rem; padding: 4px 8px 4px 4px; }
    .qg-dnd--headings .dnd-bank .dnd-chip { font-size: .82rem; }
    /* heading_matching sur écran étroit : "Section X" sur sa ligne (avec la
       pastille Q en regard), puis la zone de dépôt en pleine largeur dessous,
       qui affiche le titre choisi EN ENTIER (romain + texte, wrap autorisé). */
    .qg-dnd--headings .dnd-row { flex-wrap: wrap; }
    .qg-dnd--headings .dnd-row-item { flex: 1 1 auto; font-weight: 600; }
    .qg-dnd--headings .dnd-slot {
        flex: 1 1 100%;
        max-width: none;
        min-width: 0;
        order: 3;
        justify-content: flex-start;
    }
    .qg-dnd--headings .dnd-slot .dnd-chip-text { display: block; flex: 1; }
    .qg-dnd--headings .dnd-slot .dnd-chip {
        width: 100%;
        gap: 7px;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    /* Banque sticky sur mobile : limiter la hauteur pour ne pas masquer les
       questions (l'écran est court). La banque défile en interne au-delà. */
    .dnd-bank {
        max-height: 30vh;
    }
}

/* =====================================================================
   SPEAKING (session 7) — passation Parts 1/2/3
   Couleur d'accent speaking : #fa709a (cf. hub). UI sobre : bordures
   fines complètes, AUCUN border-left coloré. Tokens --w-* réutilisés.
   ===================================================================== */
.ielts-speaking-main {
    --w-speaking:       #fa709a;
    --w-speaking-dark:  #e14d7e;
    --w-speaking-light: #fff0f5;
}

/* Encart d'information (étape 1 : micro/correction à venir) */
.ielts-spk-note {
    background: var(--w-speaking-light);
    border: 1px solid #f6c9d8;
    border-radius: var(--w-radius-sm);
    padding: 12px 16px;
    margin: 14px 0 22px;
    font-size: 0.92rem;
    color: var(--w-text-2);
    line-height: 1.5;
}

/* Carte d'une part */
.ielts-spk-part {
    background: var(--w-surface);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    padding: 20px 22px;
    margin-bottom: 22px;
    box-shadow: var(--w-shadow-sm);
}

.ielts-spk-part-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.ielts-spk-part-badge {
    flex: 0 0 auto;
    display: inline-block;
    background: linear-gradient(135deg, var(--w-speaking), #fee140);
    color: #5a3e00;
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
}

.ielts-spk-part-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--w-text);
    line-height: 1.3;
}

.ielts-spk-part-descr {
    margin: 0 0 14px;
    font-size: 0.92rem;
    color: var(--w-text-2);
    line-height: 1.5;
}

/* Bloc « examinateur » (script / transition) */
.ielts-spk-examiner {
    background: var(--w-surface-2);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    padding: 12px 16px;
    margin: 14px 0;
}
.ielts-spk-examiner-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--w-speaking-dark);
    margin-bottom: 4px;
}
.ielts-spk-examiner p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--w-text);
    font-style: italic;
}

/* Topics + questions */
.ielts-spk-topic {
    margin: 14px 0;
}
.ielts-spk-transition {
    margin: 0 0 8px;
    color: var(--w-text-2);
    font-size: 0.92rem;
}
.ielts-spk-questions {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ielts-spk-questions li {
    display: flex;
    gap: 10px;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid var(--w-border);
}
.ielts-spk-questions li:last-child { border-bottom: none; }
.ielts-spk-qnum {
    flex: 0 0 auto;
    min-width: 2.4em;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--w-speaking-dark);
    font-variant-numeric: tabular-nums;
}
.ielts-spk-qtext {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--w-text);
}

/* Étiquette de difficulté (Part 3) */
.ielts-spk-difficulty {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 14px;
    margin-bottom: 8px;
    border: 1px solid var(--w-border-strong);
    color: var(--w-text-2);
    background: var(--w-surface-2);
}
.ielts-spk-difficulty--moderate    { color: var(--w-green-dark); border-color: #a7e8cf; background: var(--w-green-light); }
.ielts-spk-difficulty--challenging { color: #92400e; border-color: #fcd9a3; background: #fef3c7; }
.ielts-spk-difficulty--advanced    { color: var(--w-red-dark); border-color: #f6c9c9; background: var(--w-red-light); }

/* Cue card (Part 2) */
.ielts-spk-cuecard {
    background: var(--w-speaking-light);
    border: 1px solid #f6c9d8;
    border-radius: var(--w-radius);
    padding: 18px 20px;
    margin: 16px 0;
}
.ielts-spk-cue-topic {
    margin: 0 0 10px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--w-text);
    line-height: 1.4;
}
.ielts-spk-cue-intro {
    margin: 0 0 6px;
    font-weight: 600;
    color: var(--w-text-2);
    font-size: 0.9rem;
}
.ielts-spk-cue-prompts {
    margin: 0 0 10px;
    padding-left: 22px;
}
.ielts-spk-cue-prompts li {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--w-text);
}
.ielts-spk-cue-closing {
    margin: 0;
    font-size: 0.88rem;
    color: var(--w-text-2);
}

/* Minuterie de préparation (Part 2) */
.ielts-spk-prep {
    text-align: center;
    margin: 16px 0;
}
.ielts-spk-prep-timer {
    margin-top: 14px;
}
.ielts-spk-prep-label {
    display: block;
    font-size: 0.85rem;
    color: var(--w-text-2);
    margin-bottom: 6px;
}
.ielts-spk-prep-after {
    margin-top: 12px;
    font-weight: 600;
    color: var(--w-green-dark);
    font-size: 0.95rem;
}
/* Bouton « Je suis prêt › » — écourte la préparation du long turn (conforme
   IELTS). Couleurs Speaking (rose), centré sous l'anneau de décompte. */
.ielts-spk-prep-ready {
    display: inline-block;
    margin: 14px auto 0;
    font-size: 0.9rem;
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--w-speaking), var(--w-speaking-dark));
}
.ielts-spk-prep-ready[hidden] { display: none !important; }
/* Bouton « Passer l'intro › » — même style rose, visible pendant la transition
   de l'examinateur (clips dialogue). */
.ielts-spk-skip-intro {
    display: inline-block;
    margin: 14px auto 0;
    font-size: 0.9rem;
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--w-speaking), var(--w-speaking-dark));
}
.ielts-spk-skip-intro[hidden] { display: none !important; }

/* Questions de conclusion (Part 2) — repliées par défaut */
.ielts-spk-rounding {
    margin: 14px 0 0;
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    padding: 10px 16px;
    background: var(--w-surface-2);
}
.ielts-spk-rounding summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--w-text-2);
}
.ielts-spk-rounding .ielts-spk-questions { margin-top: 10px; }
.ielts-spk-rounding-note {
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: var(--w-text-3);
}

/* Colonne Speaking dans la nav inter-tâches */
.ielts-task-nav-col--speaking .ielts-task-nav-cat { color: var(--w-speaking-dark); }

/* =====================================================================
   SPEAKING — étape 2 : hub de progression + recorder (state machine)
   ===================================================================== */

/* Barre de progression du hub */
.ielts-spk-progress { margin: 18px 0; }
.ielts-spk-progress-bar {
    height: 8px;
    background: var(--w-border);
    border-radius: 4px;
    overflow: hidden;
}
.ielts-spk-progress-bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--w-speaking), #fee140);
    border-radius: 4px;
    transition: width var(--w-transition);
}
.ielts-spk-progress-label {
    margin: 8px 0 0;
    font-size: 0.9rem;
    color: var(--w-text-2);
    text-align: center;
}

/* Grille des 3 cartes de part (hub) */
.ielts-spk-parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.ielts-spk-part-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    background: var(--w-surface);
    text-decoration: none;
    box-shadow: var(--w-shadow-sm);
    transition: transform var(--w-transition), box-shadow var(--w-transition);
}
.ielts-spk-part-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--w-shadow);
}
.ielts-spk-part-card.is-done {
    border-color: #a7e8cf;
    background: var(--w-green-light);
}
.ielts-spk-part-card-badge {
    align-self: flex-start;
    background: linear-gradient(135deg, var(--w-speaking), #fee140);
    color: #5a3e00;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
}
.ielts-spk-part-card-state {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--w-text);
}
.ielts-spk-part-card.is-done .ielts-spk-part-card-state { color: var(--w-green-dark); }
.ielts-spk-part-card-desc {
    font-size: 0.85rem;
    color: var(--w-text-2);
    line-height: 1.4;
}

/* CTA résultat global */
.ielts-spk-result-cta {
    text-align: center;
    margin: 22px 0;
}
.ielts-spk-result-cta .btn-start[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}
.ielts-spk-result-hint {
    margin: 10px 0 0;
    font-size: 0.85rem;
    color: var(--w-text-3);
}
.ielts-spk-reset-line { text-align: center; margin: 6px 0 0; }

/* Recorder : state machine */
.ielts-spk-recorder {
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    background: var(--w-surface);
    padding: 22px;
    margin: 16px 0;
    box-shadow: var(--w-shadow-sm);
    text-align: center;
}
.ielts-spk-rec-label {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--w-text);
    margin: 0 0 12px;
}
.ielts-spk-recorder .ielts-spk-questions { text-align: left; max-width: 640px; margin: 0 auto; }
.ielts-spk-recorder .ielts-spk-cuecard { text-align: left; max-width: 640px; margin-left: auto; margin-right: auto; }
.ielts-spk-recorder .ielts-spk-prep { text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }

/* Indicateur d'enregistrement (point rouge clignotant + chrono) */
.ielts-spk-rec-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0;
    padding: 6px 14px;
    border: 1px solid var(--w-red-light);
    border-radius: 20px;
    background: var(--w-red-light);
    color: var(--w-red-dark);
    font-weight: 600;
    font-size: 0.9rem;
}
.ielts-spk-rec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--w-red);
    animation: ielts-spk-blink 1s steps(2, start) infinite;
}
@keyframes ielts-spk-blink { to { visibility: hidden; } }
.ielts-spk-rec-timer { font-variant-numeric: tabular-nums; font-weight: 700; }
.ielts-spk-rec-actions { margin-top: 14px; }
.ielts-spk-rec-done-msg { font-weight: 600; color: var(--w-green-dark); margin: 0 0 12px; }

/* Anneau de progression (minuteur, style TOEFL) */
.ielts-spk-ring-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 16px auto 4px;
}
.ielts-spk-ring-wrap[hidden] { display: none !important; }
.ielts-spk-ring {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg); /* départ en haut */
}
.ielts-spk-ring-track {
    fill: none;
    stroke: var(--w-border, #e5e7eb);
    stroke-width: 9;
}
.ielts-spk-ring-progress {
    fill: none;
    stroke: var(--w-green, #43a047);
    stroke-width: 9;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke 1s linear;
}
.ielts-spk-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.ielts-spk-ring-time {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--w-text, #1f2937);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.ielts-spk-ring-label {
    margin-top: 2px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--w-text-3, #9ca3af);
}
.ielts-spk-ring-wrap.is-urgent { animation: ielts-spk-ring-pulse 0.8s ease-in-out infinite; }
@keyframes ielts-spk-ring-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}

/* IMPORTANT : display:inline-flex écrase l'attribut HTML [hidden] ; on force donc
   le masquage quand [hidden] est présent (sinon les badges restent visibles). */
.ielts-spk-rec-status[hidden],
.ielts-spk-speaking-status[hidden] { display: none !important; }

/* Idem pour le bouton "question suivante" : .btn-start est en inline-flex,
   ce qui écraserait son attribut [hidden]. */
.ielts-speaking-main .btn-start[hidden] { display: none !important; }

/* Indicateur "l'examinateur parle" (bleu) — distinct de l'enregistrement (rouge) */
.ielts-spk-speaking-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0;
    padding: 6px 14px;
    border: 1px solid var(--w-blue-mid);
    border-radius: 20px;
    background: var(--w-blue-light);
    color: var(--w-blue-dark);
    font-weight: 600;
    font-size: 0.9rem;
}
.ielts-spk-speaking-icon {
    animation: ielts-spk-pulse 1.1s ease-in-out infinite;
}
@keyframes ielts-spk-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

/* Mic status (sous le bandeau) */
.ielts-spk-mic-status {
    display: block;
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--w-text-3);
}

/* Récap d'une part (mode résultat) */
.ielts-spk-recap { margin: 16px 0; }
.ielts-spk-recap-ok {
    font-weight: 700;
    color: var(--w-green-dark);
    font-size: 1rem;
    margin: 0 0 12px;
}

/* Wrappers structurels du recorder (espacements ; affichage piloté par [hidden]) */
.ielts-spk-form { margin: 0; }
.ielts-spk-rec-start { padding: 8px 0; }
.ielts-spk-rec-active { padding: 4px 0; }
.ielts-spk-rec-done { padding: 8px 0; }

/* Speaking — étape C : récap par QUESTION (1 audio + 1 transcription / question) */
.ielts-spk-recap-topic {
    margin: 0 0 16px;
    padding: 14px 16px;
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    background: var(--w-surface);
}
.ielts-spk-recap-topic:last-child { margin-bottom: 0; }
.ielts-spk-recap-topic-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--w-text);
    margin: 0 0 10px;
}
.ielts-spk-answer {
    padding: 10px 0;
    border-top: 1px solid var(--w-border);
}
.ielts-spk-answer:first-of-type { border-top: none; padding-top: 0; }
.ielts-spk-answer-q {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 8px;
}
.ielts-spk-answer-num {
    flex: 0 0 auto;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--w-text-2);
    font-variant-numeric: tabular-nums;
}
.ielts-spk-answer-qtext {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--w-text);
    line-height: 1.45;
}
.ielts-spk-answer-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ielts-spk-answer-head audio { flex: 1 1 240px; max-width: 360px; height: 36px; }
.ielts-spk-answer-dur {
    font-size: 0.82rem;
    color: var(--w-text-3);
    font-variant-numeric: tabular-nums;
}
.ielts-spk-answer-transcript {
    margin: 8px 0 0;
    padding: 10px 14px;
    background: var(--w-surface-2);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    font-size: 0.92rem;
    line-height: 1.55;
    font-weight: 600;
    color: var(--w-blue-dark);
}
.ielts-spk-answer-transcript--empty {
    color: var(--w-text-3);
    font-style: italic;
    font-weight: 400;
}
.ielts-spk-rec-wait {
    margin: 10px 0 0;
    font-size: 0.82rem;
    color: var(--w-text-3);
}

/* =====================================================================
   SPEAKING — étape 4 : affichage de l'évaluation holistique
   ===================================================================== */

/* Listes d'observations / suggestions dans les cartes de critère */
.ielts-spk-crit-list {
    margin: 6px 0 0;
    padding-left: 18px;
    padding-bottom: 14px;
    list-style: disc;
}
.ielts-spk-crit-list li {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--w-text-2);
    margin-bottom: 3px;
}
.ielts-spk-crit-sugg {
    margin: 8px 0 0;
    padding-bottom: 0;
    font-size: 0.85rem;
    color: var(--w-text);
}
.ielts-spk-crit-list--sugg { margin-top: 0; }
.ielts-spk-crit-list--sugg li { color: var(--w-text); }

/* Note prononciation non évaluable */
.ielts-spk-pron-note {
    margin: 0 0 16px;
    padding: 10px 14px;
    background: var(--w-blue-light);
    border: 1px solid var(--w-blue-mid);
    border-radius: var(--w-radius-sm);
    font-size: 0.88rem;
    color: var(--w-blue-dark);
    line-height: 1.5;
}

/* Notes par partie */
.ielts-spk-perpart {
    margin: 18px 0;
    padding: 16px 18px;
    background: var(--w-surface-2);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
}
.ielts-spk-perpart h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    color: var(--w-text);
}
.ielts-spk-perpart p {
    margin: 0 0 8px;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--w-text-2);
}
.ielts-spk-perpart p:last-child { margin-bottom: 0; }

/* Vérifications Part 2 + engagement Part 3 */
.ielts-spk-checks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.ielts-spk-check-block {
    padding: 14px 16px;
    background: var(--w-surface);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
}
.ielts-spk-check-block h3 {
    margin: 0 0 8px;
    font-size: 0.95rem;
    color: var(--w-text);
}
.ielts-spk-check-block p {
    margin: 0 0 6px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--w-text-2);
}

/* Forces / faiblesses */
.ielts-spk-sw {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.ielts-spk-sw-col {
    padding: 14px 16px;
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    background: var(--w-surface);
}
.ielts-spk-sw-col h3 {
    margin: 0 0 8px;
    font-size: 0.95rem;
    color: var(--w-text);
}
.ielts-spk-sw-col ul { margin: 0; padding-left: 18px; }
.ielts-spk-sw-col li {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--w-text-2);
    margin-bottom: 4px;
}

/* Résumé global */
.ielts-spk-summary {
    margin: 18px 0;
    padding: 16px 18px;
    background: var(--w-speaking-light);
    border: 1px solid #f6c9d8;
    border-radius: var(--w-radius);
}
.ielts-spk-summary p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--w-text);
}

/* Speaking — étape 5 : détail de calcul + band en cache sur le hub */
.ielts-spk-calc {
    margin: 8px 0 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--w-text-3);
    font-variant-numeric: tabular-nums;
}
.ielts-spk-cached-band {
    margin: 0 0 12px;
    font-size: 1.05rem;
    color: var(--w-text);
}
.ielts-spk-cached-band strong { color: var(--w-speaking-dark); font-size: 1.2rem; }

/* Speaking — étape 5 : page d'attente de l'évaluation (deux temps) */
.ielts-spk-waiting {
    text-align: center;
    padding: 48px 20px;
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    background: var(--w-surface);
    box-shadow: var(--w-shadow-sm);
    margin: 18px 0;
}
.ielts-spk-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    border: 4px solid var(--w-border);
    border-top-color: var(--w-speaking);
    border-radius: 50%;
    animation: ielts-spk-spin 0.9s linear infinite;
}
@keyframes ielts-spk-spin { to { transform: rotate(360deg); } }
.ielts-spk-waiting-title {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--w-text);
}
.ielts-spk-waiting-msg {
    margin: 0 0 8px;
    font-size: 0.95rem;
    color: var(--w-text-2);
    min-height: 1.4em;
    transition: opacity var(--w-transition);
}
.ielts-spk-waiting-hint {
    margin: 0;
    font-size: 0.82rem;
    color: var(--w-text-3);
}
/* Respect des préférences de réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
    .ielts-spk-spinner { animation-duration: 2.5s; }
}

/* =====================================================================
   TEST ENCHAÎNÉ — étape D : carte overall + récap réponse Writing
   ===================================================================== */
.ielts-overall-card {
    margin-bottom: 22px;
    border: 2px solid rgba(0, 0, 0, 0.06);
}
.ielts-overall-card .trainer-score-big { font-size: 2.6rem; }

/* Récap dépliable de la réponse Writing dans les résultats */
.ielts-writing-answer-recap {
    margin: 12px 0 6px;
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    background: var(--w-surface);
}
.ielts-writing-answer-recap summary {
    cursor: pointer;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--w-text-2);
    user-select: none;
}
.ielts-writing-answer-recap summary:hover { color: var(--w-text); }
.ielts-writing-answer-recap[open] summary {
    border-bottom: 1px solid var(--w-border);
}
.ielts-recap-text {
    padding: 14px;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--w-text);
    white-space: normal;
}

/* ════════════════════════════════════════════════════════════════════════
   PAGE RÉSULTATS DU TEST BLANC — refonte session 12 (A2 + A3 + A4)
   - A3 : 4 accordéons <details> (Listening / Reading / Writing / Speaking).
   - A2 : réponse candidat (bleu) + réponse exemple (vert).
   - A4 : bouton d'export PDF (clone + fenêtre d'impression).
   Bordures fines COMPLÈTES uniquement (aucun border-left coloré).
   ════════════════════════════════════════════════════════════════════════ */

/* ── A3 : conteneur + accordéons par compétence ─────────────────────────── */
.ielts-result-accordions {
    margin: 20px 0 8px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.ielts-result-acc {
    background: linear-gradient(135deg, var(--w-blue-light) 0%, var(--w-blue-mid) 100%);
    border: 1px solid var(--w-blue-mid);
    border-radius: var(--w-radius);
    overflow: hidden;
}
.ielts-result-acc-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--w-blue-dark);
    user-select: none;
}
.ielts-result-acc-summary::-webkit-details-marker { display: none; }
.ielts-result-acc-summary::marker { display: none; }
.ielts-result-acc-summary:hover { filter: brightness(0.98); }
.ielts-result-acc-title { flex: 1 1 auto; }
.ielts-result-acc-band {
    flex: 0 0 auto;
    font-weight: 800;
    color: var(--w-blue-dark);
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: var(--w-radius-sm);
    padding: 3px 12px;
    font-size: 0.95rem;
}
.ielts-result-acc-arrow {
    flex: 0 0 auto;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--w-blue);
    transition: transform 0.2s ease;
}
.ielts-result-acc[open] > .ielts-result-acc-summary .ielts-result-acc-arrow {
    transform: rotate(90deg);
}
.ielts-result-acc-body {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--w-blue-mid);
    background: var(--w-surface);
}

/* Sous-bloc générique à l'intérieur d'un accordéon (Writing/Speaking). */
.ielts-result-block { margin: 16px 0; }
.ielts-result-block:first-child { margin-top: 8px; }
.ielts-result-block-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--w-text);
    margin: 0 0 10px;
}

/* ── A2 : blocs réponse candidat (bleu) / réponse exemple (vert) ─────────── */
.ielts-answer-block {
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    padding: 12px 14px;
    margin: 10px 0;
}
.ielts-answer-block--user   { background: var(--w-blue-light); }
.ielts-answer-block--sample { background: var(--w-green-light); }
.ielts-answer-label {
    display: block;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}
.ielts-answer-label--user   { color: var(--w-blue-dark); }
.ielts-answer-label--sample { color: var(--w-green-dark); }
.ielts-answer-text {
    font-size: 0.95rem;
    line-height: 1.65;
    font-weight: 600;
}
.ielts-answer-text--user   { color: var(--w-blue-dark); }
.ielts-answer-text--sample { color: var(--w-green-dark); margin: 0 0 6px; }
.ielts-answer-text--sample:last-child { margin-bottom: 0; }
.ielts-answer-sample-audio { margin: 4px 0 8px; }
.ielts-answer-sample-audio audio { width: 100%; max-width: 360px; height: 36px; }

/* Appariement 1:1 par question : un bloc par question, contenant la réponse
   du candidat (bleu) puis la réponse exemple (vert). */
.ielts-spk-qa {
    margin: 0 0 18px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--w-border);
}
.ielts-spk-qa:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.ielts-spk-qa .ielts-answer-block { margin: 8px 0 0; }
.ielts-spk-qa .ielts-answer-block--user .ielts-spk-answer-head,
.ielts-spk-qa .ielts-answer-block--sample .ielts-spk-answer-head { margin: 2px 0 6px; }
.ielts-spk-qa .ielts-answer-block audio { width: 100%; max-width: 360px; height: 36px; }
.ielts-spk-qa .ielts-spk-answer-transcript { margin-top: 0; }
.ielts-answer-analysis {
    margin-top: 8px;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--w-text-2);
    font-weight: 400;
}

/* ── A4 : bouton d'export PDF ───────────────────────────────────────────── */
.ielts-results-export {
    display: flex;
    justify-content: center;
    margin: 24px 0 8px;
}
.ielts-export-btn { cursor: pointer; }

/* ── @media print (repli si l'utilisateur imprime la page vivante) ──────────
   La voie principale est l'export via fenêtre dédiée (bouton). Ce repli
   garantit un rendu correct si la page courante est imprimée directement :
   on force l'ouverture des accordéons et on masque les éléments d'interface. */
@media print {
    header, nav, .navbar, #navbar-placeholder, #footer-placeholder,
    .ielts-results-export, .ielts-results-actions,
    .ielts-result-acc-arrow,
    audio, video { display: none !important; }

    .ielts-result-acc-body { display: block !important; }
    .ielts-result-acc { border: 1px solid #e2e8f0; break-inside: auto; }
    .ielts-qq-card, .ielts-answer-block, .ielts-spk-answer,
    .ielts-criterion { break-inside: avoid; page-break-inside: avoid; }

    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}

/* ============================================================================
   TIMER DE PAGE IELTS (porté du timer TOEIC) — IDs préfixés #w-*
   Voir timer-general.js. La pilule sticky en haut à droite mesure la durée
   GLOBALE de la partie. En Listening/Speaking elle s'AJOUTE au décompte des
   pauses / à l'anneau SVG (cohabitation) : elle ne les remplace pas.
   Couleur initiale en #10b981 (vert hex) pour cohérence avec le JS.
   ========================================================================== */
/* v4 : plus de marge négative. L'ancien « margin-top:-52px » remontait la pilule
   sur la ligne précédente et la faisait chevaucher tout paragraphe un peu long
   (consignes, description des parts). La pilule occupe désormais sa propre
   ligne, alignée à droite, et reste sticky au défilement. */
#w-fixed-timer-container { position: sticky; top: 12px; z-index: 500; width: fit-content; margin: 4px 0 16px auto; display: flex; align-items: center; }
#w-progress-bar-container { display: inline-flex; align-items: center; justify-content: center; position: relative; height: 36px; min-width: 200px; background: #2a2d35; border-radius: 18px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
#w-progress-bar { position: absolute; top: 0; left: 0; height: 100%; width: 0; border-radius: 18px; background: #10b981; z-index: 1; transition: width 1s linear, background-color .4s ease; }
#w-timer-text { position: relative; z-index: 2; color: #fff; font-family: 'DM Mono','Fira Code',ui-monospace,monospace; font-size: 14px; white-space: nowrap; padding: 0 16px; display: flex; align-items: center; gap: 8px; }
#w-timer-text .label { font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; font-family: var(--w-font); }
#w-timer-text .time { font-weight: 700; font-size: 18px; }

/* ── Minuteur : adaptation mobile (évite le débordement à droite du message
   d'attente, ex. « Le minuteur démarrera au lancement de l'audio »). Le
   conteneur est en width:fit-content + margin-left:auto + white-space:nowrap,
   ce qui déborde du viewport sur petit écran. On borne la largeur et on
   autorise le retour à la ligne du texte. ───────────────────────────────── */
@media (max-width: 640px) {
  #w-fixed-timer-container { max-width: 100%; width: 100%; margin-left: 0; justify-content: flex-end; }
  #w-progress-bar-container { max-width: 100%; min-width: 0; height: auto; min-height: 36px; }
  #w-timer-text { white-space: normal; font-size: 12px; padding: 6px 12px; text-align: center; }
  #w-timer-text .time { font-size: 16px; }
}

/* =====================================================================
   Bandeau de moyenne globale : fond bleu plein, texte blanc.
   ===================================================================== */
.score-hero-card{
    background:#1f7cff;
}
.score-hero-card,
.score-hero-card *{
    color:#fff;
    opacity:1;
}
