/* ============================================================
   English Pocket — Style minimal & lisible
   Palette stricte : noir, crème, rose (un seul accent).
   ============================================================ */

:root {
  --black: #000000;
  --cream: #fbf7ee;
  --white: #ffffff;
  --pink: #e6517a;          /* accent unique */
  --pink-soft: #fcdfe7;
  --green: #2c8a5c;         /* success only */
  --green-soft: #d5ebd7;
  --red: #d94545;           /* error only */
  --red-soft: #fadcdc;
  --grey: #6a6a6a;
  --grey-line: #d8d4ca;

  --text: var(--black);
  --bg: var(--cream);

  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  --font-display: "Helvetica Neue", "Inter", "Arial Black", Impact, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: var(--safe-top);
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1rem;
}
a { color: var(--pink); text-decoration: underline; }
mark { background: var(--pink-soft); color: var(--black); padding: 0 2px; }

/* ============================================================
   HEADER
   ============================================================ */
header.app-header {
  position: sticky;
  top: 0;
  background: var(--cream);
  z-index: 50;
  border-bottom: 1px solid var(--black);
}
.header-inner {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
header.app-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
header.app-header .header-sub {
  font-size: 11px;
  color: var(--grey);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 4px;
}
.back-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  background: var(--cream);
  flex-shrink: 0;
}
.back-btn:active { background: var(--pink); color: var(--cream); border-color: var(--pink); }

/* ============================================================
   MAIN
   ============================================================ */
main, .view {
  padding: 0;
  padding-bottom: calc(72px + var(--safe-bottom));
  max-width: 720px;
  margin: 0 auto;
}

/* ============================================================
   HOME — hero + tiles uniformes
   ============================================================ */
.hero {
  padding: 32px 20px 28px;
  border-bottom: 1px solid var(--grey-line);
  background: var(--cream);
}
.hero h2 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--black);
}
.hero h2 em {
  font-style: normal;
  color: var(--black);
}
.hero .sub {
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: 0.04em;
  font-weight: 500;
  color: var(--grey);
}

.tile {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  text-align: left;
  background: var(--cream);
  border: 0;
  border-bottom: 1px solid var(--grey-line);
  cursor: pointer;
  gap: 12px;
}
.tile:active { background: var(--pink-soft); }
.tile .tile-content {
  flex: 1;
  min-width: 0;
}
.tile .tile-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--black);
}
.tile .tile-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--grey);
  font-weight: 500;
}
.tile .tile-arrow {
  color: var(--grey);
  font-size: 22px;
  font-weight: 400;
  flex-shrink: 0;
}
.tile.featured {
  background: var(--cream);
  border-left: 3px solid var(--pink);
  padding-left: 17px;
}
.tile.featured .tile-title { color: var(--black); }
.tile.featured .tile-sub { color: var(--grey); }
.tile.featured .tile-arrow { color: var(--grey); }

/* Section dividers — premium minimal */
.section-divider {
  padding: 44px 20px 10px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
  background: var(--cream);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-divider::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--black);
  display: inline-block;
}

/* ============================================================
   CARD generic
   ============================================================ */
.card {
  background: var(--white);
  border-bottom: 1px solid var(--grey-line);
  padding: 18px 20px;
}
.card .tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--black);
  color: var(--cream);
  padding: 3px 8px;
  margin-bottom: 10px;
  border-radius: 2px;
}
.card .tag.pink { background: var(--pink); }
.card h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.card p { margin: 8px 0; font-size: 14.5px; color: #1f1f1f; }
.card ul, .card ol {
  margin: 10px 0;
  padding-left: 22px;
}
.card li { margin: 6px 0; font-size: 14.5px; }
.card .example {
  background: var(--cream);
  border-left: 3px solid var(--pink);
  padding: 10px 12px;
  margin: 8px 0;
  font-size: 14px;
  border-radius: 0 4px 4px 0;
}

/* Hearts (used in lesson/vocab content) */
.heart-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--grey-line);
}
.heart-item:last-child { border-bottom: 0; }
.heart-item .heart {
  color: var(--pink);
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1.6;
}
.heart-item .heart-content { flex: 1; min-width: 0; }
.heart-item .heart-title {
  font-weight: 700;
  font-size: 15.5px;
  color: var(--black);
  line-height: 1.25;
}
.heart-item .heart-sub {
  margin-top: 3px;
  font-size: 13.5px;
  color: var(--grey);
}
.heart-item .heart-ex {
  margin-top: 5px;
  font-size: 13px;
  font-style: italic;
  color: #4a4a4a;
}

