/* =====================================================================
   06 · BOUTIQUE — mini-panier, panier, commande, fiche produit, compte
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. PRIX
   --------------------------------------------------------------------- */
.woocommerce-Price-amount {
  font-weight: 600;
  white-space: nowrap;
}

/* ---------------------------------------------------------------------
   2. MINI-PANIER (colonne latérale)
   --------------------------------------------------------------------- */
.widget_shopping_cart .address-change-header {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  font-size: .9rem;
  color: var(--ui-text-soft);
  border-bottom: 1px dashed var(--brand-border);
}

.widget_shopping_cart .address-change-header b { color: var(--ui-text); }

.widget_shopping_cart .address-change-header .pull-right { float: none; }

.widget_shopping_cart .edit-address-icon {
  width: 100%;
  font-size: .875rem;
}

/* Le thème parent fait flotter les lignes et le sous-total (float:left) :
   le bloc des boutons était alors rejeté hors du cadre, invisible.
   On remet tout dans le flux normal (sélecteurs du même poids que le parent). */
.woocommerce.widget_shopping_cart .cart_list li,
.woocommerce .widget_shopping_cart .cart_list li,
.woocommerce.widget_shopping_cart .total,
.woocommerce .widget_shopping_cart .total,
.woocommerce-mini-cart span.quantity {
  float: none;
  width: auto;
}

/* Une ligne :  [×] Nom du produit        [photo]
                    options…
                    1 × 45,90 €                  */
.woocommerce .widget_shopping_cart .cart_list,
.woocommerce.widget_shopping_cart .cart_list {
  margin: 0;
  padding: 0;
  border: 0;
}

.woocommerce.widget_shopping_cart .cart_list li,
.woocommerce .widget_shopping_cart .cart_list li,
.woofood-mini-cart .cart_list li {
  position: relative;
  margin: 0;
  padding: .75rem 0 .75rem 2.1rem;
  list-style: none;
  border: 0;
}

/* Trait uniquement ENTRE deux articles (ne dépend pas de :last-child) */
.woocommerce.widget_shopping_cart .cart_list li + li,
.woocommerce .widget_shopping_cart .cart_list li + li,
.woofood-mini-cart .cart_list li + li {
  border-top: 1px dashed var(--brand-border);
}

.woocommerce.widget_shopping_cart .cart_list li:first-child,
.woocommerce .widget_shopping_cart .cart_list li:first-child {
  padding-top: 0;
}

/* Contient la photo flottante */
.woocommerce.widget_shopping_cart .cart_list li::after,
.woocommerce .widget_shopping_cart .cart_list li::after {
  content: "";
  display: table;
  clear: both;
}

.woocommerce ul.cart_list li > a:not(.remove) {
  display: block;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ui-text);
  text-decoration: none;
}

.woocommerce ul.cart_list li > a:not(.remove):hover { color: var(--ui-link-hover); }

.woocommerce ul.cart_list li img {
  float: right;
  width: 48px;
  height: 48px;
  margin: 0 0 .25rem .75rem;
  object-fit: cover;
  border-radius: var(--brand-radius-sm);
  box-shadow: none;
}

.woocommerce ul.cart_list li dl.variation { margin-top: .2rem; }

.woocommerce-mini-cart span.quantity {
  display: block;
  margin-top: .35rem;
  font-size: .875rem;
  color: var(--ui-text-soft);
}

.woocommerce-mini-cart span.quantity .amount { color: var(--ui-text); }

.woocommerce ul.cart_list li a.remove,
.woofood-mini-cart .cart_list li a.remove {
  top: .75rem;
  width: 1.5rem;
  height: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.5rem;
  text-align: center;
  text-decoration: none;
  border-radius: 50%;
}

.woocommerce ul.cart_list li:first-child a.remove { top: 0; }

.woocommerce.widget_shopping_cart .total,
.woocommerce .widget_shopping_cart .total,
p.woofood-mini-cart__total.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
  margin: .25rem 0 1rem;
  padding: .75rem 0 0;
  font-size: 1.05rem;
  border-top: 2px solid var(--brand-border);
}

.woocommerce-mini-cart__buttons,
.woofood-mini-cart__buttons {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin: 0;
}

