/* ==========================================================
   RESPONSIVE — tablette (≤1050px) et mobile (≤760px)
   (chargé en dernier pour l'emporter sur le reste)
========================================================== */

@media(max-width:1050px){
  .stats{ grid-template-columns:repeat(2,1fr); }
  .grid2{ grid-template-columns:1fr; }
  .listing-grid{ grid-template-columns:repeat(2,1fr); }
  .plans{ grid-template-columns:1fr; }
  .topbar{ padding:0 16px; }
  .profile{ display:none; }

  /* fiche véhicule */
  .detail{ grid-template-columns:1fr; }
  .buybox{ position:static; }
}

@media(max-width:760px){
  .layout{ grid-template-columns:1fr; }

  .sidebar{
    position:fixed; left:0; right:0; bottom:0; top:auto;
    height:auto; z-index:30; padding:7px;
    border-right:0; border-top:1px solid var(--line);
  }

  .nav{ flex-direction:row; justify-content:space-around; }
  .nav-label,
  .side-card{ display:none; }
  .nav button{ font-size:0; padding:9px 13px; justify-content:center; }
  .nav button span{ font-size:19px; }

  .search{ display:none; }
  main{ padding:20px 14px 90px; }
  .page-head{ align-items:flex-start; flex-direction:column; }
  .stats{ grid-template-columns:1fr 1fr; }
  .listing-grid{ grid-template-columns:1fr; }

  .messages{ grid-template-columns:1fr; height:min(680px,calc(100vh - 210px)); min-height:480px; }
  .thread-list{ display:none; }

  .table-row{ grid-template-columns:1.5fr .9fr .7fr; }
  .table-row>:nth-child(2),
  .table-row>:nth-child(4){ display:none; }

  .logo-name{ font-size:18px; }

  /* fiche véhicule */
  .specs{ grid-template-columns:1fr; }
  .spec:nth-child(n){ padding-left:0; padding-right:0; border-left:0; }
}