/* ============================================================
   FLASHCARDS
   ============================================================ */
.flash-stage {
  padding: 20px 20px 0;
}
.flash-card {
  background: var(--white);
  border: 1px solid var(--black);
  border-radius: 8px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 22px;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
  position: relative;
}
.flash-card.flipped {
  background: var(--pink);
  color: var(--cream);
  border-color: var(--pink);
}
.flash-card .flash-side {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 10px;
  letter-spacing: 0.14em;
  font-family: var(--font-body);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--grey);
}
.flash-card.flipped .flash-side { color: var(--cream); opacity: 0.8; }
.flash-card .flash-hint {
  position: absolute;
  bottom: 12px;
  font-size: 10px;
  letter-spacing: 0.1em;
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--grey);
}
.flash-card.flipped .flash-hint { color: var(--cream); opacity: 0.7; }

.flash-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 14px 20px 0;
}
.flash-controls button {
  background: var(--white);
  border: 1px solid var(--black);
  border-radius: 6px;
  padding: 14px 8px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.flash-controls .good { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.flash-controls .hard { background: var(--cream); }
.flash-controls .again { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.flash-controls button:active { transform: scale(0.98); }

.flash-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  padding: 16px 20px 0;
}
.flash-stats .stat {
  text-align: center;
  padding: 8px 6px;
  border-right: 1px solid var(--grey-line);
}
.flash-stats .stat:last-child { border-right: 0; }
.flash-stats .stat .num {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: var(--black);
}
.flash-stats .stat .lbl {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ============================================================
   QUIZ / EXERCICES
   ============================================================ */
.quiz-bar {
  background: var(--cream);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--grey);
  border-bottom: 1px solid var(--grey-line);
}
.prompt-block {
  background: var(--white);
  padding: 20px;
  border-bottom: 1px solid var(--black);
}
.prompt-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
}
.prompt-sentence {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.quiz-question {
  background: var(--white);
  padding: 22px 20px;
  border-bottom: 1px solid var(--black);
}
.quiz-question .q {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  background: var(--cream);
}
.quiz-options button {
  text-align: left;
  background: var(--white);
  border: 0;
  border-bottom: 1px solid var(--grey-line);
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font-body);
}
.quiz-options button:active { background: var(--pink-soft); }
.quiz-options button.correct {
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
}
.quiz-options button.correct::before { content: "✓  "; font-weight: 900; }
.quiz-options button.wrong {
  background: var(--red-soft);
  color: var(--red);
  font-weight: 700;
}
.quiz-options button.wrong::before { content: "✗  "; font-weight: 900; }
.quiz-options button.disabled { opacity: 0.45; }

/* Rich explanation block */
.explain-box {
  background: var(--white);
  border-top: 2px solid var(--black);
  padding: 16px 20px;
  border-bottom: 1px solid var(--black);
}
.explain-rule {
  display: inline-block;
  font-family: var(--font-body);
  background: var(--pink);
  color: var(--cream);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 10px;
}
.explain-answer {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--green);
  background: var(--green-soft);
  padding: 10px 12px;
  margin: 4px 0 12px;
  border-radius: 4px;
}
.explain-answer .ok {
  font-size: 16px;
  margin-right: 6px;
}
.explain-trap {
  background: var(--red-soft);
  color: var(--red);
  padding: 10px 12px;
  font-size: 13.5px;
  line-height: 1.5;
  border-radius: 4px;
  margin-bottom: 10px;
}
.explain-trap b { color: var(--red); font-weight: 800; }
.explain-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--black);
}
.explain-body b { font-weight: 800; color: var(--black); background: var(--pink-soft); padding: 0 3px; }

/* Big action button */
.btn-big {
  display: block;
  width: 100%;
  background: var(--black);
  color: var(--cream);
  padding: 16px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 0;
  border-radius: 0;
}
.btn-big:active { background: var(--pink); }

/* Result screen */
.quiz-result {
  background: var(--cream);
  text-align: center;
  padding: 50px 20px 30px;
}
.quiz-result .label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--grey);
}
.quiz-result .score {
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--pink);
  margin: 14px 0 8px;
}
.quiz-result .verdict {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 18px;
}

/* ============================================================
   REORDER
   ============================================================ */
.reorder-zone {
  background: var(--white);
  border-bottom: 1px solid var(--black);
  min-height: 80px;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}
