/* ════════════════════════════════════════════════════════════
   checkout.css — Belgium IT Green Standalone Theme
   Back Market / Swappie style · --green #72C35A · font: Inter
════════════════════════════════════════════════════════════ */

/* ── Fil d'Ariane ─────────────────────────────────────────── */
.checkout-breadcrumb {
  padding: 18px 0;
  font-size: .85rem;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
}
.checkout-breadcrumb a { color: var(--gray-600); transition: var(--transition); }
.checkout-breadcrumb a:hover { color: var(--green); }
.checkout-breadcrumb i { font-size: .7rem; margin: 0 8px; color: var(--gray-400); }
.checkout-breadcrumb span[aria-current] { color: var(--dark); font-weight: 600; }

/* ── Page ─────────────────────────────────────────────────── */
.checkout-page { padding: 40px 0 80px; background: var(--gray-100); }

.checkout-title {
  display: flex; align-items: center; gap: 14px;
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: var(--dark);
  margin: 0 0 22px;
}
.checkout-title i { color: var(--green); }

/* ── Indicateur d'étapes ──────────────────────────────────── */
.checkout-steps {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 28px; padding: 0; list-style: none;
}
.checkout-step {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.step-circle {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .88rem; font-weight: 700;
  border: 2px solid var(--gray-200); background: var(--white);
  color: var(--gray-400); position: relative; z-index: 1;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.checkout-step.completed .step-circle {
  background: var(--green); border-color: var(--green); color: var(--white);
}
.checkout-step.completed .step-circle i { font-size: .8rem; }
.checkout-step.active .step-circle {
  background: var(--green); border-color: var(--green); color: var(--white);
  box-shadow: 0 0 0 5px rgba(114,195,90,.2);
}
.step-label {
  font-size: .78rem; font-weight: 600; color: var(--gray-400); white-space: nowrap;
}
.checkout-step.completed .step-label { color: var(--green-dark); }
.checkout-step.active .step-label   { color: var(--green); font-weight: 700; }
.step-connector {
  height: 2px; width: 72px; flex-shrink: 0;
  background: var(--gray-200); margin-bottom: 26px;
}
.checkout-step.completed + .step-connector { background: var(--green); }

/* ── Mention retrait en magasin ───────────────────────────── */
.checkout-pickup-notice {
  background: var(--green-light); border: 1px solid rgba(114,195,90,.25);
  border-radius: 14px; padding: 22px 24px; margin-bottom: 32px;
}
.checkout-pickup-head {
  display: flex; align-items: center; gap: 10px;
  color: var(--green-dark); font-size: 1.05rem; margin-bottom: 8px;
}
.checkout-pickup-notice p  { font-size: .9rem; color: var(--text); line-height: 1.6; margin: 0 0 14px; max-width: 760px; }
.checkout-pickup-addresses { display: flex; flex-wrap: wrap; gap: 24px; }
.checkout-pickup-addresses li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .88rem; color: var(--text); font-weight: 600; line-height: 1.4;
}
.checkout-pickup-addresses i { color: var(--green); margin-top: 2px; }

/* ── Réassurance ──────────────────────────────────────────── */
.checkout-trust {
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: center;
  margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--gray-200);
}
.checkout-trust span {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .88rem; color: var(--gray-600); font-weight: 500;
}
.checkout-trust i { color: var(--green); }

/* ════════════════════════════════════════════════════════════
   FORMULAIRE WOOCOMMERCE — Layout & overrides
════════════════════════════════════════════════════════════ */

.checkout-wrapper.woocommerce { font-family: var(--font); color: var(--text); }

/* ── GRILLE PRINCIPALE ────────────────────────────────────────
   Deux enfants DIRECTS : .checkout-forms-col | .checkout-review-col
   2fr (~66 %) à gauche, 1fr (~33 %) à droite — le récap/paiement
   fait la moitié de la largeur du formulaire de facturation.
   max-width 1180px centré — les deux colonnes se touchent.   */
.checkout-wrapper .checkout-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: stretch;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* Chaque enfant direct remplit INTÉGRALEMENT sa piste de grille.
   min-width:0 empêche le débordement si un contenu est large.  */
