/* ==========================================
   RESPONSIVE DESIGN - PAGES CATEGORIES
   ========================================== */

/* --- MOBILE FIRST BASE STYLES --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- TABLETTES (768px - 1024px) --- */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 2.5rem !important;
  }
  
  .hero p {
    font-size: 1.1rem !important;
  }
  
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    gap: 20px !important;
  }
  
  .container {
    padding: 40px 15px !important;
  }
}

/* --- MOBILE LARGE (481px - 768px) --- */
@media (max-width: 768px) {
  body {
    padding-top: 60px !important;
  }
  
  .hero {
    padding: 60px 15px !important;
  }
  
  .hero h1 {
    font-size: 2rem !important;
  }
  
  .hero p {
    font-size: 1rem !important;
  }
  
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 15px !important;
  }
  
  .card img {
    height: 250px !important;
  }
  
  .card-body h3 {
    font-size: 1.1rem !important;
  }
  
  .card-body .price {
    font-size: 1.3rem !important;
  }
  
  .card-body .description {
    font-size: 0.85rem !important;
  }
  
  .card-actions {
    flex-direction: column !important;
  }
  
  .btn {
    padding: 10px !important;
    font-size: 0.9rem !important;
  }
  
  /* Footer responsive */
  .footer-content {
    flex-direction: column !important;
    gap: 15px !important;
  }
  
  .footer-left,
  .footer-center,
  .footer-right {
    text-align: center !important;
    justify-content: center !important;
  }
  
  .footer-brand {
    font-size: 1.8rem !important;
  }
}

/* --- MOBILE STANDARD (376px - 480px) --- */
@media (max-width: 480px) {
  .hero {
    padding: 40px 10px !important;
  }
  
  .hero h1 {
    font-size: 1.5rem !important;
  }
  
  .hero p {
    font-size: 0.9rem !important;
  }
  
  .container {
    padding: 30px 10px !important;
  }
  
  .product-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
  
  .card img {
    height: 200px !important;
  }
  
  .card-body {
    padding: 15px !important;
  }
  
  .card-body h3 {
    font-size: 1rem !important;
  }
  
  .card-body .price {
    font-size: 1.2rem !important;
  }
  
  .btn {
    padding: 8px !important;
    font-size: 0.85rem !important;
  }
  
  /* Navbar icons plus petits */
  .navbar-icon {
    font-size: 1.2rem !important;
  }
  
  .cart-badge {
    width: 16px !important;
    height: 16px !important;
    font-size: 0.65rem !important;
  }
}

/* --- MOBILE SMALL (320px - 375px) --- */
@media (max-width: 375px) {
  .hero h1 {
    font-size: 1.3rem !important;
  }
  
  .hero p {
    font-size: 0.85rem !important;
  }
  
  .card img {
    height: 180px !important;
  }
  
  .card-body h3 {
    font-size: 0.95rem !important;
  }
  
  .card-body .price {
    font-size: 1.1rem !important;
  }
  
  .btn {
    font-size: 0.8rem !important;
    padding: 7px !important;
  }
}

/* --- MOBILE TRÈS PETIT (< 320px) --- */
@media (max-width: 320px) {
  .hero {
    padding: 30px 8px !important;
  }
  
  .hero h1 {
    font-size: 1.2rem !important;
  }
  
  .hero p {
    font-size: 0.8rem !important;
  }
  
  .container {
    padding: 20px 8px !important;
  }
  
  .card img {
    height: 150px !important;
  }
  
  .card-body {
    padding: 10px !important;
  }
  
  .card-body h3 {
    font-size: 0.9rem !important;
  }
  
  .card-body .price {
    font-size: 1rem !important;
  }
}

/* --- OPTIMISATION TOUCH --- */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .card {
    -webkit-tap-highlight-color: rgba(184, 72, 103, 0.2);
  }
  
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .navbar-icon {
    padding: 10px;
  }
}

/* --- LANDSCAPE MODE MOBILE --- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: 30px 15px !important;
  }
  
  .hero h1 {
    font-size: 1.5rem !important;
  }
  
  .hero p {
    font-size: 0.9rem !important;
  }
  
  .container {
    padding: 30px 15px !important;
  }
  
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
  }
}

/* --- AMÉLIORATION PERFORMANCE --- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- DARK MODE (si activé système) --- */
@media (prefers-color-scheme: dark) {
  .card {
    background: rgba(255, 255, 255, 0.95);
  }
}
