:root {
  color-scheme: dark;
  --ink: #f7fbff;
  --muted: #a9bdd0;
  --night: #06192e;
  --night-2: #0a2742;
  --panel: rgba(8, 36, 60, 0.92);
  --line: rgba(255, 255, 255, 0.13);
  --turquoise: #49e0d0;
  --coral: #ff7a68;
  --gold: #ffc85b;
  --blue: #72b7ff;
  --success: #58d79b;
  --danger: #ff8b86;
  --shadow: 0 24px 70px rgba(0, 9, 20, 0.38);
  font-family: Inter, ui-rounded, "Avenir Next", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html { min-height: 100%; background: var(--night); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 0%, rgba(51, 188, 190, 0.18), transparent 34rem),
    linear-gradient(145deg, #041428 0%, #08243d 55%, #071a2d 100%);
}

button, input { font: inherit; }
button { color: inherit; }

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 46px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: #062338;
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--turquoise), #9af8e9);
  box-shadow: 0 10px 24px rgba(73, 224, 208, 0.25);
}

.brand-copy { text-align: left; }
.brand-copy strong { display: block; font-size: 1.05rem; letter-spacing: .01em; }
.brand-copy span { color: var(--muted); font-size: .84rem; }

.student-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
}

.student-chip span { color: var(--muted); font-size: .85rem; }
.student-chip strong { font-size: .95rem; }

.icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #08223d;
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3,18,35,.97) 0%, rgba(3,18,35,.86) 33%, rgba(3,18,35,.18) 70%),
    url("./assets/escale-lecture-hero.png") center/cover no-repeat;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(560px, 60%);
  padding: 52px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 13px;
  padding: 7px 11px;
  border: 1px solid rgba(73,224,208,.35);
  border-radius: 999px;
  color: #a3fff3;
  background: rgba(73,224,208,.1);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 14px; font-size: clamp(2.5rem, 5vw, 4.7rem); line-height: .95; letter-spacing: -.055em; }
.hero p { color: #d2e1ed; font-size: 1.08rem; line-height: 1.65; }

.name-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}

.name-form input {
  min-width: 0;
  flex: 1;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px;
  outline: none;
  color: white;
  background: rgba(0,0,0,.22);
}

.name-form input:focus { border-color: var(--turquoise); box-shadow: 0 0 0 3px rgba(73,224,208,.16); }

.primary-button, .secondary-button {
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 0;
  font-weight: 850;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, background .18s ease;
}

.primary-button { color: #052337; background: linear-gradient(135deg, var(--turquoise), #9cf9eb); }
.secondary-button { border: 1px solid var(--line); background: rgba(255,255,255,.07); }
.primary-button:hover, .secondary-button:hover, .category-card:hover { transform: translateY(-2px); filter: brightness(1.05); }
.primary-button:disabled { cursor: not-allowed; opacity: .45; transform: none; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 38px 2px 16px;
}

.section-heading h2 { margin-bottom: 4px; font-size: 1.55rem; }
.section-heading p { margin: 0; color: var(--muted); }

.categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  text-align: left;
  background: linear-gradient(145deg, rgba(15,56,85,.95), rgba(7,31,53,.95));
  box-shadow: 0 16px 38px rgba(0,10,25,.18);
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -62px;
  top: -70px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .13;
}

.category-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 22px;
  border-radius: 16px;
  color: #061a2c;
  background: var(--accent);
  font-size: 1.45rem;
}

.category-card h3 { margin-bottom: 9px; font-size: 1.25rem; }
.category-card p { max-width: 36ch; color: var(--muted); line-height: 1.5; }
.category-footer { width: 100%; margin-top: auto; }

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #d7e6f0;
  font-size: .85rem;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  margin-top: 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent, var(--turquoise));
}

.welcome-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(255,200,91,.2);
  border-radius: 18px;
  color: #eaf2f8;
  background: rgba(255,200,91,.08);
}

.welcome-note strong { color: var(--gold); }

.screen {
  width: min(880px, 100%);
  margin: 34px auto 0;
}

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.back-button {
  border: 0;
  padding: 10px 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 750;
}

.question-card, .result-card, .intro-card {
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.intro-card { text-align: center; }
.intro-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  border-radius: 23px;
  color: #061a2c;
  font-size: 2rem;
  background: var(--accent);
}

.intro-card h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.intro-card > p { max-width: 610px; margin-inline: auto; color: var(--muted); line-height: 1.65; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 28px 0; }
.step { padding: 14px; border-radius: 15px; background: rgba(255,255,255,.055); color: #d9e6ef; font-size: .9rem; }

.question-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: .9rem;
}

.place-tag {
  padding: 6px 10px;
  border-radius: 999px;
  color: #bdf9f0;
  background: rgba(73,224,208,.09);
}

