:root {
  --mp-blue:#009CEA;
  --mp-green:#7CBB00;
  --mp-orange:#D66B07;
  --mp-yellow:#EAAA00;
  --mp-dark:#17324d;
  --mp-muted:#5f7187;
  --mp-border:#e4edf6;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

body.mp-ce2-figures-page {
  margin: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(0,156,234,.08), transparent 24%),
    radial-gradient(circle at 90% 12%, rgba(234,170,0,.10), transparent 24%),
    #f6f8fb;
  color: var(--mp-dark);
  font-family: Arial, Helvetica, sans-serif;
  padding-bottom: 22px;
}

.mp-nav-wrap {
  max-width: 1120px;
  margin: 18px auto 16px;
  padding: 0 15px;
}

.mp-nav-wrap .navbar {
  margin: 0;
  min-height: 100px;
  background: #fff;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(15,23,42,.08);
}

.mp-nav-wrap .navbar-brand {
  height: auto;
  padding: 12px 15px;
}

.mp-nav-wrap .navbar-brand img {
  max-height: 78px;
  width: auto;
  display: block;
}

.mp-nav-wrap .navbar-nav { margin-top: 24px; }

.mp-nav-wrap .navbar-nav > li > a {
  color: #fff !important;
  font-weight: 800;
  padding: 13px 18px;
  line-height: 20px;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(15,23,42,.14);
  margin: 0 5px;
  transition: all .15s ease;
}

.mp-nav-wrap .navbar-nav > li > a:hover,
.mp-nav-wrap .navbar-nav > li > a:focus {
  color: #fff !important;
  text-decoration: none;
  filter: brightness(.97);
  transform: translateY(-2px);
}

.mp-nav-wrap .navbar-toggle {
  margin-top: 30px;
  margin-right: 15px;
}

.mp-hero {
  margin: 26px auto 22px;
  padding: 38px 32px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(124,187,0,.18), transparent 34%),
    linear-gradient(135deg,#fff 0%,#eef8ff 100%);
  border: 1px solid rgba(0,156,234,.16);
  box-shadow: 0 14px 38px rgba(15,23,42,.10);
  display: grid;
  grid-template-columns: 92px minmax(0,1fr);
  gap: 24px;
  align-items: center;
}

