/* ==========================================================================
   Page pilier /cejm v4 (21/11/2026) : 11 BTS tertiaires + BTS SIO
   Style maison des pages piliers (/rattrapage, /resultats-examens, /programme) :
   réponse directe, étapes .aid-howto, « L'essentiel » .formav-keyfacts, H2 en question,
   séparateurs Apple, liste « Pour aller plus loin » .res-links, encadré sources.
   Règles : aucun z-index, aucun élément sticky, encadrés à bordure gauche toujours
   droits à gauche (border-radius: 0 12px 12px 0), aucun débordement horizontal mobile.
   ========================================================================== */

.cj-page {
  --cj-ink: color-mix(in srgb, var(--primary-color) 70%, #000);
  --cj-tint: color-mix(in srgb, var(--primary-color) 7%, #fff);
  --cj-tint-2: color-mix(in srgb, var(--primary-color) 14%, #fff);
  --cj-line: #e2e8f0;
  --cj-soft: #f8fafc;
  --cj-text: #1e293b;
  --cj-muted: #64748b;
  --cj-sticky: 96px;
  overflow-wrap: break-word;
}

.cj-page *,
.cj-page *::before,
.cj-page *::after {
  box-sizing: border-box;
}

/* Ancres : le titre visé s'arrête juste sous l'en-tête collant (hauteur mesurée en JS). */
.cj-page [id] {
  scroll-margin-top: calc(var(--cj-sticky) + 18px);
}

.page-content .cj-page h2.aid-h2 {
  margin-top: 8px;
}

.page-content .cj-page h3 {
  margin: 26px 0 10px;
  font-size: 1.12rem;
  line-height: 1.35;
}

.page-content .cj-page h4 {
  margin: 18px 0 6px;
  font-size: 1rem;
  line-height: 1.4;
}

.cj-page p {
  line-height: 1.65;
}

.cj-page :is(a, button, input, summary, select):focus-visible {
  outline: 2px solid var(--cj-ink);
  outline-offset: 2px;
}

.cj-muted {
  color: var(--cj-muted);
}

.cj-small {
  font-size: 0.9rem;
}

/* ----- Étapes de navigation (reprend .aid-howto, liens cliquables) ----- */
.page-content .cj-page .aid-howto li {
  padding: 0;
}

.page-content .cj-page .aid-howto li > a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 10px 12px 10px 42px;
  color: inherit;
  text-decoration: none;
  border-radius: 10px;
}

.page-content .cj-page .aid-howto li > a:hover {
  background: var(--cj-tint);
}

/* ----- Encadré à bordure gauche : toujours droit à gauche ----- */
.cj-note {
  margin: 16px 0;
  padding: 14px 18px;
  border-left: 4px solid var(--primary-color);
  border-radius: 0 12px 12px 0;
  background: var(--cj-soft);
  line-height: 1.6;
}

.cj-note > :first-child {
  margin-top: 0;
}

.cj-note > :last-child {
  margin-bottom: 0;
}

.cj-note-title {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
  color: var(--cj-text);
}

/* ----- Anatomie du sujet (3 blocs) ----- */
.cj-anatomy {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 10px;
  padding: 0;
  list-style: none;
  counter-reset: cjana;
}

.page-content .cj-anatomy li {
  position: relative;
  margin: 0;
  padding: 16px 16px 14px;
  border: 1px solid var(--cj-line);
  border-radius: 14px;
  background: #fff;
  counter-increment: cjana;
}

.cj-anatomy li::before {
  content: counter(cjana);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

.cj-anatomy li > strong {
  display: block;
  margin-bottom: 4px;
  color: var(--cj-text);
}

.cj-anatomy span {
  display: block;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #334155;
}

/* ----- Tableaux : bordure arrondie autorisée, cartes empilées sur mobile ----- */
.cj-table-wrap {
  margin: 14px 0 10px;
  border: 1px solid var(--cj-line);
  border-radius: 12px;
  overflow: hidden;
}

.page-content .cj-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.cj-table th,
.cj-table td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
  border-bottom: 1px solid #eef2f7;
}

.cj-table thead th {
  background: var(--cj-soft);
  color: var(--cj-text);
  font-weight: 700;
  font-size: 0.86rem;
}

.cj-table tbody tr:last-child td {
  border-bottom: 0;
}

.cj-table .is-current td {
  background: var(--cj-tint);
}

.cj-table small {
  display: block;
  color: var(--cj-muted);
  font-size: 0.84rem;
}

.cj-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--primary-color);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: 1px;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .cj-table-wrap {
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .page-content .cj-table,
  .cj-table tbody,
  .cj-table tr,
  .cj-table td {
    display: block;
    width: 100%;
  }

  .cj-table thead {
    display: none;
  }

  .cj-table tr {
    margin: 0 0 10px;
    padding: 6px 0;
    border: 1px solid var(--cj-line);
    border-radius: 12px;
    background: #fff;
  }

  .cj-table td {
    padding: 6px 14px;
    border: 0;
  }

  .cj-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--cj-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .cj-table td.cj-td-head::before {
    display: none;
  }

  .cj-table td.cj-td-head {
    font-size: 1rem;
  }
}

/* ----- Cartes outils (simulateur, feuille de route) ----- */
.cj-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0 8px;
}

