/* ============================================================
   Examen Civique — Feuille de styles
   Design moderne, épuré, inspiré des codes graphiques de la
   République française (sans surcharge tricolore).
   ============================================================ */

:root {
  --blue: #0055A4;
  --blue-deep: #00387A;
  --blue-soft: #E7EFFA;
  --red: #EF4135;
  --red-soft: #FBEAE8;
  --gold: #B8860B;
  --green: #2F855A;

  --ink: #1A2238;
  --ink-soft: #5A6378;
  --line: #E5E7EB;
  --line-soft: #F2F4F7;
  --bg: #FAFBFD;
  --white: #FFFFFF;

  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 4px 12px rgba(16, 24, 40, .07);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .10);

  --transition: 200ms cubic-bezier(.4,0,.2,1);

  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ----- Reset léger ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; color: var(--ink); }
h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-weight: 700; font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-deep); }
ul, ol { padding-left: 1.2em; }
li { margin-bottom: .35em; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img, svg { max-width: 100%; display: block; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }

/* ============================================================
   LOCKSCREEN — Accès protégé par mot de passe
   ============================================================ */
.lockscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(0, 85, 164, .18), transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(239, 65, 53, .12), transparent 55%),
    linear-gradient(135deg, #0a0e1f 0%, #1a2238 100%);
  animation: fadeInLock 280ms ease-out;
}
html.auth-unlocked .lockscreen {
  display: none !important;
}
@keyframes fadeInLock {
  from { opacity: 0; }
  to { opacity: 1; }
}
.lockscreen.dismissed {
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease-out;
}
body.locked {
  overflow: hidden;
}

