/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* ========================================
   TABLET (768px - 1024px)
   ======================================== */
@media (max-width: 1024px) {
  :root {
    --spacing-xl: 64px;
    --spacing-2xl: 80px;
    --font-size-3xl: 40px;
    --font-size-4xl: 56px;
  }

  .container {
    padding: 0 var(--spacing-sm);
  }

  .hero-title {
    font-size: var(--font-size-3xl);
  }

  .listings-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

/* ========================================
   MOBILE (max-width: 768px)
   ======================================== */
@media (max-width: 768px) {
  :root {
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-2xl: 64px;
    --font-size-2xl: 28px;
    --font-size-3xl: 32px;
    --font-size-4xl: 40px;
  }

  /* Navigation */
  .navbar {
    height: 56px;
    gap: var(--spacing-xs);
  }

  /* Logo réduit : à 44px de haut il fait ~258px de large et fait déborder la barre sur un écran de 375px */
  .navbar-brand .logo img {
    height: 34px;
  }

  /* Éléments décoratifs qui dépassent (ex. cercle du bandeau d'accueil) : pas de défilement horizontal */
  body {
    overflow-x: clip;
  }

  .navbar-menu {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .navbar-actions {
    gap: var(--spacing-xs);
  }

  /* Connexion / inscription : déjà dans le tiroir mobile (évite le débordement horizontal de la page) */
  .navbar-actions > .btn {
    display: none;
  }

  /* Menu utilisateur : avatar seul, sans le prénom */
  .navbar-actions .user-btn > span:first-of-type {
    display: none;
  }

  /* Hero */
  .hero {
    padding: var(--spacing-xl) 0;
  }

  .hero-title {
    font-size: var(--font-size-3xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-lg);
  }

  .search-form {
    flex-direction: column;
  }

  /* Stats */
  .stats {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  /* Grids */
  .brands-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--spacing-sm);
  }

  .listings-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }

  /* Error Page */
  .error-code {
    font-size: 80px;
  }

  .error-actions {
    flex-direction: column;
  }

  .error-actions .btn {
    width: 100%;
  }
}

/* ========================================
   SMALL MOBILE (max-width: 480px)
   ======================================== */
@media (max-width: 480px) {
  :root {
    --font-size-4xl: 32px;
  }

  .container {
    padding: 0 var(--spacing-sm);
  }

  .brands-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
