:root {
  --navy: #0b2f6b;
  --blue: #1769aa;
  --light: #eef6ff;
  --line: #c8d9ee;
  --text: #172033;
  --muted: #667085;
  --yellow: #ffbd1a;
  --green: #43a66c;
  --purple: #7c4dcc;
  --bg: #f6f8fb
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg)
}

button {
  font: inherit
}

header {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #fff;
  padding: 0 20px 30px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08)
}

.course-appbar {
  margin: 0 -20px 24px;
  border-bottom: 1px solid rgba(11, 47, 107, .14);
  background: rgba(255, 255, 255, .98);
  color: var(--text)
}

.course-appbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 58px;
  margin: auto;
  padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left))
}

.course-appbar-actions {
  display: flex;
  align-items: center;
  gap: 8px
}

.course-physiqueplus-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 4px 9px 4px 5px;
  border: 1px solid #cbd2df;
  border-radius: 10px;
  background: #fff;
  color: #14213d;
  cursor: pointer;
  font: 800 12px/1 system-ui, sans-serif;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease
}

.course-physiqueplus-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #315fbd;
  color: #fff;
  font: 900 12px/1 Inter, system-ui, sans-serif;
  box-shadow: 0 5px 13px rgba(49, 95, 189, .28)
}

.course-physiqueplus-link:hover {
  border-color: #315fbd;
  background: #f4f7ff;
  color: #315fbd;
  box-shadow: 0 6px 16px rgba(11, 47, 107, .16)
}

.course-physiqueplus-link[aria-expanded="true"] {
  border-color: #315fbd;
  background: #eef3ff;
  color: #315fbd
}

.course-physiqueplus-link:focus-visible {
  border-color: #315fbd;
  background: #f4f7ff;
  color: #315fbd;
  outline: 3px solid rgba(49, 95, 189, .2);
  outline-offset: 3px
}

.course-fullscreen-button {
  display: grid;
  place-items: center;
  width: 40px;
  min-height: 38px;
  padding: 7px;
  border: 1px solid rgba(18, 31, 50, .18);
  border-radius: 11px;
  background: #fff;
  color: #182338;
  box-shadow: 0 5px 18px rgba(18, 31, 50, .1);
  cursor: pointer;
  font-size: 17px;
  font-weight: 750
}

.course-fullscreen-button:hover,
.course-fullscreen-button:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  outline: none
}

.course-fullscreen-button[aria-pressed="true"] {
  color: var(--blue)
}

.course-fullscreen-button[hidden] {
  display: none
}

.wrap {
  max-width: 1160px;
  margin: auto
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px
}

.brand {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .9
}

.level-badge {
  background: #fff;
  color: var(--navy);
  font-weight: 800;
  padding: 8px 13px;
  border-radius: 999px
}

header h1 {
  margin: 14px 0 4px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1
}

header p {
  margin: 0;
  opacity: .9
}

main {
  padding: 26px 20px 70px
}

.themes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px
}

.theme {
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 16px;
  padding: 15px;
  box-shadow: 0 5px 16px rgba(28, 48, 78, .04)
}

.theme h3 {
  margin: 4px 0;
  font-size: 17px
}

.theme p {
  margin: 0;
  font-size: 13px;
  color: var(--muted)
}

.energy {
  border-top: 5px solid var(--yellow)
}

.matter {
  border-top: 5px solid var(--green)
}

.motion {
  border-top: 5px solid #2a9d8f
}

.signals {
  border-top: 5px solid var(--purple)
}

.layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 20px;
  align-items: start
}

.sidebar,
.panel {
  background: #fff;
  border: 1px solid #e5ebf3;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(28, 48, 78, .05)
}

.sidebar {
  padding: 14px;
  position: sticky;
  top: 142px
}

.side-title {
  font-weight: 800;
  color: var(--navy);
  padding: 8px 8px 11px
}

.chapter-btn {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 11px 10px;
  cursor: pointer;
  color: var(--text);
  margin: 2px 0
}

.chapter-btn:hover {
  background: #f3f7fc
}

.chapter-btn.active {
  background: var(--navy);
  color: #fff
}

.chapter-btn small {
  display: block;
  opacity: .7;
  margin-top: 2px
}

.chapter-btn.locked {
  opacity: .5;
  cursor: default
}

