/* Majorant — Direction Artistique (DA) pour corrigés sujet 0 */

:root {
  --black: #0A0808;
  --black-2: #111111;
  --red: #A31423;
  --red-dark: #7A0F1A;
  --cream: #F8F5F0;
  --cream-light: #F0EDEA;
  --white: #FFFFFF;
  --border: #E4E0DA;
  --text: #0A0808;
  --text-muted: #5A5651;
}

* { box-sizing: border-box; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--white);
  color: var(--text);
  margin: 0;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-head {
  font-family: 'Outfit', -apple-system, sans-serif;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); text-decoration: underline; }

.container { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* Navbar */
.nav {
  background: var(--black);
  color: var(--white);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav .inner { display: flex; align-items: center; justify-content: space-between; }
.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--white);
  text-decoration: none;
}
.logo .accent { color: var(--red); }
.nav-crumb { color: rgba(255,255,255,0.6); font-size: 13px; }
.nav-crumb .sep { color: rgba(255,255,255,0.3); margin: 0 8px; }
.nav-crumb a { color: rgba(255,255,255,0.7); }
.nav-crumb a:hover { color: var(--white); text-decoration: none; }

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.85);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  transition: all 0.15s ease;
}
.nav-back:hover {
  color: var(--white);
  border-color: rgba(163,20,35,0.7);
  background: rgba(163,20,35,0.12);
  text-decoration: none;
}
.nav-back .arrow { transition: transform 0.15s ease; }
.nav-back:hover .arrow { transform: translateX(-3px); }