.source-box {
  margin-bottom: 26px;
  padding: 24px;
  border-left: 4px solid var(--accent, var(--turquoise));
  border-radius: 5px 18px 18px 5px;
  color: #f8fbfd;
  background: rgba(255,255,255,.055);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.12rem, 2.4vw, 1.35rem);
  line-height: 1.7;
}

.document-source {
  font-family: Inter, ui-rounded, "Avenir Next", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

.document-source h3 { margin: 0 0 10px; font-size: 1.25rem; }
.document-source h4 { margin: 14px 0 6px; color: var(--gold); }
.document-source p { margin: 6px 0; }
.document-source small { color: var(--muted); }
.document-source table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.document-source th, .document-source td { padding: 9px 10px; border: 1px solid rgba(255,255,255,.18); text-align: left; }
.document-source th { color: #061a2c; background: var(--accent); }
.document-source ul, .document-source ol { margin: 8px 0; padding-left: 22px; }
.document-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.document-panel { padding: 14px; border: 1px solid rgba(255,255,255,.15); border-radius: 14px; background: rgba(255,255,255,.045); }
.doc-route { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.doc-stop { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.09); }
.doc-arrow { color: var(--gold); font-weight: 900; }
.doc-bars { display: grid; gap: 8px; margin-top: 12px; }
.doc-bar { display: grid; grid-template-columns: 90px 1fr 52px; gap: 8px; align-items: center; }
.doc-bar-track { height: 18px; overflow: hidden; border-radius: 6px; background: rgba(255,255,255,.09); }
.doc-bar-fill { height: 100%; width: var(--value); background: var(--accent); }
.doc-note { padding: 12px; border-left: 4px solid var(--gold); background: rgba(255,200,91,.08); }

@media (max-width: 640px) {
  .document-grid { grid-template-columns: 1fr; }
  .doc-bar { grid-template-columns: 72px 1fr 44px; }
}

.source-selectable {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.text-fragment {
  display: inline;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: inherit;
  background: rgba(255,255,255,.04);
  font: inherit;
  line-height: 1.45;
  cursor: pointer;
}

.text-fragment:hover { border-color: rgba(73,224,208,.5); }
.text-fragment.selected { border-color: var(--turquoise); background: rgba(73,224,208,.15); }
.text-fragment.correct { border-color: var(--success); background: rgba(88,215,155,.17); }
.text-fragment.wrong { border-color: var(--danger); background: rgba(255,139,134,.15); }

.micro-instruction {
  margin: -6px 0 4px;
  color: var(--muted);
  line-height: 1.5;
}

.instruction {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.question-card h2 { margin-bottom: 18px; font-size: clamp(1.35rem, 3vw, 1.75rem); line-height: 1.35; }

.options {
  display: grid;
  gap: 10px;
}

.order-list {
  display: grid;
  gap: 10px;
}

.order-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.045);
}

.order-item.correct { border-color: var(--success); background: rgba(88,215,155,.12); }
.order-item.wrong { border-color: var(--danger); background: rgba(255,139,134,.1); }
.order-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #062238;
  background: var(--gold);
  font-weight: 900;
}
.order-controls { display: flex; gap: 6px; }
.order-controls button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(255,255,255,.07);
  cursor: pointer;
}
.order-controls button:disabled { opacity: .3; cursor: default; }

.option {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  width: 100%;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  text-align: left;
  background: rgba(255,255,255,.045);
  cursor: pointer;
}