.checkout-wrapper .checkout-forms-col {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.checkout-wrapper .checkout-review-col {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* ── Alignement du haut des deux colonnes ─────────────────────
   align-items:start (sur .checkout-layout, ci-dessus) aligne les hauts des
   pistes de grille, mais une marge sur le tout premier élément d'une colonne
   décale visuellement son contenu vers le bas par rapport à l'autre colonne.
   On neutralise tout margin-top résiduel sur les premières cartes et leur
   tout premier enfant (h3, wrapper de hook…). */
.checkout-wrapper .checkout-forms-col > *:first-child,
.checkout-wrapper .checkout-review-col > *:first-child,
.checkout-wrapper .checkout-forms-col > *:first-child > *:first-child,
.checkout-wrapper .checkout-review-col > *:first-child > *:first-child {
  margin-top: 0 !important;
}

/* ── RESET DES FLOATS WOOCOMMERCE ─────────────────────────────
   woocommerce-layout.css applique ces règles sur le checkout :
     #customer_details          { float:left;  width:60% }
     .col2-set .col-1           { float:left;  width:48% }
     .col2-set .col-2           { float:right; width:48% }
   Ces floats réduisent les colonnes même quand notre grid est en place.
   On écrase avec !important sur des sélecteurs à spécificité élevée. */

/* .col2-set (= #customer_details) — pleine largeur, pas de float */
.checkout-wrapper .col2-set,
.checkout-wrapper #customer_details {
  display: block !important;
  float: none   !important;
  width: 100%   !important;
  clear: none   !important;
  overflow: visible;
  background: var(--white);
  border-radius: 14px;
  border: 1px solid #ECECEC;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  padding: 28px;
  box-sizing: border-box;
}

/* .col-1 et .col-2 — pleine largeur, pas de float */
.checkout-wrapper .col2-set .col-1,
.checkout-wrapper .col2-set .col-2,
.checkout-wrapper #customer_details .col-1,
.checkout-wrapper #customer_details .col-2 {
  float: none !important;
  width: 100% !important;
  padding: 0  !important;
  clear: none !important;
  min-width: 0;
  display: block;
}
/* Séparation visuelle si les deux sous-sections sont présentes */
.checkout-wrapper .col2-set .col-2:not(:empty) { margin-top: 24px; }

/* Carte « Informations complémentaires » (notes de commande) */
.checkout-wrapper .woocommerce-additional-fields {
  background: var(--white);
  border-radius: 14px;
  border: 1px solid #ECECEC;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  padding: 28px;
  box-sizing: border-box;
}
.checkout-wrapper .woocommerce-additional-fields textarea { min-height: 110px; }

/* ── Titres h3 ────────────────────────────────────────────── */
.checkout-wrapper h3 {
  font-size: 1.1rem; font-weight: 800; color: var(--dark); margin: 0 0 18px;
}
.checkout-wrapper #ship-to-different-address { font-weight: 600; }

/* ── CHAMPS DE FORMULAIRE — PLEINE LARGEUR / REGROUPEMENT PAR PAIRES ──
   WooCommerce rend .form-row-first / .form-row-last en float+width:47%.
   On neutralise les floats natifs et on s'appuie sur un conteneur flex
   (le wrapper de champs WooCommerce) pour disposer .form-row-first et
   .form-row-last à ~50% côte à côte (Prénom/Nom, Adresse/Complément, Code
   postal/Ville, Région/Téléphone — voir filtre woocommerce_checkout_fields
   dans functions.php), tandis que .form-row-wide (e‑mail, pays…) reste en
   pleine largeur. Les classes/id/name WooCommerce ne sont pas modifiés. */
.checkout-wrapper .woocommerce-billing-fields__field-wrapper,
.checkout-wrapper .woocommerce-shipping-fields__field-wrapper {
  display: flex !important;
  flex-wrap: wrap;
  column-gap: 16px;
}
.checkout-wrapper .form-row {
  display: block !important;
  float: none    !important;
  margin-bottom: 16px;
  box-sizing: border-box;
}
.checkout-wrapper .form-row-wide,
.checkout-wrapper .form-row:not(.form-row-first):not(.form-row-last) {
  flex: 1 1 100%;
  width: 100% !important;
}
.checkout-wrapper .form-row-first,
.checkout-wrapper .form-row-last {
  flex: 1 1 calc(50% - 8px);
  width: calc(50% - 8px) !important;
  margin-right: 0 !important;
}

/* ── Surcharge à spécificité renforcée ────────────────────────
   Le woocommerce.css du cœur (et potentiellement Kadence) cible
   ".woocommerce form .form-row-first / .form-row-last" avec une spécificité
   (0,2,1) supérieure à ".checkout-wrapper .form-row-first" (0,2,0) : leurs
   width:47% / float l'emportaient et empêchaient le pairing. On cible donc
   directement les ID des champs (spécificité 1,2,0), qui gagnent dans tous
   les cas. */