.mp-hero-icon {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  background: var(--mp-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: #fff;
  box-shadow: 0 14px 28px rgba(124,187,0,.22);
}

.mp-eyebrow {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(124,187,0,.14);
  color: #447000;
  font-weight: 900;
  margin-bottom: 14px;
}

.mp-hero h1 {
  margin: 0 0 12px;
  font-size: 40px;
  line-height: 1.12;
  font-weight: 900;
  color: #1f2937;
}

.mp-hero p {
  font-size: 18px;
  line-height: 1.55;
  color: var(--mp-muted);
  max-width: 850px;
  margin: 0;
}

.mp-hero-level {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #d8efb5;
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
  font-weight: 900;
  color: #1d3f05;
}

.mp-hero-level img {
  height: 58px;
  width: auto;
  display: block;
}

.mp-actions { margin-top: 22px; }

.mp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  min-height: 46px;
  padding: 13px 20px;
  border-radius: 14px;
  font-weight: 900;
  text-decoration: none !important;
  margin: 0 8px 10px 0;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.mp-btn:hover { transform: translateY(-2px); }
.mp-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.mp-btn-primary {
  background: var(--mp-blue);
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(0,156,234,.22);
}

.mp-btn-secondary {
  background: #fff;
  color: var(--mp-dark) !important;
  border: 1px solid #d8e2eb;
}

.mp-quick-access {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 22px;
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #eef8ff, #fff7e9);
  border: 1px solid #cfe8f8;
  box-shadow: 0 8px 20px rgba(15,23,42,.08);
}

.mp-quick-access strong,
.mp-quick-access span { display: block; }
.mp-quick-access strong { color: #0f3554; font-size: 18px; }
.mp-quick-access span { color: var(--mp-muted); }

.mp-card {
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 10px 24px rgba(15,23,42,.07);
  margin-bottom: 22px;
  overflow-wrap: anywhere;
}

.mp-card h2,
.mp-card h3 { margin-top: 0; font-weight: 900; }
.mp-card h2 { font-size: 29px; }
.mp-card h3 { font-size: 22px; margin-top: 22px; }

.mp-card p,
.mp-lesson-list,
.mp-correction-content {
  font-size: 17px;
  line-height: 1.75;
}

.mp-card p { color: var(--mp-muted); }

.mp-objective-box,
.mp-reminder {
  border-radius: 20px;
  padding: 16px 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 17px;
  line-height: 1.7;
}

.mp-objective-box { border-left: 6px solid var(--mp-green); }
.mp-reminder { background: #eff6ff; border-color: #bfdbfe; }

.mp-figures-grid,
.mp-method-steps,
.mp-related-grid {
  display: grid;
  gap: 12px;
  margin: 16px 0 22px;
}

.mp-figures-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.mp-method-steps { grid-template-columns: repeat(4, minmax(0,1fr)); }
.mp-related-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }

.mp-figure-card,
.mp-method-steps div,
.mp-related-grid a {
  min-width: 0;
  border: 1px solid #bfdff3;
  background: #eef8ff;
  border-radius: 18px;
  padding: 14px;
}

.mp-figure-card {
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
}

.mp-figure-card strong,
.mp-method-steps strong {
  display: block;
  color: #0f3554;
  font-size: 18px;
}

.mp-figure-card small {
  color: var(--mp-muted);
  font-weight: 800;
  line-height: 1.4;
}

.mp-shape {
  display: block;
  width: 72px;
  height: 54px;
  background: #fff5cc;
  border: 4px solid var(--mp-orange);
}

.mp-triangle {
  width: 0;
  height: 0;
  border-left: 38px solid transparent;
  border-right: 38px solid transparent;
  border-bottom: 64px solid var(--mp-orange);
  background: transparent;
  position: relative;
}
.mp-triangle::after {
  content: '';
  position: absolute;
  left: -29px;
  top: 13px;
  border-left: 29px solid transparent;
  border-right: 29px solid transparent;
  border-bottom: 49px solid #fff5cc;
}
.mp-square { width: 58px; height: 58px; }
.mp-rectangle { width: 82px; height: 48px; }
.mp-circle { width: 62px; height: 62px; border-radius: 999px; }

.mp-method-steps span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--mp-blue);
  color: #fff;
  font-weight: 900;
  margin-bottom: 8px;
}

.mp-lesson-list { padding-left: 22px; }
.mp-lesson-list li { margin-bottom: 8px; }

.mp-quiz-card {
  background:
    radial-gradient(circle at 15px 15px, rgba(0,156,234,.09) 2px, transparent 3px) 0 0/28px 28px,
    #fff;
}