.lock-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 44px 38px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  text-align: center;
  max-width: 420px;
  width: 100%;
  animation: lockCardPop 380ms cubic-bezier(.22, 1, .36, 1);
}
@keyframes lockCardPop {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.lock-flag {
  width: 56px;
  height: 38px;
  border-radius: 4px;
  margin: 0 auto 22px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}
.lock-title {
  font-family: var(--serif);
  font-size: 1.7rem;
  margin-bottom: 8px;
  color: var(--ink);
}
.lock-sub {
  color: var(--ink-soft);
  font-size: .95rem;
  margin-bottom: 28px;
  line-height: 1.55;
}
.lock-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}
.lock-input {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--ink);
  text-align: center;
  letter-spacing: .15em;
  transition: all var(--transition);
}
.lock-input:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(0, 85, 164, .12);
}
.lock-input.shake {
  animation: shake 380ms;
  border-color: var(--red);
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.lock-btn {
  padding: 14px 20px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}
.lock-btn:hover { background: var(--blue-deep); }
.lock-btn:disabled { opacity: .6; cursor: wait; }
.lock-error {
  color: var(--red);
  font-size: .9rem;
  font-weight: 600;
  min-height: 1.4em;
  margin: 0;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-flag {
  width: 36px;
  height: 24px;
  border-radius: 3px;
  box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.brand-sub { font-size: .76rem; color: var(--ink-soft); font-weight: 500; }

.main-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .94rem;
  transition: all var(--transition);
}
.main-nav a:hover { color: var(--ink); background: var(--line-soft); }
.main-nav a.active { color: var(--blue); background: var(--blue-soft); }
.main-nav .cta-link {
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
}
.main-nav .cta-link:hover { background: var(--blue-deep); color: var(--white); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ============================================================
   HÉRO
   ============================================================ */
.hero {
  padding: 64px 0 80px;
  background:
    radial-gradient(ellipse at top right, rgba(0, 85, 164, .06), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(239, 65, 53, .04), transparent 50%),
    var(--bg);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 .hl {
  background: linear-gradient(120deg, var(--blue) 0%, var(--red) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lead {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 540px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
  margin-bottom: 40px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .97rem;
  transition: all var(--transition);
  border: 1.5px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 2px 0 var(--blue-deep);
}
.btn-primary:hover { background: var(--blue-deep); color: var(--white); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,85,164,.25); }
.btn-ghost {
  background: var(--white);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.hero-stats {
  display: flex;
  gap: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
}
.stat-num small { font-size: 1.2rem; }
.stat-lbl { font-size: .85rem; color: var(--ink-soft); margin-top: 4px; font-weight: 500; }

.hero-visual { display: flex; justify-content: center; }
.cocarde {
  width: 320px;
  max-width: 100%;
  filter: drop-shadow(0 20px 40px rgba(0,85,164,.18));
  animation: rotate 60s linear infinite;
}
@keyframes rotate { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cocarde { animation: none; } }

/* ============================================================
   SECTION : MÉTHODE (3 étapes)
   ============================================================ */
.methode {
  padding: 80px 0;
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.methode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 40px;
}
.methode-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  position: relative;
  transition: all var(--transition);
}
.methode-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.methode-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.methode-card h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin-bottom: 10px;
}
.methode-card p {
  color: var(--ink-soft);
  font-size: .94rem;
  margin-bottom: 16px;
  line-height: 1.6;
}
.methode-link {
  font-weight: 600;
  font-size: .92rem;
  color: var(--blue);
}

/* ============================================================
   PAGE HEADER (utilisé sur fiches.html)
   ============================================================ */
.page-header {
  padding: 56px 0 40px;
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(0, 85, 164, .06), transparent 60%),
    var(--bg);
}
.page-header .eyebrow { margin-bottom: 18px; }
.page-header h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 16px;
}
.page-header .lead {
  max-width: 720px;
  margin: 0 auto 28px;
  color: var(--ink-soft);
  font-size: 1.02rem;
}
.page-header-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   FICHES — CTA en bas de page
   ============================================================ */
.fiches-cta {
  margin-top: 60px;
  padding: 36px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  text-align: center;
}
.fiches-cta h3 {
  color: var(--white);
  font-family: var(--serif);
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.fiches-cta p {
  color: rgba(255,255,255,.88);
  margin-bottom: 18px;
}
.fiches-cta .btn-primary {
  background: var(--white);
  color: var(--blue);
  box-shadow: 0 2px 0 rgba(0,0,0,.1);
}
.fiches-cta .btn-primary:hover {
  background: var(--white);
  color: var(--blue-deep);
}

/* ============================================================
   SECTION : RÉPARTITION
   ============================================================ */
.repartition {
  padding: 60px 0;
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-title {
  text-align: center;
  margin-bottom: 12px;
}
.section-sub {
  text-align: center;
  color: var(--ink-soft);
  max-width: 720px;
  margin: 0 auto 40px;
}
.repart-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.repart-card {
  padding: 20px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  transition: all var(--transition);
}
.repart-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.repart-card .repart-icon { font-size: 1.8rem; margin-bottom: 8px; }
.repart-card .repart-pct {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.repart-card .repart-name { font-size: .85rem; font-weight: 600; color: var(--ink); }
.repart-card .repart-q { font-size: .78rem; color: var(--ink-soft); margin-top: 6px; }

.repart-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.bar-seg { transition: filter var(--transition); position: relative; }
.bar-seg:hover { filter: brightness(1.1); }

/* ============================================================
   SECTION : FICHES
   ============================================================ */
.fiches { padding: 80px 0; }
.theme-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}
.theme-tab {
  padding: 10px 18px;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 600;
  background: var(--white);
  border: 1.5px solid var(--line);
  color: var(--ink-soft);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.theme-tab:hover { color: var(--ink); border-color: var(--ink-soft); }
.theme-tab.active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}
.theme-tab .tab-count {
  font-size: .76rem;
  background: rgba(255,255,255,.18);
  padding: 2px 8px;
  border-radius: 999px;
}
.theme-tab:not(.active) .tab-count { background: var(--line-soft); color: var(--ink-soft); }

.fiches-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}
.fiche {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
  position: relative;
}
.fiche:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.fiche.essential { border-left: 4px solid var(--gold); }
.fiche-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.fiche-head h3 { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.essentiel-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gold);
  background: #FFF6E0;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.fiche-body {
  font-size: .92rem;
  color: var(--ink);
  line-height: 1.65;
}
.fiche-body p { margin-bottom: .75em; }
.fiche-body ul, .fiche-body ol { margin: .5em 0 .75em; padding-left: 1.4em; }
.fiche-body li { margin-bottom: .25em; }
.fiche-body strong { color: var(--ink); }
.fiche-body em { color: var(--blue); font-style: italic; }

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: .5em 0;
  font-size: .86rem;
}
.info-table th, .info-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}
.info-table th {
  background: var(--line-soft);
  font-weight: 600;
  color: var(--ink);
}
.info-table tr:hover td { background: var(--blue-soft); }

