/* =========================================================================
   CONTAINER CHECKOUT
   ========================================================================= */

.woocommerce-checkout .woocommerce {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* =========================================================================
   SUPPRIME LA COLONNE VIDE
   ========================================================================= */

.woocommerce-checkout .col-2 {
  display: none !important;
}

.woocommerce-checkout .col-1 {
  width: 100% !important;
  max-width: 100%;
  flex: none;
  float: none !important;
}

.woocommerce-checkout .col2-set {
  display: block !important;
  width: 100%;
}

#customer_details {
  width: 100%;
}

/* =========================================================================
   LAYOUT — conservé tel quel car il fonctionne
   ========================================================================= */

.woocommerce-checkout .col2-set {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

@media (max-width: 900px) {
  .woocommerce-checkout .col2-set {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   BLOC GAUCHE
   ========================================================================= */

.woocommerce-billing-fields {
  background: #111;
  border: 1px solid rgba(255, 120, 0, 0.25);
  border-radius: 12px;
  padding: 30px;
}

/* =========================================================================
   CADRE DROIT — 3 éléments soudés : h3 + #order_review + #payment
   Stratégie : overflow:hidden sur #order_review pour englober #payment
   ========================================================================= */

/* HAUT du cadre : le titre */
h3#order_review_heading {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ff7a00;
  margin: 0;
  padding: 20px 28px 16px;
  position: relative;
  background: #111;
  border: 1px solid rgba(255, 120, 0, 0.45);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
}

/* Trait décoratif sous le titre */
h3#order_review_heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 28px;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, #ff7a00, transparent);
  border-radius: 2px;
}

/* MILIEU + BAS du cadre : #order_review englobe tout le reste */
#order_review.woocommerce-checkout-review-order {
  background: #111;
  border: 1px solid rgba(255, 120, 0, 0.45);
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 24px 28px 28px;
  margin: 0;
  /* overflow:hidden pour que le border-radius s'applique aux enfants */
  overflow: hidden;
}

/* #payment est dans #order_review — on efface ses propres bordures */
#payment.woocommerce-checkout-payment {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

/* =========================================================================
   TABLEAU COMMANDE
   ========================================================================= */

.woocommerce-checkout-review-order-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 120, 0, 0.15);
  margin-bottom: 24px;
}

.woocommerce-checkout-review-order-table thead {
  background: rgba(255, 120, 0, 0.08);
}

.woocommerce-checkout-review-order-table th {
  color: #ff7a00;
  padding: 12px 14px;
  text-transform: uppercase;
  font-size: 18px;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.woocommerce-checkout-review-order-table td {
  color: #ddd;
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.woocommerce-checkout-review-order-table tfoot tr:last-child td,
.woocommerce-checkout-review-order-table tfoot tr:last-child th {
  border-top: 1px solid rgba(255, 120, 0, 0.2);
  padding-top: 14px;
}

.woocommerce-checkout-review-order-table tfoot .woocommerce-Price-amount {
  color: #ff7a00;
  font-weight: 700;
  font-size: 24px;
}

/* =========================================================================
   SÉPARATEUR entre tableau et paiement
   ========================================================================= */

#order_review .woocommerce-checkout-review-order-table + * {
  border-top: 1px solid rgba(255, 120, 0, 0.15);
  padding-top: 16px;
}

/* =========================================================================
   MÉTHODES DE PAIEMENT
   ========================================================================= */

#payment ul.payment_methods {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  border: none !important;
}

#payment .wc_payment_method {
  background: transparent;
  border: none;
  margin-bottom: 0;
  padding: 0;
}

#payment .wc_payment_method > label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 120, 0, 0.15);
}

.stripe-cards-icon {
  height: 20px;
  opacity: 0.85;
}

/* =========================================================================
   BLOC STRIPE — UN SEUL cadre, fond sombre
   La double bordure venait du payment_box + wc-stripe-upe-element cumulés
   ========================================================================= */

#payment .payment_box {
  background: #0d0d0d !important;
  border: 1px solid rgba(255, 120, 0, 0.25) !important;
  border-radius: 10px !important;
  padding: 20px !important;
  margin-top: 14px;
  box-shadow: none !important;
  color: #ddd;
}

/* Supprime TOUS les cadres internes Stripe */
#payment .wc-stripe-upe-element,
#payment .wc-upe-form,
#payment fieldset#wc-stripe-upe-form,
#payment .StripeElement {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}

/* =========================================================================
   MESSAGE MODE TEST
   ========================================================================= */

#payment .testmode-info {
  background: rgba(255, 120, 0, 0.06);
  border-left: 3px solid #ff7a00;
  border-radius: 0 6px 6px 0;
  padding: 10px 14px;
  color: #bbb;
  font-size: 12px;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* =========================================================================
   CHECKBOX + FIELDSET
   ========================================================================= */

#payment .woocommerce-SavedPaymentMethods-saveNew {
  margin-top: 15px;
  color: #aaa;
  font-size: 13px;
}

#payment fieldset:not(#wc-stripe-upe-form) {
  border: none;
  padding: 0;
  margin: 0;
}

/* =========================================================================
   POLITIQUE DE CONFIDENTIALITÉ
   ========================================================================= */

.woocommerce-terms-and-conditions-wrapper {
  color: #888;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.woocommerce-terms-and-conditions-wrapper a {
  color: #ff7a00;
  text-decoration: none;
}

/* =========================================================================
   MESSAGE RASSURANT
   ========================================================================= */

.checkout-reassurance {
  margin-top: 20px;
  padding: 14px 16px;
  background: #0d0d0d;
  border-left: 3px solid #ff7a00;
  border-radius: 6px;
  color: #bbb;
  font-size: 14px;
}

/* =========================================================================
   INPUTS
   ========================================================================= */

.woocommerce-checkout input,
.woocommerce-checkout select {
  background: #1a1a1a;
  border: 1px solid #444;
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  transition: border-color 0.2s ease;
}

.woocommerce-checkout input:focus,
.woocommerce-checkout select:focus {
  border-color: rgba(255, 120, 0, 0.5);
  outline: none;
}

/* =========================================================================
   BOUTON COMMANDER
   ========================================================================= */

#place_order.button.alt {
  width: 100%;
  background: linear-gradient(135deg, #ff7a00, #ff3c00) !important;
  color: #fff !important;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 15px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: block;
  box-shadow: 0 0 20px rgba(255, 120, 0, 0.3);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  margin-top: 8px;
}

#place_order.button.alt:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 120, 0, 0.5);
}

/* =========================================================================
   SUPPRESSION BLOCS VIDES
   ========================================================================= */

.woocommerce-additional-fields {
  display: none;
}

/* =========================================================================
   OVERRIDE BORDURE CADRE DROITE (thème natif en rouge → orange)
   ========================================================================= */

form
  #order_review:not(.elementor-widget-woocommerce-checkout-page #order_review) {
  border-color: rgba(255, 120, 0, 0.2) !important;
}

h3#order_review_heading {
  border-color: rgba(255, 120, 0, 0.2) !important;
}