.reorder-zone .empty-hint {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}
.reorder-bank {
  background: var(--cream);
  border-bottom: 1px solid var(--grey-line);
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.word-chip {
  background: var(--white);
  border: 1px solid var(--black);
  border-radius: 4px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 14px;
}
.word-chip:active { background: var(--pink-soft); }
.word-chip.placed {
  background: var(--pink);
  color: var(--cream);
  border-color: var(--pink);
}
.reorder-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--cream);
  border-bottom: 1px solid var(--black);
}
.reorder-actions button {
  padding: 14px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-right: 1px solid var(--grey-line);
}
.reorder-actions button:last-child { border-right: 0; }
.reorder-actions .reset { color: var(--grey); }
.reorder-actions .check { background: var(--black); color: var(--cream); }
.reorder-actions button[disabled] { opacity: 0.4; pointer-events: none; }

/* ============================================================
   TENSE
   ============================================================ */
.tense-card {
  background: var(--white);
  border-bottom: 1px solid var(--grey-line);
  padding: 18px 20px;
}
.tense-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.tense-card .desc {
  font-size: 13.5px;
  color: var(--grey);
  margin-bottom: 10px;
}
.tense-card .formula {
  background: var(--cream);
  border: 1px solid var(--grey-line);
  padding: 10px 12px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 13.5px;
  margin: 8px 0;
  border-radius: 4px;
}
.tense-card .markers {
  font-size: 12px;
  color: var(--grey);
  font-weight: 600;
  margin: 8px 0;
}
.tense-card .ex-row {
  background: var(--cream);
  padding: 8px 12px;
  margin-top: 5px;
  font-size: 13.5px;
  border-radius: 4px;
}
.tense-card .ex-row b {
  display: inline-block;
  min-width: 20px;
  font-weight: 800;
  color: var(--pink);
}

/* ============================================================
   CINÉ — extraits de films/séries en situation
   ============================================================ */
.cine-card {
  background: var(--white);
  border-bottom: 1px solid var(--grey-line);
  padding: 18px 20px;
}
.cine-card .cine-tag {
  display: inline-block;
  background: var(--pink-soft);
  color: var(--pink);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  margin-bottom: 8px;
}
.cine-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.cine-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--black);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}
.cine-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.cine-quote {
  background: var(--cream);
  border: 1px solid var(--grey-line);
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 14.5px;
  font-style: italic;
  margin-bottom: 8px;
}
.cine-explain {
  font-size: 13.5px;
  color: var(--grey);
}
.cine-explain b { color: var(--text); font-style: normal; }
.cine-offline-note {
  font-size: 12px;
  color: var(--grey);
  margin-top: 4px;
}

/* ============================================================
   IRREGULAR VERBS
   ============================================================ */
.verbs-table {
  background: var(--white);
  border-bottom: 1px solid var(--black);
}
.verbs-table .row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.2fr;
  border-bottom: 1px solid var(--grey-line);
  font-size: 14px;
}
.verbs-table .row > div {
  padding: 10px 12px;
  border-right: 1px solid var(--grey-line);
  font-weight: 500;
}
.verbs-table .row > div:last-child {
  border-right: 0;
  font-size: 12.5px;
  color: var(--grey);
}
.verbs-table .row.head {
  background: var(--black);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
}
.verbs-table .row.head > div { color: var(--cream); border-right-color: rgba(255,255,255,0.15); }

/* ============================================================
   USAGE WORDS
   ============================================================ */
.usage-head {
  background: var(--white);
  border-bottom: 1px solid var(--black);
  padding: 22px 20px 18px;
}
.usage-head .word {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  text-transform: lowercase;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--black);
}
.usage-head .pron {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  color: var(--grey);
  margin-top: 6px;
}
.usage-head .fr-label {
  font-size: 14px;
  color: var(--pink);
  font-weight: 700;
  margin-top: 6px;
}
.usage-uses {
  background: var(--cream);
  border-bottom: 1px solid var(--black);
}
.use-row {
  padding: 14px 20px;
  border-bottom: 1px solid var(--grey-line);
}
.use-row:last-child { border-bottom: 0; }
.use-row .sense {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.005em;
  margin-bottom: 4px;
}
.use-row .sense::before { content: "♥  "; color: var(--pink); }
.use-row .ex {
  font-style: italic;
  font-size: 14px;
  color: #2c2c2c;
}
.use-row .tip {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  background: var(--pink-soft);
  color: var(--pink);
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 3px;
}

/* ============================================================
   PHRASAL VERBS
   ============================================================ */
.phrasal-row {
  background: var(--white);
  padding: 12px 20px;
  border-bottom: 1px solid var(--grey-line);
}
.phrasal-row .v {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--pink);
  letter-spacing: -0.005em;
}
.phrasal-row .fr {
  font-size: 13.5px;
  margin-top: 2px;
  color: var(--black);
  font-weight: 600;
}
.phrasal-row .ex {
  font-size: 13px;
  font-style: italic;
  color: var(--grey);
  margin-top: 4px;
}

