/* PC : carte joueur | objectifs live/hors live | roue, sur une seule ligne.
   Les éléments sont déplacés sans recréer leurs composants ni leurs états. */
@media (min-width: 1181px) and (hover:hover) and (pointer:fine){
 body[data-desktop-view="home"] .dashboard-head-grid{
  display:grid!important;
  grid-template-columns:minmax(260px, 23%) minmax(0, 1fr) minmax(310px, 29%)!important;
  grid-template-areas:"left side side" "incubator incubator incubator"!important;
  gap:16px!important;align-items:start!important;width:100%!important;max-width:none!important;
 }
 body[data-desktop-view="home"] .dashboard-side-stack{
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(310px, 38%)!important;
  gap:16px!important;padding-top:0!important;align-items:start!important;
 }
 body[data-desktop-view="home"] .dashboard-side-stack #offlineContractsHome{
  display:block;min-width:0;width:100%;max-width:none;box-sizing:border-box;
  margin:0!important;
 }
 body[data-desktop-view="home"] .dashboard-side-stack #rewardWheelCard{
  min-width:0;width:100%;max-width:none;box-sizing:border-box;margin:0!important;
 }
 body[data-desktop-view="home"] .dashboard-left-stack{min-width:0;width:100%;max-width:none}
 body[data-desktop-view="home"] #offlineContractsHome #offlineContractsGrid,
 body[data-desktop-view="home"] #offlineContractsHome #dailyChallengesGrid{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome .offline-contract-grid>*,
 body[data-desktop-view="home"] #offlineContractsHome #dailyChallengesGrid>*{
  min-width:0!important;width:100%!important;box-sizing:border-box!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome #objectivesModeTabs button{
  min-width:0;padding:8px 5px;font-size:11px;
 }
 body[data-desktop-view="home"] #offlineContractsHome .offline-contract-head h2{font-size:18px}
 body[data-desktop-view="home"] #offlineContractsHome .offline-contract-head p{font-size:11px}
}
@media (min-width:1181px) and (max-width:1450px) and (hover:hover) and (pointer:fine){
 body[data-desktop-view="home"] .dashboard-head-grid{
  grid-template-columns:minmax(230px,22%) minmax(0,1fr) minmax(270px,29%)!important;
 }
 body[data-desktop-view="home"] .dashboard-side-stack{
  grid-template-columns:minmax(0,1fr) minmax(270px,38%)!important;
 }
}

/* Harmoniser les défis En live avec les contrats Hors live sur PC.
   Le composant En live avait conservé son ancien agencement interne horizontal
   et une grande hauteur vide après son déplacement dans la colonne centrale. */
