/* =========================================================
   marquee.css — rangées de cartes vidéo qui défilent sans fin (Accueil, marquee.js), sens alternés. Le défilement est
   mené par marquee.js (translate3d arrondi au pixel de l'écran, jamais de décalage sous-pixel qui floute). Pause de la
   seule rangée survolée, qui a le focus ou dont un menu est ouvert. Au doigt : glissement horizontal = défilement de la
   rangée (touch-action: pan-y laisse le vertical à la page). prefers-reduced-motion : rangées immobiles, à la main.
   Refonte du 04/11/2026 (« j'aime pas trop la disposition ») : un mur de miniatures homogène — toutes les cartes ont
   leur titre, leur chaîne et leurs chiffres posés en bas de l'image sur un dégradé ; 1re rangée en grand (3 cartes
   visibles), les autres 4 (pas de fondu sur les bords : refusé le 04/11/2026, et le fondu du
   seul bord gauche, contre la barre latérale, refusé aussi le 23/11/2026) ; la carte survolée se
   soulève. Les 2 premières rangées tiennent dans l'écran (--mq-top mesuré par marquee.js).
   ========================================================= */

/* Place restante sous le haut des rangées, moins l'écart et les marges ; largeur telle que 1/3 + 1/4 de largeur en 16:9
   y tienne (× 0,328), jamais plus que la page. */
.tp-mq {
  --mq-room: max(300px, calc(100svh - var(--mq-top, 280px) - 64px));
  display: grid; gap: 14px; width: min(100%, calc(var(--mq-room) / 0.328)); margin-inline: auto; overflow: hidden;
  container-type: inline-size;
}
.tp-mq__row { overflow: hidden; touch-action: pan-y; padding-block: 6px; }
.tp-mq__track { display: flex; width: max-content; will-change: transform; transform: translate3d(0, 0, 0); }
.tp-mq__set { display: flex; gap: 16px; padding-right: 16px; }

/* Largeur d'après la section : 4 cartes visibles, la 1re rangée en grand : 3. */
.tp-mq__set > .tp-vcard { flex: none; width: max(260px, calc((100cqw - 48px) / 4)); }
.tp-mq__row--hero .tp-mq__set { gap: 18px; padding-right: 18px; }
.tp-mq__row--hero .tp-mq__set > .tp-vcard { width: max(300px, calc((100cqw - 36px) / 3)); }

/* ---------- Carte : l'image d'abord, le texte posé dessus ---------- */
.tp-mq .tp-vcard {
  position: relative; overflow: hidden; border-radius: 14px; background: #0b0b0b;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 260ms ease;
}
.tp-mq .tp-vcard:hover, .tp-mq .tp-vcard:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 16px 34px rgba(0, 0, 0, 0.55);
}
.tp-mq .tp-vcard__media { margin: 0; }
.tp-mq .tp-vcard__thumb, .tp-mq .tp-vcard__img { border-radius: 0; }
/* Survol de la miniature : celui de toutes les cartes (app.css, façon fortnite.gg) */
.tp-mq .tp-vcard:not(.is-compact) .tp-vcard__body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; margin: 0; padding: 64px 12px 10px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55) 38%, rgba(0, 0, 0, 0.88));
  pointer-events: none;
}
.tp-mq .tp-vcard__body :is(a, button, .tp-tag) { pointer-events: auto; }
.tp-mq .tp-vcard:not(.is-compact) .tp-vcard__title {
  margin: 0 0 2px; color: #ffffff; font-size: 15px; line-height: 20px; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.tp-mq .tp-vcard__title a { color: inherit; }
.tp-mq :is(.tp-vcard__channel, .tp-vcard__line, .tp-vcard__menu) { color: rgba(255, 255, 255, 0.82); }
/* Durée en bas à droite comme sur YouTube (06/11), au-dessus du dégradé du texte ; la dernière ligne lui laisse la place */
.tp-mq .tp-vcard__dur { top: auto; bottom: 10px; z-index: 2; transition: opacity 140ms ease; }
.tp-mq .tp-vcard:not(.is-compact) .tp-vcard__line { padding-right: 30px; }
.tp-mq .tp-vcard:hover .tp-vcard__dur, .tp-mq .tp-vcard:focus-within .tp-vcard__dur { opacity: 0; }
.tp-mq__row--hero .tp-vcard { border-radius: 16px; }
.tp-mq__row--hero .tp-vcard:not(.is-compact) .tp-vcard__body { padding: 88px 16px 14px; }
.tp-mq__row--hero .tp-vcard:not(.is-compact) .tp-vcard__title { font-size: 19px; line-height: 25px; font-weight: 700; }

@media (max-width: 600px) {
  .tp-mq { gap: 10px; width: 100%; }
  .tp-mq__set { gap: 12px; padding-right: 12px; }
  .tp-mq__set > .tp-vcard { width: 248px; }
  .tp-mq__row--hero .tp-mq__set { gap: 12px; padding-right: 12px; }
  .tp-mq__row--hero .tp-mq__set > .tp-vcard { width: 300px; }
  .tp-mq__row--hero .tp-vcard:not(.is-compact) .tp-vcard__title { font-size: 16px; line-height: 22px; }
}

/* Mouvement réduit : immobile, la rangée défile au doigt / à la molette. */
.tp-mq.is-static .tp-mq__track { transform: none; will-change: auto; }
.tp-mq.is-static .tp-mq__row { overflow-x: auto; touch-action: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
.tp-mq.is-static .tp-mq__set > .tp-vcard { scroll-snap-align: start; }
@media (prefers-reduced-motion: reduce) {
  .tp-mq .tp-vcard, .tp-mq .tp-vcard__img { transition: none; }
  .tp-mq .tp-vcard:hover, .tp-mq .tp-vcard:hover .tp-vcard__img { transform: none; }
}
