/* ================================================================
   RESPONSIVE OVERRIDES — tablette & desktop
   Chargé en dernier (wp_footer) pour surcharger les <style> inline
   des templates de pages qui figent max-width: 480px.
   ================================================================ */

@media (min-width: 481px) {

  /* ── Conteneurs de page (wrappers plein écran) ───────────── */
  .app-shell,
  .al, .bs, .cf, .cv, .fp, .gp, .h-nav, .hd, .hl, .hls, .hpr, .hpx,
  .hr, .hs, .hv, .la, .lp, .mp, .notif, .page, .pgp, .ph, .pkg-pay,
  .po, .rc, .rdp, .rp, .rr, .sr, .vg, .vp,
  .pay-success__inner {
    max-width: var(--max-width) !important;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  /* ── Barres fixes / en-têtes / pieds collés ──────────────── */
  .al__footer, .hpx__footer, .hr__footer, .hv__footer, .la__footer,
  .rc__footer, .rdp__footer, .rp__footer, .rr__footer,
  .hpr__head, .hr__head, .la__head,
  .bottom-nav, .bottom-bar, .sticky-bar {
    max-width: var(--max-width) !important;
  }

  /* ── Feuilles / modales ──────────────────────────────────── */
  .bottom-sheet,
  .gp__del-modal, .gp__edit-sheet, .gp__verif-sheet,
  .hd__pick-sheet, .hls__pick-sheet, .ph__vi-sheet,
  .lm__box, .pv-box {
    max-width: min(560px, var(--max-width)) !important;
  }
}

/* Tablette : pas de bordures latérales (plein écran) */
@media (min-width: 481px) and (max-width: 1279px) {
  .app-shell, .bottom-nav, .sticky-bar, .bottom-sheet, .toast {
    border-left: none !important;
    border-right: none !important;
  }
}

/* ── Page recherche / filtres ─────────────────────────────── */
@media (min-width: 481px) and (max-width: 767px) {
  .sr__list.grid-view { grid-template-columns: repeat(3, 1fr) !important; }
}

/* Tablette et + : 4 annonces par ligne */
@media (min-width: 768px) {
  .sr__list.grid-view {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 28px 16px;
  }
  .sr__list.grid-view .sr__card-title { font-size: 14px; }
  .sr__list.grid-view .sr__card-meta  { font-size: 12px; }
  .sr__list.grid-view .sr__card-price { font-size: 15px; }

  /* Vue liste : 2 colonnes de cartes horizontales */
  .sr__list:not(.grid-view) {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 20px;
    align-items: start;
  }
  .sr__list:not(.grid-view) .sr__empty { grid-column: 1 / -1; }

  /* Carte de la carte interactive plus haute sur grand écran */
  .sr__map { height: 380px; }
}