.woocommerce-mini-cart__buttons a,
.woofood-mini-cart__buttons.buttons a {
  width: 100%;
}

.woocommerce-mini-cart__empty-message {
  padding: 1.25rem;
  color: var(--ui-text-soft);
  text-align: center;
  background: var(--brand-surface-alt);
  border-radius: var(--brand-radius-sm);
}

@layer overrides {
  .woocommerce ul.cart_list li a.remove,
  .woofood-mini-cart .cart_list li a.remove {
    color: var(--brand-danger) !important;
    background: var(--ui-danger-soft) !important;
  }
}

/* ---------------------------------------------------------------------
   3. TABLEAUX (panier, commande, compte)
   --------------------------------------------------------------------- */
.woocommerce table.shop_table {
  width: 100%;
  margin: 0 0 1.5rem;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--brand-radius);
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  padding: .85rem 1rem;
  vertical-align: middle;
  border-top: 1px solid var(--brand-border);
}

/* Le thème parent fait flotter le thead (colonnes d'en-tête décalées) */
.woocommerce table.shop_table thead {
  display: table-header-group;
  float: none;
}

.woocommerce table.shop_table thead tr { display: table-row; }

.woocommerce table.shop_table thead th {
  white-space: nowrap;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ui-text-soft);
  background: var(--brand-surface-alt);
  border-top: 0;
}

/* ---------------------------------------------------------------------
   4. PAGE PANIER
   Ordinateur : articles à gauche, total à droite (reste visible).
   Tablette et mobile : l'un sous l'autre.
   --------------------------------------------------------------------- */
.woocommerce-cart .entry-content > .woocommerce {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 1.5rem;
}

.woocommerce-cart .entry-content > .woocommerce > * { flex: 0 0 100%; }

.woocommerce-cart .woocommerce-cart-form {
  display: block;
  min-width: 0;
}

.woocommerce-cart .cart-collaterals {
  float: none;
  width: auto;
  margin: 0;
}

@media (min-width: 992px) {
  .woocommerce-cart .entry-content > .woocommerce > .woocommerce-cart-form { flex: 1 1 0; }

  .woocommerce-cart .entry-content > .woocommerce > .cart-collaterals {
    position: sticky;
    top: 1rem;
    flex: 0 0 360px;
  }
}

/* Le thème parent (main.css) transforme les lignes du tableau en blocs
   flottants, ce qui décale les colonnes : on rétablit un vrai tableau.
   Sélecteur volontairement long = même poids que celui du parent. */
.woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents {
  display: table;
  text-align: left;
}

.woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents thead,
.woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents tr {
  float: none;
  width: auto;
}

.woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents thead { display: table-header-group; }
.woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents tr { display: table-row; }

/* Largeur des colonnes : le nom du produit prend la place restante */
.woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents .product-remove    { width: 52px; }
.woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents .product-thumbnail { width: 88px; }
.woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents .product-name      { width: auto; }
.woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents .product-price     { width: 96px; }
.woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents .product-quantity  { width: 150px; }
.woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents .product-subtotal  { width: 104px; }

.woocommerce-cart table.cart td.actions {
  display: table-cell;
  float: none;
  width: auto;
}

.woocommerce-cart table.cart td.product-thumbnail img {
  display: block;
  width: 64px;
  height: 64px;
  max-width: none;
  object-fit: cover;
  border-radius: var(--brand-radius-sm);
}

.woocommerce-cart table.cart td.product-name a {
  font-weight: 600;
  color: var(--ui-text);
  text-decoration: none;
}

/* Options du produit (taille, suppléments…) : une option par ligne
   « Libellé : valeur » (panier, récapitulatif de commande, mini-panier) */
/* flow-root : contient les libellés flottants sans passer sous la photo du mini-panier */
.woocommerce dl.variation {
  display: flow-root;
  float: none;
  width: auto;
  margin: .3rem 0 0;
  font-size: .8125rem;
  line-height: 1.45;
  color: var(--ui-text-soft);
}

.woocommerce dl.variation dt {
  float: left;
  clear: left;
  width: auto;
  min-width: 0;
  margin: 0 .3em 0 0;
  font-weight: 600;
}