/* ============================================================
   BOTTOM NAV
   ============================================================ */
nav.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--cream);
  border-top: 1px solid var(--black);
  display: flex;
  padding: 0 0 var(--safe-bottom);
  z-index: 60;
  max-width: 720px;
  margin: 0 auto;
}
nav.bottom-nav .nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px 8px;
  color: var(--grey);
  gap: 3px;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
nav.bottom-nav .nav-btn .icon {
  font-size: 18px;
  line-height: 1;
}
nav.bottom-nav .nav-btn.active {
  color: var(--pink);
}

/* ============================================================
   SEARCH
   ============================================================ */
.search-box {
  width: calc(100% - 40px);
  margin: 16px 20px;
  background: var(--white);
  border: 1px solid var(--black);
  padding: 12px 14px;
  color: var(--black);
  font-size: 16px;
  font-weight: 500;
  font-family: var(--font-body);
  outline: none;
  border-radius: 6px;
}
.search-box:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px var(--pink-soft);
}

.empty {
  text-align: center;
  padding: 50px 20px;
  font-size: 14px;
  color: var(--grey);
  letter-spacing: 0.04em;
}

/* Section-block: now just a clean separator with a left accent */
.section-block {
  padding: 22px 20px 18px;
  background: var(--cream);
  border-bottom: 1px solid var(--black);
}
.section-block h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.section-block .meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  margin-top: 6px;
}

/* Secondary buttons */
.btn-secondary {
  background: var(--cream);
  border: 1px solid var(--black);
  padding: 10px 14px;
  font-weight: 700;
  font-size: 13px;
  border-radius: 6px;
  font-family: var(--font-body);
}
.btn-secondary:active { background: var(--pink-soft); }
.btn-secondary.danger { border-color: var(--red); color: var(--red); }
.btn-secondary.danger:active { background: var(--red-soft); }

/* ============================================================
   RULE CARD — règle dépliable (grammar focus)
   ============================================================ */
.rule-card {
  background: var(--white);
  border-bottom: 1px solid var(--grey-line);
  padding: 14px 20px;
}
.rule-card summary {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.005em;
  cursor: pointer;
  padding: 6px 0;
  list-style: none;
  color: var(--pink);
}
.rule-card summary::-webkit-details-marker { display: none; }
.rule-card[open] summary { margin-bottom: 8px; }
.rule-card .rule-half {
  margin: 14px 0;
  padding-left: 12px;
  border-left: 3px solid var(--pink);
}
.rule-card .rule-half h4 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.rule-card .rule-half p {
  font-size: 14px;
  margin: 4px 0;
  color: var(--text);
}
.rule-card .rule-formula {
  background: var(--cream);
  border: 1px solid var(--grey-line);
  padding: 8px 10px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 13px;
  margin: 8px 0;
  border-radius: 4px;
}
.rule-card .rule-half ul {
  margin: 8px 0;
  padding-left: 20px;
  font-size: 13.5px;
}
.rule-card .rule-half li { margin: 3px 0; }
.rule-card .rule-markers {
  font-size: 12.5px;
  color: var(--grey);
  margin-top: 6px;
}
.rule-card .rule-markers b { color: var(--black); }
.rule-card .rule-tldr {
  background: var(--pink-soft);
  color: var(--black);
  padding: 12px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  margin-top: 12px;
  border-left: 3px solid var(--pink);
}

/* ============================================================
   TYPED INPUT (dictée, rappel actif, traduction tapée)
   ============================================================ */
.typed-input-wrap {
  background: var(--white);
  padding: 16px 20px;
  border-bottom: 1px solid var(--grey-line);
}
.typed-input {
  width: 100%;
  padding: 14px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  border: 2px solid var(--black);
  border-radius: 6px;
  background: var(--cream);
  color: var(--black);
  outline: none;
  resize: vertical;
  margin-bottom: 12px;
  min-height: 50px;
}
.typed-input:focus {
  background: var(--white);
  border-color: var(--pink);
  box-shadow: 0 0 0 3px var(--pink-soft);
}
.typed-input[readonly] {
  background: var(--cream);
  border-color: var(--grey-line);
}

.explain-box.correct { border-top-color: var(--green); }
.explain-box.close { border-top-color: var(--pink); }
.explain-box.wrong { border-top-color: var(--red); }
.explain-answer.close { background: var(--pink-soft); color: var(--pink); }
.explain-answer.wrong { background: var(--red-soft); color: var(--red); }

