/* CP HTML5 batch - phrases + couleurs - Maprimaire */
:root {
  --mp-blue: #009CEA;
  --mp-green: #7CBB00;
  --mp-orange: #D66B07;
  --mp-yellow: #EAAA00;
  --mp-red: #ef4444;
  --mp-dark: #243447;
  --mp-muted: #64748b;
  --mp-border: #e6edf4;
}

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

* {
  box-sizing: border-box;
}

body {
  background: #f6f8fb;
  color: var(--mp-dark);
}

.mp-cp-activity-page {
  font-family: Arial, Helvetica, sans-serif;
}

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

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

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

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

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

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

.mp-cp-nav-wrap .navbar-nav > li > a:hover,
.mp-cp-nav-wrap .navbar-nav > li > a:focus {
  color: #ffffff !important;
  filter: brightness(0.97);
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.18);
  text-decoration: none !important;
}

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

.mp-hero {
  margin: 26px auto 22px;
  padding: 40px 34px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(214,107,7,.20), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #fff6e9 100%);
  border: 1px solid rgba(214,107,7,.16);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.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-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: #fff;
  box-shadow: 0 14px 28px rgba(214,107,7,.22);
}

.mp-eyebrow {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(214,107,7,.13);
  color: #a34d00;
  font-weight: 900;
  margin-bottom: 14px;
}

.mp-hero h1 {
  margin: 0 0 12px;
  font-size: 42px;
  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-actions {
  margin-top: 22px;
}

.mp-btn {
  display: inline-block;
  border: 0;
  padding: 13px 20px;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none !important;
  margin: 0 8px 10px 0;
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
}

.mp-btn:hover {
  transform: translateY(-2px);
}

.mp-btn-primary {
  background: var(--mp-orange);
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(214,107,7,.22);
}

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

.mp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}

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

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

.mp-card p {
  color: var(--mp-muted);
  line-height: 1.65;
  font-size: 16px;
}

.mp-progress {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.mp-stat {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 15px;
  min-width: 120px;
}

.mp-stat strong {
  display: block;
  font-size: 26px;
  color: var(--mp-orange);
  line-height: 1;
}

.mp-label-bank {
  position: sticky;
  top: 10px;
  z-index: 40;
  background: rgba(248, 250, 252, .98);
  border: 2px dashed #f1c08a;
  border-radius: 22px;
  padding: 14px;
  margin: 18px 0 22px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(6px);
  max-width: 100%;
}

.mp-label-bank h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.mp-label-tip {
  margin: 0 0 10px;
  color: var(--mp-muted);
  font-size: 14px;
  font-weight: 700;
}

.mp-selected-helper {
  display: none;
  margin: 0 0 10px;
  padding: 9px 11px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-weight: 900;
}

.mp-selected-helper.is-visible {
  display: block;
}

.mp-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 54px;
  max-width: 100%;
}

.mp-label {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: var(--mp-orange);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(214,107,7,.18);
  cursor: grab;
  user-select: none;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  touch-action: manipulation;
  max-width: 100%;
  font-size: 18px;
}

.mp-label:active {
  cursor: grabbing;
}

.mp-label.is-dragging {
  opacity: .45;
  transform: scale(.96);
}

.mp-label.is-selected {
  outline: 4px solid rgba(234,170,0,.45);
  box-shadow: 0 12px 26px rgba(234,170,0,.24);
  background: var(--mp-yellow);
  color: #412600;
}

.mp-activity-board {
  background: #fff7ed;
  border: 2px solid #ffcc8a;
  border-radius: 24px;
  padding: 22px;
  margin-top: 18px;
}

.mp-board-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.mp-board-number {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--mp-orange);
  color: #fff;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.mp-board-title h3 {
  margin: 0;
  font-size: 22px;
}

.mp-sentence-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.mp-start-tile,
.mp-drop-zone {
  min-height: 70px;
  min-width: 90px;
  border-radius: 18px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  text-align: center;
  font-size: 18px;
}

.mp-start-tile {
  background: #e2ebed;
  border: 1px solid #000;
  color: #243447;
}

.mp-drop-zone {
  border: 2px dashed #c16100;
  background: #ffffff;
  color: var(--mp-muted);
  cursor: pointer;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.mp-drop-zone:hover,
.mp-drop-zone.is-over {
  border-color: var(--mp-orange);
  background: #fff6e9;
}

.mp-drop-zone.is-correct {
  border-color: var(--mp-green);
  background: #f3fbeb;
}

.mp-drop-zone.is-wrong {
  border-color: var(--mp-red);
  background: #fff1f2;
}

.mp-drop-zone .mp-label {
  cursor: grab;
  font-size: 18px;
}

.mp-color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mp-color-card {
  background: #fff7ed;
  border: 2px solid #ffcc8a;
  border-radius: 22px;
  padding: 16px;
}

.mp-color-card.is-correct {
  border-color: var(--mp-green);
  background: #f3fbeb;
}

.mp-color-card.is-wrong {
  border-color: var(--mp-red);
  background: #fff1f2;
}

.mp-color-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.mp-color-swatch {
  height: 70px;
  border: 1px solid #000;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}

.mp-color-card .mp-drop-zone {
  min-width: 0;
  width: 100%;
}

.mp-feedback {
  margin-top: 16px;
  min-height: 24px;
  font-weight: 800;
}

.mp-feedback.good {
  color: #3f7d00;
}

.mp-feedback.bad {
  color: #b91c1c;
}

.mp-result-box {
  display: none;
  border-radius: 22px;
  padding: 20px;
  margin-top: 18px;
  background: #fff6e9;
  border: 1px solid #f1c08a;
}

.mp-result-box.is-visible {
  display: block;
}

.mp-result-box strong {
  display: block;
  font-size: 24px;
  color: #9a4b00;
  margin-bottom: 6px;
}

.mp-correction-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
  margin-top: 14px;
}

.mp-correction-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 11px 12px;
  font-size: 17px;
}