.checkout-wrapper .woocommerce-billing-fields__field-wrapper #billing_address_1_field,
.checkout-wrapper .woocommerce-billing-fields__field-wrapper #billing_address_2_field,
.checkout-wrapper .woocommerce-billing-fields__field-wrapper #billing_postcode_field,
.checkout-wrapper .woocommerce-billing-fields__field-wrapper #billing_city_field,
.checkout-wrapper .woocommerce-billing-fields__field-wrapper #billing_first_name_field,
.checkout-wrapper .woocommerce-billing-fields__field-wrapper #billing_last_name_field {
  display: block !important;
  float: none !important;
  flex: 1 1 calc(50% - 8px) !important;
  width: calc(50% - 8px) !important;
  margin-right: 0 !important;
}
.checkout-wrapper label {
  display: block; font-size: .85rem; font-weight: 600; color: var(--text); margin-bottom: 6px;
}
.checkout-wrapper label .required { color: #e53935; text-decoration: none; }
.checkout-wrapper .form-row .description,
.checkout-wrapper .checkout-field-hint {
  display: block; font-size: .8rem; color: var(--gray-600); margin-top: 6px; line-height: 1.4;
}

/* ── Bloc opt-in newsletter + confidentialité (déplacé sous le formulaire
   de facturation, voir form-checkout.php) ───────────────────────────────── */
.checkout-wrapper .checkout-optin-block .woocommerce-terms-and-conditions-wrapper,
.checkout-wrapper .checkout-optin-block .woocommerce-privacy-policy-text {
  margin-bottom: 14px;
}
.checkout-wrapper .checkout-optin-block .woocommerce-terms-and-conditions-wrapper:last-child,
.checkout-wrapper .checkout-optin-block .woocommerce-privacy-policy-text:last-child,
.checkout-wrapper .checkout-optin-block .form-row:last-child {
  margin-bottom: 0;
}
.checkout-wrapper .checkout-optin-block label,
.checkout-wrapper .checkout-optin-block .woocommerce-form__label-for-checkbox {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: .9rem; font-weight: 500; color: var(--text); cursor: pointer;
}
.checkout-wrapper .checkout-optin-block input[type="checkbox"] {
  width: auto !important; flex-shrink: 0; margin-top: 3px;
  accent-color: var(--green);
}

/* Inputs, selects, textareas — toujours 100 % de leur conteneur */
.checkout-wrapper .input-text,
.checkout-wrapper select,
.checkout-wrapper textarea,
.checkout-wrapper input[type="text"],
.checkout-wrapper input[type="email"],
.checkout-wrapper input[type="tel"],
.checkout-wrapper input[type="password"] {
  display: block;
  width: 100% !important;
  font-family: var(--font); font-size: .95rem; color: var(--text);
  border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  padding: 12px 16px; background: var(--white); transition: var(--transition); outline: none;
  box-sizing: border-box;
}
.checkout-wrapper .input-text:focus,
.checkout-wrapper select:focus,
.checkout-wrapper textarea:focus {
  border-color: var(--green); box-shadow: 0 0 0 4px rgba(114,195,90,.12);
}
/* Select2 pleine largeur */
.checkout-wrapper .select2-container         { width: 100% !important; }
.checkout-wrapper .select2-container .select2-selection--single {
  height: auto; border: 2px solid var(--gray-200); border-radius: var(--radius-sm); padding: 6px 4px;
}

/* ── Colonne récapitulatif — deux cartes empilées ──
   NB : l'effet « sticky » (le récap qui suit le défilement) a été retiré pour
   garder le haut des deux colonnes parfaitement aligné. Pour le réactiver
   (effet Back Market — le récap reste visible quand on descend), rajouter ici :
   position: sticky; top: 100px; */
.checkout-wrapper .checkout-review-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: space-between;
  height: 100%;
}
.checkout-wrapper .checkout-card {
  background: var(--white);
  border-radius: 14px;
  border: 1px solid #ECECEC;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  padding: 28px;
  box-sizing: border-box;
}

/* ── Ligne produit dans le récapitulatif — calée par le haut ─── */
.checkout-wrapper .checkout-product-line {
  display: flex; align-items: flex-start; gap: 14px;
}
/* Colonne de gauche : photo agrandie */
.checkout-wrapper .checkout-product-media {
  flex-shrink: 0; width: 72px;
}
.checkout-wrapper .checkout-product-thumb {
  display: block; width: 72px; height: 72px; border-radius: 10px;
  overflow: hidden; background: var(--gray-100); border: 1px solid var(--gray-200);
}
.checkout-wrapper .checkout-product-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* Colonne de droite : quantité (1re ligne, sur une seule ligne) puis
   nom de l'article (2e ligne, gras, casse normalisée) — alignés sur le
   haut de la photo. */
/* Colonne de droite : NOM de l'article en 1re ligne (gras, casse normalisée)
   puis quantité en dessous (gris). column-reverse inverse l'ordre du markup
   (qty puis nom) sans toucher au PHP. */
.checkout-wrapper .checkout-product-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column-reverse; gap: 4px;
  justify-content: flex-end;
}
.checkout-wrapper .checkout-product-qty {
  font-size: .8rem; font-weight: 400; color: var(--gray-600);
  white-space: nowrap; line-height: 1.2;
}
.checkout-wrapper .checkout-product-name {
  display: inline-block; font-weight: 700; color: var(--text); text-transform: lowercase;
}
.checkout-wrapper .checkout-product-name::first-letter { text-transform: uppercase; }

