/* BKR École : feuille de style commune (sombre, cohérente avec les charts) */
:root {
  --bg: #141416;
  --surface: #1d1d21;
  --surface-2: #232329;
  --border: #2c2c33;
  --border-soft: #26262c;
  --text: #ececee;
  --muted: #9b9ba4;
  --faint: #6d6d76;
  --gold: #e7b54a;
  --gold-soft: rgba(231, 181, 74, 0.12);
  --green: #3fbf7f;
  --green-soft: rgba(63, 191, 127, 0.12);
  --red: #e05252;
  --red-soft: rgba(224, 82, 82, 0.12);
  --blue: #5aa9e6;
  --radius: 12px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 450;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; margin: 0 auto; }

/* ===== Nav ===== */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 20, 22, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.brand {
  font-weight: 600; font-size: 16px; letter-spacing: 0.02em;
  color: var(--text); text-decoration: none;
}
.brand span { color: var(--gold); }
.nav-links { display: flex; gap: 8px; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 13px;
  padding: 6px 12px; border-radius: var(--radius-sm);
  transition: background 150ms ease-out, color 150ms ease-out;
}
.nav-links a:hover { background: var(--surface-2); color: var(--text); }
.nav-links a.active { background: var(--gold-soft); color: var(--gold); }

/* ===== Typographie ===== */
h1 { font-size: 28px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
h2 { font-size: 20px; font-weight: 600; line-height: 1.3; }
h3 { font-size: 16px; font-weight: 600; }
.kicker {
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold);
}
.lead { font-size: 16px; color: var(--muted); max-width: 62ch; }
p { max-width: 70ch; }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }

/* ===== Sections ===== */
section { padding: 56px 0; }
.section-head { margin-bottom: 32px; }
.section-head h2 { margin-top: 8px; }

/* ===== Hero ===== */
.hero { padding: 72px 0 56px; }
.hero h1 { font-size: 34px; max-width: 22ch; margin: 12px 0 16px; }
.hero .lead { margin-bottom: 28px; }

/* ===== Cartes ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 150ms ease-out, transform 150ms ease-out;
}
a.card { text-decoration: none; color: var(--text); display: block; }
a.card:hover { border-color: var(--gold); transform: translateY(-2px); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ===== Pastilles / tags ===== */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.tag.gold { background: var(--gold-soft); border-color: transparent; color: var(--gold); }
.tag.green { background: var(--green-soft); border-color: transparent; color: var(--green); }
.tag.red { background: var(--red-soft); border-color: transparent; color: var(--red); }

/* ===== Boutons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 20px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none;
  transition: background 150ms ease-out, border-color 150ms ease-out;
}
.btn-gold { background: var(--gold); color: #17130a; }
.btn-gold:hover { background: #f0c463; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--muted); }

/* ===== Citations d'Oliver ===== */
blockquote {
  border-left: 3px solid var(--gold);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 15px;
  color: var(--text);
  max-width: 64ch;
}
blockquote footer { font-size: 12px; color: var(--faint); margin-top: 8px; }

/* ===== Bloc honnêteté (signature de la marque) ===== */
.honest {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  position: relative;
}
.honest::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 3px; border-radius: 2px; background: var(--gold);
}
.honest h3 { color: var(--gold); margin-bottom: 8px; }

/* ===== Chapitres (page module) ===== */
.chapter {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 32px;
  margin-bottom: 24px;
}
.chapter-num {
  font-size: 12px; font-weight: 600; color: var(--gold);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.chapter h2 { margin: 6px 0 16px; }
.chapter .erreur {
  background: var(--red-soft); border-radius: var(--radius-sm);
  padding: 14px 18px; margin: 16px 0;
}
.chapter .erreur strong { color: var(--red); }
.chapter .regle {
  background: var(--green-soft); border-radius: var(--radius-sm);
  padding: 14px 18px; margin: 16px 0;
}
.chapter .regle strong { color: var(--green); }

/* Situation concrète : mini cas d'étude avec point de décision */
.situation {
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 18px 22px;
  margin: 18px 0;
}
.situation .sit-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--blue);
}
.situation h4 { font-size: 14px; margin: 6px 0 10px; }
.situation .decision {
  margin-top: 12px; padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(90, 169, 230, 0.10);
  font-size: 13.5px;
}
.situation .decision strong { color: var(--blue); }

.video-slot {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 20px; margin: 16px 0;
  display: flex; align-items: center; gap: 14px;
  color: var(--muted); font-size: 13px;
}
.video-slot .dot {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--gold-soft); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}

/* ===== Diagrammes SVG ===== */
.diagram {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 16px; margin: 16px 0;
}
.diagram svg { display: block; width: 100%; height: auto; }
.diagram figcaption { font-size: 12px; color: var(--faint); margin-top: 10px; }

/* ===== Tableaux ===== */
table.clean { border-collapse: collapse; width: 100%; font-size: 13px; }
table.clean th, table.clean td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border-soft); }
table.clean th { color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }

/* ===== Quiz ===== */
.quiz-q {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 20px 24px; margin-bottom: 14px;
}
.quiz-q h4 { font-size: 14px; margin-bottom: 12px; }
.quiz-q label {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 12px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 13.5px; color: var(--muted);
  transition: background 120ms ease-out;
}
.quiz-q label:hover { background: var(--surface-2); }
.quiz-q input { accent-color: var(--gold); margin-top: 3px; }
.quiz-q.correct { border-color: var(--green); }
.quiz-q.wrong { border-color: var(--red); }
.quiz-q .explain {
  display: none; margin-top: 10px; font-size: 13px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--muted);
}
.quiz-q.graded .explain { display: block; }

.score-card {
  text-align: center; padding: 40px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
}
.score-big { font-size: 44px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ===== Gate (clé d'accès) ===== */
#gate {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.gate-box { max-width: 400px; width: 90%; text-align: center; }
.gate-box input {
  width: 100%; margin: 16px 0 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px;
  color: var(--text); font-family: inherit; font-size: 14px;
  text-align: center; letter-spacing: 0.08em;
}
.gate-box input:focus { outline: none; border-color: var(--gold); }
.gate-err { color: var(--red); font-size: 12px; min-height: 18px; }

/* ===== Divers ===== */
.check-list { list-style: none; }
.check-list li { padding-left: 26px; position: relative; margin-bottom: 10px; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 600;
}
.steps { counter-reset: step; list-style: none; }
.steps li { counter-increment: step; padding-left: 40px; position: relative; margin-bottom: 14px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold-soft); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}

footer.site {
  border-top: 1px solid var(--border-soft);
  padding: 32px 0 48px; margin-top: 48px;
  font-size: 12px; color: var(--faint);
}
footer.site p { max-width: 90ch; margin-bottom: 8px; }

.fade-in { animation: fadeIn 400ms ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
