/* Styles améliorés pour le panier - Mobile first */

/* Structure générale du panier sur mobile */
@media (max-width: 767px) {
  /* Réorganisation de la grille */
  .cart-grid {
    flex-direction: column;
  }
  
  .cart-grid-body,
  .cart-grid-right {
    width: 100% !important;
    padding: 0 10px;
  }
  
  /* Carte du panier */
  .cart-container {
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
  }
  
  .cart-container .card-block {
    padding: 15px;
  }
  
  .cart-container h1 {
    font-size: 20px;
    margin-bottom: 15px;
    text-align: center;
    color: #288728;
  }
  
  /* Articles du panier */
  .cart-overview .cart-items {
    padding: 0;
  }
  
  .cart-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
  }
  
  .cart-item:last-child {
    border-bottom: none;
  }
  
  /* Ligne de produit */
  .product-line-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
  
  /* Image produit */
  .product-line-grid-left {
    width: 80px;
    flex-shrink: 0;
  }
  
  .product-line-grid-left img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  
  /* Infos produit */
  .product-line-grid-body {
    flex: 1;
    min-width: 0;
  }
  
  .product-line-info {
    margin-bottom: 10px;
  }
  
  .product-line-info .label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    display: block;
  }
  
  /* Prix unitaire */
  .current-price {
    font-size: 16px;
    color: #288728;
    font-weight: 600;
  }
  
  /* Quantité */
  .product-line-grid-right {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
  }
  
  .qty {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .qty .label {
    font-size: 14px;
    color: #666;
  }
  
  .qty input {
    width: 50px;
    height: 36px;
    text-align: center;
    border: 1px solid #288728;
    border-radius: 4px;
    font-size: 16px;
  }
  
  /* Prix total ligne */
  .product-price {
    font-size: 18px;
    font-weight: 700;
    color: #288728;
  }
  
  /* Actions (supprimer) */
  .cart-line-product-actions {
    margin-left: 10px;
  }
  
  .cart-line-product-actions a {
    color: #dc3545;
    font-size: 20px;
  }
  
  /* Bouton continuer les achats */
  .cart-grid-body .btn-primary {
    width: 100%;
    margin: 20px 0;
    padding: 12px;
    font-size: 16px;
    border-radius: 4px;
  }
  
  /* Résumé du panier */
  .cart-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }
  
  /* Totaux */
  .cart-summary-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .cart-summary-line:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 18px;
    padding-top: 15px;
  }
  
  .cart-summary-line .label {
    color: #666;
  }
  
  .cart-summary-line .value {
    color: #288728;
    font-weight: 600;
  }
  
  /* Bouton commander */
  .checkout .btn-primary {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: 700;
    background: #288728;
    border: none;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(40, 135, 40, 0.2);
    transition: all 0.3s ease;
  }
  
  .checkout .btn-primary:hover {
    background: #1e6b1e;
    box-shadow: 0 6px 8px rgba(40, 135, 40, 0.3);
    transform: translateY(-2px);
  }
  
  /* Panier vide */
  .no-items {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
  }
}

/* Tablette */
@media (min-width: 768px) and (max-width: 991px) {
  .cart-grid-body {
    padding-right: 20px;
  }
  
  .product-line-grid {
    align-items: center;
  }
  
  .product-line-grid-left {
    width: 100px;
  }
  
  .product-line-grid-right {
    flex-direction: row;
    justify-content: space-between;
  }
  
  .qty {
    flex: 1;
  }
  
  .product-price {
    min-width: 100px;
    text-align: right;
  }
}

/* Améliorations générales */
.cart-container {
  overflow: hidden;
}

.separator {
  margin: 0 -20px 20px;
  border-color: #e0e0e0;
}

/* Animations */
.cart-item {
  transition: background-color 0.2s ease;
}

.cart-item:hover {
  background-color: #f8f9fa;
}

/* Focus amélioré */
input:focus,
button:focus,
a:focus {
  outline: 2px solid #288728;
  outline-offset: 2px;
}

/* Messages d'erreur/succès */
.alert {
  border-radius: 4px;
  margin-bottom: 20px;
  padding: 12px 20px;
}

/* Amélioration de l'accessibilité */
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Support du mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
  .cart-container,
  .cart-summary {
    background: #1a1a1a;
    color: #f0f0f0;
  }
  
  .cart-item {
    border-color: #333;
  }
  
  .product-line-info .label,
  .cart-summary-line .label {
    color: #ccc;
  }
  
  .cart-summary {
    background: #2a2a2a;
  }
}