/* ============================================
   CSS DÉDIÉ - PAGES PANIER ET COMMANDE
   Design moderne avec résumé rouge à droite
   ============================================ */

/* RESET ET BASE */
* {
  box-sizing: border-box;
}

/* ============================================
   PAGE PANIER - LAYOUT PRINCIPAL
   ============================================ */

.cart-content-new {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.5rem;
  margin-top: 2rem;
  align-items: start;
}

.cart-items-section {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* ============================================
   ITEMS DU PANIER - IMAGES RÉDUITES
   ============================================ */

.cart-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 1.2rem;
  padding: 1.5rem;
  background: var(--card-bg, #fff);
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cart-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 102, 204, 0.15);
  border-color: #0066cc;
}

/* Images réduites à 70px */
.cart-item-image {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #e0e0e0;
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
}

.cart-item-details h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: #333;
}

.cart-item-details p {
  font-size: 1.2rem;
  font-weight: bold;
  color: #cc0000;
  margin: 0;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  justify-content: center;
  align-items: flex-end;
}

/* Contrôles de quantité avec boutons bleus arrondis */
.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f5f5f5;
  border: 2px solid #e0e0e0;
  border-radius: 30px;
  padding: 0.3rem 0.5rem;
}

.cart-item-quantity button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #0066cc;
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-quantity button:hover {
  background: #0052a3;
  transform: scale(1.1);
}

.cart-item-quantity span {
  min-width: 35px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  color: #333;
}

/* Bouton supprimer rouge arrondi */
.remove-item {
  padding: 0.5rem 1.2rem;
  background: transparent;
  color: #cc0000;
  border: 2px solid #cc0000;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.remove-item:hover {
  background: #cc0000;
  color: white;
  transform: scale(1.05);
}

/* ============================================
   BOUTONS EN BAS DU PANIER
   ============================================ */

