/* COSYlanguages · Lexique Français */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  --teal-900: var(--accent-900, #0f382c);
  --teal-800: var(--accent-800, #1c6b54);
  --teal-600: var(--accent-600, #25a894);
  --teal-100: var(--accent-100, #e4f5f0);
  --ink: #13231e;
  --ink-soft: #3c544c;
  --paper: #fcfbf7;
  --panel: #ffffff;
  --line: #e3e0d5;
  --mint-bg: #e3f5ef;
  --mint-ink: #0f382c;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 20px;
  --shadow-card: 0 2px 8px rgba(15,56,44,.06);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Inter', system-ui, sans-serif; line-height: 1.6; }
a { color: var(--teal-800); text-decoration: none; font-weight: 600; }
.container { max-width: 920px; margin: 0 auto; padding: 0 20px; }

.page-head { padding: 32px 0 16px; }
.eyebrow { display: inline-block; font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--teal-800); background: var(--teal-100); padding: 4px 12px; border-radius: 99px; margin-bottom: 12px; }
.page-head h1 { font-family: 'Nunito', sans-serif; font-weight: 900; font-size: clamp(28px, 4vw, 40px); margin: 0 0 6px; }
.subtitle { color: var(--ink-soft); font-size: 18px; margin: 0; font-style: italic; }
.rule { border: none; border-top: 2px solid var(--ink); margin: 16px 0 24px; opacity: .8; }

.vocab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 24px 0; }
.vcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; box-shadow: var(--shadow-card); }
.vcard .word-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.vcard .word { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 18px; color: var(--teal-900); }
.vcard .emoji { font-size: 20px; }
.vcard .genre { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--teal-800); font-weight: 700; margin-bottom: 6px; }
.vcard .def { font-size: 14px; color: var(--ink); margin-bottom: 6px; }
.vcard .ex { font-size: 14px; color: var(--ink-soft); font-style: italic; background: var(--paper); padding: 6px 10px; border-radius: 6px; border-left: 3px solid var(--teal-600); }

.checklist { background: var(--mint-bg); border: 1px solid #a3e0d3; border-radius: var(--radius-m); padding: 20px; margin: 24px 0; }
.checklist h3 { margin: 0 0 12px; font-family: 'Nunito', sans-serif; color: var(--mint-ink); font-size: 16px; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }

.quiz-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 24px; margin: 32px 0; box-shadow: var(--shadow-card); }
.quiz-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.qitem { border-top: 1px solid var(--line); padding: 16px 0; }
.qopts { display: flex; flex-direction: column; gap: 8px; }
.qopt { text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius-s); padding: 10px 14px; font-size: 15px; cursor: pointer; width: 100%; }
.qopt.correct { border-color: #15803d; background: #dcfce7; font-weight: 700; }
.qopt.incorrect { border-color: #ef4444; background: #fef2f2; }
.qexplain { display: none; margin-top: 10px; font-size: 14px; background: var(--teal-100); padding: 10px 14px; border-radius: 6px; }
.qexplain.show { display: block; }

.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 24px 0; }
.mcard { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px; color: var(--ink); box-shadow: var(--shadow-card); }
.mcard h2 { font-family: 'Nunito', sans-serif; font-size: 18px; font-weight: 800; margin: 6px 0; }

.pager { display: flex; justify-content: space-between; gap: 16px; margin: 40px 0; }
footer.site { background: var(--teal-900); color: #e4f5f0; padding: 32px 0; margin-top: 48px; text-align: center; font-size: 14px; }
footer.site a { color: #fff; }




/* Dark theme: the palette above is light-only, so the same role
   tokens are re-derived over a dark base when the OS prefers dark
   or an explicit theme is set. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --teal-100: color-mix(in srgb, #e4f5f0 14%, #151a16);
  --ink: #e8f0e9;
  --ink-soft: #c8d8c9;
  --paper: #151a16;
  --panel: #1e241f;
  --line: color-mix(in srgb, #e3e0d5 42%, #151a16);
  --mint-bg: color-mix(in srgb, #e3f5ef 16%, #151a16);
  --mint-ink: color-mix(in srgb, #0f382c 45%, #ffffff);
  /* table headers paint --ink as a fill, which turns light in dark mode */
  --thead-fill: color-mix(in srgb, var(--ink) 16%, #151a16);
  }
  :root:not([data-theme="light"]) thead th {
    background: var(--thead-fill) !important; color: var(--ink) !important;
  }
}
html[data-theme="dark"], body.theme-dark {
  --teal-100: color-mix(in srgb, #e4f5f0 14%, #151a16);
  --ink: #e8f0e9;
  --ink-soft: #c8d8c9;
  --paper: #151a16;
  --panel: #1e241f;
  --line: color-mix(in srgb, #e3e0d5 42%, #151a16);
  --mint-bg: color-mix(in srgb, #e3f5ef 16%, #151a16);
  --mint-ink: color-mix(in srgb, #0f382c 45%, #ffffff);
  /* table headers paint --ink as a fill, which turns light in dark mode */
  --thead-fill: color-mix(in srgb, var(--ink) 16%, #151a16);
}
html[data-theme="dark"] thead th, body.theme-dark thead th {
  background: var(--thead-fill) !important; color: var(--ink) !important;
}
