/* Design complet - Evaluation nombres entiers CM2 - MaPrimaire */
:root{
  --mp-blue:#11a7e6;
  --mp-blue-dark:#006da8;
  --mp-navy:#07345f;
  --mp-soft:#eef8ff;
  --mp-soft2:#f7fbff;
  --mp-border:#d8e8f5;
  --mp-warm:#ffdda6;
  --mp-good:#128747;
  --mp-bad:#d73838;
  --mp-shadow:0 18px 45px rgba(7,52,95,.12);
}

body.mp-nombres-modern{
  margin:0;
  background:linear-gradient(180deg,#f4fbff 0,#eaf5fc 100%);
  color:var(--mp-navy);
  font-family:Arial,Helvetica,sans-serif;
  font-size:16px;
}

body.mp-nombres-modern a{
  color:var(--mp-blue-dark);
}

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

.mp-nav-wrap .navbar{
  border:0;
  border-radius:22px;
  box-shadow:var(--mp-shadow);
  overflow:hidden;
}

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

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

.mp-nav-wrap .navbar-nav>li>a{
  color:#fff!important;
  font-weight:800;
  border-radius:999px;
  margin:17px 5px;
  padding:10px 14px;
}

.mp-hero{
  display:flex;
  gap:22px;
  align-items:center;
  margin:20px 0 22px;
  padding:30px;
  background:linear-gradient(135deg,#fff 0,#eef9ff 100%);
  border:1px solid var(--mp-border);
  border-radius:28px;
  box-shadow:var(--mp-shadow);
}

.mp-hero-icon{
  width:82px;
  height:82px;
  flex:0 0 82px;
  border-radius:26px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:linear-gradient(135deg,var(--mp-blue),#57c7f0);
  font-size:36px;
}

.mp-eyebrow{
  display:inline-block;
  color:var(--mp-blue-dark);
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-size:13px;
  margin-bottom:6px;
}

.mp-hero h1{
  margin:0 0 8px;
  color:#0872ad;
  font-weight:900;
  font-size:38px;
  line-height:1.08;
}

.mp-hero p{
  margin:0;
  color:#496987;
  font-size:18px;
}

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

.mp-btn{
  border:0;
  border-radius:999px;
  padding:12px 18px;
  font-weight:900;
  text-decoration:none!important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  cursor:pointer;
}

.mp-btn-primary{
  background:linear-gradient(135deg,var(--mp-blue),#5bc8f0);
  color:#fff!important;
  box-shadow:0 10px 22px rgba(17,167,230,.28);
}

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

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

.mp-card{
  background:#fff;
  border:1px solid var(--mp-border);
  border-radius:26px;
  box-shadow:var(--mp-shadow);
  padding:24px;
}

.mp-card h2,
.mp-card h3{
  margin-top:0;
  color:var(--mp-navy);
  font-weight:900;
}

.mp-intro{
  background:var(--mp-soft);
  border:1px solid var(--mp-border);
  border-radius:20px;
  padding:15px 18px;
  margin-bottom:18px;
  font-weight:800;
}

.mp-question-grid{
  display:grid;
  gap:14px;
}

.mp-question-row{
  display:grid;
  grid-template-columns:minmax(210px,.8fr) 34px minmax(240px,1fr);
  gap:12px;
  align-items:center;
  padding:16px;
  border:1px solid var(--mp-border);
  border-radius:22px;
  background:var(--mp-soft2);
}

.mp-number-line{
  display:flex;
  align-items:center;
  gap:12px;
}

.mp-number{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  flex:0 0 34px;
  border-radius:12px;
  background:#e7f6ff;
  color:var(--mp-blue-dark);
  font-weight:900;
}

.mp-digit-number{
  font-size:26px;
  letter-spacing:.03em;
  font-weight:900;
  color:var(--mp-navy);
  white-space:nowrap;
}

.mp-red-digit{
  color:#d8242f;
  font-size:1.18em;
  text-shadow:0 2px 0 rgba(216,36,47,.08);
}

.mp-arrow{
  text-align:center;
  font-size:24px;
  font-weight:900;
  color:var(--mp-blue-dark);
}

.mp-question-row select{
  width:100%;
  min-height:48px;
  border:2px solid #bfd9ee;
  border-radius:14px;
  background:#fff;
  color:var(--mp-navy);
  font-weight:800;
  padding:8px 12px;
  font-size:15px;
}

.mp-question-row select:focus{
  outline:none;
  border-color:var(--mp-blue);
  box-shadow:0 0 0 4px rgba(17,167,230,.12);
}

.mp-form-actions{
  display:flex;
  justify-content:flex-end;
  gap:12px;
  margin-top:22px;
}

.mp-form-actions input{
  border:0;
  border-radius:999px;
  padding:13px 24px;
  font-weight:900;
  font-size:16px;
  cursor:pointer;
}

.mp-form-actions input[type=submit]{
  background:linear-gradient(135deg,var(--mp-blue),#5bc8f0);
  color:#fff;
  box-shadow:0 10px 22px rgba(17,167,230,.28);
}

.mp-form-actions input[type=reset]{
  background:#fff;
  color:var(--mp-blue-dark);
  border:1px solid var(--mp-border);
}

.mp-level-aside{
  display:flex;
  align-items:center;
  gap:14px;
  background:#f1faff;
  border:1px solid var(--mp-border);
  border-radius:20px;
  padding:14px;
  margin:12px 0 16px;
  font-weight:900;
}

.mp-level-aside img{
  width:96px;
  height:auto;
}

.mp-help-box{
  background:#fff8e7;
  border:1px solid #f7d99a;
  border-radius:20px;
  padding:16px;
  color:#5f4312;
}

.mp-help-box strong{
  color:#07345f;
}

.mp-position-table{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin-top:12px;
}

.mp-position-table span{
  display:block;
  background:#fff;
  border:1px solid var(--mp-border);
  border-radius:14px;
  padding:10px 8px;
  text-align:center;
  font-weight:900;
  font-size:13px;
}

.mp-sticky-help{
  position:sticky;
  top:18px;
  z-index:10;
}

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

.mp-result-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:20px;
  background:linear-gradient(135deg,#fff 0,#eef9ff 100%);
  border:1px solid var(--mp-border);
  border-radius:24px;
  padding:20px;
}

.mp-score-big{
  font-size:42px;
  font-weight:900;
  color:var(--mp-blue-dark);
  line-height:1;
}

.mp-score-card{
  text-align:center;
  min-width:190px;
}

.mp-score-card img{
  max-height:72px;
  width:auto;
  margin:8px auto;
  display:block;
}

.mp-correction-grid{
  display:grid;
  gap:14px;
}

.mp-correction-row{
  display:grid;
  grid-template-columns:minmax(0,.85fr) minmax(210px,.75fr) minmax(240px,.85fr);
  gap:0;
  border:1px solid var(--mp-border);
  border-radius:22px;
  overflow:hidden;
  background:#fff;
}

.mp-correction-cell{
  padding:16px;
  border-right:1px solid var(--mp-border);
  display:flex;
  align-items:center;
}

.mp-correction-cell:last-child{
  border-right:0;
}

.mp-correction-question{
  background:#edf8ff;
  font-weight:800;
}

.mp-correction-answer{
  background:#f8fbff;
  justify-content:center;
  gap:10px;
}

.mp-correction-points{
  background:#16a6df;
  color:#fff;
  display:block;
  text-align:center;
  font-weight:900;
}

.mp-correction-points .good-answer{
  background:#fff8b8;
  color:var(--mp-navy);
  border-radius:14px;
  padding:10px;
  margin:8px 0 10px;
}

.mp-correction-points .point{
  background:rgba(255,255,255,.88);
  color:var(--mp-navy);
  border-radius:14px;
  padding:8px;
}

.mp-status-icon{
  width:20px;
  height:20px;
  flex:0 0 20px;
}

.mp-answer-readonly{
  min-width:175px;
  border:2px solid #bfd9ee;
  border-radius:14px;
  background:#fff;
  text-align:center;
  color:var(--mp-navy);
  font-weight:900;
  padding:9px 10px;
}

.mp-answer-readonly.mp-empty{
  color:#899aaa;
  font-style:italic;
}

@media(max-width:992px){
  .mp-layout{
    grid-template-columns:1fr;
  }
  .mp-sticky-help{
    position:static;
  }
  .mp-hero{
    align-items:flex-start;
  }
  .mp-hero h1{
    font-size:32px;
  }
  .mp-correction-row{
    grid-template-columns:1fr;
  }
  .mp-correction-cell{
    border-right:0;
    border-bottom:1px solid var(--mp-border);
  }
  .mp-correction-cell:last-child{
    border-bottom:0;
  }
}

@media(max-width:720px){
  .mp-hero{
    display:block;
    padding:22px;
  }
  .mp-hero-icon{
    margin-bottom:15px;
  }
  .mp-question-row{
    grid-template-columns:1fr;
  }
  .mp-arrow{
    display:none;
  }
  .mp-digit-number{
    font-size:22px;
  }
  .mp-form-actions{
    justify-content:stretch;
    flex-direction:column;
  }
  .mp-form-actions input,
  .mp-btn{
    width:100%;
  }
  .mp-nav-wrap .navbar-nav>li>a{
    margin:6px 10px;
  }
  .mp-result-card{
    display:block;
    text-align:center;
  }
  .mp-card{
    padding:18px;
  }
  .mp-position-table{
    grid-template-columns:1fr;
  }
}
