/* ===================================
   PANIER - STYLES GÉNÉRAUX
   =================================== */

.cart-container {
  max-width: 1400px;
  margin: 60px auto 80px;
  padding: 0 20px;
}

.cart-title {
  font-family: 'Allura', cursive;
  font-size: 3.5rem;
  color: #B84867;
  text-align: center;
  margin-bottom: 50px;
  font-weight: 400;
}

/* ===================================
   LAYOUT DU PANIER
   =================================== */

.cart-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
  margin-bottom: 60px;
}

@media (max-width: 1024px) {
  .cart-content {
    grid-template-columns: 1fr;
  }
}

/* ===================================
   ARTICLES DU PANIER
   =================================== */

.cart-items-section {
  background: #FCDEE2;
  border-radius: 18px;
  padding: 30px;
  border: 1.5px solid #ffd6e0;
  box-shadow: 0 2px 16px rgba(255, 192, 203, 0.15);
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  border: 1px solid #ffd6e0;
  transition: transform 0.2s, box-shadow 0.2s;
  align-items: center;
}

.cart-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 182, 193, 0.2);
}

.cart-item-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 12px;
  border: 2px solid #ffd6e0;
  flex-shrink: 0;
  background: white;
  padding: 5px;
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-item-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #B84867;
  margin: 0;
}

.cart-item-description {
  font-size: 0.95rem;
  color: #666;
  margin: 0;
}

.cart-item-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #B84867;
  margin: 0;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-end;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff0f6;
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid #ffd6e0;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: linear-gradient(90deg, #ff97b1 0%, #B84867 100%);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.qty-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(184, 72, 103, 0.3);
}

.qty-btn:active {
  transform: scale(0.95);
}

.qty-value {
  min-width: 30px;
  text-align: center;
  font-weight: 600;
  color: #B84867;
  font-size: 1.05rem;
}

.btn-remove {
  background: transparent;
  border: 1px solid #ff4444;
  color: #ff4444;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-remove:hover {
  background: #ff4444;
  color: white;
  transform: scale(1.05);
}

/* Panier vide */
.cart-empty {
  text-align: center;
  padding: 80px 20px;
}

.cart-empty i {
  font-size: 5rem;
  color: #ffd6e0;
  margin-bottom: 20px;
}

.cart-empty p {
  font-size: 1.3rem;
  color: #B84867;
  margin-bottom: 30px;
}