/* ============================================================
   SECTION : REPÈRES VISUELS
   ============================================================ */
.reperes {
  padding: 80px 0;
  background: var(--white);
  border-top: 1px solid var(--line);
}
.reperes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.repere-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}
.repere-card:hover { box-shadow: var(--shadow); }
.repere-card h3 {
  font-family: var(--serif);
  text-align: center;
  margin-bottom: 16px;
  color: var(--blue);
}
.svg-wrap {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.svg-wrap.symbols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: var(--white);
  padding: 8px;
}
.sym {
  text-align: center;
  padding: 14px 8px;
  background: var(--line-soft);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.sym:hover { background: var(--blue-soft); transform: scale(1.03); }
.sym svg { width: 60px; height: 60px; margin: 0 auto 8px; }
.sym p { font-size: .82rem; font-weight: 600; margin: 0; line-height: 1.35; }
.sym small { font-weight: 500; color: var(--ink-soft); }
.repere-cap {
  text-align: center;
  font-size: .88rem;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
}

/* ============================================================
   SECTION : QCM
   ============================================================ */
.qcm-section { padding: 80px 0; background: var(--bg); }

.mode-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.mode-card {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: left;
  transition: all var(--transition);
  font-family: inherit;
  color: var(--ink);
}
.mode-card:hover {
  border-color: var(--blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.mode-card-primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: var(--white);
  border-color: transparent;
}
.mode-card-primary h3, .mode-card-primary .mode-cta { color: var(--white); }
.mode-card-primary p { color: rgba(255,255,255,.88); }
.mode-icon { font-size: 2rem; margin-bottom: 12px; }
.mode-card h3 { margin-bottom: 8px; font-size: 1.18rem; }
.mode-card p { font-size: .9rem; color: var(--ink-soft); margin-bottom: 16px; line-height: 1.5; }
.mode-cta {
  font-weight: 600;
  font-size: .9rem;
  color: var(--blue);
  display: inline-block;
}

.theme-picker {
  background: var(--white);
  border: 1.5px solid var(--blue);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  animation: slideDown 300ms ease-out;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.theme-picker-label { font-weight: 600; margin-bottom: 16px; }
.theme-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.theme-pick {
  padding: 14px 16px;
  background: var(--line-soft);
  border-radius: var(--radius);
  text-align: left;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition);
}
.theme-pick:hover { background: var(--blue-soft); color: var(--blue); }

.best-scores {
  margin-top: 24px;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.best-scores h4 {
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.best-scores .score-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.best-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--line-soft);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
}
.best-score-pill.success { background: #DEF7E5; color: var(--green); }
.best-score-pill.fail { background: var(--red-soft); color: var(--red); }

/* --- Quiz play --- */
.quiz-play { animation: fadeIn 300ms ease-out; }
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.quiz-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.quiz-progress {
  flex: 1;
  height: 8px;
  background: var(--line-soft);
  border-radius: 999px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-deep) 100%);
  border-radius: 999px;
  transition: width 300ms ease-out;
  width: 0%;
}
.quiz-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-soft);
}
#quizTimer.warning { color: var(--red); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}
.btn-quit {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--line-soft);
  color: var(--ink-soft);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.btn-quit:hover { background: var(--red-soft); color: var(--red); }