.revision-btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: var(--yellow);
  color: #3d2a00;
  font-weight: 900;
  padding: 12px;
  margin-top: 12px;
  cursor: pointer
}

.panel {
  padding: 24px
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--light);
  color: var(--blue);
  font-weight: 800;
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 999px
}

h2 {
  color: var(--navy);
  font-size: 32px;
  margin: 13px 0 5px
}

.goal {
  margin: 0 0 17px;
  color: var(--muted)
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 18px
}

.progress {
  height: 9px;
  background: #e8eef6;
  border-radius: 999px;
  overflow: hidden;
  flex: 1
}

.progress span {
  display: block;
  height: 100%;
  background: var(--blue)
}

.progress-label {
  font-size: 13px;
  color: var(--muted)
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 20px
}

.tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  padding: 9px 12px;
  border-radius: 10px;
  font-weight: 750;
  cursor: pointer
}

.tab.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy)
}

.tab-content {
  display: none
}

.tab-content.active {
  display: block
}

.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 17px;
  margin: 13px 0;
  background: #fbfdff
}

.card h3 {
  margin: 0 0 9px;
  color: var(--navy);
  font-size: 19px
}

.card p,
.card li {
  line-height: 1.55
}

.card ul {
  padding-left: 22px
}

.remember {
  border-left: 5px solid var(--yellow);
  background: #fffaf0
}

.quiz-card {
  background: #f4f8ff;
  border: 1px solid #dce9fa;
  border-radius: 16px;
  padding: 17px;
  margin: 14px 0
}

.quiz-card h3 {
  margin: 0 0 8px;
  color: var(--navy)
}

.option {
  width: 100%;
  text-align: left;
  padding: 11px 13px;
  margin: 6px 0;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer
}

.option:hover {
  border-color: var(--blue)
}

.feedback {
  display: none;
  margin-top: 9px;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 750
}

.feedback.good {
  display: block;
  background: #e8f7ee;
  color: #166534
}

.feedback.bad {
  display: block;
  background: #fff0f0;
  color: #a61b1b
}

.next-btn {
  margin-top: 18px;
  border: 0;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  padding: 12px 16px;
  cursor: pointer
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(9, 25, 48, .56);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 20
}

.modal.open {
  display: flex
}

.modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  overflow: auto
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center
}

.close {
  border: 0;
  background: #edf2f7;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer
}

.score {
  font-size: 38px;
  font-weight: 900;
  color: var(--navy)
}

.hidden {
  display: none !important
}

.error {
  padding: 18px;
  border: 1px solid #efb7b7;
  background: #fff5f5;
  border-radius: 14px;
  color: #8a1c1c
}

@media(max-width:900px) {
  .themes {
    grid-template-columns: repeat(2, 1fr)
  }

  .layout {
    grid-template-columns: 1fr
  }

  .sidebar {
    position: static
  }
}

@media(max-width:560px) {
  header {
    position: static
  }

  .themes {
    grid-template-columns: 1fr
  }

  .panel {
    padding: 16px
  }

  h2 {
    font-size: 27px
  }

  .course-appbar-inner {
    min-height: 54px;
    padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right))
  }

}

.lesson-figure {
  margin: 18px auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  max-width: 860px;
}

.image-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.lesson-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 560px;
  height: auto;
  margin: auto;
  object-fit: contain;
  border-radius: 10px;
}

.lesson-figure figcaption {
  margin-top: 9px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.image-modal {
  z-index: 30
}

.image-modal-box {
  max-width: 1100px;
  width: min(96vw, 1100px);
  max-height: 94vh;
}

.image-modal-img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  margin: 12px auto 0;
  object-fit: contain;
}

.image-modal-caption {
  color: var(--navy);
  font-weight: 800;
  padding-right: 12px;
}

@media(max-width:560px) {
  .lesson-figure {
    padding: 8px;
    margin: 14px 0
  }

  .lesson-figure img {
    max-height: 420px
  }

  .image-modal-box {
    padding: 14px
  }
}

.revision-intro {
  color: var(--muted);
  margin-top: 0
}

.revision-modes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 16px 0
}

.revision-mode,
.count-btn,
.theme-choice {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: 12px;
  padding: 11px;
  cursor: pointer;
  font-weight: 800
}

