/* ============================================================
   IV IELTS — Simulateur IELTS sur ordinateur (Immigration Voyages)
   Interface inspirée du test IELTS sur ordinateur (CBT)
   ============================================================ */

/* La palette (--iv-navy, --accent, --border, --text, --tint…) est définie dans
   iv-charte.css, chargé juste après : c'est la charte rouge / noir chaud du site.
   L'ancien bloc :root bleu (bleu marine et bleu d'action) a été retiré le 22/08/2026 pour
   qu'il ne puisse plus réapparaître — audit d'interface, constat #34. */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  background: var(--body-bg);
  color: var(--text);
  line-height: 1.55;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; color: var(--text); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.3rem; border-radius: 8px; border: 1px solid transparent;
  font-size: 1rem; font-weight: 600; transition: background .15s, transform .05s;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: #fff; color: var(--iv-navy); border-color: var(--border); }
.btn-ghost:hover { background: var(--tint); }
.btn-danger { background: var(--ko); color: #fff; }
.btn-danger:hover { background: #a51f1f; }
.btn-big { font-size: 1.1rem; padding: .85rem 1.9rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ============================================================
   ACCUEIL
   ============================================================ */
.home { flex: 1; display: flex; flex-direction: column; }

.home-hero {
  background: linear-gradient(135deg, var(--navy-2) 0%, var(--iv-navy) 55%, var(--hero-end) 100%);
  color: #fff; padding: 2.6rem 1.5rem 2.2rem; text-align: center;
}
.home-hero .brand {
  display: inline-block; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  padding: .25rem .9rem; border-radius: 99px; margin-bottom: 1rem;
}
.home-hero h1, .home-hero h2 { font-size: 2.1rem; font-weight: 800; letter-spacing: -.01em; }
.home-hero p.sub { margin-top: .6rem; font-size: 1.05rem; opacity: .85; max-width: 40rem; margin-left: auto; margin-right: auto; }

.home-main { flex: 1; width: 100%; max-width: 62rem; margin: 0 auto; padding: 1.8rem 1.2rem 2.5rem; }

/* ============================================================
   LISTE DES SUJETS (12/08 — « je préfère que tous les sujets soient
   affichés comme dans le TCF »)
   ------------------------------------------------------------
   Le menu déroulant repliait les 30 sujets derrière un clic : on ne voyait
   ni la taille de la banque, ni ce qu'un accès complet ouvre. Reprise du
   geste de la Prépa TCF — une carte par sujet, les non ouverts grisés
   derrière un cadenas, ce qu'on n'a pas se voit.
   Seul écart assumé : une GRILLE plutôt qu'une colonne. Au TCF, la liste
   EST la page ; ici elle précède les versions, les modes et les 4 modules.
   Trente lignes empilées les repousseraient à 1 800 px plus bas. Pour
   revenir à une colonne : grid-template-columns: 1fr partout.
   ============================================================ */
.iv-sujets-tete {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .8rem; flex-wrap: wrap; margin-bottom: .6rem;
}
.iv-sujets-tete b { font-family: Sora, Inter, sans-serif; color: var(--iv-navy); font-size: 1rem; }
.iv-sujets-compte { font-size: .84rem; color: var(--text-soft); }
.iv-sujets-compte a { color: var(--accent); font-weight: 600; }

.iv-sujets {
  display: grid; gap: .6rem; grid-template-columns: 1fr; margin-bottom: 1.6rem;
}
@media (min-width: 700px)  { .iv-sujets { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .iv-sujets { grid-template-columns: repeat(3, 1fr); } }

.iv-sujet {
  display: flex; align-items: center; gap: .8rem;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: .7rem .9rem; cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease;
  /* ⚠️ INDISPENSABLE. Un élément de grille vaut min-width:auto par défaut : il
     refuse de descendre sous la largeur de son contenu. Le sous-titre étant en
     white-space:nowrap, chaque colonne réclamait 454 px, la grille débordait de
     la fenêtre et la page gagnait un ascenseur horizontal. Mesuré : document
     1 616 px pour une fenêtre de 1 425. */
  min-width: 0;
}
.iv-sujet:hover { border-color: var(--tint-line, var(--accent)); box-shadow: var(--card-shadow, none); }
.iv-sujet:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.iv-sujet .em { font-size: 1.15rem; line-height: 1; }
.iv-sujet .infos { flex: 1; min-width: 0; }
.iv-sujet .infos b { display: block; color: var(--iv-navy); font-size: .92rem; }
.iv-sujet .infos small {
  display: block; color: var(--text-soft); font-size: .74rem; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Le sujet en cours : la bordure d'action, comme la pastille de mode active. */
.iv-sujet.actif { border-color: var(--accent); background: var(--tint-2); }

/* Verrouillé : exactement le traitement du TCF — pâli, emoji désaturé,
   titre en gris. On le montre, on ne le cache pas. */
.iv-sujet.verrouille {
  opacity: .58; background: var(--body-bg); cursor: default;
}
.iv-sujet.verrouille .em { filter: grayscale(1); }
.iv-sujet.verrouille .infos b { color: var(--text-soft); }
.iv-sujet.verrouille:hover { border-color: var(--border); box-shadow: none; }

.iv-badge {
  font-size: .68rem; font-weight: 700; padding: 3px 9px; border-radius: 20px;
  white-space: nowrap; text-decoration: none;
}
.iv-badge.choisi { background: var(--tint); color: var(--accent-dark); }
.iv-badge.libre  { background: var(--tint-2); color: var(--text-soft); }
.iv-badge.verrou { background: #F1EEED; color: var(--text-soft); }
.iv-badge.verrou[href]:hover { background: var(--tint); color: var(--accent-dark); }

.mode-row {
  display: flex; gap: .8rem; justify-content: center; margin-bottom: 1.6rem; flex-wrap: wrap;
}
.mode-pill {
  border: 2px solid var(--border); background: #fff; border-radius: 99px;
  padding: .55rem 1.4rem; font-weight: 600; color: var(--text-soft); font-size: .98rem;
}
.mode-pill.active { border-color: var(--accent); color: var(--accent); background: var(--tint-2); }
.mode-hint { text-align: center; color: var(--text-soft); font-size: .92rem; margin-bottom: 1.6rem; }

.mod-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
}
.mod-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--iv-radius);
  padding: 1.4rem 1.3rem 1.3rem; box-shadow: var(--card-shadow); text-align: left;
  display: flex; flex-direction: column; gap: .45rem; transition: transform .12s, box-shadow .12s;
}
.mod-card:hover { transform: translateY(-3px); box-shadow: var(--card-shadow); }
.mod-card .ic { font-size: 1.9rem; }
.mod-card h3 { font-size: 1.15rem; color: var(--iv-navy); }
.mod-card .meta { font-size: .85rem; color: var(--text-soft); }
.mod-card .desc { font-size: .92rem; color: var(--text-soft); flex: 1; }

.hist-box { margin-top: 2.2rem; }
.hist-box h2 { font-size: 1.1rem; color: var(--iv-navy); margin-bottom: .7rem; }
.hist-scroll { overflow-x: auto; border-radius: var(--iv-radius); }
.hist-scroll .hist-table { min-width: 540px; }
.hist-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--iv-radius); overflow: hidden; box-shadow: var(--card-shadow); }
.hist-table th, .hist-table td { padding: .55rem .9rem; text-align: left; font-size: .92rem; border-bottom: 1px solid var(--tint-2); }
.hist-table th { background: var(--tint-2); color: var(--text-soft); font-weight: 600; }
.hist-table tr:last-child td { border-bottom: none; }
.hist-empty { color: var(--text-soft); font-size: .92rem; background: #fff; border: 1px dashed var(--border); border-radius: var(--iv-radius); padding: 1rem 1.2rem; }

.home-foot {
  text-align: center; color: var(--text-soft); font-size: .8rem; padding: 1.4rem 1rem 1.8rem;
  border-top: 1px solid var(--border); background: #fff;
}
.home-foot .legal { max-width: 46rem; margin: .35rem auto 0; }

.band-chip { display: inline-block; background: var(--iv-navy); color: #fff; border-radius: 6px; padding: .05rem .55rem; font-weight: 700; }

/* ============================================================
   ÉCRAN D'INSTRUCTIONS
   ============================================================ */
.instr-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.instr-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--iv-radius);
  box-shadow: var(--card-shadow); max-width: 44rem; width: 100%; padding: 2rem 2.2rem;
}
.instr-card h2 { color: var(--iv-navy); font-size: 1.5rem; margin-bottom: .3rem; }
.instr-card .mode-tag { font-size: .85rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.instr-card ul { margin: 1rem 0 1.2rem 1.2rem; }
.instr-card li { margin-bottom: .45rem; }
.instr-card .warnbar { margin: 0 0 1rem; }
.instr-actions { display: flex; gap: .8rem; justify-content: flex-end; margin-top: 1.2rem; }

.warnbar {
  background: #fdf3e3; border: 1px solid #e8c98a; color: #7a5410;
  border-radius: 8px; padding: .6rem .9rem; font-size: .92rem; margin: .8rem 0;
}

/* ============================================================
   EN-TÊTE DE TEST (bandeau noir façon CBT)
   ============================================================ */
.test-header {
  background: var(--header-bg); color: #fff; height: 54px; flex: 0 0 54px;
  display: flex; align-items: center; padding: 0 1rem; gap: 1rem;
  position: sticky; top: 0; z-index: 50;
}
.th-brand { font-weight: 800; letter-spacing: .04em; font-size: 1.05rem; white-space: nowrap; }
.th-brand span { color: var(--brand-accent); }
.th-user { font-size: .85rem; color: rgba(255, 255, 255, .75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-timer {
  margin-left: auto; margin-right: auto; position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: .45rem; font-size: 1.15rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.th-timer .clock-ic { font-size: 1rem; opacity: .8; }
.th-timer.flash { animation: timerflash 1s steps(2) infinite; color: #ffb4a8; }
@keyframes timerflash { 50% { opacity: .35; } }
.th-right { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.th-btn {
  background: #333; color: #fff; border: 1px solid #555; border-radius: 6px;
  padding: .35rem .8rem; font-size: .85rem; font-weight: 600;
}
.th-btn:hover { background: #444; }
.th-btn.quit { background: #5a1f1f; border-color: #7c2b2b; }
.th-btn.quit:hover { background: #6e2626; }

/* ---------- barre audio (listening) ---------- */
.audio-bar {
  background: var(--tint-2); border-bottom: 1px solid var(--border);
  padding: .45rem 1rem; display: flex; align-items: center; gap: .9rem; flex-wrap: wrap;
  position: sticky; top: 54px; z-index: 40;
}
.audio-bar .ab-status { font-weight: 700; color: var(--iv-navy); font-size: .95rem; white-space: nowrap; }
.audio-bar .ab-progress { flex: 1; min-width: 140px; height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; }
.audio-bar .ab-fill { height: 100%; width: 0%; background: var(--accent); border-radius: 99px; transition: width .4s linear; }
.audio-bar .ab-note { font-size: .8rem; color: var(--text-soft); white-space: nowrap; }
.ab-ctrl { display: flex; gap: .4rem; }
.ab-ctrl button { border: 1px solid var(--border); background: #fff; border-radius: 6px; padding: .3rem .7rem; font-size: .85rem; font-weight: 600; }
.ab-ctrl button:hover { background: var(--tint); }
.ab-ctrl button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============================================================
   CORPS DE TEST
   ============================================================ */
.test-body { flex: 1; overflow: auto; padding: 1.2rem 1.2rem 7.5rem; }
.test-body-inner { max-width: 60rem; margin: 0 auto; }

/* split reading / writing */
.split { display: flex; gap: 0; height: calc(100vh - 54px - 96px); }
.split-left, .split-right { overflow-y: auto; padding: 1.3rem 1.5rem 3rem; }
.split-left { flex: 0 0 52%; background: #fff; border-right: 3px solid var(--border); }
.split-right { flex: 1; }

.part-tabs { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.part-tab {
  border: 1px solid var(--border); background: #fff; border-radius: 8px;
  padding: .4rem 1rem; font-weight: 600; font-size: .92rem; color: var(--text-soft);
}
.part-tab.active { background: var(--iv-navy); color: #fff; border-color: var(--iv-navy); }
.part-tab:hover:not(.active) { background: var(--tint-2); }

.passage h2 { color: var(--iv-navy); font-size: 1.3rem; margin-bottom: .2rem; }
.passage .p-sub { color: var(--text-soft); font-style: italic; margin-bottom: 1rem; font-size: .93rem; }
.passage p { margin-bottom: .9rem; text-align: justify; }
.passage .para-label { font-weight: 800; color: var(--iv-navy); margin-right: .5rem; }

/* ---------- groupes de questions ---------- */
.qgroup {
  background: #fff; border: 1px solid var(--border); border-radius: var(--iv-radius);
  box-shadow: var(--card-shadow); padding: 1.2rem 1.4rem; margin-bottom: 1.3rem;
}
.qgroup .g-range { font-weight: 800; color: var(--iv-navy); font-size: 1.02rem; }
.qgroup .g-instr { color: var(--text-soft); font-size: .93rem; margin: .25rem 0 1rem; }
.qgroup .g-instr strong { color: var(--ko); }
.qgroup h4.g-title { text-align: center; margin: .4rem 0 .9rem; font-size: 1.05rem; }

.qnum {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.75rem; height: 1.75rem; padding: 0 .3rem; margin-right: .55rem;
  background: var(--iv-navy); color: #fff; border-radius: 6px; font-weight: 700; font-size: .9rem;
  flex: 0 0 auto;
}

.qnum.flagged, .gap-n.flagged { background: var(--flag); color: var(--text); }
.qnum[data-flag], .gap-n[data-flag] { cursor: pointer; }
.gap-wrap { white-space: nowrap; }

.q-item { display: flex; align-items: flex-start; margin-bottom: 1rem; scroll-margin-top: 120px; }
.q-item .q-body { flex: 1; }
.q-item .q-text { margin-bottom: .5rem; font-weight: 600; }

.opt { display: flex; align-items: flex-start; gap: .55rem; padding: .3rem .45rem; border-radius: 6px; cursor: pointer; }
.opt:hover { background: var(--tint-2); }
.opt input { margin-top: .3rem; accent-color: var(--accent); transform: scale(1.15); }
.opt .ol { font-weight: 700; color: var(--iv-navy); min-width: 1.1rem; }

.tfng-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.tfng-row .opt { padding: .25rem .6rem; border: 1px solid var(--border); }
.tfng-row .opt.sel { background: var(--tint-2); border-color: var(--accent); }

/* notes / form completion */
.notes-block {
  background: var(--tint); border: 1px solid var(--border); border-radius: 8px;
  padding: 1rem 1.3rem; font-size: .98rem;
}
.notes-block .nb-line { margin-bottom: .55rem; display: block; }
.notes-block .nb-h { font-weight: 800; color: var(--iv-navy); display: block; margin: .6rem 0 .4rem; }
.notes-block ul { margin-left: 1.2rem; }
.notes-block li { margin-bottom: .5rem; }

input.gap {
  border: 1.5px solid var(--border); border-radius: 6px; padding: .18rem .5rem;
  width: 11rem; max-width: 60vw; background: #fff;
}
input.gap:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
input.gap.filled { background: #f2f8f2; border-color: #9fc7a8; }
.gap-n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.5rem; height: 1.5rem; padding: 0 .25rem;
  background: var(--iv-navy); color: #fff; border-radius: 5px; font-weight: 700; font-size: .8rem;
  margin-right: .3rem;
}

select.match-select {
  border: 1.5px solid var(--border); border-radius: 6px; padding: .22rem .45rem; background: #fff;
  font-weight: 600; min-width: 4.5rem;
}
select.match-select.filled { background: #f2f8f2; border-color: #9fc7a8; }

.match-options {
  background: var(--tint-2); border: 1px solid var(--border); border-radius: 8px;
  padding: .7rem 1rem; margin-bottom: 1rem; font-size: .95rem;
}
.match-options .mo-title { font-weight: 700; color: var(--iv-navy); margin-bottom: .3rem; }
.match-options li { list-style: none; margin-bottom: .2rem; }
.match-options .ol { font-weight: 700; color: var(--iv-navy); margin-right: .4rem; }

.map-wrap { text-align: center; margin: .5rem 0 1.2rem; }
.map-wrap svg { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; }

.chart-wrap { text-align: center; margin: .8rem 0 1rem; }
.chart-wrap svg { max-width: 100%; height: auto; }

/* ============================================================
   PALETTE DE QUESTIONS (bas d'écran)
   ============================================================ */
.palette {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: #fff; border-top: 2px solid var(--border);
  padding: .55rem .9rem .65rem; box-shadow: 0 -4px 14px rgba(23, 19, 20, .10);
}
.pal-inner { display: flex; align-items: center; gap: .9rem; max-width: 72rem; margin: 0 auto; }
.pal-parts { flex: 1; display: flex; gap: .9rem; overflow-x: auto; padding-bottom: .15rem; }
.pal-group { display: flex; align-items: center; gap: .28rem; }
.pal-group .pg-label { font-size: .72rem; font-weight: 700; color: var(--text-soft); margin-right: .2rem; white-space: nowrap; }
.pal-num {
  min-width: 1.85rem; height: 1.85rem; padding: 0 .2rem;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border); border-radius: 6px; background: #fff;
  font-size: .85rem; font-weight: 700; color: var(--text); position: relative;
}
.pal-num:hover { border-color: var(--accent); }
.pal-num.answered { background: var(--iv-navy); border-color: var(--iv-navy); color: #fff; }
.pal-num.flagged::after {
  content: ""; position: absolute; top: -4px; right: -4px; width: 10px; height: 10px;
  background: var(--flag); border-radius: 99px; border: 2px solid #fff;
}
.pal-actions { display: flex; align-items: center; gap: .55rem; flex: 0 0 auto; }
.flag-toggle { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; font-weight: 600; color: var(--text-soft); cursor: pointer; white-space: nowrap; }
.flag-toggle input { accent-color: var(--flag); transform: scale(1.2); }

/* ============================================================
   WRITING
   ============================================================ */
.essay-box { display: flex; flex-direction: column; height: 100%; }
textarea.essay {
  flex: 1; width: 100%; min-height: 46vh; resize: vertical;
  border: 1.5px solid var(--border); border-radius: 8px; padding: .9rem 1rem;
  font-size: 1.02rem; line-height: 1.6;
}
textarea.essay:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.essay-meta { display: flex; justify-content: space-between; align-items: center; margin-top: .5rem; color: var(--text-soft); font-size: .9rem; }
.wcount { font-weight: 700; color: var(--iv-navy); }
.wcount.low { color: var(--ko); }
.wcount.ok { color: var(--green); }
.task-prompt h3 { color: var(--iv-navy); margin-bottom: .5rem; }
.task-prompt .tp-box { background: var(--tint); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.2rem; margin: .8rem 0; }
.task-prompt .tp-time { font-size: .88rem; color: var(--text-soft); margin-bottom: .8rem; }

/* ============================================================
   SPEAKING
   ============================================================ */
.speak-wrap { max-width: 46rem; margin: 0 auto; }
.cue-card {
  background: #fffdf5; border: 2px solid #e3d9b3; border-radius: var(--iv-radius);
  padding: 1.3rem 1.5rem; margin: 1rem 0;
}
.cue-card h3 { color: var(--iv-navy); margin-bottom: .6rem; }
.cue-card ul { margin: .5rem 0 .5rem 1.3rem; }
.speak-timer {
  font-size: 2.4rem; font-weight: 800; text-align: center; color: var(--iv-navy);
  font-variant-numeric: tabular-nums; margin: .8rem 0;
}
.speak-timer.warn { color: var(--ko); }
.speak-phase { text-align: center; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; }
.rec-controls { display: flex; gap: .7rem; justify-content: center; margin: 1rem 0; flex-wrap: wrap; }
.rec-dot { display: inline-block; width: 10px; height: 10px; background: var(--ko); border-radius: 99px; margin-right: .4rem; animation: timerflash 1.2s steps(2) infinite; }
.rec-list { margin-top: 1rem; }
.rec-list .rec-item { display: flex; align-items: center; gap: .8rem; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: .5rem .9rem; margin-bottom: .5rem; }
.rec-list audio { height: 34px; flex: 1; }
.q-list-card { background: #fff; border: 1px solid var(--border); border-radius: var(--iv-radius); box-shadow: var(--card-shadow); padding: 1.2rem 1.4rem; margin-bottom: 1rem; }
.q-list-card h4 { color: var(--iv-navy); margin-bottom: .5rem; }
.q-list-card li { margin-bottom: .4rem; }

/* ============================================================
   RÉSULTATS
   ============================================================ */
.results { max-width: 56rem; margin: 0 auto; padding-bottom: 3rem; }
.res-hero {
  background: linear-gradient(135deg, var(--navy-2), var(--iv-navy));
  color: #fff; border-radius: var(--iv-radius); padding: 1.8rem 2rem; text-align: center;
  margin-bottom: 1.5rem;
}
.res-hero .rh-mod { text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; opacity: .8; }
.band-big { font-size: 3.4rem; font-weight: 800; line-height: 1.1; margin: .3rem 0; }
.band-big small { font-size: 1.1rem; font-weight: 600; opacity: .8; }
.res-raw { font-size: 1.05rem; opacity: .9; }
.res-cols { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.res-note { flex: 1 1 240px; background: #fff; border: 1px solid var(--border); border-radius: var(--iv-radius); padding: 1rem 1.2rem; font-size: .93rem; color: var(--text-soft); }
.res-note b { color: var(--text); }

.res-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--iv-radius); overflow: hidden; box-shadow: var(--card-shadow); }
.res-table th, .res-table td { padding: .5rem .8rem; border-bottom: 1px solid var(--tint-2); font-size: .93rem; text-align: left; vertical-align: top; }
.res-table th { background: var(--tint-2); color: var(--text-soft); }
.res-table td.ok { color: var(--green); font-weight: 700; }
.res-table td.ko { color: var(--ko); font-weight: 700; }
.res-table .given-empty { color: var(--text-soft); font-style: italic; }
.res-table tr.expl-row td {
  background: var(--tint); color: var(--text); font-size: .88rem;
  padding: .45rem .9rem .65rem 2rem; border-bottom: 1px solid var(--border);
}
.res-table tr.expl-row td::before { content: "💡 "; }

.transcripts { margin-top: 1.6rem; }
.transcripts details { background: #fff; border: 1px solid var(--border); border-radius: 8px; margin-bottom: .6rem; padding: .7rem 1rem; }
.transcripts summary { font-weight: 700; color: var(--iv-navy); cursor: pointer; }
.transcripts .tr-line { margin: .45rem 0; }
.transcripts .tr-line b { color: var(--iv-navy); }

.sample-box { background: #f4f9f4; border: 1px solid #bcd9c2; border-radius: var(--iv-radius); padding: 1.1rem 1.3rem; margin: 1rem 0; }
.sample-box h4 { color: var(--green); margin-bottom: .5rem; }
.sample-box p { margin-bottom: .7rem; }
.crit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem; margin: 1rem 0; }
.crit-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: .8rem 1rem; font-size: .9rem; }
.crit-card b { color: var(--iv-navy); display: block; margin-bottom: .3rem; }

.res-actions { display: flex; gap: .8rem; justify-content: center; margin: 1.8rem 0 .5rem; flex-wrap: wrap; }

.copyline {
  text-align: center; color: var(--text-soft); font-size: .75rem;
  margin: 1.4rem auto .3rem; max-width: 44rem; line-height: 1.5;
}

/* check phase (listening) */
.check-banner {
  background: var(--tint-2); border: 1px solid var(--tint-line); color: var(--navy-2);
  border-radius: 8px; padding: .7rem 1rem; margin-bottom: 1rem; font-weight: 600; text-align: center;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .split { flex-direction: column; height: auto; }
  .split-left { flex: none; max-height: 45vh; border-right: none; border-bottom: 3px solid var(--border); }
  .th-user { display: none; }
  .test-body { padding-bottom: 9rem; }
}
@media (max-width: 560px) {
  .home-hero h1, .home-hero h2 { font-size: 1.5rem; }
  .th-brand { font-size: .9rem; }
  .th-timer { font-size: 1rem; }
  input.gap { width: 8rem; }
}

/* ============================================================
   MODULE « PLUS » — objectif, examen complet, carnet d'erreurs,
   surlignage, gestion du temps, NCLC (ajouté le 11/08/2026)
   ============================================================ */

/* --- bandeau objectif --- */
.target-row { background: var(--tint-2); border: 1.5px solid var(--tint-line); border-radius: 12px;
  padding: .8rem 1rem; margin-bottom: 1.2rem; text-align: center; }
.target-row label { font-weight: 600; color: var(--iv-navy); }
.target-row select { border: 1.5px solid var(--border); border-radius: 8px; padding: .35rem .6rem;
  font-weight: 600; color: var(--iv-navy); max-width: 100%; }
.target-note { margin: .55rem 0 0; font-size: .85rem; color: var(--text-soft); line-height: 1.45; }

/* --- carte examen complet --- */
.full-card { margin: 1.4rem 0; padding: 1.2rem 1.3rem; border-radius: 14px;
  border: 2px solid var(--iv-navy); background: linear-gradient(180deg, var(--tint), var(--tint-2)); text-align: center; }
.full-card h3 { color: var(--iv-navy); margin: 0 0 .5rem; font-size: 1.15rem; }
.full-card p { color: var(--text); font-size: .93rem; line-height: 1.55; margin: 0 auto 1rem; max-width: 46rem; }

/* --- points faibles + carnet --- */
.weak-box { margin: 1.4rem 0; padding: 1.1rem 1.2rem; border: 1.5px solid var(--border);
  border-radius: 14px; background: #fff; }
.weak-box h2 { color: var(--iv-navy); font-size: 1.05rem; margin: 0 0 .7rem; }
.wk-list { list-style: none; margin: 0 0 .6rem; padding: 0; }
.wk-list li { display: flex; align-items: center; gap: .7rem; padding: .35rem 0; flex-wrap: wrap; }
.wk-ty { flex: 1 1 12rem; font-weight: 600; color: var(--iv-navy); font-size: .92rem; }
.wk-bar { flex: 1 1 8rem; height: 10px; background: var(--border); border-radius: 6px; overflow: hidden; }
.wk-bar i { display: block; height: 100%; background: var(--ko); }
.wk-pct { font-size: .85rem; color: var(--text-soft); white-space: nowrap; }
.wk-pct small { color: var(--text-soft); }
.wk-note { font-size: .82rem; color: var(--text-soft); margin: .3rem 0 .8rem; }
.nb-block { border: 1.5px solid var(--border); border-radius: 12px; background: #fff;
  margin: .8rem 0; padding: .3rem .9rem; }
.nb-block > summary { cursor: pointer; padding: .55rem 0; color: var(--iv-navy); }
.nb-item { border-top: 1px solid var(--border); padding: .6rem 0; }
.nb-head { font-size: .82rem; color: var(--text-soft); margin-bottom: .25rem; }
.nb-head span { color: var(--text-soft); }
.nb-line { font-size: .92rem; color: var(--text); }
.nb-expl { font-size: .88rem; color: var(--iv-navy); background: var(--tint); border-left: 3px solid var(--tint-line);
  padding: .45rem .7rem; border-radius: 0 6px 6px 0; margin-top: .35rem; line-height: 1.5; }

/* --- Réponse type du Speaking (13/08/2026) ---
   L'équivalent oral de la correction type du TCF. Repliée par défaut : le candidat
   doit d'abord se réécouter, et seulement ensuite comparer. L'avertissement
   « ne pas apprendre par cœur » est en tête et en rouge — au vrai IELTS, une
   réponse récitée est repérée et sanctionnée. */
.sp-avert { background: #fdecec; border: 1px solid #f3c2bd; color: #8a1c1c; border-radius: 8px;
  padding: .7rem .9rem; font-size: .88rem; line-height: 1.55; margin-bottom: .7rem; }
.sp-cadre { font-size: .9rem; color: var(--text-soft); line-height: 1.6; margin-bottom: .8rem; }
.sp-modele { border: 1.5px solid var(--border); border-radius: 12px; background: #fff;
  margin: .6rem 0; padding: .3rem .9rem; }
.sp-modele > summary { cursor: pointer; padding: .6rem 0; color: var(--iv-navy); font-weight: 600; }
.sp-modele[open] > summary { border-bottom: 1px solid var(--border); margin-bottom: .6rem; }
.sp-q { font-size: .9rem; color: var(--text-soft); font-style: italic; margin: 0 0 .6rem; }
.sp-notes { font-size: .87rem; color: var(--iv-navy); background: var(--tint);
  border-left: 3px solid var(--tint-line); border-radius: 0 6px 6px 0;
  padding: .5rem .75rem; margin-bottom: .7rem; line-height: 1.55; }
.sp-rep { font-size: .95rem; color: var(--text); line-height: 1.7; }
.sp-rep p { margin: 0 0 .7rem; }
.sp-pourquoi { font-size: .87rem; color: #6b5210; background: #fdf7e7; border-left: 3px solid var(--flag);
  border-radius: 0 6px 6px 0; padding: .55rem .8rem; margin: .3rem 0 .7rem; line-height: 1.6; }

/* Correction d'un sujet de la banque : elle ne s'ouvre qu'au clic, une fois le
   travail fait. Encadrée pour qu'on la distingue nettement du sujet lui-même. */
.bank-corr { margin: 1.2rem 0 .4rem; border: 1.5px solid var(--tint-line); border-radius: 12px;
  background: var(--tint); padding: 1rem 1.2rem; }
.bank-corr h3 { color: var(--iv-navy); font-size: 1.05rem; margin: 0 0 .7rem; }
.bank-corr .sp-rep { background: #fff; border-radius: 8px; padding: .8rem 1rem; }

/* --- passerelle NCLC --- */
.clb-box { border: 1.5px solid var(--tint-line); background: var(--tint); border-radius: 12px;
  padding: .9rem 1.1rem; margin: 1rem 0; }
.clb-box h3 { color: var(--iv-navy); font-size: 1rem; margin: 0 0 .45rem; }
.clb-box p { margin: .3rem 0; color: var(--text); font-size: .93rem; line-height: 1.55; }
.clb-note { font-size: .82rem !important; color: var(--text-soft) !important; }
.clb-verdict { margin: .6rem 0 .2rem; padding: .55rem .8rem; border-radius: 8px;
  font-weight: 600; font-size: .93rem; }
.clb-verdict.ok { background: #E9F8EF; color: var(--green); }
.clb-verdict.ko { background: #FBEAE8; color: var(--ko); }
.clb-verdict span { font-weight: 400; color: var(--text-soft); font-size: .85rem; }

/* --- orthographe --- */
.spell-box { border: 1.5px solid #f0d9a8; background: #fffaf0; border-radius: 12px;
  padding: .9rem 1.1rem; margin: 1rem 0; }
.spell-box h3 { color: #8a5d00; font-size: 1rem; margin: 0 0 .4rem; }
.spell-box p { font-size: .92rem; color: var(--text); margin: .25rem 0; line-height: 1.5; }
.spell-box ul { margin: .5rem 0 .3rem 1.1rem; font-size: .92rem; }
.spell-box li { margin: .2rem 0; }
.spell-box b.bad { color: var(--ko); } .spell-box b.good { color: var(--green); }
.spell-note { font-size: .88rem !important; font-weight: 600; color: #8a5d00 !important; }

/* --- gestion du temps --- */
.time-box { margin: 1.2rem 0; }
.time-box h3 { color: var(--iv-navy); font-size: 1rem; margin: 0 0 .5rem; }
.time-note { font-size: .85rem; color: var(--text-soft); margin-top: .4rem; line-height: 1.5; }

/* --- surlignage du Reading --- */
.hl-bar { position: sticky; top: 0; z-index: 5; background: var(--tint); border-bottom: 1px solid var(--border);
  padding: .4rem .6rem; font-size: .8rem; color: var(--text-soft); display: flex; align-items: center; gap: .5rem; }
.hl-bar b { color: var(--iv-navy); }
.hl-clear { margin-left: auto; border: 1px solid var(--border); background: #fff; border-radius: 6px;
  padding: .18rem .55rem; font-size: .78rem; cursor: pointer; color: var(--iv-navy); }
.hl-clear:hover { background: var(--tint-2); }
mark.hl { background: #ffe680; padding: 0 .05em; border-radius: 2px; cursor: pointer; }
mark.hl:hover { background: #ffd633; }

/* --- vérification du son --- */
.sound-check { border: 1.5px solid var(--tint-line); background: var(--tint); border-radius: 10px;
  padding: .7rem .9rem; margin: .7rem 0; font-size: .9rem; color: var(--text); }
.sound-check b { color: var(--iv-navy); }
.sound-check small { display: block; margin-top: .4rem; color: var(--text-soft); font-size: .82rem; }
.sc-row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .55rem; }

/* --- bouton « écouter la question » (Speaking) --- */
.say-btn { border: none; background: transparent; cursor: pointer; font-size: .95rem;
  margin-left: .4rem; opacity: .55; padding: 0 .15rem; }
.say-btn:hover { opacity: 1; }
.say-btn.saying { opacity: 1; animation: sayPulse .6s ease-in-out infinite alternate; }
@keyframes sayPulse { from { transform: scale(1); } to { transform: scale(1.25); } }

/* --- relevé de l'examen complet --- */
.res-table.trf td:first-child { font-weight: 600; color: var(--iv-navy); }
.ov-box { border: 1.5px solid var(--border); border-radius: 12px; background: #fff;
  padding: 1rem 1.1rem; margin: 1.1rem 0; }
.ov-box h3 { color: var(--iv-navy); font-size: 1rem; margin: 0 0 .5rem; }
.ov-box p { font-size: .92rem; color: var(--text); line-height: 1.55; margin: .3rem 0; }
.bi-row { display: flex; gap: 1.2rem; flex-wrap: wrap; margin: .8rem 0; }
.bi { display: flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--iv-navy); }
.bi select { border: 1.5px solid var(--border); border-radius: 8px; padding: .3rem .55rem;
  font-weight: 600; color: var(--iv-navy); }
.ov-note { font-size: .84rem !important; color: var(--text-soft) !important; }
.ov-wait { font-style: italic; color: var(--text-soft) !important; }

/* --- révision ciblée par type de question --- */
.rev-promo { border-color: #a8791f; background: linear-gradient(180deg, #fffdf7, #fdf3e0); }
.rev-promo h3 { color: #8a5d00; }
.rev-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: .8rem; margin: 1rem 0; }
.rev-card { text-align: left; border: 1.5px solid var(--border); background: #fff; border-radius: 12px;
  padding: .8rem .9rem; cursor: pointer; display: flex; flex-direction: column; gap: .25rem; }
.rev-card:hover:not([disabled]) { border-color: var(--iv-navy); background: var(--tint); }
.rev-card[disabled] { opacity: .45; cursor: not-allowed; }
.rev-card b { color: var(--iv-navy); font-size: .95rem; }
.rev-card span { font-size: .82rem; color: var(--text-soft); }
.rev-src { background: var(--tint-2); border-bottom: 1px solid var(--border); padding: .4rem .7rem;
  font-size: .82rem; color: var(--iv-navy); font-weight: 600; position: sticky; top: 0; z-index: 5; }
.rev-prog { font-size: .85rem; color: var(--text-soft); margin-bottom: .6rem; font-weight: 600; }
.rev-actions { margin: 1.2rem 0 2rem; display: flex; justify-content: center; }
.rev-result { border: 1.5px solid var(--tint-line); background: var(--tint); border-radius: 12px;
  padding: .8rem 1rem; margin-bottom: 1rem; }
.rev-result > b { color: var(--iv-navy); display: block; margin-bottom: .5rem; font-size: 1.05rem; }

/* --- banque d'entraînement (essais, lettres, cue cards) --- */
.bank-promo { border-color: #7a4a86; background: linear-gradient(180deg, #fdfaff, #f5eef7); }
.bank-promo h3 { color: #6b3d78; }
.bank-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.bank-prompt { border: 1.5px solid var(--border); border-radius: 12px; background: #fff;
  padding: 1rem 1.1rem; margin-bottom: .8rem; }
.bank-prompt p { font-size: 1.02rem; line-height: 1.6; color: var(--text); margin: 0; }
.bank-tag { display: inline-block; background: var(--tint-2); color: var(--iv-navy); border-radius: 20px;
  padding: .18rem .7rem; font-size: .76rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: .6rem; }
.bank-hint { border-left: 4px solid #a8791f; background: #fffaf0; border-radius: 0 8px 8px 0;
  padding: .6rem .9rem; margin-bottom: .8rem; font-size: .92rem; color: var(--text); line-height: 1.55; }
.bank-hint b { color: #8a5d00; }
.bank-hint ul { margin: .4rem 0 0 1.1rem; }
.bank-hint li { margin: .15rem 0; }
