/* GoMathy V86 — Première : finition d'alignement, grilles sans trous et applications réellement structurées. */

/* --- 1) Cartes de cours : géométrie commune plus régulière --- */
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-essential-grid{
  gap:20px!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-essential-card{
  padding:25px 26px!important;
  overflow:visible!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-essential-card h4{
  display:flex!important;
  align-items:flex-start!important;
  min-height:3.05rem!important;
  margin:0 0 15px!important;
  line-height:1.42!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-card-body{
  min-width:0!important;
  width:100%!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-card-body>:first-child{
  margin-top:0!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-card-body p{
  margin:.72rem 0!important;
  line-height:1.8!important;
}

/* Formules : mêmes hauteurs visuelles et aucun débordement dans les cartes étroites. */
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-formula{
  width:100%!important;
  min-width:0!important;
  min-height:50px!important;
  margin:12px 0!important;
  padding:10px 14px!important;
  line-height:1.55!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-formula .math-inline,
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-formula-table span{
  max-width:100%!important;
}

/* Les tableaux de formules à nombre impair ne laissent plus une cellule orpheline. */
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-formula-table{
  gap:10px!important;
  align-items:stretch!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-formula-table>div{
  min-width:0!important;
  min-height:52px!important;
  align-items:center!important;
  padding:12px 13px!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-formula-table[data-gm86-count="5"]>div:last-child,
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-formula-table[data-gm86-count="3"]>div:last-child{
  grid-column:1/-1!important;
}

/* Petites grilles internes : hauteur et alignement homogènes. */
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-choice-grid,
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-case-grid,
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm85-quadrants{
  align-items:stretch!important;
  gap:10px!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-choice-grid>div,
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-case-grid>div,
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm85-quadrants>div{
  height:100%!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm85-method-strip{
  gap:9px!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm85-method-strip span{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:38px!important;
  text-align:center!important;
}

/* Exemples : séparation plus nette entre cours et application sans les éloigner. */
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-example{
  margin-top:22px!important;
  padding-top:20px!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-example__label{
  margin-bottom:14px!important;
  line-height:1.3!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-prompt{
  margin:0 0 15px!important;
  padding:12px 14px!important;
  line-height:1.7!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-step-list{
  gap:12px!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-step{
  min-width:0!important;
  padding:14px 15px!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-step>div{
  min-width:0!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-step b{
  margin-bottom:5px!important;
  line-height:1.42!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-step p{
  line-height:1.7!important;
}

/* --- 2) Applications type devoir : en-tête pleine largeur + deux cartes alignées --- */
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-list{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:18px!important;
  align-items:stretch!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-list>div:first-child{
  grid-column:1/-1!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:14px 16px!important;
  display:flex!important;
  align-items:center!important;
  align-content:center!important;
  flex-wrap:wrap!important;
  gap:8px 10px!important;
  border-radius:13px!important;
  background:#f6f8fb!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-list>div:first-child>span:last-child{
  flex:1 0 100%!important;
  margin-top:3px!important;
  line-height:1.5!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item{
  width:100%!important;
  min-width:0!important;
  height:100%!important;
  margin:0!important;
  padding:22px 23px!important;
  display:flex!important;
  flex-direction:column!important;
  align-self:stretch!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item__label{
  margin-bottom:8px!important;
  line-height:1.3!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item .mb-2{
  min-height:31px!important;
  align-items:center!important;
  margin-bottom:11px!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item__question{
  min-width:0!important;
  margin:0!important;
  font-size:1rem!important;
  line-height:1.82!important;
  font-weight:650!important;
  overflow:visible!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item__question>strong,
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item__correction>strong,
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gm26-correction>strong{
  display:block!important;
  margin:0 0 12px!important;
  font-size:1.04rem!important;
  line-height:1.48!important;
  color:#213a49!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item__question ol,
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item__question ul,
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item__correction ol,
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item__correction ul,
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gm26-correction ol,
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gm26-correction ul{
  display:grid!important;
  gap:.7rem!important;
  margin:.75rem 0 .15rem!important;
  padding-left:1.55rem!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item__question li,
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item__correction li,
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gm26-correction li{
  display:list-item!important;
  margin:0!important;
  padding-left:.2rem!important;
  line-height:1.72!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item__question li::marker{
  color:#6d28d9!important;
  font-weight:850!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item__correction li::marker,
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gm26-correction li::marker{
  color:#0f766e!important;
  font-weight:850!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item details{
  margin-top:auto!important;
  padding-top:16px!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item summary{
  min-height:42px!important;
  display:flex!important;
  align-items:center!important;
  padding:10px 12px!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-list[data-gm86-items="1"]>.gomathy-course-practice-item{
  grid-column:1/-1!important;
}

/* --- 3) Méthodes et vocabulaire : même ligne de base visuelle --- */
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-method .course-unified-body>.space-y-2{
  gap:15px!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-method .course-unified-body>.space-y-2>.flex{
  padding:15px 16px!important;
  align-content:start!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-method .course-unified-body>.space-y-2>.flex>p{
  line-height:1.66!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gomathy-course-vocab-item{
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
  padding:17px 18px!important;
}

/* Une fraction en ligne doit rester solidaire de son numérateur/dénominateur. */
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .math-inline-fraction{
  white-space:nowrap!important;
  flex:0 0 auto!important;
}
.gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .math-inline{
  max-width:100%!important;
}

@media(max-width:1180px){
  .gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-essential-card h4{min-height:0!important}
  .gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-list{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-list>div:first-child,
  .gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item{
    grid-column:1/-1!important;
  }
}
@media(max-width:760px){
  .gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-essential-card{padding:21px 19px!important}
  .gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-formula-table{grid-template-columns:1fr!important}
  .gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish .gm84-formula-table>div{grid-column:auto!important}
  .gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item{padding:19px!important}
  .gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item__question ol,
  .gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gomathy-course-practice-item__correction ol,
  .gm84-premiere-excellence.gm85-premiere-polish.gm86-premiere-finish #math-practice .gm26-correction ol{padding-left:1.35rem!important}
}