.mp-correction-item strong {
  color: var(--mp-dark);
}

.mp-correction-sentence {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  font-size: 22px;
  font-weight: 900;
  color: #1f2937;
}

.mp-image-card {
  text-align: center;
}

.mp-image-card img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 8px auto 14px;
  border-radius: 18px;
}

.mp-side-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mp-side-list li {
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  line-height: 1.45;
}

.mp-side-list li:last-child {
  border-bottom: 0;
}

.mp-footer {
  margin: 22px 0 30px;
  padding: 22px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--mp-border);
  color: var(--mp-muted);
}

.mp-footer a {
  color: var(--mp-blue);
  font-weight: 700;
}

@media (max-width: 1199px) {
  .mp-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991px) {
  .mp-hero h1 {
    font-size: 34px;
  }

  .mp-color-grid,
  .mp-correction-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  body.mp-cp-activity-page {
    padding-bottom: 255px;
  }

  .mp-cp-activity-page .container,
  .mp-cp-activity-page main,
  .mp-cp-activity-page .mp-layout,
  .mp-cp-activity-page .mp-card,
  .mp-cp-activity-page .mp-activity-board,
  .mp-cp-activity-page .mp-sentence-row,
  .mp-cp-activity-page .mp-color-grid {
    max-width: 100%;
    overflow-x: visible;
  }

  .mp-cp-nav-wrap {
    margin: 0 auto 14px;
    padding-left: 0;
    padding-right: 0;
  }

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

  .mp-cp-nav-wrap .navbar-brand {
    padding: 10px 15px;
  }

  .mp-cp-nav-wrap .navbar-brand img {
    max-height: 62px;
  }

  .mp-cp-nav-wrap .navbar-nav {
    margin-top: 0;
  }

  .mp-cp-nav-wrap .navbar-nav > li > a {
    display: block;
    margin: 6px 10px;
    border-radius: 16px;
    text-align: left;
  }

  .mp-cp-nav-wrap .navbar-toggle {
    margin-top: 23px;
  }

  .mp-hero {
    grid-template-columns: 1fr;
    margin-top: 16px;
    padding: 26px 20px;
    border-radius: 22px;
  }

  .mp-hero-icon {
    width: 74px;
    height: 74px;
    font-size: 36px;
  }

  .mp-hero h1 {
    font-size: 30px;
  }

  .mp-hero p {
    font-size: 16px;
  }

  .mp-card {
    padding: 18px;
  }

  .mp-label-bank {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    top: auto;
    z-index: 9999;
    max-height: 235px;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
    padding: 10px;
    border-radius: 18px;
    background: rgba(248, 250, 252, .98);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .24);
  }

  .mp-label-bank h3 {
    font-size: 16px;
    margin: 0 0 6px;
  }

  .mp-label-tip {
    font-size: 12px;
    line-height: 1.25;
    margin: 0 0 7px;
  }

  .mp-selected-helper {
    font-size: 12px;
    line-height: 1.25;
    margin: 0 0 7px;
    padding: 7px 9px;
  }

  .mp-labels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    padding-bottom: 0;
  }

  .mp-label {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    padding: 9px 7px;
    font-size: 16px;
    line-height: 1.2;
    border-radius: 14px;
  }

  .mp-activity-board {
    padding: 16px;
    scroll-margin-bottom: 260px;
  }

  .mp-sentence-row,
  .mp-color-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .mp-start-tile,
  .mp-drop-zone {
    width: 100%;
    min-width: 0;
    min-height: 58px;
  }

  .mp-drop-zone .mp-label {
    width: auto;
    max-width: 100%;
    padding: 10px 13px;
    border-radius: 999px;
  }

  .mp-actions .mp-btn {
    width: 100%;
    text-align: center;
    margin-right: 0;
  }

  .mp-footer {
    margin-bottom: 270px;
  }

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

@media (max-width: 360px) {
  .mp-labels {
    grid-template-columns: 1fr;
  }

  .mp-label-bank {
    max-height: 245px;
  }

  body.mp-cp-activity-page {
    padding-bottom: 265px;
  }
}