.btn-continue-shopping {
  display: inline-block;
  background: linear-gradient(90deg, #ff97b1 0%, #B84867 100%);
  color: white;
  padding: 14px 32px;
  border-radius: 22px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-continue-shopping:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(184, 72, 103, 0.3);
}

/* ===================================
   RÉSUMÉ DE LA COMMANDE
   =================================== */

.cart-summary {
  background: #FCDEE2;
  border-radius: 18px;
  padding: 30px;
  border: 1.5px solid #ffd6e0;
  box-shadow: 0 2px 16px rgba(255, 192, 203, 0.15);
  height: fit-content;
  position: sticky;
  top: 20px;
}

.cart-summary h2 {
  font-size: 1.8rem;
  color: #B84867;
  margin: 0 0 25px 0;
  font-weight: 600;
}

.summary-details {
  margin-bottom: 20px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 1.05rem;
  color: #333;
}

.summary-line span:last-child {
  font-weight: 600;
  color: #B84867;
}

.summary-promo {
  color: #22c55e;
}

.summary-promo span:last-child {
  color: #22c55e;
}

.summary-divider {
  border: none;
  border-top: 2px solid #ffd6e0;
  margin: 20px 0;
}

.summary-total {
  font-size: 1.4rem;
  font-weight: 700;
  color: #B84867;
}

.summary-total span {
  color: #B84867;
}

/* Code promo */
.promo-code-section {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

#promo-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #ffd6e0;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

#promo-input:focus {
  outline: none;
  border-color: #ff97b1;
}

.btn-promo {
  padding: 12px 20px;
  background: white;
  border: 1px solid #ffd6e0;
  color: #B84867;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-promo:hover {
  background: #fff0f6;
  border-color: #ff97b1;
}

.btn-checkout {
  width: 100%;
  padding: 16px;
  background: linear-gradient(90deg, #ff97b1 0%, #B84867 100%);
  color: white;
  border: none;
  border-radius: 22px;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.btn-checkout:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(184, 72, 103, 0.3);
}

.payment-badges {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding-top: 15px;
  border-top: 1px solid #ffd6e0;
}

.payment-badges i {
  font-size: 2rem;
  color: #B84867;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.payment-badges i:hover {
  opacity: 1;
}

/* ===================================
   FORMULAIRE DE COMMANDE
   =================================== */

.checkout-form-section {
  background: #FCDEE2;
  border-radius: 18px;
  padding: 40px;
  border: 1.5px solid #ffd6e0;
  box-shadow: 0 2px 16px rgba(255, 192, 203, 0.15);
  margin-top: 40px;
}

.btn-back {
  background: white;
  border: 1px solid #ffd6e0;
  color: #B84867;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 30px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-back:hover {
  background: #fff0f6;
  border-color: #ff97b1;
}

.section-title {
  font-size: 2.2rem;
  color: #B84867;
  margin: 0 0 35px 0;
  font-weight: 600;
}

.form-section {
  background: white;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 25px;
  border: 1px solid #ffd6e0;
}

.form-section h3 {
  font-size: 1.3rem;
  color: #B84867;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-section h3 i {
  font-size: 1.1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #B84867;
  font-weight: 500;
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ffd6e0;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #ff97b1;
  box-shadow: 0 0 0 3px rgba(255, 151, 177, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Méthodes de paiement */
.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 25px;
}

@media (max-width: 600px) {
  .payment-methods {
    grid-template-columns: 1fr;
  }
}

.payment-method {
  display: flex;
  align-items: center;
  padding: 15px;
  background: #fff0f6;
  border: 2px solid #ffd6e0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.payment-method:hover {
  border-color: #ff97b1;
  background: white;
}

.payment-method input[type="radio"] {
  margin-right: 12px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #B84867;
}

.payment-method span {
  font-weight: 500;
  color: #B84867;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

.payment-method span i {
  font-size: 1.2rem;
}

.info-text {
  background: #fff0f6;
  padding: 15px;
  border-radius: 8px;
  color: #B84867;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-text i {
  font-size: 1.2rem;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 15px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #B84867;
  flex-shrink: 0;
}

.checkbox-label span {
  color: #333;
  font-size: 0.95rem;
  line-height: 1.5;
}

.checkbox-label a {
  color: #B84867;
  text-decoration: underline;
}

.checkbox-label a:hover {
  color: #ff97b1;
}

/* Récapitulatif final */
.final-summary {
  background: #fff0f6;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 25px;
  border: 2px solid #ffd6e0;
}

.final-summary h3 {
  font-size: 1.2rem;
  color: #B84867;
  margin: 0 0 15px 0;
}

.final-total-amount {
  font-size: 1.8rem;
  font-weight: 700;
  color: #B84867;
}

/* Bouton de soumission */
.btn-submit-order {
  width: 100%;
  padding: 18px;
  background: linear-gradient(90deg, #ff97b1 0%, #B84867 100%);
  color: white;
  border: none;
  border-radius: 22px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn-submit-order:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(184, 72, 103, 0.4);
}

.btn-submit-order:active {
  transform: scale(0.98);
}

/* ===================================
   MODALS
   =================================== */

.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 50px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  text-align: center;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loader */
.loader-container {
  padding: 20px;
}

.loader {
  border: 4px solid #ffd6e0;
  border-top: 4px solid #B84867;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loader-container p {
  color: #B84867;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 10px 0;
}

.loader-subtext {
  font-size: 0.9rem;
  color: #666;
  font-weight: 400;
}

/* Icônes de statut */
.success-icon i {
  font-size: 5rem;
  color: #22c55e;
  margin-bottom: 20px;
}

.error-icon i {
  font-size: 5rem;
  color: #ff4444;
  margin-bottom: 20px;
}

.modal-content h2 {
  font-size: 2rem;
  color: #B84867;
  margin-bottom: 15px;
}

.modal-content p {
  font-size: 1.05rem;
  color: #666;
  margin-bottom: 10px;
  line-height: 1.6;
}

.order-info {
  background: #fff0f6;
  padding: 15px;
  border-radius: 10px;
  margin: 20px 0;
}

.order-number {
  font-size: 1.1rem;
  color: #B84867;
}

.btn-home,
.btn-retry {
  background: linear-gradient(90deg, #ff97b1 0%, #B84867 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 22px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-home:hover,
.btn-retry:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(184, 72, 103, 0.3);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
  .cart-container {
    margin: 30px auto 50px;
    padding: 0 15px;
  }

  .cart-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
  }

  .cart-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-item-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: white;
    padding: 10px;
  }

  .cart-item-actions {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }

  .checkout-form-section {
    padding: 25px 20px;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .modal-content {
    padding: 30px 20px;
  }

  .success-icon i,
  .error-icon i {
    font-size: 3.5rem;
  }
}

@media (max-width: 480px) {
  .cart-title {
    font-size: 2rem;
  }

  .btn-checkout,
  .btn-submit-order {
    font-size: 1rem;
    padding: 14px;
  }
}