.woocommerce dl.variation dd,
.woocommerce dl.variation dd p {
  float: none;
  width: auto;
  margin: 0;
}

.woocommerce-cart table.cart td.product-subtotal { font-weight: 700; }

/* Croix de suppression */
.woocommerce a.remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
  border-radius: 50%;
  transition: background-color var(--ui-speed), color var(--ui-speed);
}

@layer overrides {
  .woocommerce a.remove {
    color: var(--ui-text-soft) !important;
    background: var(--brand-surface-alt) !important;
  }

  .woocommerce a.remove:hover {
    color: var(--brand-on-primary) !important;
    background: var(--brand-danger) !important;
  }
}

/* Ligne « code promo + mettre à jour » */
.woocommerce-cart table.cart td.actions {
  padding: 1rem;
  background: var(--brand-surface-alt);
}

.woocommerce-cart table.cart td.actions .coupon {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .5rem;
  float: left;
}

.woocommerce-cart table.cart td.actions .coupon .input-text {
  width: 180px;
}

.woocommerce-cart table.cart td.actions > .button { float: right; }

/* Mise à jour automatique en cours (script de functions.php) */
.woocommerce-cart-form.processing {
  opacity: .55;
  pointer-events: none;
  transition: opacity .25s;
}

/* Carte « Total panier » */
.cart-collaterals .cart_totals {
  float: none;
  width: 100%;
  margin: 0;
  padding: 1.5rem;
  background: var(--brand-surface-alt);
  border-radius: var(--brand-radius);
}

.cart-collaterals .cart_totals h2 {
  margin-bottom: 1rem;
  text-align: center;
}

.cart_totals table.shop_table {
  margin-bottom: 1rem;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.cart_totals table.shop_table th {
  width: 40%;
  font-weight: 500;
  color: var(--ui-text-soft);
}

.cart_totals table.shop_table td { text-align: right; }

.cart_totals .woocommerce-shipping-methods {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cart_totals .woocommerce-shipping-destination {
  margin: .25rem 0 0;
  font-size: .8125rem;
  color: var(--ui-text-soft);
}

/* WooFood facture la livraison en « Frais de livraison » : la ligne
   « Expédition : Livraison gratuite » est masquée tant qu'aucune méthode
   n'a de prix (panier et checkout). Une méthode payante reste affichée. */
tr.woocommerce-shipping-totals:not(:has(.woocommerce-Price-amount)) { display: none; }

.wc-proceed-to-checkout { padding: 0; }

/* Total + TVA */
.woocommerce table.shop_table tr.order-total th,
.woocommerce table.shop_table tr.order-total td {
  padding-top: 1rem;
  font-size: 1.125rem;
  border-top: 2px solid var(--brand-primary);
}

.woocommerce table.shop_table tr.order-total .amount {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand-primary-dark);
}

.woocommerce table.shop_table tr.order-total small.includes_tax,
.woocommerce table.shop_table tr.order-total .includes_tax {
  display: block;
  font-size: .75rem;
  font-weight: 400;
  color: var(--ui-text-soft);
}

.woocommerce table.shop_table tr.order-total .includes_tax .amount {
  font-size: inherit;
  font-weight: 600;
  color: inherit;
}

/* Grands boutons « Valider la commande » et « Commander » */
.woocommerce a.checkout-button,
.woocommerce #payment #place_order {
  display: flex;
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: .9rem 1.25rem;
  font-size: 1.0625rem;
}

/* Panier vide (display:block : le « CSS additionnel » du Customizer masque les .woocommerce-info) */
.wc-empty-cart-message .cart-empty {
  display: block;
  font-size: 1.05rem;
  text-align: center;
}

.return-to-shop { text-align: center; }

/* ---------------------------------------------------------------------
   5. PANIER — MOBILE : chaque ligne devient une carte
      [ image ] [ nom + options           ] [ × ]
      [ image ] [ prix unitaire                 ]
      [ image ] [ quantité       sous-total     ]
   Mêmes sélecteurs longs qu'au §4 (poids du thème parent).
   --------------------------------------------------------------------- */