.cj-card {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--cj-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.cj-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.page-content .cj-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.cj-badge {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--cj-tint-2);
  color: var(--cj-ink);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cj-card > p {
  margin: 0 0 12px;
  font-size: 0.93rem;
  color: #334155;
}

/* Simulateur de note */
.cj-sim-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--cj-text);
}

.cj-sim-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cj-sim-row input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  accent-color: var(--primary-color);
}

.cj-sim-row input[type="number"] {
  flex: 0 0 84px;
  width: 84px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font: inherit;
  text-align: center;
}

.cj-sim-out {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 10px;
}

.cj-sim-out div {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--cj-soft);
}

.cj-sim-out span {
  display: block;
  font-size: 0.78rem;
  color: var(--cj-muted);
  line-height: 1.35;
}

.cj-sim-out strong {
  display: block;
  margin-top: 2px;
  font-size: 1.02rem;
  color: var(--cj-text);
}

.cj-verdict {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.5;
}

.cj-verdict.is-ok {
  background: #dcfce7;
  color: #14532d;
}

.cj-verdict.is-mid {
  background: #fef3c7;
  color: #713f12;
}

.cj-verdict.is-ko {
  background: #fee2e2;
  color: #7f1d1d;
}

.cj-card .cj-foot {
  margin: 10px 0 0;
  font-size: 0.84rem;
  color: var(--cj-muted);
}

/* Feuille de route 4 h : 5 boutons de même largeur */
.cj-plan-btns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 4px 0 12px;
}

.cj-plan-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 58px;
  padding: 8px 4px;
  border: 1px solid var(--cj-line);
  border-radius: 10px;
  background: #fff;
  color: var(--cj-text);
  font: inherit;
  cursor: pointer;
  line-height: 1.2;
  text-align: center;
}

.cj-plan-btn .cj-plan-ord {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--cj-muted);
}

.cj-plan-btn .cj-plan-min {
  font-size: 0.95rem;
  font-weight: 700;
}

.cj-plan-btn:hover {
  border-color: var(--primary-color);
}

.cj-plan-btn[aria-selected="true"] {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: #fff;
}

.cj-plan-btn[aria-selected="true"] .cj-plan-ord {
  color: rgba(255, 255, 255, 0.85);
}

.cj-plan-detail {
  padding: 12px 14px;
  border-left: 4px solid var(--primary-color);
  border-radius: 0 12px 12px 0;
  background: var(--cj-soft);
}

.cj-plan-detail > strong {
  display: block;
  color: var(--cj-text);
}

.cj-plan-detail .cj-plan-slot {
  display: block;
  margin: 2px 0 6px;
  font-size: 0.84rem;
  color: var(--cj-muted);
}

.cj-plan-detail p {
  margin: 0;
  font-size: 0.92rem;
}

/* ----- Navigation des 6 thèmes ----- */
.cj-themes-nav {
  display: grid;
  gap: 12px;
  margin: 16px 0 14px;
}

.cj-year {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.cj-year-label {
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cj-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cj-year-btns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.cj-theme-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--cj-line);
  border-radius: 12px;
  background: #fff;
  color: var(--cj-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cj-theme-btn:hover {
  border-color: var(--primary-color);
}

.cj-theme-btn .cj-tb-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cj-ink);
}

.cj-theme-btn .cj-tb-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}

.cj-theme-btn[aria-selected="true"] {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: #fff;
}

.cj-theme-btn[aria-selected="true"] .cj-tb-num {
  color: rgba(255, 255, 255, 0.88);
}

.cj-panel[hidden] {
  display: none;
}

.cj-theme {
  padding: 22px 24px 18px;
  border: 1px solid var(--cj-line);
  border-radius: 14px;
  background: #fff;
}