.quiz-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.quiz-theme-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 16px;
}
.quiz-question {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-bottom: 24px;
  color: var(--ink);
  line-height: 1.4;
}
.quiz-options {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz-option {
  padding: 16px 20px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--white);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .98rem;
  text-align: left;
  width: 100%;
  font-family: inherit;
  color: var(--ink);
}
.quiz-option:hover:not(.disabled) {
  border-color: var(--blue);
  background: var(--blue-soft);
}
.quiz-option .opt-letter {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: var(--ink-soft);
  flex-shrink: 0;
  transition: all var(--transition);
}
.quiz-option:hover:not(.disabled) .opt-letter { background: var(--blue); color: var(--white); }
.quiz-option.correct { border-color: var(--green); background: #DEF7E5; }
.quiz-option.correct .opt-letter { background: var(--green); color: var(--white); }
.quiz-option.wrong { border-color: var(--red); background: var(--red-soft); }
.quiz-option.wrong .opt-letter { background: var(--red); color: var(--white); }
.quiz-option.disabled { cursor: not-allowed; }
.quiz-option.disabled:not(.correct):not(.wrong) { opacity: .55; }

.quiz-feedback {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: .92rem;
  line-height: 1.55;
  animation: slideUp 250ms ease-out;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.quiz-feedback.success { background: #DEF7E5; color: #166534; border-left: 4px solid var(--green); }
.quiz-feedback.error { background: var(--red-soft); color: #7F1D1D; border-left: 4px solid var(--red); }
.quiz-feedback strong { display: block; margin-bottom: 4px; }

.quiz-controls {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

/* --- Résultat --- */
.quiz-result { animation: fadeIn 400ms ease-out; }
.result-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  max-width: 540px;
  margin: 0 auto;
}
.result-circle {
  width: 160px;
  height: 160px;
  margin: 0 auto 24px;
  position: relative;
}
.result-circle svg { width: 100%; height: 100%; }
#resultArc { transition: stroke-dashoffset 800ms ease-out; }
.result-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--ink);
}
.result-card.success .result-pct,
.result-card.success #resultArc { color: var(--green); stroke: var(--green); }
.result-card.fail .result-pct,
.result-card.fail #resultArc { color: var(--red); stroke: var(--red); }
.result-detail {
  color: var(--ink-soft);
  font-size: .9rem;
  background: var(--line-soft);
  padding: 12px;
  border-radius: var(--radius);
  margin-top: 16px;
}
.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.review-list {
  margin-top: 32px;
  display: grid;
  gap: 14px;
}
.review-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  border-left: 4px solid var(--green);
}
.review-item.wrong { border-left-color: var(--red); }
.review-item.unanswered { border-left-color: var(--ink-soft); }
.review-item .review-q {
  font-weight: 600;
  margin-bottom: 8px;
  font-size: .96rem;
}
.review-item .review-given,
.review-item .review-correct {
  font-size: .88rem;
  margin: 4px 0;
}
.review-item .review-given.wrong { color: var(--red); text-decoration: line-through; }
.review-item .review-correct { color: var(--green); font-weight: 600; }
.review-item .review-explain {
  font-size: .85rem;
  color: var(--ink-soft);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-style: italic;
}

/* ============================================================
   SECTION : CONSEILS STRATÉGIQUES
   ============================================================ */
.tips-section {
  padding: 80px 0;
  background: var(--white);
  border-top: 1px solid var(--line);
}
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 40px;
}
.tip-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  transition: all var(--transition);
}
.tip-card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.tip-num {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--line);
  line-height: 1;
  margin-bottom: 8px;
}
.tip-card:hover .tip-num { color: var(--blue); }
.tip-card h3 {
  font-family: var(--serif);
  font-size: 1.18rem;
  margin-bottom: 10px;
  line-height: 1.35;
}
.tip-card p {
  color: var(--ink-soft);
  font-size: .92rem;
  line-height: 1.6;
  margin: 0;
}
.tip-card em {
  color: var(--blue);
  font-style: italic;
  background: var(--blue-soft);
  padding: 1px 6px;
  border-radius: 3px;
}

