/**
 * Styles pour la page panier
 */

.cart-page-container {
  padding: 2rem 0;
  min-height: 60vh;
  background-color: var(--light-bg);
}

.page-title {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  color: var(--text-dark);
  text-align: center;
}

.loading-spinner {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-size: 1.1rem;
}

.loading-spinner i {
  margin-right: 10px;
  color: var(--primary-orange);
}

.empty-cart-message {
  text-align: center;
  padding: 3rem 1rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.empty-cart-message i {
  font-size: 3rem;
  color: var(--primary-orange);
  margin-bottom: 1rem;
  opacity: 0.7;
}

.empty-cart-message h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.empty-cart-message p {
  color: #666;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Table d'articles du panier */
.cart-header {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr 1fr 0.5fr;
  gap: 1rem;
  padding: 1rem;
  background-color: white;
  border-radius: 8px 8px 0 0;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.cart-item {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr 1fr 0.5fr;
  gap: 1rem;
  padding: 1rem;
  background-color: white;
  border-bottom: 1px solid #eee;
  align-items: center;
}

.cart-product {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cart-product-image {
  width: 80px;
  height: 80px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f9f9f9;
  border-radius: 4px;
  flex-shrink: 0;
}

.cart-product-name {
  font-weight: 600;
  color: var(--text-dark);
}

.cart-product-duration {
  font-size: 0.9rem;
  color: #666;
  margin-top: 4px;
}

.cart-price, .cart-total {
  font-weight: 600;
  color: var(--text-dark);
}

.cart-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-quantity-input {
  width: 50px;
  text-align: center;
  padding: 0.4rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.cart-quantity-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.cart-quantity-btn:hover {
  background-color: #e0e0e0;
}

.cart-remove-btn {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  transition: all 0.2s;
}

.cart-remove-btn:hover {
  color: #ff4444;
}

.cart-footer {
  background-color: white;
  padding: 1.5rem;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-top: 2px;
}

.cart-subtotal {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

#cart-subtotal-amount {
  font-weight: 700;
  color: var(--primary-orange);
}

.cart-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-secondary {
  background-color: #f0f0f0;
  color: var(--text-dark);
}

.btn-secondary:hover {
  background-color: #e0e0e0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Responsivité */
@media (max-width: 768px) {
  .cart-header {
    display: none;
  }
  
  .cart-item {
    grid-template-columns: 1fr;
    grid-template-areas:
      "product"
      "details"
      "actions";
    gap: 0.5rem;
    padding: 1rem;
    position: relative;
  }
  
  .cart-product {
    grid-area: product;
  }
  
  .cart-price, .cart-quantity, .cart-total {
    grid-area: details;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.3rem 0;
  }
  
  .cart-price::before {
    content: "Prix:";
    font-weight: normal;
    color: #666;
  }
  
  .cart-quantity::before {
    content: "Quantité:";
    font-weight: normal;
    color: #666;
  }
  
  .cart-total::before {
    content: "Total:";
    font-weight: normal;
    color: #666;
  }
  
  .cart-remove {
    position: absolute;
    top: 1rem;
    right: 1rem;
  }
  
  .cart-actions {
    flex-direction: column;
    gap: 1rem;
  }
  
  .cart-actions .btn {
    width: 100%;
    text-align: center;
  }
}