.cj-theme-kicker {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cj-ink);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.page-content .cj-theme h3 {
  margin: 4px 0 8px;
  font-size: 1.22rem;
}

.cj-theme-q {
  margin: 0 0 14px;
  color: #334155;
  font-style: italic;
}

.cj-essentiel {
  margin: 0 0 16px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--cj-tint);
}

.cj-essentiel strong.cj-ess-title {
  display: block;
  margin-bottom: 6px;
  color: var(--cj-text);
}

.page-content .cj-essentiel ul {
  margin: 0;
  padding-left: 20px;
}

.page-content .cj-essentiel li {
  margin: 4px 0;
  line-height: 1.55;
}

/* Cours par discipline : accordéons natifs */
.cj-disc {
  margin: 0 0 10px;
  border: 1px solid var(--cj-line);
  border-radius: 12px;
  background: #fff;
}

.cj-disc > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--cj-text);
}

.cj-disc > summary::-webkit-details-marker {
  display: none;
}

.cj-disc > summary::after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-right: 2px solid var(--cj-muted);
  border-bottom: 2px solid var(--cj-muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s;
}

.cj-disc[open] > summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.cj-disc-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-color);
}

.cj-disc[data-disc="droit"] .cj-disc-dot {
  background: #0f766e;
}

.cj-disc[data-disc="management"] .cj-disc-dot {
  background: #b45309;
}

.cj-disc-meta {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--cj-muted);
}

.cj-disc > summary .cj-disc-dot {
  align-self: flex-start;
  margin-top: 6px;
}

.cj-disc-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cj-disc-num {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--cj-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cj-disc-q {
  font-weight: 700;
  line-height: 1.4;
  color: var(--cj-text);
}

.page-content .cj-comp li {
  margin: 3px 0;
}

.cj-refbox {
  margin: 12px 0 4px;
}

.page-content .cj-refindex li {
  margin: 7px 0;
}

.cj-refnum {
  margin-left: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  color: var(--cj-muted);
}

.cj-disc-body {
  padding: 0 18px 14px;
  border-top: 1px solid #eef2f7;
}

.cj-disc-body > h4:first-child {
  margin-top: 14px;
}

.cj-disc-body p {
  margin: 0 0 10px;
}

.cj-defs {
  margin: 12px 0 6px;
  padding: 0;
}

.cj-defs > div {
  padding: 8px 0;
  border-bottom: 1px dashed var(--cj-line);
}

.cj-defs > div:last-child {
  border-bottom: 0;
}

.cj-defs dt {
  font-weight: 700;
  color: var(--cj-text);
}

.cj-defs dd {
  margin: 2px 0 0;
  line-height: 1.55;
  color: #334155;
}

.cj-refs-title {
  display: block;
  margin: 12px 0 4px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--cj-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.page-content .cj-refs {
  margin: 0;
  padding-left: 20px;
}

.page-content .cj-refs li {
  margin: 5px 0;
  line-height: 1.55;
}

.cj-theme-foot {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.cj-fell {
  margin: 0;
  font-size: 0.9rem;
  color: #334155;
}

/* Auto-évaluation */
.cj-check {
  margin: 0;
  padding: 12px 16px;
  border: 1px dashed var(--cj-tint-2);
  border-radius: 12px;
}

.cj-check-title {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cj-text);
}

.cj-check label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.92rem;
  line-height: 1.5;
  cursor: pointer;
}

.cj-check input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary-color);
}

.cj-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 14px 0 4px;
  font-size: 0.92rem;
}

.cj-progress-track {
  flex: 1 1 180px;
  height: 8px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.cj-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--primary-color);
  transition: width 0.3s;
}

.cj-linkbtn {
  min-height: 40px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--cj-ink);
  font: inherit;
  font-size: 0.88rem;
  text-decoration: underline;
  cursor: pointer;
}

/* ----- Onglets (méthode, sujets blancs) : boutons de même largeur ----- */
.cj-tabs {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 6px;
  margin: 14px 0 12px;
  padding: 5px;
  border-radius: 12px;
  background: #f1f5f9;
}

.cj-tab {
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}

.cj-tab:hover {
  color: var(--cj-text);
}