/* ── Tableau récapitulatif ──────────────────────────────────── */
.checkout-wrapper #order_review,
.checkout-wrapper .woocommerce-checkout-review-order {
  background: transparent; box-shadow: none; padding: 0; position: static;
}
.checkout-wrapper #order_review_heading,
.checkout-wrapper h3#order_review_heading {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 1.1rem; font-weight: 800; color: var(--dark); margin: 0 0 18px;
}
.checkout-wrapper .checkout-order-review-count {
  font-size: .82rem; font-weight: 500; color: var(--gray-600); white-space: nowrap;
}
.checkout-wrapper table.shop_table {
  width: 100%; border-collapse: collapse; font-family: var(--font);
  font-size: .9rem; color: var(--text);
  border: none !important;
}
.checkout-wrapper table.shop_table th,
.checkout-wrapper table.shop_table td {
  padding: 12px 0; text-align: left; font-weight: 400;
  border-top: none !important; border-left: none !important; border-right: none !important;
  border-bottom: 1px solid var(--gray-200);
}
/* Prix produit : aligné à droite, calé en haut (au niveau de la quantité), en gras */
.checkout-wrapper table.shop_table .product-total {
  text-align: right; vertical-align: top; white-space: nowrap; color: var(--text);
  font-weight: 700;
}
/* Tous les montants du pied (sous-total, TVA, total) alignés à droite */
.checkout-wrapper table.shop_table tfoot td {
  text-align: right; white-space: nowrap;
}
/* Libellés « Sous-total » et « TVA » en normal ; TOUS les montants en gras */
.checkout-wrapper table.shop_table tfoot th { font-weight: 400; color: var(--text); }
.checkout-wrapper table.shop_table tfoot td { font-weight: 700; color: var(--text); }
/* Total : seul en gras, à la même taille que le reste */
.checkout-wrapper table.shop_table .order-total th,
.checkout-wrapper table.shop_table .order-total td {
  font-size: .9rem; font-weight: 700; color: var(--dark);
  border-bottom: none; padding-top: 14px;
}
.checkout-wrapper table.shop_table .order-total td { text-align: right; }
.checkout-wrapper table.shop_table .order-total .woocommerce-Price-amount {
  color: var(--green); font-size: .9rem; font-weight: 700;
}

/* Méthode de retrait en magasin */
.checkout-wrapper ul#shipping_method { list-style: none; margin: 0; padding: 0; }
.checkout-wrapper ul#shipping_method li {
  display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: .9rem;
}

/* ── Carte 2 : bouton « Commander » + accordéon de paiement ──── */

/* Bouton « Commander » — déclencheur de l'accordéon, visible par défaut */
.checkout-place-order-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; background: #72C34A; color: var(--white) !important;
  font-family: var(--font); font-size: 1.05rem; font-weight: 700;
  padding: 16px; border-radius: 50px; border: none; cursor: pointer;
  transition: var(--transition);
}
.checkout-place-order-btn:hover {
  background: var(--green-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg);
}
.checkout-place-order-btn[aria-expanded="true"] {
  background: var(--gray-100); color: var(--text) !important;
  box-shadow: none; transform: none;
}
.checkout-place-order-btn[aria-expanded="true"]:hover { background: var(--gray-200); }

/* Accordéon de paiement — TOUJOURS monté dans le DOM (pas de display:none)
   pour que l'iframe Stripe puisse se monter et rester saisissable.
   Repli : max-height:0 + overflow:hidden, transition douce à l'ouverture. */
.checkout-payment-collapse {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.checkout-payment-collapse.is-open {
  max-height: 2000px; /* large valeur fixe : laisse la place au formulaire Stripe */
  overflow: visible;
}

/* ── Paiement ───────────────────────────────────────────────── */
.checkout-wrapper #payment {
  background: var(--green-light); border: 1px solid rgba(114,195,90,.25);
  border-radius: var(--radius-sm); margin-top: 16px;
}
.checkout-wrapper #payment ul.payment_methods {
  list-style: none; margin: 0; padding: 18px 18px 0;
}
.checkout-wrapper #payment ul.payment_methods li {
  margin-bottom: 14px; font-size: .92rem; font-weight: 600; color: var(--text);
}
.checkout-wrapper #payment ul.payment_methods li input[type="radio"] {
  accent-color: var(--green); margin-right: 8px;
}
.checkout-wrapper #payment ul.payment_methods li img {
  display: inline-block; vertical-align: middle; margin-left: 8px;
}
.checkout-wrapper #payment .payment_box {
  background: var(--white); border-radius: var(--radius-sm);
  padding: 14px 16px; margin: 10px 0 16px;
  font-size: .85rem; color: var(--gray-600); line-height: 1.6;
}
.checkout-wrapper #payment .payment_box p { margin: 0; }

/* Bouton Commander — pleine largeur vert */
.checkout-wrapper #payment #place_order,
.checkout-wrapper .checkout #place_order {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; background: var(--green); color: var(--white) !important;
  font-family: var(--font); font-size: 1.05rem; font-weight: 700;
  padding: 16px; border-radius: 50px; border: none; cursor: pointer;
  transition: var(--transition); margin-top: 8px;
}
.checkout-wrapper #payment #place_order:hover {
  background: var(--green-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg);
}
.checkout-wrapper #payment div.form-row { padding: 0 18px 18px; }
.checkout-wrapper .woocommerce-terms-and-conditions-wrapper {
  margin-bottom: 14px; font-size: .85rem;
}
.checkout-wrapper .woocommerce-terms-and-conditions-wrapper a { color: var(--green); text-decoration: underline; }
.checkout-wrapper .woocommerce-privacy-policy-text { font-size: .8rem; color: var(--gray-600); margin-bottom: 14px; }

