/* MaPrimaire - Alphabet CP modernisation */
.mp-alphabet-page {
  background: #f3f6fb;
  color: #263243;
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}
.mp-alphabet-page *, .mp-alphabet-page *::before, .mp-alphabet-page *::after { box-sizing: border-box; }
.mp-nav-wrap { margin-top: 12px; }
.mp-nav-wrap .navbar { border: 0; border-radius: 18px; box-shadow: 0 12px 28px rgba(37, 52, 73, .12); overflow: hidden; }
.mp-nav-wrap .navbar-brand { height: 64px; padding: 10px 15px; }
.mp-nav-wrap .navbar-brand img { max-height: 44px; width: auto; }
.mp-nav-wrap .navbar-nav > li > a { color: #fff !important; font-weight: 700; margin: 10px 4px; border-radius: 999px; padding: 10px 14px; }
.mp-hero {
  display: flex; gap: 20px; align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
  border-radius: 24px; padding: 28px; margin: 18px 0;
  box-shadow: 0 18px 40px rgba(37, 52, 73, .12);
}
.mp-hero-icon {
  width: 74px; height: 74px; border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  background: #ffe8c7; color: #c06b00; font-size: 34px; flex: 0 0 auto;
}
.mp-eyebrow { display: inline-block; color: #6b7280; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; margin-bottom: 6px; }
.mp-hero h1 { margin: 0 0 8px; font-size: 34px; font-weight: 800; color: #20304a; }
.mp-hero p { margin: 0 0 16px; font-size: 17px; color: #526173; }
.mp-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.mp-btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; padding: 11px 18px; font-weight: 800; text-decoration: none !important; cursor: pointer; line-height: 1.2; }
.mp-btn-primary { background: #ff8a00; color: #fff !important; box-shadow: 0 8px 18px rgba(255, 138, 0, .28); }
.mp-btn-secondary { background: #eaf0f7; color: #27364d !important; }
.mp-btn-full { width: 100%; }
.mp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.mp-card { background: #fff; border-radius: 22px; padding: 24px; box-shadow: 0 12px 30px rgba(37, 52, 73, .10); margin-bottom: 22px; overflow: hidden; }
.mp-card h2, .mp-card h3 { color: #20304a; font-weight: 800; margin-top: 0; }
.mp-side-list { padding-left: 18px; line-height: 1.8; }
.mp-level-aside { display: flex; align-items: center; gap: 12px; background: #f7fbff; border: 1px solid #dfeaf6; border-radius: 16px; padding: 12px; margin: 12px 0; }
.mp-level-aside img { width: 92px; height: auto; flex: 0 0 auto; }
.mp-level-aside span { font-weight: 800; color: #20304a; }
.mp-alpha-discovery { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 20px; align-items: start; }
.mp-alpha-image { width: 100%; max-width: 670px; height: auto; border-radius: 18px; background: #f7fbff; box-shadow: inset 0 0 0 1px #dfeaf6; }
.mp-letter-grid { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.mp-letter-btn, .mp-alpha-check span { min-height: 44px; border-radius: 13px; border: 2px solid #dfe7f1; background: #f8fbff; color: #20304a; font-weight: 900; font-size: 18px; display: flex; align-items: center; justify-content: center; transition: .15s ease; }
.mp-letter-btn:hover, .mp-letter-btn.is-active { border-color: #ff8a00; background: #fff2df; color: #a55100; transform: translateY(-1px); }
.mp-letter-detail { background: #f7fbff; border: 1px solid #dfeaf6; border-radius: 20px; padding: 18px; text-align: center; }
.mp-detail-kicker { display: inline-block; color: #6b7280; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.mp-letter-detail h3 { font-size: 52px; margin: 2px 0; color: #ff8a00; }
.mp-letter-detail p { font-weight: 800; }
.mp-letter-detail img { max-width: 150px; max-height: 170px; width: auto; height: auto; margin: 8px auto 0; display: block; }
.mp-audio-card { display: flex; justify-content: space-between; gap: 18px; align-items: center; background: #fff9ef; border: 1px solid #ffe0ad; border-radius: 18px; padding: 18px; margin-top: 22px; }
.mp-audio-card p { margin: 4px 0 0; }
.mp-audio-card audio { max-width: 100%; }
.mp-word-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mp-word-card { display: flex; gap: 16px; align-items: center; background: #f8fbff; border: 1px solid #dfeaf6; border-radius: 18px; padding: 16px; }
.mp-word-card img { width: 92px; height: 92px; object-fit: contain; background: #fff; border-radius: 16px; padding: 8px; flex: 0 0 auto; }
.mp-word-card h3 { margin-bottom: 6px; }
.mp-word-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #f8fbff; border: 1px solid #dfeaf6; border-radius: 18px; padding: 14px; margin-bottom: 18px; }
.mp-word-banner { max-width: min(100%, 328px); height: auto; }
.mp-word-thumb { width: 100px; height: 100px; object-fit: contain; background: #fff; border-radius: 16px; padding: 8px; }
.mp-target-word { display: inline-flex; align-items: center; justify-content: center; letter-spacing: .18em; font-size: 34px; font-weight: 900; color: #20304a; background: #fff4e4; border: 2px solid #ffd39a; border-radius: 18px; padding: 12px 22px; margin: 0 0 18px; }
.mp-alpha-check-grid { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 8px; margin: 6px 0 20px; }
.mp-alpha-check { margin: 0; cursor: pointer; }
.mp-alpha-check input { position: absolute; opacity: 0; pointer-events: none; }
.mp-alpha-check input:checked + span { border-color: #ff8a00; background: #ffead0; color: #9a4c00; box-shadow: 0 8px 16px rgba(255, 138, 0, .18); }
.mp-alpha-check input:focus + span { outline: 3px solid rgba(0, 156, 234, .25); outline-offset: 2px; }
.mp-alpha-correction .mp-alpha-check { cursor: default; }
.mp-alpha-correction .mp-alpha-check span { opacity: .55; }
.mp-alpha-correction .mp-alpha-check input:checked + span { opacity: 1; }
.mp-result-card { display: flex; gap: 16px; align-items: flex-start; border-radius: 18px; padding: 18px; margin: 12px 0 22px; border: 1px solid; }
.mp-result-card.is-success { background: #f0fff6; border-color: #bdeecf; }
.mp-result-card.is-error { background: #fff6f3; border-color: #ffd1c3; }
.mp-result-icon { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 900; background: #fff; flex: 0 0 auto; }
.mp-result-card.is-success .mp-result-icon { color: #13984f; }
.mp-result-card.is-error .mp-result-icon { color: #d33f26; }
.mp-mini-links { display: flex; flex-direction: column; gap: 8px; }
.mp-mini-links a { display: block; background: #f0f5fb; border-radius: 12px; padding: 10px 12px; font-weight: 800; color: #27364d; text-decoration: none; }
.mp-mini-links a:hover { background: #fff2df; color: #a55100; }
.mp-footer { margin: 26px 0; padding: 18px 20px; border-radius: 18px; background: #20304a; color: #dfe8f5; }
.mp-footer a { color: #fff; }
@media (max-width: 991px) {
  .mp-layout, .mp-alpha-discovery { grid-template-columns: 1fr; }
  .mp-hero { align-items: flex-start; }
}
@media (max-width: 767px) {
  .mp-nav-wrap { margin-top: 0; padding-left: 0; padding-right: 0; }
  .mp-nav-wrap .navbar { border-radius: 0 0 18px 18px; }
  .mp-hero { padding: 20px; border-radius: 20px; }
  .mp-hero-icon { width: 56px; height: 56px; border-radius: 18px; font-size: 26px; }
  .mp-hero h1 { font-size: 27px; }
  .mp-card { padding: 18px; border-radius: 18px; }
  .mp-letter-grid, .mp-alpha-check-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
  .mp-letter-btn, .mp-alpha-check span { min-height: 42px; font-size: 16px; border-radius: 12px; }
  .mp-audio-card, .mp-word-header { flex-direction: column; align-items: stretch; }
  .mp-word-list { grid-template-columns: 1fr; }
  .mp-word-card { align-items: flex-start; }
  .mp-target-word { font-size: 26px; letter-spacing: .12em; width: 100%; }
  .mp-footer .text-right { text-align: left; margin-top: 12px; }
}
@media (max-width: 380px) {
  .mp-letter-grid, .mp-alpha-check-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
