/* ================= JEUX : TUILES EN GRILLE AVEC UNE IMAGE PAR JEU (onglet Jeux) =================
   Chargé par index.html depuis le dossier jeux/ : pour changer une image, on remplace seulement le fichier dans jeux/images/.
   - L'image prend la place de la grosse icône de la carte (repérée par son icône : fish-hook, brain, speedboat),
     seulement sur l'écran d'accueil de chaque jeu (pas pendant une partie de quiz ni sur l'écran de fin).
   - Les cartes des jeux deviennent des tuiles : 2 par ligne sur téléphone, plus sur PC selon la largeur.
     Une tuile dont le classement est ouvert, ou l'écran de fin du quiz, prend toute la ligne. */
.qz-carte > div:first-child:has(> .ti-fish-hook, > .ti-brain, > .ti-speedboat){
  margin:-12px -12px 10px; aspect-ratio:5 / 2; max-height:260px; font-size:0 !important;
  border-radius:inherit; border-bottom-left-radius:0; border-bottom-right-radius:0;
  background:var(--bg-alt) center / cover no-repeat;
}
.qz-carte > div:first-child > :is(.ti-fish-hook, .ti-brain, .ti-speedboat){display:none;}
.qz-carte > div:first-child:has(> .ti-fish-hook){background-image:url(images/lancer.jpg);}
.qz-carte > div:first-child:has(> .ti-brain){background-image:url(images/quiz.jpg);}
.qz-carte > div:first-child:has(> .ti-speedboat){background-image:url(images/course.svg);}

/* Grille : seulement quand l'onglet affiche les cartes des jeux (pas pendant une partie) */
#view-quiz.active:has(> .qz-carte [data-jx-panneau]){
  display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:10px; align-items:stretch; grid-auto-flow:row dense;
}
#view-quiz.active:has(> .qz-carte [data-jx-panneau]) > *{grid-column:1 / -1; min-width:0;}
#view-quiz.active:has(> .qz-carte [data-jx-panneau]) > .qz-carte{margin:0 !important;}
#view-quiz > .qz-carte:has(> div:first-child > :is(.ti-fish-hook, .ti-brain, .ti-speedboat)){
  grid-column:auto; display:flex; flex-direction:column; padding:12px; overflow:hidden;
}
#view-quiz > .qz-carte:has(> div:first-child > :is(.ti-fish-hook, .ti-brain, .ti-speedboat)):has([data-jx-panneau] .ti-chevron-up){grid-column:1 / -1;}
/* contenu d'une tuile : titre plus petit, description sur 3 lignes, boutons en bas */
#view-quiz > .qz-carte > div:first-child:has(> :is(.ti-fish-hook, .ti-brain, .ti-speedboat)) ~ .display{font-size:17px !important; line-height:1.2;}
#view-quiz > .qz-carte > div:first-child:has(> :is(.ti-fish-hook, .ti-brain, .ti-speedboat)) ~ .display + .hint{
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; font-size:12.5px; line-height:1.4 !important;
}
#view-quiz > .qz-carte > div:first-child:has(> :is(.ti-fish-hook, .ti-brain, .ti-speedboat)) ~ .display + .hint + .hint{margin-top:auto !important; padding-top:10px;}
#view-quiz > .qz-carte:has(> div:first-child > :is(.ti-fish-hook, .ti-brain, .ti-speedboat)) > .btn{padding-left:8px; padding-right:8px;}
@media (min-width:700px){
  #view-quiz.active:has(> .qz-carte [data-jx-panneau]){grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:14px;}
  #view-quiz > .qz-carte:has(> div:first-child > :is(.ti-fish-hook, .ti-brain, .ti-speedboat)){padding:14px;}
  #view-quiz > .qz-carte > div:first-child:has(> :is(.ti-fish-hook, .ti-brain, .ti-speedboat)){margin:-14px -14px 12px;}
  #view-quiz > .qz-carte > div:first-child:has(> :is(.ti-fish-hook, .ti-brain, .ti-speedboat)) ~ .display{font-size:19px !important;}
  #view-quiz > .qz-carte > div:first-child:has(> :is(.ti-fish-hook, .ti-brain, .ti-speedboat)) ~ .display + .hint{-webkit-line-clamp:4; font-size:13px;}
}