@media (max-width: 768px) {
  .woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents {
    display: block;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents thead { display: none; }

  .woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents tbody { display: block; }

  .woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents td::before {
    content: none;
    display: none;
  }

  .woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents tr.cart_item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb name     remove"
      "thumb price    price"
      "thumb qty      subtotal";
    align-items: center;
    column-gap: 12px;
    row-gap: 6px;
    width: auto;
    margin: 0 0 .75rem;
    padding: 12px;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
  }

  .woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents tr.cart_item > td {
    display: block;
    width: auto;
    max-width: none;
    padding: 0;
    background: transparent;
    border: 0;
  }

  .woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents td.product-thumbnail { grid-area: thumb; align-self: start; }
  .woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents td.product-name      { grid-area: name; }
  .woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents td.product-remove    { grid-area: remove; align-self: start; }
  .woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents td.product-price     { grid-area: price; font-size: .8125rem; color: var(--ui-text-soft); }
  .woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents td.product-quantity  { grid-area: qty; }
  .woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents td.product-subtotal  { grid-area: subtotal; justify-self: end; font-size: 1rem; }

  .woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents td.product-price::before {
    content: "Prix unitaire : ";
    display: inline;
    float: none;
    font-weight: 400;
  }

  /* Le thème parent masque la miniature et le prix unitaire en !important */
  @layer overrides {
    .woocommerce-cart table.cart td.product-thumbnail,
    .woocommerce-cart table.cart td.product-price {
      display: block !important;
    }
  }

  .woocommerce-cart table.cart .quantity .qty-change-button { width: 34px; height: 34px; }
  .woocommerce-cart table.cart .quantity input.qty { width: 36px; height: 34px; }

  /* Code promo + mise à jour : empilés pleine largeur */
  .woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents tr:not(.cart_item) { display: block; }

  .woocommerce-cart table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents td.actions {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1rem;
    border: 0;
    border-radius: var(--brand-radius);
  }

  .woocommerce-cart table.cart td.actions .coupon {
    display: flex;
    flex-direction: column;
    float: none;
  }

  .woocommerce-cart table.cart td.actions .coupon .input-text,
  .woocommerce-cart table.cart td.actions .button {
    width: 100%;
    float: none;
  }

  .cart-collaterals .cart_totals {
    margin-top: 1rem;
    padding: 1.25rem 1rem;
  }

  /* Les boutons sont fixés en bas d'écran par le thème parent */
  .woocommerce a.checkout-button,
  .woocommerce #payment #place_order {
    min-height: 60px;
    border-radius: var(--brand-radius) var(--brand-radius) 0 0;
    box-shadow: 0 -6px 20px color-mix(in srgb, var(--brand-ink) 18%, transparent);
  }
}

/* ---------------------------------------------------------------------
   6. PAGE COMMANDE (checkout)
   --------------------------------------------------------------------- */
.woocommerce-checkout h3 {
  margin: 1.5rem 0 1rem;
  font-size: 1.2rem;
}

/* Grille des formulaires WooCommerce.
   Bootstrap 4 (thème parent) transforme .form-row en flex : on rétablit
   le comportement WooCommerce (lignes pleines, ou moitié gauche/droite). */
.woocommerce form .form-row {
  display: block;
  margin: 0 0 1rem;
  padding: 0;
}

.woocommerce form .form-row-first,
.woocommerce form .form-row-last {
  width: calc(50% - .5rem);
}

.woocommerce form .form-row-first { float: left; }
.woocommerce form .form-row-last  { float: right; }

.woocommerce form .form-row-wide {
  clear: both;
  float: none;
  width: 100%;
}

/* WooFood réaffiche les champs d'adresse avec style="display: initial"
   (= inline : les marges disparaissent et les champs se collent).
   On les remet en bloc ; les champs masqués (display: none) ne sont pas touchés. */
@layer overrides {
  .woocommerce form .form-row[style*="display: initial"] {
    display: block !important;
  }
}

@media (max-width: 480px) {
  .woocommerce form .form-row-first,
  .woocommerce form .form-row-last {
    float: none;
    width: 100%;
  }
}

.woocommerce form .form-row label {
  display: block;
  margin-bottom: .3rem;
  font-size: .9375rem;
}