.diff-line {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 14px;
  margin: 6px 0;
  line-height: 1.8;
}
.diff-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  margin-right: 6px;
}
.diff-word {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 2px;
}
.diff-word.ok { background: var(--green-soft); color: var(--green); }
.diff-word.bad { background: var(--red-soft); color: var(--red); text-decoration: line-through; }
.diff-word.ref { background: var(--cream); color: var(--black); border: 1px solid var(--grey-line); }

/* ============================================================
   STREAK BANNER (top of Today)
   ============================================================ */
.streak-banner {
  background: var(--cream);
  border-bottom: 1px solid var(--grey-line);
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.streak-banner.done {
  background: linear-gradient(135deg, var(--pink) 0%, #d44980 100%);
  color: var(--cream);
}
.streak-banner .streak-num {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--pink);
  min-width: 70px;
}
.streak-banner.done .streak-num { color: var(--cream); }
.streak-banner .streak-label {
  flex: 1;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.streak-banner .streak-check {
  font-size: 30px;
  font-weight: 700;
  width: 50px;
  height: 50px;
  border: 2px solid currentColor;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   WORD OF THE DAY
   ============================================================ */
.wod-card {
  background: var(--white);
  border-bottom: 1px solid var(--grey-line);
  padding: 20px;
}
.wod-card .wod-word {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--pink);
}
.wod-card .wod-fr {
  font-size: 14px;
  color: var(--grey);
  margin-top: 4px;
  font-weight: 500;
}
.wod-card .wod-ex {
  font-style: italic;
  font-size: 15px;
  margin: 12px 0;
  padding: 10px 12px;
  background: var(--cream);
  border-left: 3px solid var(--pink);
  border-radius: 0 4px 4px 0;
}
.wod-card .wod-tip {
  font-size: 12.5px;
  color: var(--grey);
  font-style: italic;
}

/* ============================================================
   DAILY PROMPT
   ============================================================ */
.prompt-card {
  background: var(--cream);
  border: 2px solid var(--pink);
  margin: 14px 20px 4px;
  padding: 18px 18px 14px;
  border-radius: 8px;
}
.prompt-card .prompt-card-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--pink);
}
.prompt-card .prompt-card-text {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 8px 0;
}
.prompt-card .prompt-card-tip {
  font-size: 12.5px;
  color: var(--grey);
  font-style: italic;
}

/* ============================================================
   STATS
   ============================================================ */
.big-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--white);
  border-bottom: 1px solid var(--grey-line);
}
.big-stat {
  text-align: center;
  padding: 20px 12px;
  border-right: 1px solid var(--grey-line);
}
.big-stat:last-child { border-right: 0; }
.big-stat .big-stat-num {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  color: var(--pink);
  letter-spacing: -0.03em;
}
.big-stat .big-stat-lbl {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--grey);
  margin-top: 8px;
}

.box-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.box-row .box-label {
  font-size: 13px;
  font-weight: 600;
  width: 110px;
  flex-shrink: 0;
}
.box-row .box-bar {
  flex: 1;
  height: 8px;
  background: var(--grey-line);
  border-radius: 4px;
  overflow: hidden;
}
.box-row .box-fill {
  height: 100%;
  background: var(--pink);
}
.box-row .box-num {
  width: 28px;
  text-align: right;
  font-weight: 700;
  color: var(--grey);
  font-size: 13px;
}

/* ============================================================
   ÉCOUTE — listen player
   ============================================================ */
.listen-controls {
  background: var(--cream);
  padding: 24px 20px;
  border-bottom: 1px solid var(--grey-line);
  display: flex;
  align-items: center;
  gap: 14px;
}
.listen-play {
  flex: 1;
  background: var(--black);
  color: var(--cream);
  border: 0;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.listen-play .play-icon {
  font-size: 18px;
  color: var(--pink);
}
.listen-play:active { background: var(--pink); color: var(--cream); }
.listen-play:active .play-icon { color: var(--cream); }
.rate-controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rate-controls button {
  border: 1px solid var(--grey-line);
  background: var(--white);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  min-width: 56px;
}
.rate-controls button.active {
  background: var(--pink);
  color: var(--cream);
  border-color: var(--pink);
}

.resource-link {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 14px;
  background: var(--black);
  color: var(--cream) !important;
  border-radius: 6px;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 14px;
}
.resource-link:active { background: var(--pink); }

/* Misc */
::-webkit-scrollbar { display: none; }
.view { animation: fadeIn 0.18s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