/* ── Logos moyens de paiement (bas du récap) ──────────────── */
.checkout-payment-logos {
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--gray-200);
}
.checkout-payment-logos-label {
  font-size: .78rem; font-weight: 600; color: var(--gray-600);
  text-transform: uppercase; letter-spacing: .06em; margin: 0 0 10px;
}
.checkout-payment-logos-row { display: flex; flex-wrap: wrap; gap: 8px; }
.checkout-pay-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 600; color: var(--gray-600);
  background: var(--gray-100); border: 1px solid var(--gray-200);
  padding: 7px 12px; border-radius: 8px;
}
.checkout-pay-badge i { font-size: 1rem; }
.checkout-pay-bancontact i             { color: var(--green); }
.checkout-pay-badge:nth-child(2) i    { color: #1a1f71; }
.checkout-pay-badge:nth-child(3) i    { color: #eb001b; }

/* ── Coupon ─────────────────────────────────────────────────── */
.checkout-wrapper .woocommerce-form-coupon-toggle .woocommerce-info {
  background: var(--gray-100); border-radius: var(--radius-sm); padding: 14px 18px;
  font-size: .88rem; color: var(--text); border-left: 3px solid var(--green);
}
.checkout-wrapper .woocommerce-form-coupon-toggle .woocommerce-info a { color: var(--green); font-weight: 700; }
.checkout-wrapper .checkout_coupon {
  background: var(--gray-100); border-radius: var(--radius-sm);
  padding: 18px; margin-bottom: 20px;
}

/* ── Notices WooCommerce ────────────────────────────────────── */
.checkout-wrapper .woocommerce-error,
.checkout-wrapper .woocommerce-message,
.checkout-wrapper .woocommerce-info {
  list-style: none; border-radius: var(--radius-sm); padding: 14px 18px;
  font-size: .9rem; margin: 0 0 24px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.checkout-wrapper .woocommerce-error   { background: #fff0f0; color: #c0392b; border-left: 3px solid #c0392b; }
.checkout-wrapper .woocommerce-message { background: var(--green-light); color: var(--green-dark); border-left: 3px solid var(--green); }
.checkout-wrapper .woocommerce-info    { background: var(--gray-100); color: var(--text); border-left: 3px solid var(--gray-400); }

/* BUG FIX — ::before absolu de WooCommerce (position:absolute; left:1.5em)
   Remplace le padding-left:3.5em natif → icône superposée au texte.
   On supprime le pseudo-élément ; notre flex+gap gère l'espacement. */
.checkout-wrapper .woocommerce-message::before,
.checkout-wrapper .woocommerce-message li::before,
.checkout-wrapper .woocommerce-info::before,
.checkout-wrapper .woocommerce-info li::before,
.checkout-wrapper .woocommerce-error::before,
.checkout-wrapper .woocommerce-error li::before,
.checkout-wrapper .woocommerce-form-coupon-toggle .woocommerce-info::before {
  content: none    !important;
  display: none    !important;
}

/* ════════════════════════════════════════════════════════════
   CTA « Vous avez oublié quelque chose ? »
════════════════════════════════════════════════════════════ */
.checkout-continue-shopping {
  max-width: 1180px;
  margin: 32px auto 0;
  background: var(--white);
  border-radius: 14px;
  border: 1px solid #ECECEC;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  padding: 28px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.checkout-continue-shopping-text h2 {
  font-size: 1.15rem; font-weight: 800; color: var(--dark); margin: 0 0 6px;
}
.checkout-continue-shopping-text p {
  font-size: .9rem; color: var(--gray-600); margin: 0; max-width: 560px; line-height: 1.5;
}
.btn-continue-shopping {
  display: inline-flex; align-items: center; gap: 10px;
  background: #72C34A; color: var(--white) !important;
  font-family: var(--font); font-size: .95rem; font-weight: 700;
  padding: 14px 28px; border-radius: 50px; border: none;
  white-space: nowrap; cursor: pointer; transition: var(--transition);
  flex-shrink: 0;
}
.btn-continue-shopping:hover {
  background: var(--green-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg);
}

/* ════════════════════════════════════════════════════════════
   ACHATS COMPLÉMENTAIRES — Accessoires
════════════════════════════════════════════════════════════ */
.checkout-upsell {
  max-width: 1180px;
  margin: 24px auto 0;
}
.checkout-upsell-title {
  font-size: 1.15rem; font-weight: 800; color: var(--dark); margin: 0 0 18px;
}
.checkout-upsell-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.checkout-upsell-card {
  background: var(--white);
  border-radius: 14px;
  border: 1px solid #ECECEC;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.checkout-upsell-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
}
.checkout-upsell-img {
  display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--gray-100);
}
.checkout-upsell-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.checkout-upsell-info {
  padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1;
}
.checkout-upsell-name {
  font-size: .92rem; font-weight: 700; color: var(--dark); line-height: 1.35;
  transition: var(--transition);
}
.checkout-upsell-name:hover { color: var(--green); }
.checkout-upsell-price { font-size: 1rem; font-weight: 800; color: var(--dark); }
.checkout-upsell-price ins { text-decoration: none; color: var(--green); }
.checkout-upsell-price del { color: var(--gray-400); font-weight: 600; font-size: .85rem; margin-right: 6px; }
.checkout-upsell-add {
  margin-top: auto;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #72C34A; color: var(--white) !important;
  font-size: .85rem; font-weight: 700;
  padding: 10px; border-radius: var(--radius-sm);
  transition: var(--transition);
}
.checkout-upsell-add:hover { background: var(--green-dark); }

/* ── Responsive ───────────────────────────────────────────── */

/* < 900px : une seule colonne, récap SOUS le formulaire */
@media (max-width: 900px) {
  .checkout-wrapper .checkout-layout {
    grid-template-columns: 1fr;
  }
  .checkout-wrapper .checkout-review-col {
    position: static;
  }
  .checkout-continue-shopping {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .btn-continue-shopping {
    width: 100%;
    justify-content: center;
  }
  .checkout-upsell-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .checkout-wrapper .col2-set,
  .checkout-wrapper #customer_details,
  .checkout-wrapper .woocommerce-additional-fields,
  .checkout-wrapper .checkout-card { padding: 20px; }
  .checkout-pickup-addresses { flex-direction: column; gap: 12px; }
  .checkout-steps  { gap: 0; }
  .step-connector  { width: 44px; }
}

/* < 600px : champs appariés repassent en pleine largeur */
@media (max-width: 600px) {
  .checkout-wrapper .form-row-first,
  .checkout-wrapper .form-row-last {
    flex: 1 1 100%;
    width: 100% !important;
  }
  .checkout-upsell-grid {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════════════════════════
   AJUSTEMENTS — finitions checkout (11 juin 2026)
════════════════════════════════════════════════════════════ */

/* 1 ─ Section « Informations complémentaires » (notes de commande) :
   le champ de notes a été retiré, il ne restait que le titre → carte vide.
   On masque la carte et on neutralise sa marge résiduelle. */
.checkout-wrapper .woocommerce-additional-fields { display: none !important; }
.checkout-wrapper #customer_details .col-2 { margin-top: 0 !important; }

/* 2 ─ Alignement du haut des deux colonnes (défensif) :
   neutralise tout margin-top hérité sur les premières cartes / titres.
   (Le décalage venait surtout de l'effet « sticky » du récap, retiré plus haut.) */
.checkout-wrapper .checkout-forms-col .col2-set,
.checkout-wrapper .checkout-forms-col #customer_details,
.checkout-wrapper .checkout-forms-col .woocommerce-billing-fields > h3:first-child,
.checkout-wrapper .checkout-review-col .checkout-card-summary,
.checkout-wrapper .checkout-review-col #order_review_heading {
  margin-top: 0 !important;
}

/* 2bis ─ Alignement du haut des deux colonnes (cause réelle) :
   aucun hook de ce thème n'accroche quoi que ce soit à
   woocommerce_checkout_before_customer_details / _before_order_review_heading,
   mais WooCommerce (ou un plugin) peut malgré tout y imprimer un wrapper de
   notices VIDE (ex. <div class="woocommerce-notices-wrapper"></div>). Cet
   élément vide devient alors le :first-child réel de la colonne et lui ajoute
   son propre padding/margin "fantôme" — décalant son contenu vers le bas
   par rapport à l'autre colonne, sans qu'aucun margin-top:0 sur la carte ne
   puisse compenser. On le masque entièrement. */
.checkout-wrapper .checkout-forms-col > *:empty,
.checkout-wrapper .checkout-review-col > *:empty,
.checkout-wrapper .checkout-card-summary > *:empty {
  display: none !important;
}

/* 3 ─ Champ « Bâtiment, appartement… » (billing_address_2) :
   le champ a maintenant un label visible « Complément (facultatif) » (voir
   functions.php, woocommerce_checkout_fields), avec la même structure
   label + input que billing_address_1 ('Numéro et nom de rue') : les deux
   saisies s'alignent naturellement, sans hack CSS. */

/* 4 ─ Téléphone : pleine largeur (le champ Région voisin a été retiré). */
.checkout-wrapper .woocommerce-billing-fields__field-wrapper #billing_phone_field {
  flex: 1 1 100% !important;
  width: 100% !important;
}

/* 5 ─ Décalage du haut des colonnes — correctif définitif :
   la carte « Détails de facturation » démarrait plus bas que le récap. Causes
   possibles cumulées : un élément vide (wrapper de notices/erreurs) inséré
   avant la carte par WooCommerce, le gap de la colonne, ou une marge propre à
   la carte. On traite les trois :
   - on masque tout enfant de la colonne gauche qui n'est pas la carte ;
   - on annule le gap de cette colonne (fait plus haut) ;
   - on force margin-top:0 sur la carte en la ciblant par son id/sa classe
     (et non par :first-child, qui rate quand un élément masqué la précède). */
.checkout-wrapper .checkout-forms-col > *:not(#customer_details):not(.col2-set) {
  display: none !important;
}
.checkout-wrapper .checkout-forms-col > #customer_details,
.checkout-wrapper .checkout-forms-col > .col2-set {
  margin-top: 0 !important;
}

/* ════════════════════════════════════════════════════════════════════════
   PAGE DE CONFIRMATION DE COMMANDE  (endpoint order-received)
   Template : order-confirmation.php  →  <main class="... order-received-page">
   Contenu centré, colonne étroite, montants rapprochés des libellés.
   ════════════════════════════════════════════════════════════════════════ */

/* Conteneur : colonne centrée et étroite (c'est ce qui rapproche les prix) */
.order-received-page .woocommerce-order {
  max-width: 560px;
  margin: 48px auto 64px;
  padding: 0 20px;
}

/* « Merci. Votre commande a été reçue. » — centré et mis en avant */
.order-received-page .woocommerce-thankyou-order-received {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #2e7d32;
  background: #f1f8e9;
  border: 1px solid #c8e6c9;
  border-radius: 12px;
  padding: 22px 20px;
  margin: 0 0 32px;
}

/* Récap (n° / date / total / paiement) — centré, sans bordures natives */
.order-received-page ul.woocommerce-order-overview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 28px;
  list-style: none;
  margin: 0 0 44px;
  padding: 0;
  border: none;
}
.order-received-page ul.woocommerce-order-overview li {
  border: none;
  padding: 0;
  margin: 0;
  text-align: center;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: #777;
}
.order-received-page ul.woocommerce-order-overview li strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  color: #1a1a1a;
}

/* Titres de section */
.order-received-page .woocommerce-order-details__title,
.order-received-page .woocommerce-column__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 14px;
}

/* Tableau des détails — compact, montants à droite mais resserrés */
.order-received-page table.order_details {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 44px;
}
.order-received-page table.order_details th,
.order-received-page table.order_details td {
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
  vertical-align: top;
}
.order-received-page table.order_details thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #999;
  border-bottom: 2px solid #e0e0e0;
}
.order-received-page table.order_details td.product-total,
.order-received-page table.order_details thead th.product-total,
.order-received-page table.order_details tfoot td {
  text-align: right;
  white-space: nowrap;
}
.order-received-page table.order_details tfoot th {
  font-weight: 600;
  text-align: left;
}
.order-received-page table.order_details tfoot tr:last-child th,
.order-received-page table.order_details tfoot tr:last-child td {
  font-size: 1.05rem;
  font-weight: 700;
  border-bottom: none;
  padding-top: 14px;
}

