/* Très grand écran, écrans Backlog, Loot, Listes, Ranking et en-têtes d'archives (01/12/2026, retours A1 à A4).
   Règle : la place en plus montre plus d'éléments, rien ne s'étire. Chargée seulement si `visuel.ecrans_compacts`
   est allumé ; tout est sous la classe `rh24-ecrans-compacts` du <body>. */

/* ---- A1. Backlog : Steam, Fichier, Partage côte à côte, en trois cartes compactes --------------- */
@media (min-width: 1100px) {
    body.rh24-ecrans-compacts .rh24bk:not(.est-grille) > .rh24bk-bas {
        grid-template-columns: minmax(0, 560px) minmax(0, 360px) minmax(0, 360px); justify-content: start; align-items: start; gap: 16px;
    }
    body.rh24-ecrans-compacts .rh24bk:not(.est-grille) > .rh24bk-bas.est-deux { grid-template-columns: minmax(0, 560px) minmax(0, 360px); }
    body.rh24-ecrans-compacts .rh24bk:not(.est-grille) > .rh24bk-bas > .rh24bk-pl { display: contents; }
}
body.rh24-ecrans-compacts .rh24bk-bas .rh24s-tuiles { display: flex; flex-wrap: wrap; gap: 10px; }
body.rh24-ecrans-compacts .rh24bk-bas .rh24s-tuile { display: flex; align-items: center; gap: 8px; padding: 8px 14px; flex: 0 0 auto; }
body.rh24-ecrans-compacts .rh24bk-bas .rh24s-tuile > .rh24s-ic { order: 0; }
body.rh24-ecrans-compacts .rh24bk-bas .rh24s-tuile > strong { order: 1; }
body.rh24-ecrans-compacts .rh24bk-bas .rh24s-tuile > span { order: 2; }
body.rh24-ecrans-compacts .rh24bk-bas .rh24st-boutons,
body.rh24-ecrans-compacts .rh24bk-bas .rh24s-portes { display: flex; flex-wrap: wrap; gap: 10px; }
body.rh24-ecrans-compacts .rh24bk-bas .rh24st-boutons > *,
body.rh24-ecrans-compacts .rh24bk-bas .rh24s-portes > * { flex: 0 0 auto; width: auto; }
body.rh24-ecrans-compacts .rh24bk-bas .rh24st-boutons .rh24k-bouton { display: inline-flex !important; flex-direction: row !important; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px; gap: 8px; }
body.rh24-ecrans-compacts .rh24bk-bas .rh24s-porte { flex-direction: row; min-height: 44px; padding: 8px 18px; gap: 8px; width: auto; }
body.rh24-ecrans-compacts .rh24bk-bas .rh24s-porte .rh24s-ic { width: 20px; height: 20px; }
body.rh24-ecrans-compacts .rh24bk-bas #fichier .rh24s-porte { min-height: 44px; }
body.rh24-ecrans-compacts .rh24bk-bas .rh24bk-fichier form { display: contents; }

