/* MaPrimaire - Français CM2 2026 : ou/où, sujet-verbe, compléments */
:root {
  --mp-blue: #2563eb;
  --mp-blue-dark: #1e3a8a;
  --mp-green: #16a34a;
  --mp-orange: #ea580c;
  --mp-gray: #4b5563;
  --mp-bg: #eef5ff;
  --mp-card: #ffffff;
  --mp-border: #dbeafe;
  --mp-text: #172033;
  --mp-muted: #667085;
  --mp-soft: #f8fbff;
  --mp-ok: #15803d;
  --mp-wrong: #dc2626;
}
* { box-sizing: border-box; }
html { width: 100%; overflow-x: hidden; }
body.mp-fr-page {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #ffffff 0, #f5f9ff 36%, #eaf3ff 100%);
  color: var(--mp-text);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}
body.mp-fr-page img { max-width: 100%; height: auto; }
a { color: #174ea6; text-decoration: none; }
a:hover { text-decoration: underline; }
.mp-shell { width: min(1120px, calc(100% - 28px)); margin: 0 auto; }
.mp-cm2-nav-wrap { width: min(1120px, calc(100% - 28px)); margin: 12px auto 10px; padding-left: 0; padding-right: 0; }
.mp-cm2-nav-wrap .navbar { min-height: 78px; margin-bottom: 0; border: 1px solid var(--mp-border); border-radius: 18px; background: #fff; box-shadow: 0 10px 28px rgba(37,99,235,.10); }
.mp-cm2-nav-wrap .navbar-header { min-height: 76px; }
.mp-cm2-nav-wrap .navbar-brand { height: 76px; padding: 10px 16px; display: flex; align-items: center; }
.mp-cm2-nav-wrap .navbar-brand img { width: 178px; max-width: 46vw; height: auto; display: block; }
.mp-cm2-nav-wrap .navbar-toggle { margin-top: 20px; margin-right: 16px; }
.mp-cm2-nav-wrap .navbar-nav > li > a { margin: 17px 4px 12px; padding: 11px 13px; min-height: 42px; border-radius: 12px; color: #fff !important; font-weight: 700; line-height: 1.2; text-decoration: none; }
.mp-cm2-nav-wrap .navbar-nav > li > a:hover, .mp-cm2-nav-wrap .navbar-nav > li > a:focus { filter: brightness(.96); text-decoration: none; }
.mp-breadcrumb { margin: 10px auto 14px; padding: 10px 14px; background: #fff; border: 1px solid var(--mp-border); border-radius: 14px; color: #536079; font-size: 14px; }
.mp-hero { display: flex; justify-content: space-between; gap: 22px; align-items: center; margin: 0 0 18px; padding: 24px; border-radius: 24px; background: linear-gradient(135deg,#fff 0%,#f8fbff 58%,#eaf3ff 100%); border: 1px solid var(--mp-border); box-shadow: 0 14px 34px rgba(37,99,235,.10); }
.mp-eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 6px 12px; border-radius: 999px; background: #e8f4ff; color: #0067a8; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.mp-hero h1 { margin: 0 0 8px; color: #0f1f3d; font-size: clamp(28px, 4vw, 42px); line-height: 1.08; }
.mp-hero p { margin: 0; color: #3c4964; font-size: 17px; line-height: 1.5; }
.mp-hero-visual { flex: 0 0 auto; min-width: 150px; text-align: center; }
.mp-hero-visual img { max-width: 170px; }
.mp-layout { display: grid; grid-template-columns: minmax(0,1fr) 290px; gap: 18px; align-items: start; margin-bottom: 18px; }
.mp-card { background: var(--mp-card); border: 1px solid var(--mp-border); border-radius: 22px; box-shadow: 0 12px 30px rgba(37,99,235,.08); padding: 20px; min-width: 0; }
.mp-card h2, .mp-card h3 { color: #0f1f3d; margin-top: 0; }
.mp-card h2 { font-size: 25px; }
.mp-card h3 { font-size: 19px; }
.mp-neutral-card .mp-level-inline { display: flex; align-items: center; gap: 12px; margin: 8px 0 12px; padding: 10px; border: 1px solid var(--mp-border); border-radius: 14px; background: var(--mp-soft); }
.mp-neutral-card .mp-level-inline img { width: 96px; max-width: 34%; height: auto; flex: 0 0 auto; }
.mp-neutral-card .mp-level-inline strong { display: block; font-size: 17px; color: #1e3a8a; }
.mp-neutral-card .mp-level-inline span { color: var(--mp-muted); }
.mp-mini-actions { display: grid; gap: 8px; margin-top: 10px; }
.mp-mini-actions a { display: block; padding: 9px 10px; border-radius: 12px; background: #eef5ff; color: #174ea6; font-weight: 700; text-align: center; text-decoration: none; }
.mp-mini-actions a:hover { background: #dbeafe; text-decoration: none; }
.mp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.mp-btn { appearance: none; border: 0; display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 15px; border-radius: 14px; font-weight: 800; cursor: pointer; text-decoration: none !important; }
.mp-btn-primary { background: var(--mp-blue); color: #fff !important; }
.mp-btn-secondary { background: #e6f0ff; color: #174ea6 !important; }
.mp-btn-dark { background: #20304a; color: #fff !important; }
.mp-btn:hover { filter: brightness(.98); }
.mp-question-list, .mp-correction-list { display: grid; gap: 12px; }
.mp-question { padding: 14px; border: 1px solid #dfeaf6; border-radius: 16px; background: #f8fbff; }
.mp-question strong { color: #1e3a8a; }
.mp-question-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 17px; line-height: 1.5; }
.mp-answer-input { width: 76px; min-height: 40px; padding: 7px 10px; border: 2px solid #bfd4f2; border-radius: 12px; text-align: center; font-size: 18px; font-weight: 800; color: #1e3a8a; background: #fff; }
.mp-select { width: 100%; min-height: 44px; padding: 8px 10px; border: 2px solid #bfd4f2; border-radius: 12px; background: #fff; font-size: 16px; font-weight: 700; color: #1e3a8a; }
.mp-result-card { text-align: center; }
.mp-score { font-size: 36px; color: #1e3a8a; font-weight: 900; }
.mp-result-card img { max-width: 120px; margin-top: 8px; }
.mp-correction-row { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(160px,.65fr) minmax(160px,.65fr); gap: 10px; padding: 13px; border: 1px solid #dfeaf6; border-radius: 16px; background: #f8fbff; }
.mp-correction-row .mp-user, .mp-correction-row .mp-good { padding: 8px 10px; border-radius: 12px; background: #fff; border: 1px solid #dfeaf6; text-align: center; font-weight: 800; }
.mp-ok { color: var(--mp-ok); }
.mp-wrong { color: var(--mp-wrong); }
.mp-match-board { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 18px; align-items: start; }
.mp-pairs { display: grid; gap: 12px; }
.mp-pair-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(140px,210px); gap: 10px; align-items: stretch; padding: 12px; border: 1px solid #dfeaf6; border-radius: 16px; background: #f8fbff; }
.mp-word { display: flex; align-items: center; min-height: 48px; font-size: 17px; font-weight: 800; color: #1e3a8a; }
.mp-drop-zone { min-height: 48px; padding: 10px; border: 2px dashed #9fbbe6; border-radius: 14px; background: #fff; color: #59657b; font-weight: 800; cursor: pointer; text-align: center; }
.mp-drop-zone.has-value { border-style: solid; color: #1e3a8a; background: #eef5ff; }
.mp-drop-zone.is-correct { border-color: var(--mp-ok); color: var(--mp-ok); }
.mp-drop-zone.is-wrong { border-color: var(--mp-wrong); color: var(--mp-wrong); }
.mp-label-bank { padding: 16px; border: 1px solid var(--mp-border); border-radius: 20px; background: #fff; box-shadow: 0 12px 26px rgba(37,99,235,.10); z-index: 20; }
.mp-label-bank h3 { margin-bottom: 8px; }
.mp-labels { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-label { border: 1px solid #bfd4f2; border-radius: 999px; background: #e8f4ff; color: #0f4d83; font-weight: 800; padding: 9px 12px; cursor: pointer; }
.mp-label.is-selected { outline: 3px solid rgba(37,99,235,.22); background: #dbeafe; }
.mp-label-bank.is-following { position: fixed; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.mp-label-bank-placeholder { display: none; }
.mp-label-bank-placeholder.is-visible { display: block; }
.mp-feedback, .mp-result-box { margin-top: 12px; font-weight: 800; color: #1e3a8a; }
.mp-correction-panel { margin-top: 14px; padding: 14px; border-radius: 16px; border: 1px solid #dfeaf6; background: #f8fbff; }
.mp-footer { margin: 20px auto 26px; color: #5b667c; text-align: center; font-size: 14px; }
@media (max-width: 980px) {
  .mp-layout, .mp-match-board { grid-template-columns: 1fr; }
  .mp-hero { align-items: flex-start; }
}
@media (max-width: 900px) {
  .mp-cm2-nav-wrap { width: min(100% - 20px, 760px); margin-top: 8px; }
  .mp-cm2-nav-wrap .navbar { border-radius: 14px; }
  .mp-cm2-nav-wrap .navbar-brand img { width: 150px; }
  .mp-cm2-nav-wrap .navbar-nav { margin: 0 0 10px; }
  .mp-cm2-nav-wrap .navbar-nav > li > a { margin: 6px 12px; text-align: center; }
}
@media (max-width: 760px) {
  body.mp-has-mobile-bank { padding-bottom: 180px; }
  .mp-shell { width: calc(100% - 18px); }
  .mp-hero { padding: 18px; flex-direction: column; border-radius: 18px; }
  .mp-hero h1 { font-size: 27px; }
  .mp-hero p { font-size: 16px; }
  .mp-card { padding: 15px; border-radius: 18px; }
  .mp-question-line { font-size: 16px; }
  .mp-correction-row { grid-template-columns: 1fr; }
  .mp-pair-row { grid-template-columns: 1fr; }
  .mp-label-bank[data-follow="1"] { position: fixed !important; left: 8px !important; right: 8px !important; bottom: 8px !important; top: auto !important; width: auto !important; max-height: 155px; overflow: auto; padding: 11px; border-radius: 16px; box-shadow: 0 -8px 26px rgba(15,31,61,.18); }
  .mp-label-bank[data-follow="1"] h3 { font-size: 15px; margin: 0 0 6px; }
  .mp-label-bank[data-follow="1"] p { display: none; }
  .mp-label { padding: 8px 10px; font-size: 14px; }
}
@media (max-width: 640px) {
  .mp-cm2-nav-wrap { width: calc(100% - 16px); }
  .mp-cm2-nav-wrap .navbar-brand { padding-left: 12px; }
  .mp-cm2-nav-wrap .navbar-brand img { width: 132px; max-width: 58vw; }
  .mp-actions .mp-btn { width: 100%; }
  .mp-answer-input { width: 62px; }
}