/* GoMathy V85 — deuxième passe Première : densité pédagogique + mise en page sans trous. */
.gm84-premiere-excellence.gm85-premiere-polish .gm84-essential-grid{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:18px!important;
  align-items:stretch!important;
  grid-auto-flow:row!important;
}
.gm84-premiere-excellence.gm85-premiere-polish .gm84-essential-card{
  grid-column:span 2;
  height:100%;
  min-height:0!important;
  display:flex;
  flex-direction:column;
  padding:24px 25px!important;
  border-radius:20px!important;
}
.gm84-premiere-excellence.gm85-premiere-polish .gm84-essential-card--wide{grid-column:span 2!important}
.gm84-premiere-excellence.gm85-premiere-polish .gm84-card-body{min-width:0}
.gm84-premiere-excellence.gm85-premiere-polish .gm84-card-body p{line-height:1.76!important;margin:.66rem 0!important}
.gm84-premiere-excellence.gm85-premiere-polish .gm84-essential-card h4{font-size:1.1rem!important;margin-bottom:14px!important}
.gm84-premiere-excellence.gm85-premiere-polish .gm84-example{margin-top:20px!important;padding-top:19px!important}
.gm84-premiere-excellence.gm85-premiere-polish .gm84-prompt{line-height:1.66!important;margin-bottom:14px!important}
.gm84-premiere-excellence.gm85-premiere-polish .gm84-step-list{gap:11px!important}
.gm84-premiere-excellence.gm85-premiere-polish .gm84-step{padding:13px 14px!important;gap:12px!important}
.gm84-premiere-excellence.gm85-premiere-polish .gm84-check{margin-top:12px!important;padding:11px 13px!important;line-height:1.58}

/* Répartition 6-colonnes : chaque rangée est entièrement occupée. */
.gm84-premiere-excellence.gm85-premiere-polish .gm84-essential-grid[data-gm85-count="4"]>.gm84-essential-card{grid-column:span 3!important}
.gm84-premiere-excellence.gm85-premiere-polish .gm84-essential-grid[data-gm85-count="5"]>.gm84-essential-card:nth-child(-n+3){grid-column:span 2!important}
.gm84-premiere-excellence.gm85-premiere-polish .gm84-essential-grid[data-gm85-count="5"]>.gm84-essential-card:nth-child(n+4){grid-column:span 3!important}
.gm84-premiere-excellence.gm85-premiere-polish .gm84-essential-grid[data-gm85-count="7"]>.gm84-essential-card:nth-child(-n+6){grid-column:span 2!important}
.gm84-premiere-excellence.gm85-premiere-polish .gm84-essential-grid[data-gm85-count="7"]>.gm84-essential-card:nth-child(7){grid-column:1/-1!important}
.gm84-premiere-excellence.gm85-premiere-polish .gm84-essential-grid[data-gm85-count="8"]>.gm84-essential-card:nth-child(-n+6){grid-column:span 2!important}
.gm84-premiere-excellence.gm85-premiere-polish .gm84-essential-grid[data-gm85-count="8"]>.gm84-essential-card:nth-child(n+7){grid-column:span 3!important}
.gm84-premiere-excellence.gm85-premiere-polish .gm84-essential-grid[data-gm85-count="10"]>.gm84-essential-card:nth-child(-n+9){grid-column:span 2!important}
.gm84-premiere-excellence.gm85-premiere-polish .gm84-essential-grid[data-gm85-count="10"]>.gm84-essential-card:nth-child(10){grid-column:1/-1!important}