.cj-tab[aria-selected="true"] {
  background: #fff;
  color: var(--cj-ink);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

/* Méthode */
.cj-steps {
  margin: 12px 0;
  padding: 0;
  list-style: none;
  counter-reset: cjstep;
}

.page-content .cj-steps > li {
  position: relative;
  margin: 0;
  padding: 0 0 14px 42px;
  counter-increment: cjstep;
}

.cj-steps > li::before {
  content: counter(cjstep);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

.cj-steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 30px;
  bottom: 2px;
  left: 13px;
  width: 2px;
  background: var(--cj-line);
}

.cj-steps > li > strong {
  display: block;
  color: var(--cj-text);
}

.cj-steps p {
  margin: 2px 0 0;
  font-size: 0.94rem;
}

.cj-formula {
  display: block;
  margin-top: 6px;
  padding: 8px 12px;
  border-left: 3px solid var(--primary-color);
  border-radius: 0 10px 10px 0;
  background: var(--cj-soft);
  font-size: 0.9rem;
  color: #334155;
}

.cj-compare {
  margin: 16px 0 6px;
  padding: 16px 18px;
  border: 1px solid var(--cj-line);
  border-radius: 14px;
  background: #fff;
}

.cj-compare-sit {
  margin: 0 0 12px;
  font-size: 0.94rem;
}

.cj-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  max-width: 100%;
  margin-bottom: 12px;
  padding: 4px;
  border-radius: 10px;
  background: #f1f5f9;
}

.cj-switch button {
  min-height: 40px;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.cj-switch button[aria-pressed="true"] {
  background: #fff;
  color: var(--cj-ink);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

.cj-copy {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--cj-soft);
  font-size: 0.94rem;
  line-height: 1.65;
}

.cj-copy p {
  margin: 0 0 8px;
}

.cj-copy-verdict {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}

.cj-copy-verdict.is-ko {
  background: #fee2e2;
  color: #7f1d1d;
}

.cj-copy-verdict.is-ok {
  background: #dcfce7;
  color: #14532d;
}

.cj-toolgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.cj-tool {
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--cj-line);
  border-radius: 12px;
  background: #fff;
}

.cj-tool > strong {
  display: block;
  color: var(--cj-text);
}

.cj-tool .cj-tool-when {
  display: block;
  margin: 2px 0 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cj-ink);
}

.cj-tool p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ----- Ce qui tombe le plus ----- */
.cj-freq {
  margin: 14px 0 8px;
  padding: 0;
  list-style: none;
}

.page-content .cj-freq li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 6px 16px;
  align-items: center;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f7;
}

.cj-freq li:last-child {
  border-bottom: 0;
}

.cj-freq-name strong {
  display: block;
  color: var(--cj-text);
  font-size: 0.95rem;
}

.cj-freq-name small {
  display: block;
  color: var(--cj-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.cj-freq-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--cj-text);
  white-space: nowrap;
}

.cj-freq-track {
  flex: 1 1 auto;
  height: 8px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.cj-freq-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--primary-color);
}

/* ----- Sujets blancs ----- */
.cj-sujet {
  padding: 20px 22px 12px;
  border: 1px solid var(--cj-line);
  border-radius: 14px;
  background: #fff;
}

.cj-sujet-kicker {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cj-ink);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.page-content .cj-sujet h3 {
  margin: 4px 0 6px;
  font-size: 1.18rem;
}

.cj-sujet-meta {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--cj-muted);
}

.cj-annexes {
  margin: 12px 0;
  border: 1px solid var(--cj-line);
  border-radius: 12px;
  background: var(--cj-soft);
}

.cj-annexes > summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
  color: var(--cj-text);
}

.cj-annexes-body {
  padding: 0 16px 10px;
}

.cj-annexe {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  font-size: 0.92rem;
  line-height: 1.6;
}

.cj-annexe > strong {
  display: block;
  margin-bottom: 2px;
  color: var(--cj-text);
}

.cj-annexe p {
  margin: 0;
}

.cj-mission {
  margin: 18px 0 6px;
}

.page-content .cj-mission h4 {
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--cj-tint-2);
}

.cj-q {
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #fff;
}

.cj-q-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.cj-q-num {
  font-weight: 700;
  color: var(--cj-ink);
  margin-right: 4px;
}

.cj-q details {
  margin-top: 8px;
}

.cj-q summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--cj-ink);
}

.cj-answer {
  margin-top: 6px;
  padding: 12px 14px;
  border-left: 4px solid var(--primary-color);
  border-radius: 0 12px 12px 0;
  background: var(--cj-soft);
  font-size: 0.93rem;
  line-height: 1.65;
}

.cj-answer p {
  margin: 0 0 8px;
}

.cj-answer p:last-child,
.cj-answer ul:last-child {
  margin-bottom: 0;
}