/* Champ mot de passe + bouton « afficher » (icône œil) */
.woocommerce form .password-input {
  position: relative;
  display: block;
}

.woocommerce form .password-input input { padding-right: 3rem; }

.woocommerce form .show-password-input {
  position: absolute;
  top: 50%;
  right: .6rem;
  width: 32px;
  height: 32px;
  padding: 0;
  background-color: var(--ui-text-soft);
  border: 0;
  transform: translateY(-50%);
  cursor: pointer;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 20px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 20px no-repeat;
}

.woocommerce form .show-password-input.display-password { background-color: var(--brand-primary); }

.woocommerce form .form-row .required {
  color: var(--brand-danger);
  text-decoration: none;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  width: 100%;
}

.woocommerce form .form-row.woocommerce-invalid input.input-text,
.woocommerce form .form-row.woocommerce-invalid select {
  border-color: var(--brand-danger);
}

/* Formulaire code promo, toujours visible :
   [ texte d'aide                         ]
   [ champ code promo       ] [ Appliquer ] */
form.checkout_coupon.woocommerce-form-coupon {
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1.5rem;
  padding: 1rem;
  background: var(--brand-surface-alt);
  border: 1px dashed var(--ui-border-strong);
  border-radius: var(--brand-radius);
}

/* Texte d'aide (absent depuis WooCommerce 11 : d'où le :not(.form-row)) */
form.checkout_coupon.woocommerce-form-coupon > p:first-child:not(.form-row) {
  flex: 0 0 100%;
  margin: 0;
  font-size: .875rem;
  color: var(--ui-text-soft);
}

form.checkout_coupon.woocommerce-form-coupon .form-row-first,
form.checkout_coupon.woocommerce-form-coupon .form-row-last {
  float: none;
  width: auto;
  margin: 0;
}

form.checkout_coupon.woocommerce-form-coupon .form-row-first { flex: 1 1 200px; }

form.checkout_coupon.woocommerce-form-coupon .form-row-first input { width: 100%; }

form.checkout_coupon.woocommerce-form-coupon .clear { display: none; }

@layer overrides {
  /* Le formulaire est replié par WooCommerce (style inline) : on le garde ouvert */
  form.checkout_coupon.woocommerce-form-coupon { display: flex !important; }
}

/* Utilitaire WooCommerce (sa feuille de style n'est pas chargée par le thème) */
.woocommerce .clear { clear: both; }

/* Récapitulatif de commande (tableau Bootstrap du thème parent) */
.woocommerce-checkout-review-order {
  overflow: hidden;
  border: 1px solid var(--brand-border);
  border-radius: var(--brand-radius);
}

.woocommerce-checkout-review-order-table {
  margin: 0;
  font-size: .9375rem;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
  padding: .75rem 1rem;
  vertical-align: top;
  border-top: 1px solid var(--brand-border);
}

.woocommerce-checkout-review-order-table thead th {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 0;
}

.woocommerce-checkout-review-order-table .product-name { font-weight: 500; }

.woocommerce-checkout-review-order-table .product-quantity { font-weight: 700; }

.woocommerce-checkout-review-order-table td.product-total,
.woocommerce-checkout-review-order-table tfoot td {
  text-align: right;
  white-space: nowrap;
}

.woocommerce-checkout-review-order-table tr.order-total th,
.woocommerce-checkout-review-order-table tr.order-total td {
  font-size: 1.125rem;
  border-top: 2px solid var(--brand-primary);
}

.woocommerce-checkout-review-order-table tr.order-total .amount {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand-primary-dark);
}

.woocommerce-checkout-review-order-table .includes_tax {
  display: block;
  font-size: .75rem;
  color: var(--ui-text-soft);
}

.woocommerce-checkout-review-order-table tr.order-total .includes_tax .amount {
  font-size: inherit;
  font-weight: 600;
  color: inherit;
}