@media (min-width:1181px) and (hover:hover) and (pointer:fine){
 body[data-desktop-view="home"] #offlineContractsHome #objectivesLivePanel,
 body[data-desktop-view="home"] #offlineContractsHome #dailyChallengesCard{
  height:auto!important;min-height:0!important;max-height:none!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome #dailyChallengesCard{
  padding:0!important;margin:0!important;border:0!important;box-shadow:none!important;
  background:transparent!important;overflow:visible!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome #dailyChallengesGrid{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-auto-rows:auto!important;gap:10px!important;
  height:auto!important;min-height:0!important;overflow:visible!important;
  align-items:stretch!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome #dailyChallengesGrid>.daily-challenge{
  display:flex!important;flex-direction:column!important;
  position:relative!important;width:100%!important;min-width:0!important;
  min-height:0!important;height:auto!important;max-height:none!important;
  padding:12px!important;gap:9px!important;overflow:hidden!important;
  box-sizing:border-box!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome .daily-challenge-top{
  display:flex!important;flex-direction:row!important;align-items:flex-start!important;
  gap:8px!important;min-width:0!important;width:100%!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome .daily-challenge-top>div{
  min-width:0!important;flex:1 1 auto!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome .daily-challenge-icon{
  flex:0 0 30px!important;width:30px!important;height:30px!important;
  font-size:18px!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome .daily-challenge-title{
  font-size:12px!important;line-height:1.3!important;
  white-space:normal!important;overflow-wrap:anywhere!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome .daily-challenge-desc{
  font-size:10px!important;line-height:1.4!important;
  white-space:normal!important;overflow-wrap:anywhere!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome .daily-challenge-rewards{
  display:flex!important;flex-wrap:wrap!important;width:100%!important;
  gap:5px!important;min-width:0!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome .daily-reward-pill{
  font-size:9px!important;padding:4px 6px!important;
  max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome .daily-challenge-progress{
  display:block!important;width:100%!important;height:6px!important;
  margin-top:auto!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome .daily-challenge-progress-text{
  font-size:10px!important;flex-wrap:wrap!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome .daily-challenges-head{
  margin-bottom:10px!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome .daily-challenges-note{
  margin-top:10px!important;position:static!important;
 }
}

/* PC : le cadre global des objectifs suit la hauteur réelle du contenu,
   indépendamment de la roue des récompenses placée dans la même grille. */
@media (min-width:1181px) and (hover:hover) and (pointer:fine){
 body[data-desktop-view="home"] .dashboard-side-stack{
  align-items:start!important;grid-auto-rows:max-content!important;
 }
 body[data-desktop-view="home"] .dashboard-side-stack > #offlineContractsHome{
  align-self:start!important;justify-self:stretch!important;
  height:max-content!important;min-height:0!important;max-height:none!important;
  display:block!important;overflow:visible!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome #objectivesLivePanel:not([hidden]),
 body[data-desktop-view="home"] #offlineContractsHome #dailyChallengesCard{
  height:max-content!important;min-height:0!important;max-height:none!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome .daily-challenges-note{
  position:static!important;margin:10px 0 0!important;
 }
}

/* Correction structurelle : la roue fixe la hauteur de la ligne de grille,
   mais le panneau des objectifs ne doit pas hériter de cette hauteur.
   max-height:max-content bloque également les anciennes règles height:100%. */
@media (min-width:1181px) and (hover:hover) and (pointer:fine){
 body[data-desktop-view="home"] .dashboard-head-grid > .dashboard-side-stack{
  align-items:start!important;align-content:start!important;
 }
 body[data-desktop-view="home"] .dashboard-side-stack > section#offlineContractsHome{
  align-self:start!important;justify-self:stretch!important;
  block-size:fit-content!important;
  height:fit-content!important;
  max-height:max-content!important;
  min-height:0!important;
  flex:0 0 auto!important;
  overflow:visible!important;
 }
 body[data-desktop-view="home"] .dashboard-side-stack > section#offlineContractsHome > #objectivesLivePanel,
 body[data-desktop-view="home"] .dashboard-side-stack > section#offlineContractsHome > #objectivesOfflinePanel{
  height:fit-content!important;max-height:max-content!important;min-height:0!important;
  align-self:start!important;
 }
}

/* PC : la version historique des défis impose trois LIGNES de grille
   et flex:1. Après passage en trois COLONNES dans Mes objectifs,
   ces lignes réservées provoquent le grand espace vide "En live". */
@media (min-width:1181px) and (hover:hover) and (pointer:fine){
 body[data-desktop-view="home"] .dashboard-side-stack > #offlineContractsHome{
  grid-row:auto!important;align-self:start!important;
  height:auto!important;min-height:0!important;max-height:none!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome #objectivesLivePanel:not([hidden]),
 body[data-desktop-view="home"] #offlineContractsHome #objectivesOfflinePanel:not([hidden]){
  display:block!important;flex:none!important;
  height:auto!important;min-height:0!important;max-height:none!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome #dailyChallengesCard{
  display:block!important;flex:none!important;align-self:start!important;
  height:auto!important;min-height:0!important;max-height:none!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome #dailyChallengesGrid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-template-rows:none!important;
  grid-auto-rows:auto!important;
  align-content:start!important;
  flex:none!important;height:auto!important;min-height:0!important;
 }
 body[data-desktop-view="home"] #offlineContractsHome #dailyChallengesGrid > .daily-challenge,
 body[data-desktop-view="home"] #offlineContractsHome #dailyChallengesGrid > .daily-challenge.carousel-active{
  display:flex!important;flex-direction:column!important;
  grid-row:auto!important;grid-column:auto!important;
  height:auto!important;min-height:0!important;
 }
}

/* Fiche Lovys PC : ne plus positionner le monstre en absolu selon la
   hauteur totale (variable) de la fiche. Le visuel reste dans son cadre. */
@media (min-width:1181px) and (hover:hover) and (pointer:fine){
 body[data-desktop-view="lovys"] #lovysCollectionModal .lovys-active-art{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
  position:relative!important;
  box-sizing:border-box!important;
  padding:76px 8px 20px!important;
  min-height:340px!important;
  overflow:visible!important;
 }
 body[data-desktop-view="lovys"] #lovysCollectionModal .lovys-active-art > img{
  position:relative!important;
  left:auto!important;top:auto!important;right:auto!important;bottom:auto!important;
  width:100%!important;
  max-width:245px!important;
  height:auto!important;
  max-height:310px!important;
  object-fit:contain!important;
  transform:none!important;
  opacity:1!important;
  visibility:visible!important;
  filter:drop-shadow(0 16px 12px rgba(0,0,0,.5))!important;
 }
 body[data-desktop-view="lovys"] #lovysCollectionModal .lovys-active-art::after{
  top:390px!important;
  max-width:220px!important;
 }
}