/* Adresse de facturation */
.order-received-page .woocommerce-customer-details address {
  font-style: normal;
  line-height: 1.6;
  padding: 16px;
  background: #fafafa;
  border-radius: 10px;
  border: 1px solid #eee;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE « MON COMPTE »  (account-page.php → [woocommerce_my_account])
   Centrage du bloc + habillage du formulaire de connexion / inscription
   et du tableau de bord, aux couleurs du thème.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Conteneur centré : étroit pour la connexion seule, large dès qu'il y a
   2 colonnes (connexion + inscription) ou le tableau de bord. */
/* Le <main> de la page compte reçoit moins de padding-haut que le paiement. */
.checkout-page.account-page { padding-top: 22px; }

.account-page .woocommerce {
  max-width: 520px;
  margin: 10px auto 64px;
  padding: 0 24px;
  box-sizing: border-box;
}
/* Largeur élargie réservée au tableau de bord (connecté) uniquement. */
.account-page .woocommerce:has(.woocommerce-MyAccount-navigation) {
  max-width: 980px;
}

/* Messages WooCommerce (erreurs / notices) centrés sur la même largeur */
.account-page .woocommerce-notices-wrapper {
  max-width: 980px;
  margin: 0 auto;
}

/* Titres de section ("Se connecter", "Créer un compte") */
.account-page .woocommerce h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--dark, #1a1a2e);
}