.revision-mode.active,
.count-btn.active,
.theme-choice.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy)
}

.revision-choice {
  margin: 18px 0;
  padding: 16px;
  background: #f8fbff;
  border: 1px solid #e2ebf7;
  border-radius: 15px
}

.revision-choice h3,
.revision-count h3 {
  margin: 0 0 11px;
  color: var(--navy);
  font-size: 17px
}

.revision-select {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit
}

.theme-choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px
}

.theme-choice {
  text-align: left
}

.theme-choice small {
  display: block;
  margin-top: 4px;
  opacity: .72
}

.multi-choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px
}

.multi-choice {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 9px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid #e4eaf2;
  cursor: pointer
}

.multi-choice input {
  margin-top: 3px
}

.random-info p {
  margin-bottom: 0;
  color: var(--muted)
}

.count-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.count-btn {
  min-width: 58px
}

.revision-start {
  width: 100%;
  margin-top: 18px
}

.revision-setup-error {
  color: #a61b1b;
  font-weight: 750;
  margin-top: 10px
}

.revision-question-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--navy);
  font-weight: 800
}

.revision-question-head small {
  color: var(--muted);
  font-weight: 600;
  text-align: right
}

.revision-mini-progress {
  height: 7px;
  background: #e8eef6;
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 22px
}

.revision-mini-progress span {
  display: block;
  height: 100%;
  background: var(--blue)
}

.revision-note {
  font-size: 13px;
  color: var(--muted)
}

.revision-close-btn {
  margin-left: 8px
}

@media(max-width:700px) {
  .revision-modes {
    grid-template-columns: repeat(2, 1fr)
  }

  .multi-choices,
  .theme-choices {
    grid-template-columns: 1fr
  }

  .revision-question-head {
    align-items: flex-start;
    flex-direction: column
  }

  .revision-question-head small {
    text-align: left
  }
}

.quiz-type {
  display: inline-block;
  margin-bottom: 7px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #e7effa;
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em
}

.quiz-image {
  margin: 14px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: center
}

.quiz-image img {
  display: block;
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  margin: auto;
  object-fit: contain
}

.drag-help {
  font-size: 13px;
  color: var(--muted)
}

.drag-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 12px;
  min-height: 54px
}

.drag-item {
  border: 1px solid #b8cbe2;
  background: #f8fbff;
  color: var(--navy);
  padding: 8px 10px;
  border-radius: 9px;
  cursor: grab;
  font-weight: 700
}

.drag-item.selected {
  outline: 3px solid rgba(23, 105, 170, .22);
  border-color: var(--blue)
}

.drop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px
}

.drop-target {
  border: 2px dashed #c9d7e8;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  min-height: 100px;
  cursor: pointer
}

.drop-target strong {
  display: block;
  color: var(--navy);
  margin-bottom: 8px
}

.drop-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 42px
}

.check-drag {
  margin-top: 12px;
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  padding: 10px 13px;
  font-weight: 800;
  cursor: pointer
}

@media(max-width:700px) {
  .drop-grid {
    grid-template-columns: 1fr
  }

  .drag-item {
    cursor: pointer
  }
}

#revisionBody .rev-drag-item:disabled {
  opacity: .8;
  cursor: default
}

#revisionBody .check-drag:disabled {
  opacity: .65;
  cursor: default
}

#revisionBody .drop-target {
  min-height: 110px
}

.theme-filter {
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--text)
}

.theme-filter.active {
  box-shadow: 0 0 0 3px rgba(23, 105, 170, .18), 0 8px 22px rgba(28, 48, 78, .08);
  transform: translateY(-2px)
}

.all-theme {
  border-top: 5px solid var(--blue)
}

.theme-filter:focus-visible {
  outline: 3px solid rgba(23, 105, 170, .28);
  outline-offset: 2px
}

.section-navigation {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #edf0f4;
}

.section-next-btn {
  min-width: 210px;
}

@media(max-width:560px) {
  .section-navigation {
    justify-content: stretch
  }

  .section-next-btn {
    width: 100%;
    min-width: 0
  }
}

.chapter-quiz-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  margin-bottom: 6px
}

.chapter-quiz-head span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700
}

.chapter-single-question {
  margin-top: 14px
}

