/* ===== Fluidité ===== (chargé en dernier)
   1. Partout : aucune animation en boucle sur les éléments répétés (cartes, boutons, icônes, badges).
      Des centaines d'animations simultanées faisaient tomber le défilement à 6 images/s sur téléphone.
   2. Listes longues : le navigateur ne dessine que les cartes visibles à l'écran.
   3. Téléphones et appareils modestes (html.lite, posé par js/motion.js) : décors animés du fond coupés. */

/* 1. Éléments répétés : fixes (les effets au survol restent sur ordinateur) */
.card__icon, .card .badge, .badge, .badge--hot, .chipcard, .section-tile__icon, .step span, .nav__badge:not(:empty),
.rtile img, .rtile__band b, .rtile__label, .mcard__shine, .rtile__shine, .btn--primary::after, .authbtn::after, .stat::after {
  animation: none !important;
}
.rtile__shine, .mcard__shine, .btn--primary::after, .authbtn::after, .stat::after { display: none !important; }

/* 2. Seules les cartes à l'écran sont dessinées */
#puGrid .card, #subsGrid .card, #accountGrid .account, #productGrid .card, #ordersView .order-card {
  content-visibility: auto; contain-intrinsic-size: auto 320px;
}

/* 3. Mode léger : fond fixe, logo fixe, pas de verre flouté */
@media (max-width: 760px), (pointer: coarse) {
  html::before, html::after, body.has-shell::after, .welcome__logo, .brand img, .topbar__brand img,
  .welcome .tag::after, .welcome h1, .welcome h1 *, body.has-shell::before, .page-head h1, .welcome h2 em, .block-title,
  .sidebar::before, .section-tile__art::before, .section-tile__shine::before, .pu-cover::before { animation: none !important; }
  .section-tile__shine { display: none; }
  * { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
}
html.lite::before, html.lite::after, html.lite body.has-shell::after, html.lite body.has-shell::before, html.lite .welcome__logo,
html.lite .brand img, html.lite .topbar__brand img, html.lite .welcome .tag::after, html.lite .page-head h1, html.lite .block-title,
html.lite .sidebar::before, html.lite .section-tile__art::before, html.lite .pu-cover::before { animation: none !important; }

/* Appareils modestes : le flou « verre fumé » coûte très cher à chaque image ; on garde un verre sombre, sans flou */
html.lite * { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html.lite body.has-shell :is(.panel, .card, .account, .stat, .step, .section-tile, .event, .order-card) { background-color: rgba(13, 16, 23, .86) !important; }
@media (max-width: 760px), (pointer: coarse) {
  body.has-shell :is(.panel, .card, .account, .stat, .step, .section-tile, .event, .order-card) { background-color: rgba(13, 16, 23, .86) !important; }
}

/* Sans flou, les éléments flottants (menu latéral, barre du haut, fenêtres) ont besoin d'un fond opaque pour rester lisibles */
@media (max-width: 760px), (pointer: coarse) {
  .sidebar, .topbar, .trackcard, .cta-bar, .consent, dialog.modal { background-color: #0a0c12 !important; }
}
html.lite .sidebar, html.lite .topbar, html.lite .trackcard, html.lite .consent, html.lite dialog.modal { background-color: #0a0c12 !important; }

/* Lien « ← Retour » : zone de clic suffisante aussi sur ordinateur */
.back { display: inline-flex; align-items: center; min-height: 32px; }

/* Écrans tactiles : pas de surbrillance « collée » après un toucher (seule la page en cours reste en valeur) */
@media (hover: none) { .nav__item:not(.is-active):hover { background: transparent; } }

/* Menu latéral sur téléphone : semi-transparent et légèrement flouté (verre dépoli), on voit la page derrière au travers */
@media (max-width: 760px), (pointer: coarse) { .sidebar { background-color: rgba(10, 12, 18, .7) !important; -webkit-backdrop-filter: blur(2px) !important; backdrop-filter: blur(2px) !important; } }
html.lite .sidebar { background-color: rgba(10, 12, 18, .7) !important; -webkit-backdrop-filter: blur(2px) !important; backdrop-filter: blur(2px) !important; }
