/* Chrome partagé — pages d'exercices contextuels (dissertation philo) */
:root {
  --ink: #1c1b2e;
  --ink-2: #3a3856;
  --ink-3: #6b6896;
  --paper: #f7f6f2;
  --paper-2: #eeecea;
  --paper-3: #e3e0d8;
  --white: #fffcf8;
  --accent: #2d6a4f;
  --accent-2: #40916c;
  --accent-soft: #d8f3dc;
  --accent-soft-2: #b7e4c7;
  --font-d: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-b: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --r: 8px;
  --sh: 0 1px 3px rgba(28, 27, 46, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-b);
  background:
    radial-gradient(ellipse 60% 40% at 0% 0%, rgba(45, 106, 79, 0.1) 0%, transparent 55%),
    var(--paper);
  color: var(--ink);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.exo-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 18px 64px;
}

.exo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--accent-soft-2);
}

.exo-brand {
  font-family: var(--font-d);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
}

.exo-brand span {
  display: block;
  font-family: var(--font-b);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 2px;
}

.exo-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: none;
  border-radius: var(--r);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--sh);
  transition: background 0.15s;
}

.exo-close:hover {
  background: var(--accent-2);
}

.exo-close:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.exo-panel {
  background: var(--white);
  border: 1px solid var(--paper-3);
  border-radius: 12px;
  padding: 28px 28px 32px;
  box-shadow: var(--sh);
}

.exo-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: var(--r);
  margin-bottom: 12px;
}

.exo-panel h1 {
  font-family: var(--font-d);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 10px;
}

.exo-lead {
  color: var(--ink-2);
  margin-bottom: 22px;
  max-width: 52ch;
  font-size: 15.5px;
}

.exo-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--paper-3);
}

.exo-section h2 {
  font-family: var(--font-d);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.exo-section p,
.exo-section li {
  color: var(--ink-2);
  font-size: 15px;
}

.exo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 0;
}

.exo-list > li {
  position: relative;
  padding: 12px 14px 12px 40px;
  background: var(--paper);
  border: 1px solid var(--paper-3);
  border-radius: var(--r);
  line-height: 1.55;
}

.exo-list > li::before {
  content: counter(exo-n);
  counter-increment: exo-n;
  position: absolute;
  left: 10px;
  top: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exo-list {
  counter-reset: exo-n;
}

.exo-box {
  margin-top: 16px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #f4faf6 0%, #eef6f1 100%);
  border: 1px solid var(--accent-soft-2);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  font-size: 14.5px;
  color: var(--ink-2);
}

.exo-box strong {
  color: var(--ink);
}

.exo-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--paper-3);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.exo-hint {
  font-size: 13px;
  color: var(--ink-3);
  max-width: 36ch;
}

@media (max-width: 640px) {
  .exo-shell {
    padding: 14px 12px 48px;
  }

  .exo-panel {
    padding: 20px 16px 24px;
  }

  .exo-panel h1 {
    font-size: 22px;
  }

  .exo-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .exo-close {
    width: 100%;
  }
}

/* ── Perspectives : un concept se définit dans un cadre ─────────── */

.persp-rappel {
  margin: 14px 0 18px;
  padding: 12px 15px;
  border-radius: 11px;
  background: #f6f6fc;
  border: 1px solid rgba(20, 20, 60, 0.09);
  font: 400 13px/1.6 system-ui, -apple-system, sans-serif;
  color: #45455f;
}