.chapter-quiz-result {
  text-align: center;
  padding: 28px 16px
}

.chapter-quiz-result .score {
  font-size: 48px;
  font-weight: 900;
  color: var(--navy);
  line-height: 1
}

.chapter-quiz-result p {
  color: var(--muted);
  margin-bottom: 20px
}

#chapterQuizSession .next-btn {
  margin-top: 14px
}

.progress-summary {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e1e8f1;
  border-radius: 14px;
  background: #f9fbfe
}

.progress-summary-title {
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 8px
}

.progress-theme-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  font-size: 13px
}

.progress-summary-foot {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e7edf5;
  color: var(--muted);
  font-size: 12px
}

.reset-progress-btn {
  width: 100%;
  margin-top: 10px;
  border: 1px solid #d8e1ec;
  background: #fff;
  color: #8a1c1c;
  border-radius: 10px;
  padding: 9px 10px;
  font-weight: 800;
  cursor: pointer
}

.reset-progress-btn:hover {
  background: #fff7f7
}

.progress-summary-help {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e7edf5;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4
}

.option.answer-correct,
.option.answer-correct:disabled {
  background: #eaf3ff;
  border-color: #1769aa;
  color: #0f4f85;
  opacity: 1;
  font-weight: 850;
  box-shadow: inset 0 0 0 2px #1769aa;
}

.option.answer-correct::before {
  content: "✓ ";
  font-weight: 900
}

.option.answer-wrong,
.option.answer-wrong:disabled {
  background: #fff0f0;
  border-color: #c94949;
  color: #8f1d1d;
  opacity: 1;
  font-weight: 400;
}

.option.answer-wrong::before {
  content: "✗ ";
  font-weight: 900
}

.option.answer-muted:disabled {
  opacity: .55;
  background: #f7f8fa
}

.drag-item.drag-correct,
.drag-item.drag-correct:disabled {
  background: #eaf3ff;
  border-color: #1769aa;
  color: #0f4f85;
  opacity: 1;
  font-weight: 850;
  box-shadow: inset 0 0 0 2px #1769aa;
}

.drag-item.drag-wrong,
.drag-item.drag-wrong:disabled {
  background: #fff0f0;
  border-color: #c94949;
  color: #8f1d1d;
  opacity: 1;
  font-weight: 400;
}

.level-switcher {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, .12);
  padding: 4px;
  border-radius: 999px
}

.level-btn {
  border: 0;
  background: transparent;
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer
}

.level-btn.active {
  background: #fff;
  color: var(--navy)
}

.level-state {
  margin-bottom: 14px
}

.level-empty-banner {
  padding: 12px 14px;
  border: 1px solid #d9e4f2;
  background: #f8fbff;
  border-radius: 12px;
  color: var(--navy);
  font-weight: 750
}

.empty-level {
  text-align: center;
  padding: 34px 18px
}

.empty-level h2 {
  margin-top: 0
}

@media(max-width:560px) {
  .level-switcher {
    order: 5;
    width: 100%;
    justify-content: center
  }

  .level-btn {
    min-width: 54px
  }
}

.brand-with-icon {
  display: flex;
  align-items: center;
  gap: 10px
}

.brand-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .10))
}

@media(max-width:560px) {
  .brand-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px
  }
}

/* ---------- Pied de page C4H10 ---------- */

.site-footer {
  margin-top: 10px;
  padding: 24px 20px;
  background: #fff;
  border-top: 1px solid #e5ebf3;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-c4h10 {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  text-decoration: none;
}

.footer-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
  border-radius: 50%;

  background: #eef6ff;
  border: 1px solid #d8e6f4;

  transition:
    transform .18s ease,
    box-shadow .18s ease;
}

.footer-logo img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  display: block;
}

.footer-c4h10:hover .footer-logo {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(28, 48, 78, .12);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.footer-brand strong {
  font-size: 15px;
}

.footer-brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;

  font-size: 13px;
  color: #a1a9b5;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--navy);
  text-decoration: underline;
}

@media(max-width:600px) {

  .site-footer {
    padding: 20px;
  }

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    gap: 14px;
  }

  .footer-c4h10 {
    justify-content: center;
  }

  .footer-links {
    justify-content: center;
  }

  .footer-logo {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }
}
