/* CARD_RAIL_V1 (Julien 2026-10-08) — on mobile every end-of-page card block (« Les pages de ce comparatif », « Autres
   ressources / outils », « À lire ensuite »…) is one horizontal rail of whole cards: 82 % wide, the next one peeking,
   scroll-snap and swipe. Pure CSS (no measurement), so it holds in the presentation mode's hidden steps too. Desktop
   keeps each block's own grid. Renderer: cms_card_rail_asset() in includes/overlay-cards.php. */
@media (max-width: 720px) {
  .cms-card-rail {
    display: flex !important;
    grid-template-columns: none !important;
    /* Its width comes from the column, never from its cards (a rail in a grid/flex item would otherwise grow to them). */
    contain: inline-size;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    gap: 12px !important;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .cms-card-rail::-webkit-scrollbar { display: none; }
  .cms-card-rail > * {
    flex: 0 0 82% !important;
    width: 82% !important;
    max-width: 82% !important;
    min-width: 0 !important;
    margin: 0 !important;
    scroll-snap-align: start;
    box-sizing: border-box;
  }
  .cms-card-rail > .wi2-overlay-card { aspect-ratio: 4 / 5; height: auto; }
  .cms-card-rail__count { display: block; margin-top: 8px; color: var(--color-text-muted, #5d6675); font: 600 13px/1 var(--font-body, system-ui); text-align: right; font-variant-numeric: tabular-nums; }
}
@media (min-width: 721px) { .cms-card-rail__count { display: none; } }