.persp-rappel strong { display: block; margin-bottom: 6px; color: #26263a; }
.persp-rappel ul { margin: 0 0 8px; padding-left: 20px; }
.persp-rappel li { margin-bottom: 2px; }
.persp-rappel p { margin: 0; font-style: italic; color: #6a6a86; }

.persp-phase {
  margin: 22px 0 4px;
  font: 600 13px system-ui, sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #5a5a80;
  border-top: 1px solid rgba(20, 20, 60, 0.09);
  padding-top: 14px;
}

.persp-liste { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }

.persp-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 13px;
  border: 1px solid rgba(20, 20, 60, 0.1);
  border-radius: 10px;
  background: #fff;
}

.persp-txt { flex: 1 1 260px; font: 400 14.5px/1.5 Georgia, serif; color: #2c2c3f; }

.persp-select { flex: 0 0 auto; width: auto; min-width: 210px; font-size: 13px; padding: 6px 9px; }

@media (max-width: 620px) {
  .persp-select { width: 100%; min-width: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   Lire et comprendre — choix puis justification
   ═══════════════════════════════════════════════════════════════ */

.ls-ref { margin: 0 0 8px; font: 500 12.5px system-ui, sans-serif; color: #8a8aa4; }

.ls-texte {
  margin: 0 0 16px;
  padding: 14px 18px;
  border-left: 3px solid #c9c9e4;
  background: #f8f8fc;
  border-radius: 0 10px 10px 0;
  font: 400 15px/1.75 Georgia, 'Times New Roman', serif;
  color: #2c2c3f;
  white-space: pre-line;
}

.ls-question { margin: 0 0 10px; font: 600 14.5px/1.5 system-ui, sans-serif; color: #26263a; }

.ls-options { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }

.ls-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 14px;
  border: 1px solid rgba(20, 20, 60, 0.12);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.ls-option:hover { border-color: #a9a9d0; background: #fbfbff; }

.ls-option--on { border-color: #3c3c72; background: #f0f0fb; box-shadow: 0 0 0 1px #3c3c72 inset; }

.ls-puce {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #eeeef7;
  color: #5a5a80;
  font: 600 11.5px/22px system-ui, sans-serif;
  text-align: center;
}

.ls-option--on .ls-puce { background: #3c3c72; color: #fff; }

.ls-txt { font: 400 14.5px/1.6 system-ui, -apple-system, sans-serif; color: #2c2c3f; }

/* ── La pyramide IP / AP / AS ─────────────────────────────────── */

.pyr-legende {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin: 14px 0 10px;
  font: 400 12px system-ui, sans-serif; color: #7a7a96;
}
.pyr-legende b { color: #3c3c72; }

.pyr-source { max-height: 260px; overflow-y: auto; }

.pyr-arbre { display: grid; gap: 14px; margin-top: 6px; }

.pyr-etage { display: flex; gap: 12px; align-items: flex-start; }

.pyr-etage--ip {
  padding: 13px 15px;
  border-radius: 12px;
  background: #f2f2fb;
  border: 1px solid #c9c9e8;
}

.pyr-etage--ap { flex-direction: column; gap: 8px; padding-left: 4px; }

.pyr-ap { display: flex; gap: 12px; align-items: flex-start; }

.pyr-as-liste { display: grid; gap: 7px; margin-left: 34px; }

.pyr-as { display: flex; gap: 10px; align-items: flex-start; }

.pyr-cell { flex: 1 1 auto; min-width: 0; }

.pyr-label { display: block; margin-bottom: 5px; font: 600 12px system-ui, sans-serif; color: #4a4a6a; }

.pyr-tag {
  flex: 0 0 auto;
  min-width: 34px;
  padding: 4px 8px;
  border-radius: 7px;
  background: #3c3c72;
  color: #fff;
  font: 600 11px system-ui, sans-serif;
  text-align: center;
}

.pyr-tag--ap { background: #5a5a96; }
.pyr-tag--as { background: #9a9ac0; min-width: 46px; font-size: 10.5px; }

.pyr-champ {
  width: 100%; box-sizing: border-box;
  border: 1px solid rgba(20, 20, 60, 0.16);
  border-radius: 9px;
  padding: 9px 11px;
  font: 400 14px/1.55 Georgia, serif;
  color: #26263a;
  background: #fff;
  resize: vertical;
}
.pyr-champ:focus { outline: none; border-color: #6a6ab0; box-shadow: 0 0 0 3px rgba(106,106,176,.13); }
.pyr-champ--ip { font-size: 15px; font-weight: 600; }
.pyr-champ--as { font-size: 13.5px; background: #fcfcff; }

.pyr-astuce {
  margin: 14px 0 0;
  padding: 10px 13px;
  border-radius: 10px;
  background: #fffaf0;
  border: 1px solid #ecdcb8;
  font: 400 13px/1.6 system-ui, sans-serif;
  color: #6a5320;
}

/* ── Argumenter : aide en marge du libellé ────────────────────── */

.arg-aide { display: block; font-weight: 400; font-size: 12px; color: #8a8aa4; margin-top: 2px; }

/* ── Règle, cas, résultat ─────────────────────────────────────── */

.rcr-rappel {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px;
  margin: 14px 0 16px;
}
.rcr-rappel > div {
  padding: 10px 13px; border-radius: 10px;
  background: #f7f7fc; border: 1px solid rgba(20,20,60,.09);
}
.rcr-rappel b { display: block; font: 600 13px system-ui, sans-serif; color: #26263a; }
.rcr-rappel span { display: block; font: 400 12.5px system-ui, sans-serif; color: #5a5a80; margin: 3px 0; }
.rcr-rappel em { font: italic 400 11.5px system-ui, sans-serif; color: #8a8aa4; }

/* ── Le Défi ──────────────────────────────────────────────────── */

.defi-carte {
  margin-bottom: 16px;
  padding: 18px 20px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2b2b52, #3f3f77);
  color: #f2f3fa;
  box-shadow: 0 4px 20px rgba(30, 30, 70, 0.18);
}

.defi-kicker {
  font: 600 10.5px system-ui, sans-serif;
  letter-spacing: 0.09em; text-transform: uppercase; color: #b9bce0;
}

.defi-head h3 { margin: 4px 0 14px; font-size: 20px; color: #fff; }

.defi-des { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }

.defi-de {
  padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.defi-de span { display: block; font: 600 10px system-ui, sans-serif; letter-spacing: .07em; text-transform: uppercase; color: #b9bce0; }
.defi-de b { display: block; margin-top: 3px; font: 600 14.5px/1.4 Georgia, serif; color: #fff; }

.defi-consigne { margin: 14px 0 0; font: 400 14px/1.65 system-ui, sans-serif; color: #dfe1f0; }

.defi-barre { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }

.defi-chrono {
  font: 700 22px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  color: #fff; min-width: 74px;
}
.defi-chrono--fini { color: #ffb4b4; }

.defi-barre .btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.24); color: #fff; }
.defi-barre .btn:hover { background: rgba(255,255,255,.22); }

/* ── Le pont : ce que le geste formel devient en dissertation ──── */

.exo-pont {
  margin-top: 14px;
  padding: 12px 15px;
  border-radius: 11px;
  background: #f4f7f5;
  border: 1px solid #cfe0d6;
  border-left: 3px solid #3f8f6b;
}

.exo-pont-titre {
  display: block;
  margin-bottom: 4px;
  font: 600 10.5px system-ui, sans-serif;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #3f8f6b;
}

.exo-pont p {
  margin: 0;
  font: 400 13.5px/1.65 Georgia, serif;
  color: #2c4437;
}