/* ============================================================
   SCORES / HISTORIQUE
   ============================================================ */
.score-history {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.score-history h4 {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.score-history ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .85rem;
  color: var(--ink);
}
.score-history li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.score-history li:last-child { border-bottom: none; }
.best-score-pill small {
  font-weight: 500;
  opacity: .8;
  margin-left: 4px;
}
.btn-reset {
  margin-top: 18px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: .82rem;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}
.btn-reset:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
}

/* ============================================================
   SECTION : RESSOURCES
   ============================================================ */
.ressources {
  padding: 80px 0;
  background: var(--white);
  border-top: 1px solid var(--line);
}
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}
.resource-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  transition: all var(--transition);
  color: var(--ink);
}
.resource-card:hover {
  border-color: var(--blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: var(--ink);
}
.res-num {
  position: absolute;
  top: 16px;
  right: 20px;
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--line);
  font-weight: 700;
}
.resource-card h3 { font-size: 1rem; margin-bottom: 8px; padding-right: 40px; }
.resource-card p { font-size: .88rem; color: var(--ink-soft); margin-bottom: 14px; line-height: 1.5; }
.res-link { font-weight: 600; font-size: .88rem; color: var(--blue); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.75);
  padding: 40px 0;
  font-size: .88rem;
  text-align: center;
}
.site-footer p { margin-bottom: 8px; max-width: 800px; margin-inline: auto; }
.footer-meta {
  font-size: .8rem;
  color: rgba(255,255,255,.55);
  margin-top: 12px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero { padding: 40px 0 60px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
  .cocarde { width: 220px; }
  .repart-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .reperes-grid { grid-template-columns: 1fr; }
  .quiz-card { padding: 24px; }
  .quiz-question { font-size: 1.2rem; }
}
@media (max-width: 720px) {
  .lockscreen { padding: 18px; }
  .lock-card { padding: 32px 24px; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-110%);
    transition: transform 250ms ease-out;
    pointer-events: none;
  }
  .main-nav.open {
    transform: translateY(0);
    pointer-events: auto;
  }
  .main-nav ul { flex-direction: column; padding: 12px; gap: 0; }
  .main-nav a { padding: 14px 16px; border-radius: 8px; }
  .hero h1 { font-size: 2rem; }
  .hero-stats { gap: 18px; flex-wrap: wrap; }
  .stat-num { font-size: 1.7rem; }
  .repart-grid { grid-template-columns: repeat(2, 1fr); }
  .fiches-content { grid-template-columns: 1fr; }
  .mode-cards { grid-template-columns: 1fr; }
  .svg-wrap.symbols { grid-template-columns: repeat(2, 1fr); }
  .quiz-card { padding: 20px; }
  .quiz-question { font-size: 1.1rem; }
  .quiz-option { padding: 14px 16px; font-size: .92rem; }
  .container { padding: 0 18px; }
  .fiche-body { overflow-x: auto; }
  .info-table { min-width: 520px; }
  .tip-card { padding: 22px; }
  .methode-card { padding: 24px 22px; }
  .fiches-cta { padding: 28px 22px; }
}
@media (max-width: 480px) {
  .repart-grid { grid-template-columns: 1fr 1fr; }
  .hero-cta .btn { flex: 1; }
  .hero-stats { display: grid; grid-template-columns: 1fr; gap: 14px; }
  .quiz-bar { flex-direction: column; align-items: stretch; gap: 12px; }
  .quiz-meta { justify-content: space-between; flex-wrap: wrap; }
  .quiz-option { align-items: flex-start; }
  .result-card { padding: 28px 20px; }
  .resources-grid,
  .tips-grid,
  .theme-picker-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   IMPRESSION
   ============================================================ */
@media print {
  .site-header, .hero-cta, .hero-visual, .qcm-section, .nav-toggle, .site-footer { display: none !important; }
  .container { max-width: none; }
  body { background: white; }
  .fiche, .repere-card { break-inside: avoid; box-shadow: none; border-color: #ccc; }
}