.cart-actions-bottom {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Bouton vider panier - rouge arrondi */
.btn-clear-cart {
  flex: 1;
  padding: 1rem 1.5rem;
  background: transparent;
  color: #cc0000;
  border: 2px solid #cc0000;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-clear-cart:hover {
  background: #cc0000;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(204, 0, 0, 0.3);
}

/* Bouton continuer achats - bleu arrondi */
.btn-continue {
  flex: 1;
  padding: 1rem 1.5rem;
  background: #0066cc;
  color: white;
  border: 2px solid #0066cc;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-continue:hover {
  background: #0052a3;
  border-color: #0052a3;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

/* ============================================
   RÉSUMÉ ROUGE À DROITE - ARRONDI
   ============================================ */

.cart-summary-red {
  background: linear-gradient(135deg, #cc0000 0%, #990000 100%);
  border-radius: 25px;
  padding: 2rem;
  color: white;
  box-shadow: 0 10px 30px rgba(204, 0, 0, 0.35);
  position: sticky;
  top: 2rem;
  height: fit-content;
}

.cart-summary-red h2 {
  font-size: 1.5rem;
  margin: 0 0 1.5rem 0;
  color: white;
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

/* Détails du résumé */
.summary-details-new {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.summary-row-new {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  color: white;
  font-size: 1rem;
}

.summary-row-new span:first-child {
  opacity: 0.95;
  font-weight: 500;
}

.summary-row-new span:last-child {
  font-weight: 700;
  font-size: 1.1rem;
}

/* Info livraison gratuite */
.shipping-info-new {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.8rem;
  border-radius: 15px;
  text-align: center;
  margin: 1rem 0;
  border: 1px dashed rgba(255, 255, 255, 0.4);
}

.shipping-info-new small {
  color: white;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Total */
.summary-total-new {
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 2px solid rgba(255, 255, 255, 0.3);
  font-size: 1.3rem !important;
}

.summary-total-new span {
  font-size: 1.4rem !important;
  font-weight: 700 !important;
}

/* Bouton passer commande - ROUGE ARRONDI */
.checkout-btn-red {
  width: 100%;
  padding: 1.3rem;
  background: white;
  color: #cc0000;
  border: none;
  border-radius: 30px;
  font-weight: bold;
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.3s;
  margin: 1.5rem 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.checkout-btn-red:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  background: #f8f8f8;
  color: #990000;
}

/* Badges de confiance */
.trust-badges-new {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.trust-badge-new {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: white;
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  transition: all 0.3s;
}

.trust-badge-new:hover {
  background: rgba(255, 255, 255, 0.25);
}

.trust-badge-new span:first-child {
  font-size: 1.5rem;
}

.trust-badge-new small {
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
}

/* ============================================
   PAGE COMMANDE - LAYOUT
   ============================================ */

.order-form-header-new {
  text-align: center;
  margin-bottom: 2rem;
}

.order-form-header-new h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.order-form-header-new p {
  font-size: 1.1rem;
  color: #666;
}

/* Indicateur de progression - bleu arrondi */
.progress-steps-new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #0066cc, #0052a3);
  border-radius: 25px;
  box-shadow: 0 5px 20px rgba(0, 102, 204, 0.3);
}

.step-new {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.5;
  transition: all 0.3s;
}

.step-new.active,
.step-new.completed {
  opacity: 1;
}

.step-icon-new {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  color: white;
  transition: all 0.3s;
}

.step-new.active .step-icon-new {
  background: white;
  color: #0066cc;
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.5);
  transform: scale(1.15);
}

.step-new.completed .step-icon-new {
  background: white;
  color: #28a745;
}

.step-new span {
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
}

.step-line-new {
  width: 60px;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

/* Layout formulaire + résumé */
.order-form-new {
  margin-top: 2rem;
}

.order-form-container-new {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.5rem;
  align-items: start;
}

.checkout-form-new {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ============================================
   FORMULAIRE - CHAMPS AMÉLIORÉS
   ============================================ */

.form-sections-new {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.form-section-new {
  background: var(--card-bg, #fff);
  padding: 2rem;
  border-radius: 25px;
  border: 2px solid #e0e0e0;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
}

.form-section-new:hover {
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
}

.section-title-new {
  font-size: 1.4rem;
  margin: 0 0 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e0e0e0;
  color: #333;
}

.section-title-new span {
  font-size: 1.6rem;
}

/* Groupes de champs */
.form-group-new {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.form-group-new label {
  font-weight: 600;
  font-size: 1rem;
  color: #333;
}

/* Champs modernes arrondis */
.input-modern {
  padding: 1rem 1.3rem;
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  background: #fff;
  font-size: 1rem;
  transition: all 0.3s;
  font-family: inherit;
  color: #333;
}

.input-modern:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
  transform: translateY(-2px);
}

.input-modern::placeholder {
  color: #999;
  opacity: 0.7;
}

.form-row-new {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ============================================
   MÉTHODES DE PAIEMENT - CARTES ARRONDIES
   ============================================ */

.payment-methods-new {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.payment-method-new {
  position: relative;
  cursor: pointer;
  transition: all 0.3s;
}

.payment-method-new input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.payment-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  transition: all 0.3s;
}

.payment-emoji {
  font-size: 2rem;
  flex-shrink: 0;
}

.payment-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.2rem;
  color: #333;
}

.payment-card small {
  color: #666;
  font-size: 0.85rem;
}

/* Hover bleu */
.payment-method-new:hover .payment-card {
  border-color: #0066cc;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 102, 204, 0.2);
}

/* Sélection bleue avec checkmark */
.payment-method-new.selected .payment-card {
  border-color: #0066cc;
  background: rgba(0, 102, 204, 0.05);
  box-shadow: 0 5px 15px rgba(0, 102, 204, 0.25);
}

.payment-method-new.selected::after {
  content: '✓';
  position: absolute;
  top: -10px;
  right: -10px;
  width: 34px;
  height: 34px;
  background: #0066cc;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  box-shadow: 0 3px 10px rgba(0, 102, 204, 0.4);
}

/* ============================================
   BOUTON CONFIRMER - ROUGE ARRONDI
   ============================================ */

.submit-order-btn-new {
  width: 100%;
  padding: 1.3rem;
  background: linear-gradient(135deg, #cc0000, #990000);
  color: white;
  border: none;
  border-radius: 30px;
  font-weight: bold;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 5px 20px rgba(204, 0, 0, 0.35);
  margin-top: 1.5rem;
}

.submit-order-btn-new:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(204, 0, 0, 0.45);
  background: linear-gradient(135deg, #e60000, #b30000);
}

/* ============================================
   RÉSUMÉ COMMANDE - ROUGE À DROITE
   ============================================ */

.order-summary-red {
  background: linear-gradient(135deg, #cc0000 0%, #990000 100%);
  border-radius: 25px;
  padding: 2rem;
  color: white;
  box-shadow: 0 10px 30px rgba(204, 0, 0, 0.35);
  position: sticky;
  top: 2rem;
  height: fit-content;
}

.summary-sticky-new h3 {
  font-size: 1.4rem;
  margin: 0 0 1.5rem 0;
  color: white;
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.order-items-new {
  max-height: 300px;
  overflow-y: auto;
  margin: 1rem 0;
  padding: 0.5rem;
}

.order-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.order-item {
  display: flex;
  gap: 0.8rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  transition: all 0.3s;
}

.order-item:hover {
  background: rgba(255, 255, 255, 0.25);
}

.order-item-image {
  width: 55px;
  height: 55px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.order-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  color: white;
}

.order-item-details h4 {
  font-size: 0.95rem;
  margin: 0;
  font-weight: 600;
  color: white;
}

.order-item-qty {
  font-size: 0.85rem;
  opacity: 0.9;
  margin: 0;
}

.order-item-price,
.order-item-price-new {
  font-size: 0.95rem;
  font-weight: bold;
  margin: 0;
  color: white;
}

.order-item-new {
  display: flex;
  gap: 0.8rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  transition: all 0.3s;
}

.order-item-new:hover {
  background: rgba(255, 255, 255, 0.25);
}

.order-item-new img {
  width: 55px;
  height: 55px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.order-item-details-new {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  color: white;
}

.order-item-details-new h4 {
  font-size: 0.95rem;
  margin: 0;
  font-weight: 600;
  color: white;
}

.order-item-details-new p {
  font-size: 0.85rem;
  opacity: 0.9;
  margin: 0;
}

.order-items-new::-webkit-scrollbar {
  width: 6px;
}

.order-items-new::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.order-items-new::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.summary-totals-new {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.summary-item-new {
  display: flex;
  justify-content: space-between;
  color: white;
  font-size: 1rem;
}

.summary-item-new span:last-child {
  font-weight: 600;
}

.summary-total-new {
  display: flex;
  justify-content: space-between;
  color: white;
  font-size: 1.3rem;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.security-notice-new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.security-notice-new span {
  font-size: 1.3rem;
}

.security-notice-new small {
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablette */
@media (max-width: 992px) {
  .cart-content-new,
  .order-form-container-new {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .cart-summary-red,
  .order-summary-red {
    position: static;
    order: -1;
  }
  
  .payment-methods-new {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .cart-item {
    grid-template-columns: 60px 1fr;
    gap: 1rem;
    padding: 1rem;
  }
  
  .cart-item-image {
    width: 60px;
    height: 60px;
  }
  
  .cart-item-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .cart-actions-bottom {
    flex-direction: column;
  }
  
  .btn-clear-cart,
  .btn-continue {
    width: 100%;
  }
  
  .form-row-new {
    grid-template-columns: 1fr;
  }
  
  .progress-steps-new {
    padding: 1rem;
    gap: 0.3rem;
  }
  
  .step-new span {
    display: none;
  }
  
  .step-icon-new {
    width: 40px;
    height: 40px;
  }
  
  .step-line-new {
    width: 40px;
  }
}

/* Petit mobile */
@media (max-width: 480px) {
  .cart-item {
    grid-template-columns: 50px 1fr;
    gap: 0.8rem;
    padding: 0.8rem;
  }
  
  .cart-item-image {
    width: 50px;
    height: 50px;
  }
  
  .cart-item-quantity button {
    width: 28px;
    height: 28px;
  }
  
  .form-section-new {
    padding: 1.2rem;
  }
  
  .input-modern {
    padding: 0.9rem 1rem;
  }
  
  .cart-summary-red,
  .order-summary-red {
    padding: 1.5rem;
  }
}