.page-content .cj-answer ul {
  margin: 4px 0 8px;
  padding-left: 20px;
}

.page-content .cj-answer li {
  margin: 3px 0;
}

/* ----- Ponts vers les autres épreuves ----- */
.page-content .cj-bridges {
  margin: 12px 0;
  padding-left: 20px;
}

.page-content .cj-bridges li {
  margin: 8px 0;
  line-height: 1.6;
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .cj-tools {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .cj-anatomy {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .page-content .cj-anatomy li {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    column-gap: 12px;
    padding: 12px 14px;
  }

  .cj-anatomy li::before {
    grid-row: span 2;
    margin-bottom: 0;
  }

  .cj-year {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .cj-year-btns {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .cj-theme-btn {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    padding: 10px 12px;
  }

  .cj-theme-btn .cj-tb-num {
    flex: 0 0 auto;
  }

  .cj-theme {
    padding: 16px 14px 12px;
  }

  .cj-disc > summary {
    padding: 12px 13px;
  }

  .cj-disc-body {
    padding: 0 13px 12px;
  }

  .cj-toolgrid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cj-tabs {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cj-tabs.cj-tabs-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .cj-sujet {
    padding: 16px 14px 8px;
  }

  .page-content .cj-freq li {
    grid-template-columns: minmax(0, 1fr);
  }

  .cj-sim-out {
    grid-template-columns: minmax(0, 1fr);
  }

  .cj-sim-out div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
  }

  .cj-sim-out strong {
    margin: 0;
    text-align: right;
  }
}

@media (max-width: 420px) {
  .cj-plan-btn {
    min-height: 54px;
    padding: 6px 2px;
  }

  .cj-plan-btn .cj-plan-ord {
    font-size: 0.72rem;
  }

  .cj-plan-btn .cj-plan-min {
    font-size: 0.86rem;
  }

  .cj-card {
    padding: 16px 14px;
  }
}

@media print {
  .cj-tabs,
  .cj-themes-nav,
  .cj-switch,
  .cj-plan-btns,
  .cj-sim-row,
  .cj-progress {
    display: none !important;
  }

  .cj-panel[hidden],
  .cj-disc,
  .cj-q details {
    display: block !important;
  }
}

/* Encart fiches de révision (fin de la partie programme) */
.cj-promo a {
  display: inline-block;
  margin-top: 6px;
  font-weight: 700;
}

/* Date de mise à jour, citation officielle, idées reçues */
.cj-updated {
  margin: -4px 0 14px;
  font-size: 0.86rem;
  color: var(--cj-muted);
}

.cj-quote {
  margin: 16px 0;
  padding: 12px 18px;
  border-left: 4px solid var(--primary-color);
  border-radius: 0 12px 12px 0;
  background: var(--cj-tint);
}

.cj-quote p {
  margin: 0 0 4px;
  font-size: 1.02rem;
  font-style: italic;
  color: var(--cj-text);
}

.cj-quote footer {
  font-size: 0.84rem;
  color: var(--cj-muted);
}

.cj-myths {
  margin: 10px 0 8px;
  padding: 0;
  list-style: none;
}

.page-content .cj-myths li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f7;
  line-height: 1.55;
}

.cj-myths li:last-child {
  border-bottom: 0;
}

.cj-myth-tag {
  flex: 0 0 auto;
  min-width: 52px;
  padding: 2px 0;
  border-radius: 999px;
  background: #fee2e2;
  color: #7f1d1d;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.cj-myth-tag.is-true {
  background: #dcfce7;
  color: #14532d;
}

.cj-tag-link {
  text-decoration: none;
}

.cj-tag-link:hover,
.cj-tag-link:focus-visible {
  background: var(--cj-ink);
  color: #fff;
}

/* Tableau des 11 BTS : carte compacte sur mobile (épreuve, coefficient, poids sur une ligne) */
@media (max-width: 720px) {
  .cj-table-compact tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 4px;
  }

  .cj-table-compact td.cj-td-head {
    grid-column: 1 / -1;
  }

  .cj-table-compact td {
    padding: 4px 12px;
  }
}

/* Listes de mise en page : neutralise le retrait global des listes de .page-content */
.page-content .cj-page ol.cj-anatomy,
.page-content .cj-page ol.cj-steps,
.page-content .cj-page ul.cj-freq,
.page-content .cj-page ul.cj-myths {
  margin-left: 0;
  padding-left: 0;
  list-style: none;
}