@layer overrides {
  .woocommerce-checkout-review-order,
  .woocommerce-checkout-review-order-table tbody,
  .woocommerce-checkout-review-order-table tfoot {
    background: var(--brand-surface) !important;
  }

  /* Le thème parent met l'en-tête et la ligne Total en « bg-dark text-white » */
  .woocommerce-checkout-review-order-table thead tr {
    color: var(--ui-text-soft) !important;
    background: var(--brand-surface-alt) !important;
  }

  .woocommerce-checkout-review-order-table tr.order-total {
    color: var(--ui-text) !important;
    background: var(--brand-surface-alt) !important;
  }
}

/* Heure / date de livraison ou de retrait (WooFood) : simple libellé de champ */
#wf-time-to-deliver .wf_tdlvr_title,
#wf-time-to-pickup .wf_tdlvr_title,
#wf-date-to-deliver .wf_tdlvr_title,
#wf-date-to-pickup .wf_tdlvr_title {
  display: block;
  float: none;
  width: auto;
  margin: 1rem 0 .35rem;
  padding: 0;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--ui-text);
  background: transparent;
}

#wf-time-to-deliver .form-row,
#wf-date-to-deliver .form-row {
  margin-bottom: 1rem;
}

/* Moyens de paiement
   (.wf-payment-block = enveloppe du thème ; #payment = bloc de WooCommerce,
   remplacé à chaque rafraîchissement du récapitulatif) */
.woocommerce-checkout .wf-payment-block,
.woocommerce-checkout #payment {
  padding: 1rem;
  background: var(--brand-surface-alt);
  border-radius: var(--brand-radius);
}

.woocommerce-checkout .wf-payment-block #payment {
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.woocommerce-checkout #payment ul.payment_methods {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 0;
}

.woocommerce-checkout #payment li.wc_payment_method {
  padding: .75rem 0;
  border-bottom: 1px solid var(--brand-border);
}

.woocommerce-checkout #payment li.wc_payment_method > label {
  margin-left: .35rem;
  font-weight: 600;
}

.woocommerce-checkout #payment div.payment_box {
  margin: .75rem 0 0;
  padding: .85rem 1rem;
  font-size: .9rem;
  color: var(--ui-text);
  background: var(--brand-surface);
  border-radius: var(--brand-radius-sm);
}

/* Petite flèche au-dessus de la description (dessinée par le thème parent) */
.woocommerce-checkout #payment div.payment_box::before {
  border-bottom-color: var(--brand-surface);
}

.woocommerce-checkout #payment div.payment_box p:last-of-type { margin-bottom: .5rem; }

.woocommerce-checkout #payment div.form-row.place-order { padding: 1rem 0 0; }

.woocommerce-checkout #payment .payment_box label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: .2rem 0;
  font-weight: 500;
}

.woocommerce-checkout #payment .payment_box img { height: auto; }

.woocommerce-terms-and-conditions-wrapper { margin-bottom: 1rem; font-size: .875rem; }

/* Badge « Minimum de commande » sous le champ Ville (script de functions.php) */
.wc-city-delivery {
  display: inline-block;
  margin-top: .5rem;
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.5;
  border-radius: 999px;
}

.wc-city-delivery.tier-low { color: var(--brand-success); background: var(--ui-success-soft); }
.wc-city-delivery.tier-std { color: var(--brand-primary-dark); background: var(--ui-accent-soft); }

@media (max-width: 768px) {
  .woocommerce-checkout .col2-set .col-1,
  .woocommerce-checkout .col2-set .col-2 {
    float: none;
    width: 100%;
  }

  .woocommerce-checkout table.shop_table th,
  .woocommerce-checkout table.shop_table td {
    padding: .7rem .6rem;
    font-size: .875rem;
  }
}

/* ---------------------------------------------------------------------
   7. FICHE PRODUIT (page produit classique)
   --------------------------------------------------------------------- */
.woocommerce div.product {
  padding: clamp(16px, 3vw, 32px);
  background: var(--brand-surface);
  border-radius: var(--brand-radius);
}

.entry-summary .product_title {
  padding: 0 0 .75rem;
  font-family: var(--brand-font-display);
  font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.5rem);
  font-weight: 400;
  border-bottom: 2px solid var(--brand-border);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
  margin: 0 .25rem 0 0;
  padding: 0;
  border: 0;
  border-radius: var(--brand-radius-sm) var(--brand-radius-sm) 0 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  display: block;
  padding: .6rem 1rem;
  font-weight: 600;
}

