/* TOKENOPSY V5.6.3 — hotfix ciblé Accueil + À surveiller
   But : remettre une densité desktop correcte, compacter les cartes
   et réaligner les éléments qui se déforment après rollback/cache. */

:root{
  --max:1360px;
}

.page-shell,.home-flow{
  max-width:1360px;
  margin-left:auto;
  margin-right:auto;
}

/* Desktop / grand écran : 4 cartes par ligne pour éviter les blocs trop larges. */
#smartGrid.smart-grid,
#homeWatchGrid.home-watch-grid{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:12px !important;
  align-items:stretch;
}

/* Si le JS remplace le préchargement SEO, on garde des cartes denses et propres. */
#smartGrid .smart-card,
#homeWatchGrid .smart-card{
  display:flex;
  flex-direction:column;
  min-width:0;
  height:100%;
  min-height:0;
  padding:15px 15px 13px !important;
  border-radius:18px;
}

#smartGrid .smart-card-top,
#homeWatchGrid .smart-card-top{
  gap:8px;
  align-items:flex-start;
  font-size:10px;
}

#smartGrid .smart-card-top > span,
#homeWatchGrid .smart-card-top > span{
  min-width:0;
  line-height:1.25;
}

#smartGrid .advice-compact .advice-badge,
#homeWatchGrid .advice-compact .advice-badge{
  font-size:8.5px;
  padding:5px 8px;
}

#smartGrid .smart-coin,
#homeWatchGrid .smart-coin{
  margin-top:11px;
  gap:10px;
  min-width:0;
}

#smartGrid .smart-coin img,
#homeWatchGrid .smart-coin img{
  width:36px;
  height:36px;
  flex:0 0 36px;
}

#smartGrid .smart-coin > div,
#homeWatchGrid .smart-coin > div{
  min-width:0;
}

#smartGrid .smart-coin strong,
#homeWatchGrid .smart-coin strong{
  display:block;
  min-width:0;
  font-size:13px;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

#smartGrid .smart-coin small,
#homeWatchGrid .smart-coin small{
  display:block;
  margin-top:2px;
  font-size:10px;
}

#smartGrid .smart-price,
#homeWatchGrid .smart-price{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:8px;
  margin:12px 0 9px;
}

#smartGrid .smart-price b,
#homeWatchGrid .smart-price b{
  font-size:15px;
  line-height:1.15;
}

#smartGrid .smart-price span,
#homeWatchGrid .smart-price span{
  font-size:10px;
  text-align:right;
}

#smartGrid .trend-strip-signal,
#homeWatchGrid .trend-strip-signal{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:6px !important;
  margin:8px 0 10px !important;
}

#smartGrid .trend-strip-signal .trend-pill,
#homeWatchGrid .trend-strip-signal .trend-pill{
  min-width:0;
  min-height:39px;
  padding:7px 8px !important;
  border-radius:10px;
}

#smartGrid .trend-strip-signal .trend-pill i,
#homeWatchGrid .trend-strip-signal .trend-pill i{
  font-size:8px;
}

#smartGrid .trend-strip-signal .trend-pill .trend-scenario,
#homeWatchGrid .trend-strip-signal .trend-pill .trend-scenario{
  font-size:8.5px;
  line-height:1.05;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

#smartGrid .trend-strip-signal .trend-pill b,
#homeWatchGrid .trend-strip-signal .trend-pill b{
  font-size:9px;
  line-height:1.1;
}

#smartGrid .smart-meta,
#homeWatchGrid .smart-meta{
  display:flex !important;
  justify-content:space-between;
  gap:10px;
  margin-top:auto;
  padding-top:10px;
  font-size:9px;
  line-height:1.3;
}

#smartGrid .smart-meta span,
#homeWatchGrid .smart-meta span{
  min-width:0;
}

/* Préchargement SEO (avant rendu JS) : même densité, pas de gros blocs. */
#smartGrid .seo-compact-coin,
#homeWatchGrid .seo-compact-coin{
  min-width:0;
  padding:12px 13px;
  border-radius:16px;
}

/* Accueil : le héros et la carte de lecture restent équilibrés. */
.home-decision-hero-grid{
  grid-template-columns:minmax(0,1.08fr) minmax(340px,.92fr) !important;
  gap:18px;
}

.home-decision-card{
  padding:22px 22px 20px !important;
}

.home-decision-card > strong{
  font-size:23px;
}

.home-decision-reasons{
  gap:8px;
}

.home-decision-reasons span{
  font-size:11px;
}

@media (max-width:1180px){
  #smartGrid.smart-grid,
  #homeWatchGrid.home-watch-grid{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
  .home-decision-hero-grid{
    grid-template-columns:1fr !important;
  }
}

@media (max-width:900px){
  #smartGrid.smart-grid,
  #homeWatchGrid.home-watch-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:9px !important;
  }
}

@media (max-width:560px){
  #smartGrid .smart-card,
  #homeWatchGrid .smart-card{
    padding:11px 11px 10px !important;
  }
  #smartGrid .smart-price,
  #homeWatchGrid .smart-price{
    display:block;
  }
  #smartGrid .smart-price span,
  #homeWatchGrid .smart-price span{
    display:block;
    margin-top:4px;
    text-align:left;
  }
}

@media (max-width:380px){
  #smartGrid.smart-grid,
  #homeWatchGrid.home-watch-grid{
    grid-template-columns:1fr !important;
  }
}
