/* Rendu mobile commun a tout le site, 29/09/2026. Voir generateurs-opus/patch_mobile_commun.py.
   Les styles de page sont en ligne et recopies dans chaque fichier : les corrections mobiles vivent ici,
   une seule fois, et s'appliquent partout. */

@media (max-width: 768px) {
  /* accueil : l'indication « Scroll » chevauchait le compte a rebours */
  .hero .scroll-line { display: none !important; }

  /* accueil : les 4 chiffres cles en grille 2 x 2 au lieu de 4 blocs empiles */
  .stats-section { display: grid !important; grid-template-columns: 1fr 1fr; }
  .stats-section .stat-block { padding: 22px 10px; }

  /* cartes illustrees (boutique et classements de l'accueil) : la pastille s'etirait sur toute la largeur */
  .product-card .tool-badge { left: 14px !important; right: auto !important; width: auto !important;
    max-width: calc(100% - 28px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* fiches jeux : le contenu (titre, bande-annonce, description) avant la colonne jaquette et liens */
  .game-header .game-info { order: -1; margin-top: 22px; }
  .game-header .game-left { order: 2; margin-top: 28px; }

  /* liste des jeux : deux colonnes compactes */
  div:has(> .game-card) { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .game-card .game-card-body { padding: 12px !important; }
  .game-card .game-card-title { font-size: 1.05rem !important; line-height: 1.15; }
  .game-card .game-card-year { font-size: 0.62rem !important; letter-spacing: 1px !important; }
  .game-card .game-card-excerpt { display: none !important; }
  .game-card .game-card-cta { font-size: 0.7rem !important; }

  /* fiches personnages : deux colonnes */
  .vc-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .vc-grid .vc-card-body { padding: 10px 12px 12px !important; }
  .vc-grid .vc-card-name { font-size: 1.05rem !important; line-height: 1.15; }
  .vc-grid .vc-card-role, .vc-grid .vc-card-voice { font-size: 0.72rem !important; }
  .vc-facts { grid-template-columns: 1fr 1fr !important; }

  /* boutique, carte GTA 6 : l'image (800 x 450) servait de fond a tout le bloc, etiree sur ~1600 px et floue,
     le texte par-dessus. En bandeau a son format, texte en dessous sur fond uni. */
  .sh-feat { display: flex; flex-direction: column; }
  .sh-feat-art { position: relative !important; inset: auto !important; aspect-ratio: 16 / 9; }
  .sh-feat-art img { object-position: center 30% !important; }
  .sh-feat-art::after { background: linear-gradient(180deg, rgba(26,37,53,0) 60%, #1a2535 100%) !important; }
  .sh-feat-in { padding: 14px 18px 20px !important; gap: 18px !important; justify-content: flex-start !important; }
  .sh-feat-l { flex: 0 0 auto !important; }
  .sh-feat-l h2 { font-size: 2.1rem !important; margin-top: 2px !important; text-shadow: none !important; }
  .sh-feat-l p { text-shadow: none !important; font-size: 0.9rem !important; }
  .sh-feat-r { background: rgba(5,8,15,0.55) !important; }

  /* boutique : deux colonnes compactes */
  .sh-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .sh-grid .product-card { min-width: 0; }
  .sh-grid .product-body { padding: 12px !important; }
  .sh-grid .product-desc { display: none !important; }
  .sh-grid .product-name { font-size: 1.05rem !important; }
  .sh-grid .price-current { font-size: 1.15rem !important; }
  .sh-grid .product-price-row { flex-direction: column; align-items: flex-start !important; gap: 2px !important; margin-bottom: 10px !important; }
  .sh-grid .btn-buy { padding: 10px 6px !important; font-size: 0.7rem !important; letter-spacing: 1px !important; }
}

@media (max-width: 640px) {
  /* tous les tableaux .rank-table en cartes (les classements n'avaient pas tableaux.css) */
  .rank-table { min-width: 0 !important; border: none !important; background: none !important; }
  .rank-table thead { display: none !important; }
  .rank-table tbody { display: block !important; }
  .rank-table tr { display: flex !important; flex-wrap: wrap; align-items: baseline; margin: 0 0 10px;
    border: 1px solid rgba(255,255,255,0.09); border-radius: 10px; background: rgba(255,255,255,0.03); overflow: hidden; }
  .rank-table td { display: block !important; flex: 1 1 100%; border: none !important; padding: 4px 14px !important;
    width: auto !important; text-align: left !important; font-size: 0.86rem !important; background: none !important; }
  .rank-table td:first-child { padding-top: 12px !important; }
  /* premiere colonne = rang ou numero (marque par mobile.js) : rang et nom sur la meme ligne */
  .rank-table.rt-num td:first-child { flex: 0 0 auto; padding-right: 4px !important; }
  .rank-table.rt-num td:nth-child(2) { flex: 1 1 0; padding-top: 12px !important; padding-left: 6px !important; }
  .rank-table td:last-child { padding-bottom: 12px !important; }
  .rank-table td[data-vide] { display: none !important; }
  .rank-table td[data-label]:not(:first-child)::before { content: attr(data-label); display: block;
    font-family: 'Barlow Condensed', sans-serif; font-size: 0.68rem; letter-spacing: 1.5px; text-transform: uppercase;
    color: rgba(0,245,255,0.75); margin-bottom: 1px; }
  .rank-table.rt-num td:nth-child(2)::before { content: none !important; }
  .rank-table tr.top-1, .rank-table tr.top-2, .rank-table tr.top-3 { border-left-width: 3px; }

  /* sauf les tableaux courts, qui tiennent a l'ecran : tableau classique, resserre */
  .rank-table.rt-compact { display: table !important; width: 100% !important; }
  .rank-table.rt-compact thead { display: table-header-group !important; }
  .rank-table.rt-compact tbody { display: table-row-group !important; }
  .rank-table.rt-compact tr { display: table-row !important; border: none !important; margin: 0 !important; background: none !important; }
  .rank-table.rt-compact td, .rank-table.rt-compact th { display: table-cell !important; padding: 9px 8px !important;
    border-bottom: 1px solid rgba(255,255,255,0.07) !important; font-size: 0.84rem !important; vertical-align: top; }
  .rank-table.rt-compact th { font-size: 0.68rem !important; }
  .rank-table.rt-compact td::before { content: none !important; }
  .rank-table.rt-compact td[data-vide] { display: table-cell !important; }

  /* pied de page : rubriques repliables (mobile.js), deux colonnes sinon */
  .footer-links { grid-template-columns: 1fr !important; gap: 0 !important; }
  .footer-col { border-bottom: 1px solid rgba(255,255,255,0.08); }
  .footer-col.gsm-replie ul, .footer-col.gsm-replie .footer-col-list { display: none; }
  .footer-col .footer-col-title { cursor: pointer; display: flex !important; justify-content: space-between; align-items: center;
    padding: 14px 0 !important; margin: 0 !important; }
  .footer-col .footer-col-title::after { content: "+"; color: #00f5ff; font-size: 1.1rem; }
  .footer-col:not(.gsm-replie) .footer-col-title::after { content: "\2212"; }
  .footer-col:not(.gsm-replie) ul { padding-bottom: 12px; }
}