/* Hero */
.hero {
  background: var(--black);
  color: var(--white);
  padding: 56px 0 72px;
  border-bottom: 3px solid var(--red);
}
.hero .tag {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 4px;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--white);
}
.hero h1 .em { color: var(--red); }
.hero .subtitle { color: rgba(255,255,255,0.66); font-size: 16px; max-width: 640px; margin: 0; }
.hero .meta {
  margin-top: 24px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
.hero .meta span::before { content: "●"; color: var(--red); margin-right: 6px; }
.hero .meta span:first-child::before { content: ""; margin: 0; }

/* Sections */
section { padding: 48px 0; }
section.cream { background: var(--cream); }
section.white { background: var(--white); }
section.dark { background: var(--black); color: var(--white); }
section.dark h2, section.dark h3 { color: var(--white); }
section.dark p { color: rgba(255,255,255,0.75); }

section h2 {
  font-size: 26px;
  margin: 0 0 6px;
  line-height: 1.2;
}
section .section-eyebrow {
  display: inline-block;
  color: var(--red);
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* QCM Table */
.qcm {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 18px;
  font-size: 15px;
}
.qcm thead th {
  background: var(--black);
  color: var(--white);
  text-align: left;
  padding: 12px 16px;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}
.qcm thead th:first-child { width: 60px; }
.qcm thead th.rep-col { width: 90px; text-align: center; }
.qcm tbody tr { border-top: 1px solid var(--border); }
.qcm tbody tr:nth-child(even) { background: #FAFAF8; }
.qcm tbody td { padding: 12px 16px; vertical-align: top; }
.qcm .num { font-weight: 700; color: var(--text); font-family: 'Outfit', sans-serif; }
.qcm .rep {
  text-align: center;
  font-weight: 800;
  color: var(--white);
}
.qcm .rep span {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  padding: 2px 10px;
  border-radius: 4px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.qcm td.just { color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.qcm td.just strong { color: var(--text); }

/* Exercices */
.exo {
  margin-bottom: 36px;
  padding-top: 8px;
}
.exo-header {
  border-left: 4px solid var(--red);
  padding: 4px 0 4px 16px;
  margin-bottom: 22px;
}
.exo-header .eye {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.exo-header h2 { margin: 0; font-size: 24px; }

.q-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px 22px;
  margin-bottom: 14px;
}
.q-block h3 {
  font-size: 13px;
  color: var(--red);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 4px;
  font-weight: 700;
}
.q-block .enonce {
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text);
}
.q-block p { margin: 10px 0; }

/* Callouts */
.callout {
  background: var(--cream);
  border-left: 3px solid var(--red);
  padding: 14px 18px;
  margin: 16px 0;
  border-radius: 0 4px 4px 0;
}
.callout .label {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--red);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.callout.method { border-left-color: var(--red); background: var(--cream); }
.callout.astuce { border-left-color: #D49800; background: #FFF8ED; }
.callout.astuce .label { color: #A66E00; }
.callout.warn { border-left-color: #C44; background: #FDECEA; }
.callout.warn .label { color: #9C2A1F; }

/* Math inline fallback style (for non-KaTeX) */
.m { font-family: 'Latin Modern Math', 'Cambria Math', Cambria, serif; font-style: italic; }
.mbold { font-weight: 700; color: var(--text); }

/* Tableau de variations */
.tvar {
  border-collapse: collapse;
  margin: 14px 0;
  background: var(--white);
  border: 1px solid var(--border);
  font-size: 15px;
}
.tvar th, .tvar td {
  border: 1px solid var(--border);
  padding: 8px 16px;
  text-align: center;
  min-width: 70px;
}
.tvar th { background: var(--cream); font-family: 'Outfit', sans-serif; font-weight: 700; }

/* Tableau de signes */
.tsign { border-collapse: collapse; margin: 12px 0; border: 1px solid var(--border); background: var(--white); font-size: 15px; }
.tsign td, .tsign th { border: 1px solid var(--border); padding: 8px 16px; text-align: center; }
.tsign th { background: var(--cream); font-family: 'Outfit', sans-serif; font-weight: 700; }
.tsign .zero { color: var(--red); font-weight: 700; }
.tsign .plus { color: #1F7A3F; font-weight: 700; }
.tsign .minus { color: #B21A1A; font-weight: 700; }

/* ── CTA base button ── */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: var(--white);
  padding: 12px 22px;
  border-radius: 4px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(122,15,26,0.4), 0 4px 14px rgba(163,20,35,0.22);
}
.cta:hover {
  background: var(--red-dark);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 3px 0 rgba(122,15,26,0.5), 0 6px 18px rgba(163,20,35,0.3);
}
.cta:active { transform: translateY(0); }
.cta .arrow { transition: transform 0.15s ease; display: inline-block; }
.cta:hover .arrow { transform: translateX(3px); }

.cta-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.28);
  color: rgba(255,255,255,0.92);
  padding: 11px 22px;
  border-radius: 4px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  background: transparent;
  transition: all 0.15s ease;
}
.cta-outline:hover {
  border-color: var(--white);
  color: var(--white);
  background: rgba(255,255,255,0.04);
  text-decoration: none;
}

/* ── Mid-article inline CTA (after QCM) ── */
.inline-cta-section {
  padding: 28px 0;
  background: var(--white);
}
.inline-cta {
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-light) 100%);
  border: 1px solid var(--border);
  border-left: 4px solid var(--red);
  border-radius: 6px;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.inline-cta-content { flex: 1 1 320px; min-width: 0; }
.inline-cta-eye {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin: 0 0 4px;
}
.inline-cta h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  margin: 0 0 6px;
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
}
.inline-cta p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}
.inline-cta .cta { white-space: nowrap; flex-shrink: 0; }

/* ── Bottom CTA block (enhanced) ── */
.cta-block {
  background: var(--black);
  color: var(--white);
  padding: 48px 40px;
  border-radius: 6px;
  text-align: center;
  margin: 40px 0 0;
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--red);
}
.cta-block .cta-eye {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin: 0 0 12px;
}
.cta-block h3 {
  color: var(--white);
  font-size: 26px;
  margin: 0 0 12px;
  line-height: 1.2;
}
.cta-block p {
  color: rgba(255,255,255,0.7);
  margin: 0 auto 24px;
  max-width: 560px;
  font-size: 15px;
}
.cta-block .cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.cta-block .trust {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-size: 13px;
}
.cta-block .trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cta-block .trust-item::before {
  content: "✓";
  color: var(--red);
  font-weight: 800;
  font-size: 14px;
}

/* Footer */
.footer {
  background: var(--black);
  color: rgba(255,255,255,0.48);
  padding: 32px 0;
  font-size: 13px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer .logo-small {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--white);
  display: inline-block;
  margin-bottom: 6px;
}
.footer .logo-small .accent { color: var(--red); }

/* Table of contents */
.toc {
  background: var(--cream);
  border-radius: 6px;
  padding: 18px 22px;
  margin: 24px 0 0;
}
.toc .label {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 8px;
}
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 4px 0; font-size: 15px; }
.toc li a { color: var(--text); }
.toc li a:hover { color: var(--red); text-decoration: underline; }

/* Spacing utils */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.small { font-size: 14px; color: var(--text-muted); }

/* KaTeX tweaks */
.katex { font-size: 1.02em; }
.katex-display { margin: 14px 0; overflow-x: auto; overflow-y: hidden; }

/* Responsive */
@media (max-width: 640px) {
  .hero { padding: 40px 0 48px; }
  .hero h1 { font-size: 26px; }
  section { padding: 36px 0; }
  .qcm { font-size: 14px; }
  .qcm thead th, .qcm tbody td { padding: 10px 12px; }
  .q-block { padding: 16px 18px; }
  .inline-cta { padding: 18px 20px; gap: 16px; }
  .inline-cta h4 { font-size: 17px; }
  .inline-cta .cta { width: 100%; justify-content: center; }
  .cta-block { padding: 32px 22px; }
  .cta-block h3 { font-size: 22px; }
  .cta-block .trust { gap: 14px; font-size: 12px; }
  .nav-back { padding: 6px 12px; font-size: 12px; }
}