.mp-quiz-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.mp-step-pill,
.mp-score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 18px;
  font-weight: 900;
}
.mp-step-pill { background: #e9d5ff; color: #5b21b6; }
.mp-score-pill { background: #ecfccb; color: #365314; }

.mp-quiz-card h2 {
  font-size: 34px;
  line-height: 1.18;
  color: #0f3554;
}

.mp-quiz-instruction {
  font-size: 18px;
  font-weight: 800;
  color: #44556a !important;
}

.mp-order-area {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 18px;
  align-items: stretch;
  margin: 24px 0 24px;
}

.mp-slot-wrap {
  position: relative;
  min-width: 0;
}

.mp-slot-wrap:not(:last-child)::after {
  content: '›';
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 46px;
  line-height: 1;
  color: #9ca3af;
  font-weight: 900;
}

.mp-slot {
  min-height: 96px;
  border: 3px solid #f5ad25;
  border-radius: 16px;
  background: #fff4c6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.75);
}

.mp-slot::before {
  content: attr(data-index);
  position: absolute;
  top: 8px;
  left: 10px;
  color: rgba(15,53,84,.45);
  font-weight: 900;
}

.mp-slot.is-over { background: #eef8ff; border-color: var(--mp-blue); }
.mp-slot.is-correct { border-color: #22c55e; background: #dcfce7; }
.mp-slot.is-wrong { border-color: #ef4444; background: #fee2e2; }

.mp-bank-title {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 10px;
  color: #0f3554;
}

.mp-label-bank {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 108px;
  padding: 18px;
  border: 2px dashed #c6d6e6;
  border-radius: 22px;
  background: rgba(248,250,252,.84);
  margin-bottom: 16px;
}

.mp-label {
  min-width: 128px;
  border: 2px solid #c6d6e6;
  background: #fff;
  color: #0f172a;
  border-radius: 13px;
  padding: 14px 16px;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
  cursor: grab;
  touch-action: manipulation;
}
.mp-label:active { cursor: grabbing; }
.mp-label.is-selected { outline: 4px solid rgba(0,156,234,.25); background: #eef8ff; }

.mp-feedback {
  display: none;
  margin: 14px 0;
  padding: 13px 16px;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 900;
}
.mp-feedback.is-visible { display: block; }
.mp-feedback.is-good { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.mp-feedback.is-bad { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }

.mp-quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.mp-help-box {
  margin-top: 18px;
  border-radius: 18px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.mp-help-box p { margin-bottom: 0; }

.mp-correction-toggle {
  width: 100%;
  border: 0;
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(135deg, var(--mp-blue), #38bdf8);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.mp-correction-content { margin-top: 18px; }
.mp-correction-content li { margin-bottom: 10px; }

.mp-related-grid a {
  display: block;
  color: #0f3554;
  font-weight: 900;
  text-decoration: none !important;
}
.mp-related-grid a:hover { background: #dff2ff; }

@media (max-width: 991px) {
  .mp-figures-grid,
  .mp-method-steps,
  .mp-related-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .mp-order-area { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .mp-slot-wrap:nth-child(2)::after { content: ''; }
}

@media (max-width: 767px) {
  .mp-nav-wrap {
    margin-top: 0;
    padding-left: 8px;
    padding-right: 8px;
  }

  .mp-nav-wrap .navbar {
    min-height: 0;
    border-radius: 0 0 18px 18px;
  }

  .mp-nav-wrap .navbar-brand img { max-height: 64px; }
  .mp-nav-wrap .navbar-nav { margin-top: 7.5px; }
  .mp-nav-wrap .navbar-nav > li > a { display: block; margin: 6px 0; text-align: center; }
  .mp-nav-wrap .navbar-toggle { margin-top: 24px; }

  .mp-hero {
    grid-template-columns: 1fr;
    padding: 24px 18px;
    border-radius: 24px;
  }

  .mp-hero-icon { width: 74px; height: 74px; font-size: 34px; }
  .mp-hero h1 { font-size: 31px; }
  .mp-hero-level,
  .mp-quick-access { width: 100%; }
  .mp-hero-level { justify-content: center; }

  .mp-quick-access {
    align-items: stretch;
    flex-direction: column;
  }

  .mp-card { padding: 18px; border-radius: 22px; }
  .mp-card h2 { font-size: 25px; }

  .mp-figures-grid,
  .mp-method-steps,
  .mp-related-grid,
  .mp-order-area { grid-template-columns: 1fr; }

  .mp-slot-wrap::after { content: '' !important; }
  .mp-slot { min-height: 78px; }
  .mp-label { width: 100%; min-width: 0; }

  .mp-actions,
  .mp-quiz-actions { flex-direction: column; }
  .mp-btn { width: 100%; }
}
/* MAPRIMAIRE_BREADCRUMB_FOOTER */
.mp-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 11px 15px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #dbe8f4;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
  color: #5f7187;
  font-size: 15px;
  line-height: 1.45;
}

.mp-breadcrumb a {
  color: #0f6fa8;
  font-weight: 800;
  text-decoration: none;
}

.mp-breadcrumb a:hover,
.mp-breadcrumb a:focus {
  color: #0b4f78;
  text-decoration: underline;
}

.mp-breadcrumb strong {
  color: #17324d;
  font-weight: 900;
}

.mp-breadcrumb-sep {
  color: #94a3b8;
  font-weight: 900;
}

.mp-page-footer {
  margin: 28px 0 22px;
  padding: 20px 22px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #dbe8f4;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
  color: #5f7187;
  font-size: 15px;
  line-height: 1.7;
}

.mp-page-footer strong {
  color: #17324d;
  font-size: 16px;
}

.mp-page-footer a {
  color: #0f6fa8;
  font-weight: 800;
  text-decoration: none;
}

.mp-page-footer a:hover,
.mp-page-footer a:focus {
  color: #0b4f78;
  text-decoration: underline;
}

@media (max-width: 767px) {
  .mp-breadcrumb {
    margin-left: 0;
    margin-right: 0;
    font-size: 14px;
  }

  .mp-page-footer {
    text-align: left;
    padding: 18px;
  }

  .mp-page-footer .text-right {
    text-align: left !important;
    margin-top: 12px;
  }
}