@layer overrides {
  .woocommerce div.product p.price,
  .woocommerce div.product span.price {
    float: none !important;
    padding: .5rem 0 !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    text-align: left !important;
    color: var(--ui-price) !important;
    background: transparent !important;
    border: 0 !important;
  }

  .entry-summary .product_title {
    color: var(--ui-title) !important;
  }

  .woocommerce div.product .woocommerce-tabs ul.tabs li { background: var(--brand-surface-alt) !important; }
  .woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: var(--brand-primary) !important; }
  .woocommerce div.product .woocommerce-tabs ul.tabs li a { color: var(--ui-text) !important; }
  .woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--brand-on-primary) !important; }
}

/* ---------------------------------------------------------------------
   8. MON COMPTE
   --------------------------------------------------------------------- */
.woocommerce #customer_login {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.woocommerce #customer_login::before,
.woocommerce #customer_login::after {
  content: none;
}

.woocommerce #customer_login > .u-column1,
.woocommerce #customer_login > .u-column2 {
  float: none;
  width: auto;
  max-width: none;
  padding: 0;
}

.woocommerce .woocommerce-form-login,
.woocommerce .woocommerce-form-register {
  margin: 0;
  padding: 1.5rem;
  text-align: left;
  background: var(--brand-surface-alt);
  border: 0;
  border-radius: var(--brand-radius);
  box-shadow: none;
}

.woocommerce .woocommerce-form-register .form-field { margin-bottom: .75rem; }

.woocommerce .woocommerce-form-register .form-control { width: 100%; }

.woocommerce .woocommerce-form-login .woocommerce-form-login__rememberme {
  display: flex;
  align-items: center;
  gap: .4rem;
  float: none;
  width: auto;
  margin-bottom: .75rem;
}

.woocommerce .woocommerce-form-login .woocommerce-form-login__submit { width: 100%; }

p.woocommerce-LostPassword.lost_password {
  margin: 1rem 0 0;
  padding: 1rem 0 0;
  text-align: center;
  border-top: 1px solid var(--brand-border);
}

/* « Mot de passe perdu ? » : simple lien (le thème parent en fait un bouton jaune) */
p.woocommerce-LostPassword.lost_password a {
  padding: 0;
  font-weight: 500;
  text-decoration: underline;
  border: 0;
  box-shadow: none;
}

@layer overrides {
  p.woocommerce-LostPassword.lost_password a {
    color: var(--ui-link) !important;
    background: none !important;
  }
}

/* Menu du compte */
.woocommerce-MyAccount-navigation ul {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.woocommerce-MyAccount-navigation-link a {
  display: block;
  padding: .45rem 1rem;
  font-weight: 500;
  color: var(--ui-text);
  text-decoration: none;
  background: var(--brand-surface-alt);
  border-radius: 999px;
}

.woocommerce-MyAccount-navigation-link a:hover { color: var(--brand-primary); }

.woocommerce-MyAccount-navigation-link.is-active a {
  color: var(--brand-on-primary);
  background: var(--brand-primary);
}

.woocommerce-account .woocommerce-MyAccount-content { padding: 0; }

.woocommerce-orders-table .button,
.woocommerce-MyAccount-content .woocommerce-button {
  min-height: 36px;
  margin: .15rem .25rem .15rem 0;
  padding: .3em .9em;
  font-size: .8125rem;
}

/* Shortcode [wc_reorder_last_completed] */
.wc-reorder-last-wrap {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--brand-surface-alt);
  border-radius: var(--brand-radius);
}

.wc-reorder-table {
  width: 100%;
  border-collapse: collapse;
}

.wc-reorder-table th,
.wc-reorder-table td {
  padding: .6rem .5rem;
  text-align: left;
  border-bottom: 1px solid var(--brand-border);
}

.wc-reorder-table th {
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ui-text-soft);
}

@media (max-width: 600px) {
  .wc-reorder-table thead { display: none; }

  .wc-reorder-table tr,
  .wc-reorder-table td {
    display: flex;
    justify-content: space-between;
  }

  .wc-reorder-table tr { flex-direction: column; }

  .wc-reorder-table td::before {
    content: attr(data-label);
    font-weight: 600;
  }
}