/* ── Connexion / Inscription empilées (l'inscription est masquée derrière
      le bouton déroulant « Créer un compte ») ──────────────────────────── */
.account-page .col2-set { display: block; }
.account-page .col2-set .col-1,
.account-page .col2-set .col-2,
.account-page .col2-set .u-column1,
.account-page .col2-set .u-column2 {
  width: 100%;
  float: none;
  margin: 0;
  padding: 0;
}

/* Cartes : connexion seule OU chaque colonne */
.account-page .woocommerce-form-login,
.account-page .woocommerce-form-register {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  margin: 0;
}

/* Champs */
.account-page .woocommerce-form-row,
.account-page p.form-row { margin-bottom: 16px; }
.account-page label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 7px;
  color: #333;
}
.account-page input[type="text"],
.account-page input[type="email"],
.account-page input[type="password"],
.account-page input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccd0d5;
  border-radius: 9px;
  box-sizing: border-box;
  font-size: .98rem;
  transition: border-color .15s, box-shadow .15s;
}
.account-page input[type="text"]:focus,
.account-page input[type="email"]:focus,
.account-page input[type="password"]:focus,
.account-page input[type="tel"]:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(114,195,90,.12);
}
/* Champ mot de passe avec œil (afficher/masquer) */
.account-page .password-input { position: relative; display: block; }
.account-page .show-password-input {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

/* Boutons verts (thème) */
.account-page button[type="submit"],
.account-page .woocommerce-Button,
.account-page .woocommerce-button,
.account-page .button {
  background: var(--green) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 9px !important;
  padding: 12px 30px !important;
  font-weight: 600 !important;
  font-size: .98rem !important;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.account-page button[type="submit"]:hover,
.account-page .woocommerce-Button:hover,
.account-page .woocommerce-button:hover,
.account-page .button:hover {
  background: var(--green-dark) !important;
  transform: translateY(-1px);
}

/* "Se souvenir de moi" aligné à côté du bouton */
.account-page .woocommerce-form-login__rememberme {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 14px;
  font-size: .92rem;
  font-weight: 400;
}
.account-page .woocommerce-form-login__rememberme span { font-weight: 400; }

/* Lien "Mot de passe perdu" */
.account-page .lost_password { margin-top: 16px; font-size: .92rem; }
.account-page .lost_password a { color: var(--green-dark); text-decoration: none; }
.account-page .lost_password a:hover { text-decoration: underline; }

/* Mentions légales sous l'inscription */
.account-page .woocommerce-privacy-policy-text { font-size: .85rem; color: var(--gray-600); }

/* ── Tableau de bord (connecté) : menu à gauche, contenu à droite ────────── */
.account-page .woocommerce-MyAccount-navigation { float: left; width: 30%; }
.account-page .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.account-page .woocommerce-MyAccount-navigation li { margin: 0; border-bottom: 1px solid #f0f0f0; }
.account-page .woocommerce-MyAccount-navigation li:last-child { border-bottom: 0; }
.account-page .woocommerce-MyAccount-navigation li a {
  display: block;
  padding: 13px 18px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.account-page .woocommerce-MyAccount-navigation li a:hover,
.account-page .woocommerce-MyAccount-navigation li.is-active a {
  background: var(--green-light);
  color: var(--green-dark);
  font-weight: 600;
}
.account-page .woocommerce-MyAccount-content {
  float: right;
  width: 66%;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 28px;
  box-sizing: border-box;
}
.account-page .woocommerce-MyAccount-content a { color: var(--green-dark); }
@media (max-width: 760px) {
  .account-page .woocommerce-MyAccount-navigation,
  .account-page .woocommerce-MyAccount-content { float: none; width: 100%; }
  .account-page .woocommerce-MyAccount-content { margin-top: 20px; }
}

/* Clearfix pour les flottants du tableau de bord */
.account-page .woocommerce::after { content: ""; display: table; clear: both; }

/* ── Bouton déroulant « Créer un compte » + panneau d'inscription ───────── */
.account-page .itg-register-toggle {
  display: block;
  width: 100%;
  margin: 20px 0 0;
  background: var(--green-light);
  color: var(--green-dark);
  border: 1px dashed var(--green);
  border-radius: 11px;
  padding: 15px 18px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: background .15s, border-color .15s;
}
.account-page .itg-register-toggle strong { font-weight: 700; }
.account-page .itg-register-toggle:hover {
  background: #e3f3da;
  border-color: var(--green-dark);
}
.account-page .itg-register-toggle.open {
  border-style: solid;
  background: #e3f3da;
}
.account-page .itg-register-panel[hidden] { display: none; }
.account-page .itg-register-panel { margin-top: 18px; }
.account-page .itg-register-panel > h2 { margin-top: 0; }

/* ── Liste des exigences de mot de passe ────────────────────────────────── */
.account-page .itg-password-rules {
  list-style: none;
  margin: 14px 0 4px;
  padding: 14px 16px;
  background: #f7f9fa;
  border: 1px solid #eceff1;
  border-radius: 10px;
  font-size: .88rem;
}
.account-page .itg-password-rules li {
  position: relative;
  padding-left: 26px;
  margin: 7px 0;
  color: var(--gray-600);
  transition: color .15s;
}
.account-page .itg-password-rules li::before {
  content: "✗";
  position: absolute;
  left: 2px;
  top: 0;
  color: #c0392b;
  font-weight: 700;
}
.account-page .itg-password-rules li.valid { color: #2e7d32; }
.account-page .itg-password-rules li.valid::before {
  content: "✓";
  color: #2e7d32;
}