/* ---- A2. Loot et Listes : tuiles de chiffres compactes, Clés en cartes, Listes sur deux colonnes -- */
@media (min-width: 700px) {
    body.rh24-ecrans-compacts .rh24r > .rh24s-tuiles,
    body.rh24-ecrans-compacts .rh24-listes > .rh24s-tuiles { display: flex; flex-wrap: wrap; gap: 12px; overflow: visible; padding: 0; margin: 0 0 16px; }
    body.rh24-ecrans-compacts .rh24r > .rh24s-tuiles > .rh24s-tuile,
    body.rh24-ecrans-compacts .rh24-listes > .rh24s-tuiles > .rh24s-tuile {
        display: flex; align-items: center; gap: 10px; flex: 0 1 280px; min-width: 200px; max-width: 280px; padding: 0 16px; min-height: 52px;
    }
    body.rh24-ecrans-compacts .rh24r > .rh24s-tuiles .rh24s-tuile > .rh24s-ic,
    body.rh24-ecrans-compacts .rh24-listes > .rh24s-tuiles .rh24s-tuile > .rh24s-ic { order: 0; }
    body.rh24-ecrans-compacts .rh24r > .rh24s-tuiles .rh24s-tuile > strong,
    body.rh24-ecrans-compacts .rh24-listes > .rh24s-tuiles .rh24s-tuile > strong { order: 1; font-size: 22px; line-height: 1; }
    body.rh24-ecrans-compacts .rh24r > .rh24s-tuiles .rh24s-tuile > span,
    body.rh24-ecrans-compacts .rh24-listes > .rh24s-tuiles .rh24s-tuile > span { order: 2; }
}
@media (min-width: 1100px) {
    body.rh24-ecrans-compacts #cles .rh24s-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 320px)) !important; gap: 12px; }
    body.rh24-ecrans-compacts #cles .rh24s-ligne { margin: 0; border-radius: var(--ds-r-m, 14px); box-shadow: var(--ds-o-1); background: var(--ds-surface-2); }
}
/* Listes : le champ à 760 px au plus, les coups de cœur en jaquettes dans la place libre. */
body.rh24-ecrans-compacts .rh24-liste-coeurs.rh24-liste-coeurs { display: none !important; }
@media (min-width: 1800px) {
    body.rh24-ecrans-compacts.rh24-ecrans-compacts.rh24-ecrans-compacts .rh24j-listes {
        grid-template-columns: minmax(0, 760px) minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; column-gap: 20px; row-gap: 20px;
    }
    body.rh24-ecrans-compacts.rh24-ecrans-compacts.rh24-ecrans-compacts .rh24j-listes .rh24-liste-des-listes { grid-template-columns: minmax(0, 1fr); grid-column: 1; grid-row: 1; }
    body.rh24-ecrans-compacts.rh24-ecrans-compacts.rh24-ecrans-compacts .rh24j-listes > #nouvelle-liste { grid-column: 1; grid-row: 2; }
    body.rh24-ecrans-compacts.rh24-ecrans-compacts.rh24-ecrans-compacts .rh24j-listes > .rh24-liste-coeurs.rh24-liste-coeurs { display: block !important; grid-column: 2; grid-row: 1 / span 2; }
}
body.rh24-ecrans-compacts .rh24-liste-coeurs-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; margin-top: 12px; }
body.rh24-ecrans-compacts .rh24-liste-coeurs-grille img {
    display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: var(--ds-surface-2); box-shadow: var(--ds-o-1);
}
body.rh24-ecrans-compacts .rh24-liste-coeurs-grille .rh24-liste-coeurs-plus {
    display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; border-radius: 10px; background: var(--ds-surface-2);
    color: var(--ds-encre-2); font-weight: 700; font-size: 16px;
}

/* ---- A3. Ranking : le bandeau de fin devient UNE carte de la taille d'un membre ----------------- */
body.rh24-ecrans-compacts .rh24-clm-ls > .rh24-clm-fin:nth-child(n) {
    display: flex; grid-column: auto; background: var(--ds-surface); box-shadow: var(--ds-o-1); border-radius: 14px; padding: 10px 14px; min-height: 76px;
}
body.rh24-ecrans-compacts .rh24-clm-ls > .rh24-clm-fin > span { font-size: 14px; line-height: 1.3; min-width: 0; }

/* ---- A4. En-têtes d'archives : titre, compteur et description centrés, description à 760 px au plus - */
body.rh24-ecrans-compacts .rh24-arch-entete .rh24-arch-tete { justify-content: center; }
body.rh24-ecrans-compacts .rh24-arch-entete .rh24t-archive-desc { max-width: 760px; margin-left: auto; margin-right: auto; text-align: center; }
@media (min-width: 2200px) {
    body.rh24-ecrans-compacts.rh24-archive-cotes .rh24-arch-entete > .rh24t-archive-desc { justify-self: center; }
}