/* Blocs d'approfondissement V85. */
.gm85-note{margin:12px 0;padding:12px 14px;border:1px solid #d7e8e5;border-radius:13px;background:#f4faf8;color:#355b58;line-height:1.62}
.gm85-note strong{color:#155e58}
.gm85-proof{display:grid;gap:9px;margin:12px 0}
.gm85-proof>div{padding:10px 12px;border:1px solid #dce6ef;border-radius:12px;background:#f8fbff;line-height:1.58;color:#405663}
.gm85-proof b{color:#244f78}
.gm85-quadrants{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
.gm85-quadrants>div{padding:11px;border-radius:12px;border:1px solid #dce5eb;background:#f8fafc;text-align:center;line-height:1.48}
.gm85-quadrants b{display:block;color:#174e48;margin-bottom:3px}
.gm85-table{display:grid;gap:1px;margin:12px 0;padding:1px;border:1px solid #dae4ea;border-radius:13px;overflow:hidden;background:#dae4ea}
.gm85-table>.row{display:grid;grid-template-columns:repeat(var(--gm85-cols,3),minmax(0,1fr));background:#fff}
.gm85-table .cell{padding:9px 10px;text-align:center;line-height:1.45;min-width:0}
.gm85-table .head{background:#eef5ff;color:#234779;font-weight:850}
.gm85-table .accent{background:#eef9f5;color:#155c55;font-weight:800}
.gm85-method-strip{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.gm85-method-strip span{padding:7px 10px;border-radius:10px;background:#eef5ff;border:1px solid #d9e7f8;color:#264a7e;font-size:.88rem;font-weight:750}

/* Méthodes : pas de dernière carte orpheline / trou à droite. */
.gm84-premiere-excellence.gm85-premiere-polish #math-method .course-unified-body>.space-y-2{
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:13px!important;
  align-items:stretch!important;
}
.gm84-premiere-excellence.gm85-premiere-polish #math-method .course-unified-body>.space-y-2>.flex{grid-column:span 3;height:100%}
.gm84-premiere-excellence.gm85-premiere-polish #math-method .course-unified-body>.space-y-2[data-gm85-count="5"]>.flex:nth-child(-n+3){grid-column:span 2}
.gm84-premiere-excellence.gm85-premiere-polish #math-method .course-unified-body>.space-y-2[data-gm85-count="5"]>.flex:nth-child(n+4){grid-column:span 3}
.gm84-premiere-excellence.gm85-premiere-polish #math-method .course-unified-body>.space-y-2[data-gm85-count="6"]>.flex{grid-column:span 2}

/* Vocabulaire : rangées pleines, cartes d'une hauteur homogène. */
.gm84-premiere-excellence.gm85-premiere-polish .gomathy-course-vocab-grid{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:12px!important;align-items:stretch!important}
.gm84-premiere-excellence.gm85-premiere-polish .gomathy-course-vocab-item{grid-column:span 2;height:100%!important}
.gm84-premiere-excellence.gm85-premiere-polish .gomathy-course-vocab-grid[data-gm85-count="5"]>.gomathy-course-vocab-item:nth-child(-n+3){grid-column:span 2}
.gm84-premiere-excellence.gm85-premiere-polish .gomathy-course-vocab-grid[data-gm85-count="5"]>.gomathy-course-vocab-item:nth-child(n+4){grid-column:span 3}
.gm84-premiere-excellence.gm85-premiere-polish .gomathy-course-vocab-grid[data-gm85-count="7"]>.gomathy-course-vocab-item:nth-child(7){grid-column:1/-1}

/* Les applications respirent davantage, notamment pour les énoncés multiligne. */
.gm84-premiere-excellence.gm85-premiere-polish #math-practice .gomathy-course-practice-item{padding:22px 23px!important;margin-top:16px!important}
.gm84-premiere-excellence.gm85-premiere-polish #math-practice .gomathy-course-practice-item__question{line-height:1.82!important;white-space:normal!important}
.gm84-premiere-excellence.gm85-premiere-polish #math-practice .gomathy-course-practice-item__question ol,
.gm84-premiere-excellence.gm85-premiere-polish #math-practice .gomathy-course-practice-item__question ul{margin:.7rem 0 .2rem 1.25rem!important;display:grid;gap:.55rem}
.gm84-premiere-excellence.gm85-premiere-polish #math-practice .gomathy-course-practice-item__correction{line-height:1.78!important}

@media(max-width:1220px){
 .gm84-premiere-excellence.gm85-premiere-polish .gm84-essential-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .gm84-premiere-excellence.gm85-premiere-polish .gm84-essential-grid>.gm84-essential-card{grid-column:auto!important}
 .gm84-premiere-excellence.gm85-premiere-polish .gm84-essential-grid>.gm84-essential-card:last-child:nth-child(odd){grid-column:1/-1!important}
 .gm84-premiere-excellence.gm85-premiere-polish #math-method .course-unified-body>.space-y-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .gm84-premiere-excellence.gm85-premiere-polish #math-method .course-unified-body>.space-y-2>.flex{grid-column:auto!important}
 .gm84-premiere-excellence.gm85-premiere-polish #math-method .course-unified-body>.space-y-2>.flex:last-child:nth-child(odd){grid-column:1/-1!important}
 .gm84-premiere-excellence.gm85-premiere-polish .gomathy-course-vocab-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .gm84-premiere-excellence.gm85-premiere-polish .gomathy-course-vocab-grid>.gomathy-course-vocab-item{grid-column:auto!important}
 .gm84-premiere-excellence.gm85-premiere-polish .gomathy-course-vocab-grid>.gomathy-course-vocab-item:last-child:nth-child(odd){grid-column:1/-1!important}
}
@media(max-width:760px){
 .gm84-premiere-excellence.gm85-premiere-polish .gm84-essential-grid,
 .gm84-premiere-excellence.gm85-premiere-polish #math-method .course-unified-body>.space-y-2,
 .gm84-premiere-excellence.gm85-premiere-polish .gomathy-course-vocab-grid{grid-template-columns:1fr!important}
 .gm84-premiere-excellence.gm85-premiere-polish .gm84-essential-grid>* ,
 .gm84-premiere-excellence.gm85-premiere-polish #math-method .course-unified-body>.space-y-2>* ,
 .gm84-premiere-excellence.gm85-premiere-polish .gomathy-course-vocab-grid>*{grid-column:auto!important}
 .gm85-table{overflow-x:auto}.gm85-table>.row{min-width:520px}
}