.option:hover { border-color: rgba(73,224,208,.48); background: rgba(73,224,208,.07); }
.option.selected { border-color: var(--turquoise); background: rgba(73,224,208,.12); }
.option.correct { border-color: var(--success); background: rgba(88,215,155,.12); }
.option.wrong { border-color: var(--danger); background: rgba(255,139,134,.11); }
.option-letter {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(255,255,255,.1);
  font-weight: 850;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.hint-button {
  padding: 10px 0;
  border: 0;
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  font-weight: 750;
}

.feedback {
  margin-top: 20px;
  padding: 18px;
  border-radius: 16px;
  line-height: 1.55;
}

.feedback.success { border: 1px solid rgba(88,215,155,.3); background: rgba(88,215,155,.1); }
.feedback.error { border: 1px solid rgba(255,139,134,.3); background: rgba(255,139,134,.1); }
.feedback strong { display: block; margin-bottom: 5px; }
.feedback p { margin: 0; color: #dbe7ef; }

.hint-box {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  color: #ffe9b7;
  background: rgba(255,200,91,.09);
}

.result-card { text-align: center; }
.result-score { margin: 20px 0 8px; font-size: clamp(4rem, 13vw, 7rem); font-weight: 900; letter-spacing: -.07em; }
.result-card p { color: var(--muted); line-height: 1.6; }
.stamp {
  display: inline-grid;
  place-items: center;
  width: 126px;
  height: 126px;
  margin: 20px;
  border: 4px double var(--gold);
  border-radius: 50%;
  color: var(--gold);
  transform: rotate(-7deg);
  font-weight: 900;
  text-transform: uppercase;
}

.result-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.evidence-result {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: min(430px, 100%);
  margin: 18px auto;
  padding: 16px;
  border: 1px solid rgba(73,224,208,.25);
  border-radius: 16px;
  color: #dcebf3;
  background: rgba(73,224,208,.08);
}

.evidence-result strong { color: #a3fff3; }
.evidence-result span { color: var(--muted); font-size: .9rem; }

.reset-panel {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.text-button { border: 0; color: var(--muted); background: transparent; cursor: pointer; text-decoration: underline; }

@media (max-width: 760px) {
  .app-shell { width: min(100% - 20px, 680px); padding-top: 12px; }
  .topbar { margin-bottom: 12px; }
  .brand-copy span { display: none; }
  .hero { min-height: 500px; align-items: flex-end; border-radius: 23px; }
  .hero::before {
    background:
      linear-gradient(0deg, rgba(3,18,35,.98) 0%, rgba(3,18,35,.86) 46%, rgba(3,18,35,.18) 82%),
      url("./assets/escale-lecture-hero.png") 68% center/cover no-repeat;
  }
  .hero-content { width: 100%; padding: 28px 22px; }
  .hero-content h1 { font-size: 2.65rem; }
  .name-form { flex-direction: column; align-items: stretch; }
  .categories { grid-template-columns: 1fr; }
  .category-card { min-height: 205px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .steps { grid-template-columns: 1fr; }
  .question-card, .intro-card, .result-card { padding: 22px 17px; border-radius: 21px; }
  .source-box { padding: 18px; }
  .actions { align-items: stretch; flex-direction: column-reverse; }
  .actions .primary-button { width: 100%; }
}

/* Refonte visuelle : lecture illustrée et indices */
.category-card.category-explicit{background:linear-gradient(145deg,#104e58,#082c3f)}
.category-card.category-links{background:linear-gradient(145deg,#163f6d,#092943)}
.category-card.category-words{background:linear-gradient(145deg,#5a431d,#1d3041)}
.category-card.category-infer{background:linear-gradient(145deg,#62353b,#162b40)}
.category-card.category-essential{background:linear-gradient(145deg,#493764,#172940)}
.category-card.category-documents{background:linear-gradient(145deg,#24563f,#112e39)}
.category-card.category-fluency{grid-column:1/-1;min-height:190px;background:linear-gradient(115deg,#623650,#172b42 62%,#123b54)}
.category-card.category-links .category-icon{border-radius:50% 50% 14px 50%}.category-card.category-words .category-icon{transform:rotate(-3deg);border-radius:10px 18px}.category-card.category-infer .category-icon{border-radius:50%;box-shadow:0 0 0 6px rgba(255,122,104,.12)}.category-card.category-essential .category-icon{border-radius:50% 12px}.category-card.category-documents .category-icon{border-radius:8px;box-shadow:7px 7px 0 rgba(126,227,155,.16)}
.reading-stage{display:grid;gap:14px;margin-bottom:26px}.reading-stage .source-box{margin-bottom:0}.scene-visual{position:relative;min-height:190px;overflow:hidden;margin:0;border:1px solid rgba(255,255,255,.14);border-radius:20px;background:#102f49}.scene-visual img{display:block;width:100%;height:100%;min-height:190px;object-fit:cover}.scene-visual figcaption{position:absolute;left:12px;bottom:12px;padding:6px 9px;border-radius:999px;color:#fff;background:rgba(3,19,34,.78);font-size:.78rem;font-weight:800;backdrop-filter:blur(8px)}
.layout-0 .reading-stage.illustrated{grid-template-columns:1fr}.layout-0 .scene-visual{min-height:245px}.layout-1 .reading-stage.illustrated{grid-template-columns:minmax(220px,.72fr) minmax(0,1.28fr);align-items:stretch}.layout-2 .reading-stage.illustrated{grid-template-columns:minmax(0,1.28fr) minmax(220px,.72fr);align-items:stretch}.layout-2 .scene-visual{order:2}
.focus-word{padding:.06em .25em .12em;border-radius:.38em;color:#062238;background:linear-gradient(120deg,#ffe58e,var(--gold));box-decoration-break:clone;-webkit-box-decoration-break:clone;box-shadow:0 0 0 2px rgba(255,200,91,.12)}
.reading-clue{padding:.04em .18em .09em;border-radius:.28em;color:#10243a;font-weight:750;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.reading-clue.clue-0{background:#d9b8ff;box-shadow:0 0 0 2px rgba(191,140,255,.13)}
.reading-clue.clue-1{background:#9cebdd;box-shadow:0 0 0 2px rgba(73,224,208,.12)}
.reading-clue.clue-2{background:#ffe08a;box-shadow:0 0 0 2px rgba(255,200,91,.12)}
.evidence-reveal{margin-top:13px;padding-top:12px;border-top:1px dashed rgba(255,255,255,.2);animation:evidenceIn .35s ease both}.evidence-title{display:block;margin-bottom:8px;color:#bfeee7;font-size:.78rem;font-weight:850;letter-spacing:.04em;text-transform:uppercase}.evidence-reveal>div{display:flex;flex-wrap:wrap;gap:7px}.evidence-reveal mark{padding:5px 8px;border-radius:9px;color:#062238;background:#9cf3df;font-size:.88rem;font-weight:750}@keyframes evidenceIn{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
.visual-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.option.visual-option{display:grid;overflow:hidden;padding:0;align-content:start}.visual-option>img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;background:#102f49}.visual-option-copy{display:flex;align-items:center;gap:11px;min-height:66px;padding:12px 14px}.feedback-visual,.answer-confirmation{overflow:hidden;margin:16px 0 0;border:1px solid rgba(255,255,255,.2);border-radius:16px;background:rgba(4,25,42,.44)}.feedback-visual img,.answer-confirmation img{display:block;width:100%;max-height:390px;object-fit:cover}.feedback-visual figcaption,.answer-confirmation figcaption{padding:10px 13px;color:#dcebf3;font-size:.86rem;font-weight:800}.answer-confirmation{margin:0 0 22px}.answer-confirmation figcaption{color:#ffe7bb;background:rgba(255,200,91,.08)}
.question-card,.intro-card{position:relative;overflow:hidden}.question-card::before,.intro-card::before{content:"";position:absolute;inset:0 0 auto;height:5px;background:linear-gradient(90deg,var(--accent),transparent 75%)}
.category-explicit{--cat-soft:rgba(73,224,208,.08)}.category-links{--cat-soft:rgba(114,183,255,.09)}.category-words{--cat-soft:rgba(255,200,91,.09)}.category-infer{--cat-soft:rgba(255,122,104,.09)}.category-essential{--cat-soft:rgba(191,140,255,.09)}.category-documents{--cat-soft:rgba(126,227,155,.1)}.category-fluency{--cat-soft:rgba(255,159,199,.11)}
.category-card.category-fluency .category-icon{border-radius:50%;box-shadow:0 0 0 7px rgba(255,159,199,.12)}
.fluency-card-footer{display:grid;gap:5px;padding-top:13px;border-top:1px solid rgba(255,255,255,.14)}.fluency-card-footer span{color:#ffc5dd;font-size:.8rem;font-weight:850;text-transform:uppercase;letter-spacing:.06em}.fluency-card-footer strong{font-size:.92rem}
.fluency-intro{background:radial-gradient(circle at 86% 15%,rgba(255,159,199,.17),transparent 24rem),linear-gradient(145deg,#182d47,#0b2339)}.fluency-steps{grid-template-columns:repeat(3,1fr)}
.fluency-progress .progress-fill{background:linear-gradient(90deg,#ff9fc7,#ffd2e5)}
.fluency-workshop{background:radial-gradient(circle at 100% 0,rgba(255,159,199,.12),transparent 28rem),#0b2841}.fluency-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:20px 0 16px}.fluency-heading h2{max-width:28ch}.voice-badge{display:grid;place-items:center;flex:0 0 auto;width:62px;height:62px;border:0;border-radius:20px;color:inherit;background:rgba(255,159,199,.14);font:inherit;font-size:1.75rem}.voice-record-button{cursor:pointer;box-shadow:0 0 0 0 rgba(255,159,199,0);transition:transform .18s ease,background .18s ease,box-shadow .18s ease}.voice-record-button:hover{transform:translateY(-2px);background:rgba(255,159,199,.24);box-shadow:0 0 0 6px rgba(255,159,199,.08)}.voice-record-button:focus-visible{outline:3px solid #ffd4e5;outline-offset:4px}.voice-record-button.is-recording{color:#fff;background:#d9576b;box-shadow:0 0 0 7px rgba(217,87,107,.15);animation:recording-pulse 1.4s ease-in-out infinite}.voice-record-button:disabled{cursor:not-allowed;opacity:.58;transform:none;box-shadow:none;animation:none}@keyframes recording-pulse{50%{box-shadow:0 0 0 13px rgba(217,87,107,.04)}}
.punctuation-legend{display:flex;flex-wrap:wrap;gap:9px;margin:0 0 16px;padding:14px;border:1px solid rgba(255,255,255,.11);border-radius:16px;background:rgba(255,255,255,.035)}.punctuation-legend span{display:flex;align-items:center;gap:7px;color:#dce7ef;font-size:.86rem}.legend-dot{display:inline-grid;place-items:center;min-width:31px;height:31px;padding:0 7px;border-radius:9px;color:#071d35;font-family:Georgia,serif;font-size:1.25rem}
.pause{background:#79e2c5}.stop{background:#7ebcff}.question{background:#ffd369}.exclamation{background:#ff8d78}.quote{background:#d6a8ff}
.fluency-text{padding:clamp(20px,4vw,38px);border:1px solid rgba(255,255,255,.14);border-radius:22px;background:linear-gradient(145deg,#f8fbff,#eaf3fb);box-shadow:0 20px 45px rgba(0,8,20,.22);color:#172c3d;font-family:Georgia,"Times New Roman",serif;font-size:clamp(1.18rem,2.4vw,1.55rem);line-height:1.85}.fluency-text p{margin:0 0 1em}.fluency-text p:last-child{margin-bottom:0}.reading-token{display:inline-block;white-space:nowrap}.punctuation{display:inline-grid;place-items:center;min-width:.85em;margin:0 .05em;padding:0 .12em;border-radius:.3em;color:#0a2033;font-family:Georgia,"Times New Roman",serif;font-weight:900;line-height:1.18;box-shadow:0 2px 0 rgba(7,29,53,.13)}
.fluency-tip{margin-top:17px;padding:15px 17px;border-left:5px solid #ff9fc7;border-radius:14px;background:rgba(255,159,199,.08);color:#e9f1f6;line-height:1.55}.audio-coach{display:grid;grid-template-columns:minmax(220px,1fr) minmax(280px,1.2fr);align-items:center;gap:22px;margin-top:18px;padding:20px;border:1px solid rgba(255,159,199,.25);border-radius:18px;background:linear-gradient(135deg,rgba(255,159,199,.12),rgba(114,183,255,.07))}.audio-coach div{display:grid;gap:6px}.audio-coach strong{color:#ffc5dd;font-size:1.1rem}.audio-coach span{color:#cbdbe7;line-height:1.5}.audio-coach audio{width:100%;accent-color:#ff9fc7}.fluency-actions{margin-top:20px}
.fluency-library{padding:clamp(20px,4vw,38px)}.fluency-library-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:24px}.fluency-library-heading h1{margin-bottom:10px;font-size:clamp(2rem,5vw,3.4rem)}.fluency-library-heading p:last-child{max-width:62ch;color:var(--muted);line-height:1.55}.fluency-text-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.fluency-text-card{position:relative;min-height:235px;overflow:hidden;padding:0;border:1px solid rgba(255,255,255,.14);border-radius:20px;text-align:left;background:#102d46;cursor:pointer;box-shadow:0 14px 30px rgba(0,10,24,.2);transition:transform .18s ease,filter .18s ease}.fluency-text-card:hover{transform:translateY(-3px);filter:brightness(1.07)}.fluency-text-card img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.fluency-card-shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(3,16,29,.03) 20%,rgba(3,16,29,.95) 92%)}.fluency-card-number{position:absolute;top:14px;left:14px;display:grid;place-items:center;width:42px;height:42px;border-radius:13px;color:#102437;background:#ffb6d4;font-size:.86rem;font-weight:900}.fluency-card-copy{position:absolute;inset:auto 17px 17px;display:grid;gap:5px}.fluency-card-copy small{color:#d7e5ee;font-size:.78rem;font-weight:750}.fluency-card-copy strong{font-size:1.28rem;line-height:1.13}.fluency-card-copy b{justify-self:start;padding:5px 8px;border-radius:999px;color:#102437;background:#ffd4e5;font-size:.76rem}
.fluency-cover{position:relative;min-height:285px;overflow:hidden;margin:18px 0 24px;border:1px solid rgba(255,255,255,.13);border-radius:22px;background:#102d46}.fluency-cover img{display:block;width:100%;height:360px;object-fit:cover}.fluency-cover::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 38%,rgba(3,16,29,.92))}.fluency-cover figcaption{position:absolute;z-index:1;inset:auto 24px 22px;display:grid;grid-template-columns:auto 1fr auto;align-items:end;gap:12px;color:#fff}.fluency-cover figcaption span{grid-column:1/-1;color:#ffc7de;font-size:.78rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.fluency-cover figcaption strong{font-size:clamp(1.7rem,4vw,2.8rem);line-height:1}.fluency-cover figcaption b{padding:7px 10px;border-radius:999px;color:#12283b;background:#ffd4e5;font-size:.8rem;white-space:nowrap}
.recording-studio{margin-top:20px;padding:20px;border:1px solid rgba(255,159,199,.28);border-radius:20px;background:linear-gradient(135deg,rgba(255,159,199,.11),rgba(114,183,255,.07))}.recording-copy{display:flex;align-items:center;gap:12px}.recording-copy>div{display:grid;gap:3px}.recording-copy strong{color:#ffd0e3;font-size:1.1rem}.recording-copy span{color:#c7d8e5;font-size:.88rem}.recording-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;color:#ff6f86;background:rgba(255,111,134,.13);font-size:1rem;box-shadow:0 0 0 6px rgba(255,111,134,.06)}.recording-controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:18px}.record-button,.stop-button{min-height:46px;padding:11px 16px;border:0;border-radius:13px;font-weight:850;cursor:pointer}.record-button{color:#192538;background:linear-gradient(135deg,#ff9fc7,#ffd4e5)}.stop-button{color:#fff;background:#d9576b}.record-button:disabled,.stop-button:disabled{opacity:.42;cursor:not-allowed}.recording-timer{margin-left:auto;font-variant-numeric:tabular-nums;font-size:1.15rem;font-weight:900}.recording-message{margin-top:13px;color:#cbdbe7;line-height:1.5}.recording-result{display:grid;gap:14px;margin-top:15px;padding-top:15px;border-top:1px dashed rgba(255,255,255,.17)}.recording-result[hidden]{display:none}.recording-result audio{width:100%;accent-color:#ff9fc7}.recording-result>.text-button{justify-self:start;color:#ffd0e3}.speed-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.speed-metric{display:grid;gap:5px;padding:14px;border:1px solid rgba(255,255,255,.12);border-radius:14px;background:rgba(4,25,42,.36)}.speed-metric span{color:#b8ccda;font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.speed-metric strong{color:#fff;font-size:1.12rem;font-variant-numeric:tabular-nums}.speed-metric.speed-main{border-color:rgba(255,159,199,.42);background:linear-gradient(135deg,rgba(255,159,199,.2),rgba(255,255,255,.05))}.speed-metric.speed-main strong{color:#ffd2e4;font-size:1.3rem}.speed-note{margin:0;color:#b9cbd8;font-size:.84rem;line-height:1.5}.recording-playback{display:grid;grid-template-columns:auto minmax(260px,1fr);align-items:center;gap:14px}.recording-playback strong{color:#e7f0f6}.fluency-navigation{display:flex;justify-content:space-between;gap:12px;margin-top:22px}.fluency-navigation button:disabled{opacity:.35;cursor:not-allowed}
.question-card[class*="category-"],.intro-card[class*="category-"]{background:radial-gradient(circle at 96% 2%,var(--cat-soft),transparent 25rem),var(--panel)}.category-links .source-box{border-left-width:7px;background:linear-gradient(90deg,rgba(114,183,255,.1),rgba(255,255,255,.04))}.category-words .source-box{border-left:0;border-top:4px solid var(--accent);border-radius:18px}.category-infer .source-box{border-left:0;border-radius:22px;box-shadow:inset 0 0 0 1px rgba(255,122,104,.22)}.category-essential .source-box{border-left-width:8px;background:linear-gradient(145deg,rgba(191,140,255,.1),rgba(255,255,255,.035))}.category-documents .source-box{border:0;padding:10px;background:rgba(255,255,255,.025)}
/* Documents authentiques */
.document-source{color:#17283a;overflow-x:auto}.document-source img{display:block;width:100%;object-fit:cover}.paper-doc{overflow:hidden;border-radius:18px;color:#17283a;background:#fffdf8;box-shadow:0 18px 45px rgba(0,0,0,.25)}
.poster-doc{position:relative;min-height:520px;display:grid;align-items:end;overflow:hidden;border-radius:18px;color:#fff;background:#08243d}.poster-doc>img{position:absolute;inset:0;height:100%}.poster-doc::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(3,15,28,.08),rgba(3,15,28,.95) 78%)}.poster-copy{position:relative;z-index:1;padding:28px}.poster-kicker{display:inline-block;padding:6px 10px;border-radius:999px;background:#ff6d63;font-weight:900;letter-spacing:.08em}.poster-copy h3{max-width:16ch;margin:14px 0 10px;color:#fff;font-size:clamp(2rem,6vw,3.7rem);line-height:.92;text-transform:uppercase}.poster-details{display:flex;flex-wrap:wrap;gap:9px;margin-top:18px}.poster-details span{padding:8px 10px;border:1px solid rgba(255,255,255,.35);border-radius:10px;background:rgba(3,15,28,.6)}
.schedule-doc{padding:22px;background:linear-gradient(145deg,#f7fbff,#e9f6ff)}.schedule-head{display:flex;align-items:end;justify-content:space-between;gap:14px;margin-bottom:16px}.schedule-head h3{color:#0d5d86;font-size:1.8rem}.schedule-doc table{margin:0;border-collapse:separate;border-spacing:5px}.schedule-doc th{border:0;border-radius:8px;color:#fff;background:#0d78a8}.schedule-doc td{border:0;border-radius:8px;background:#fff;box-shadow:0 2px 8px rgba(11,55,82,.08)}.schedule-doc td:first-child{color:#0d5d86;font-weight:900;background:#d8f2ff}
.map-doc{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(180px,.5fr);gap:0;background:#f7f0d9}.map-canvas{min-height:430px;padding:16px;background:#dff0e2}.map-canvas svg{width:100%;height:100%}.map-legend{padding:20px;border-left:2px solid #c6b98f;background:#fff9e9}.map-legend h3{color:#315d42}.map-key{display:grid;grid-template-columns:18px 1fr;gap:8px;align-items:center;margin:12px 0}.key-line,.key-blue{height:5px;border-radius:3px}.key-line{background:#db6b4f}.key-blue{background:#4388c7}.key-dot{width:12px;height:12px;border-radius:50%;background:#563d2d}
.chart-paper{padding:24px;background:#f9fbff}.chart-paper h3{color:#17395d;font-size:1.6rem}.chart-area{display:grid;grid-template-columns:36px 1fr;margin-top:18px}.y-labels{display:flex;flex-direction:column;justify-content:space-between;padding-bottom:28px;color:#627386;font-size:.75rem}.bars-visual{height:280px;display:flex;align-items:end;justify-content:space-around;gap:12px;padding:12px 12px 28px;border-left:2px solid #7e8e9c;border-bottom:2px solid #7e8e9c;background:repeating-linear-gradient(to top,transparent 0,transparent 54px,#dce4ec 55px)}.bar-column{position:relative;width:17%;height:var(--h);border-radius:9px 9px 0 0;background:linear-gradient(#4bd8c8,#128d91)}.bar-column b{position:absolute;top:-25px;left:50%;transform:translateX(-50%);color:#17395d}.bar-column span{position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%);color:#53667a;white-space:nowrap;font-size:.76rem}
.photo-doc{padding:14px;background:#fbfaf5}.annotated-photo{position:relative;overflow:hidden;border-radius:10px}.annotated-photo img{height:420px}.photo-pin{position:absolute;padding:6px 9px;border-radius:999px;color:#fff;background:rgba(8,35,53,.88);font-size:.78rem;font-weight:800}.pin-one{left:5%;top:10%}.pin-two{right:4%;top:36%}.pin-three{left:8%;bottom:12%}.photo-caption{padding:13px 5px 3px;color:#465462;font-family:Georgia,serif;font-style:italic}
.game-doc{padding:24px;color:#1d2440;background:linear-gradient(135deg,#fff4cc,#ffd978)}.game-title{display:flex;align-items:center;gap:14px}.game-title strong{display:grid;place-items:center;width:58px;height:58px;border-radius:16px;color:#fff;background:#6042a4;font-size:2rem}.game-title h3{color:#432d77;font-size:2rem}.game-goal{margin:15px 0;padding:13px;border:2px dashed #6042a4;border-radius:13px;background:rgba(255,255,255,.45)}.game-steps{counter-reset:game;display:grid;gap:9px;padding:0;list-style:none}.game-steps li{display:grid;grid-template-columns:34px 1fr;gap:9px;align-items:center;padding:9px;border-radius:10px;background:rgba(255,255,255,.55)}.game-steps li::before{counter-increment:game;content:counter(game);display:grid;place-items:center;width:30px;height:30px;border-radius:50%;color:#fff;background:#e85d62;font-weight:900}
.notice-doc{padding:24px;background:#f5fbff}.notice-title{display:flex;justify-content:space-between;gap:16px;color:#075e78}.notice-material{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 18px}.notice-material span{padding:7px 9px;border-radius:9px;background:#d9f2f6}.notice-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.notice-step{padding:12px 8px;border-radius:12px;text-align:center;background:#fff;box-shadow:0 4px 12px rgba(0,65,90,.08)}.notice-step b{display:grid;place-items:center;width:30px;height:30px;margin:0 auto 7px;border-radius:50%;color:#fff;background:#128aa4}.warning-strip{margin-top:16px;padding:12px;border-radius:10px;color:#742b14;background:#ffe0aa;font-weight:850}
.garden-table-doc{padding:24px;background:#f4f8ec}.garden-table-doc h3{color:#285b3e;font-size:1.8rem}.garden-advice{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0;padding:12px;border-radius:12px;background:#dff0d8}.garden-table-doc table{border-collapse:separate;border-spacing:4px}.garden-table-doc th{border:0;color:#fff;background:#3b7b54}.garden-table-doc td{border:0;background:#fff}.garden-table-doc td:first-child{font-weight:900;background:#f5c96f}
.newspaper-doc{display:grid;grid-template-columns:1.1fr .9fr;padding:24px;background:#fffdfa}.newspaper-copy{padding-right:20px;border-right:1px solid #c9c3ba}.newspaper-copy h3{color:#18212b;font-family:Georgia,serif;font-size:2.15rem;line-height:1.02}.newspaper-chapo{color:#405260;font-weight:800}.newspaper-copy p{color:#253746;font-family:Georgia,serif}.newspaper-photo{padding-left:20px}.newspaper-photo img{height:260px;border-radius:8px}.newspaper-photo small{display:block;margin-top:7px;color:#607080}
.duo-doc{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:16px;background:#eaf2f6}.bulletin-card,.rules-card{padding:18px;border-radius:12px;background:#fff;box-shadow:0 7px 18px rgba(19,50,67,.1)}.bulletin-card{border-top:8px solid #3f91bd}.rules-card{border-top:8px solid #ef7b55}.bulletin-card h3,.rules-card h3{color:#213c4f}.water-level{display:flex;align-items:end;gap:8px;height:130px;margin-top:14px}.water-level span{flex:1;position:relative;height:var(--h);border-radius:7px 7px 0 0;background:#58b6d6}.water-level b{position:absolute;left:50%;top:-24px;transform:translateX(-50%);color:#21485b;font-size:.76rem}
@media(max-width:760px){.layout-1 .reading-stage.illustrated,.layout-2 .reading-stage.illustrated{grid-template-columns:1fr}.layout-2 .scene-visual{order:0}.map-doc,.newspaper-doc,.duo-doc{grid-template-columns:1fr}.map-legend,.newspaper-copy{border:0}.newspaper-copy{padding-right:0}.newspaper-photo{padding:15px 0 0}.notice-steps{grid-template-columns:repeat(2,1fr)}}
@media(max-width:520px){.visual-options{grid-template-columns:1fr}.visual-option>img{aspect-ratio:16/9}.visual-option-copy{min-height:58px}}
@media(max-width:760px){.category-card.category-fluency{grid-column:auto}.fluency-steps,.audio-coach,.fluency-text-grid{grid-template-columns:1fr}.fluency-heading{align-items:center}.voice-badge{width:50px;height:50px;border-radius:15px}.fluency-text{padding:19px 17px;font-size:1.12rem;line-height:1.75}.punctuation-legend{gap:7px}.punctuation-legend span{font-size:.8rem}.audio-coach{gap:14px;padding:16px}.fluency-library-heading{align-items:center}.fluency-text-card{min-height:220px}.fluency-cover img{height:275px}.fluency-cover figcaption{inset:auto 16px 16px;grid-template-columns:1fr}.fluency-cover figcaption span{grid-column:auto}.fluency-cover figcaption b{justify-self:start}.recording-studio{padding:16px}.recording-controls{align-items:stretch;display:grid;grid-template-columns:1fr 1fr}.recording-timer{grid-column:1/-1;justify-self:center;margin:0}.speed-summary,.recording-playback{grid-template-columns:1fr}.recording-result>.text-button{justify-self:stretch}.fluency-navigation{flex-direction:column}}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.site-footer{width:min(1180px,calc(100% - 32px));display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:8px 14px;margin:0 auto;padding:18px 0 28px;border-top:1px solid rgba(255,255,255,.13);color:var(--muted);font-size:.82rem;font-weight:700}.legal-links{display:inline-flex;align-items:center;gap:8px}.site-footer button,.site-footer a{border:0;padding:2px;color:#bfeee7;background:transparent;font:inherit;text-decoration:underline;text-underline-offset:3px;cursor:pointer}.legal-dialog{position:relative;width:min(650px,calc(100% - 30px));max-height:82vh;overflow:auto;padding:28px;border:1px solid rgba(255,255,255,.18);border-radius:22px;color:var(--ink);background:#0b2942;box-shadow:0 30px 90px rgba(0,0,0,.55)}.legal-dialog::backdrop{background:rgba(1,12,24,.76);backdrop-filter:blur(5px)}.legal-dialog h2{margin:0;color:#fff;font-size:1.65rem}.legal-intro{margin:6px 0 20px;color:var(--muted)}.legal-close{position:absolute;top:14px;right:14px;width:38px;height:38px;border:1px solid rgba(255,255,255,.14);border-radius:50%;color:#fff;background:rgba(255,255,255,.08);font-size:1.5rem;cursor:pointer}.legal-details{display:grid;gap:16px}.legal-details section{display:grid;gap:4px}.legal-details h3,.legal-details p{margin:0}.legal-details h3{color:#8ff0e3;font-size:.95rem}.legal-details p{color:#d7e4ed;line-height:1.55}.legal-details a{color:#9fd4ff;font-weight:800}

.topbar-actions{display:flex;align-items:center;gap:12px}.portal-compass{display:grid;place-items:center;flex:0 0 auto;width:52px;height:52px;overflow:hidden;border:2px solid rgba(255,232,174,.9);border-radius:50%;background:#eaf4f5;box-shadow:0 7px 20px rgba(0,9,20,.35);transition:transform .2s ease,box-shadow .2s ease}.portal-compass img{display:block;width:100%;height:100%;object-fit:cover}.portal-compass:hover{transform:translateY(-2px) rotate(-4deg);box-shadow:0 10px 26px rgba(0,9,20,.48)}.portal-compass:focus-visible{outline:3px solid var(--turquoise);outline-offset:3px}@media(max-width:640px){.portal-compass{width:44px;height:44px}.topbar-actions{gap:7px}.student-chip{gap:6px;padding:5px 6px}.student-chip span{display:none}.student-chip strong{max-width:76px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.icon-button{width:32px;height:32px}}
