/**
 * ============================================================
 * ASTRALISPHERE — Habillage WooCommerce (Panier / Checkout / Mon compte)
 * Fichier : astra-child/css/woocommerce-custom.css
 * ============================================================
 *
 * Aucune maquette n'a été fournie pour ces 3 pages. Plutôt que de
 * réécrire les templates WooCommerce (risque de casser le paiement, les
 * nonces, les gateways ou les mises à jour AJAX du panier), on habille
 * uniquement le rendu HTML natif de WooCommerce en CSS, avec les mêmes
 * couleurs/typos que le reste du site. Chargé uniquement sur le panier,
 * le checkout et "mon compte" (voir functions.php).
 */

:root {
  --hp-gold:#C8A050; --hp-gold-d:#9A6818; --hp-gold-l:#DEC880;
  --hp-cream:#F2E8D5; --hp-cream-d:#E8D4B8; --hp-bg:#EDE0C8;
  --hp-dark:#1A0800; --hp-brown:#5C3208; --hp-tx:#3A2510;
  --hp-tx-l:#7A5535; --hp-muted:#A08060; --hp-green:#2E7D4F;
  --hp-r:12px; --hp-r-lg:20px; --hp-r-xl:28px; --hp-r-pill:100px;
  --hp-sh:0 2px 14px rgba(90,48,8,.09);
  --hp-sh-lg:0 8px 36px rgba(90,48,8,.18);
}

body.woocommerce-cart, body.woocommerce-checkout, body.woocommerce-account {
  background:var(--hp-bg) !important;
  font-family:'Nunito',sans-serif;
  color:var(--hp-tx);
}
body.woocommerce-cart .content-area, body.woocommerce-checkout .content-area, body.woocommerce-account .content-area {
  max-width:1240px; margin:0 auto; padding:32px 48px 64px;
}
body.woocommerce-cart .entry-header .entry-title,
body.woocommerce-checkout .entry-header .entry-title,
body.woocommerce-account .entry-header .entry-title {
  font-family:'Yeseva One',serif !important; color:var(--hp-tx) !important; font-size:30px !important;
}

/* ── Boutons (partout : panier, checkout, mon compte) ── */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce-cart .checkout-button,
.woocommerce #payment #place_order {
  background:linear-gradient(135deg,var(--hp-gold-l),var(--hp-gold)) !important;
  color:var(--hp-dark) !important;
  border:none !important;
  font-weight:800 !important;
  border-radius:var(--hp-r-pill) !important;
  padding:13px 26px !important;
  box-shadow:0 6px 18px rgba(154,104,24,.28) !important;
  text-transform:none !important;
  transition:opacity .15s !important;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce #payment #place_order:hover { opacity:.88 !important; }
.woocommerce a.button.alt, .woocommerce #respond input#submit.alt { background:linear-gradient(135deg,var(--hp-gold-l),var(--hp-gold)) !important; }

/* ── Tableau panier ── */
.woocommerce table.shop_table {
  border:none !important; background:#fff; border-radius:var(--hp-r-lg);
  box-shadow:var(--hp-sh); overflow:hidden; border-collapse:separate !important;
}
.woocommerce table.shop_table th {
  background:var(--hp-cream); color:var(--hp-tx-l); font-weight:800;
  text-transform:uppercase; font-size:11px; letter-spacing:.05em; border:none !important;
  padding:14px 16px !important;
}
.woocommerce table.shop_table td { border-top:1px solid var(--hp-cream-d) !important; border-bottom:none !important; border-left:none !important; border-right:none !important; padding:16px !important; vertical-align:middle; }
.woocommerce table.shop_table td.product-name a { color:var(--hp-tx); font-weight:800; text-decoration:none; }
.woocommerce table.shop_table td.product-name a:hover { color:var(--hp-gold-d); }
/* Métadonnées de ligne panier (Vendeur, "📅 Rendez-vous : …") : par défaut
   WooCommerce affiche chaque clé/valeur (dt/dd) à la suite, comme un seul
   paragraphe ("Vendeur: X Date: Y…"), illisible dès que plusieurs lignes
   sont actives sur un produit. On force chaque ligne sur sa propre ligne,
   avec la clé (dt, ex. "Vendeur") en gras et bien distincte de sa valeur. */
.woocommerce table.shop_table td.product-name dl.variation,
.woocommerce table.shop_table td.product-name .wc-item-meta {
  display:block; margin:8px 0 0; font-size:12.5px; line-height:1.7;
}
.woocommerce table.shop_table td.product-name dl.variation dt,
.woocommerce table.shop_table td.product-name .wc-item-meta dt,
.woocommerce table.shop_table td.product-name .wc-item-meta-label {
  display:inline; font-weight:800; color:var(--hp-tx);
}
.woocommerce table.shop_table td.product-name dl.variation dd,
.woocommerce table.shop_table td.product-name .wc-item-meta dd,
.woocommerce table.shop_table td.product-name .wc-item-meta-value {
  display:block; margin:0 0 6px; color:var(--hp-tx-l); font-weight:400;
}
.woocommerce table.shop_table td.product-name dl.variation dd:last-child,
.woocommerce table.shop_table td.product-name .wc-item-meta dd:last-child { margin-bottom:0; }
.woocommerce table.shop_table td.product-name dl.variation dd p,
.woocommerce table.shop_table td.product-name .wc-item-meta dd p { margin:0; display:inline; }
.woocommerce td.product-thumbnail img { border-radius:var(--hp-r); }
.woocommerce .quantity .qty {
  border:1px solid var(--hp-cream-d) !important; border-radius:var(--hp-r) !important;
  padding:8px !important; text-align:center;
}
.woocommerce td.product-remove a.remove {
  background:var(--hp-cream) !important; color:var(--hp-tx-l) !important; border-radius:50% !important;
}
.woocommerce td.product-remove a.remove:hover { background:#F5DCDC !important; color:#A03C3C !important; }

/* ── Coupon + totaux ── */
.woocommerce-cart-form .coupon .input-text {
  border:1px solid var(--hp-cream-d) !important; border-radius:var(--hp-r-pill) !important;
  padding:11px 18px !important; font-family:'Nunito',sans-serif;
}
.woocommerce-cart .cart-collaterals .cart_totals,
.woocommerce-checkout .woocommerce-checkout-review-order,
.woocommerce-checkout #order_review {
  background:#fff !important; border-radius:var(--hp-r-xl) !important;
  box-shadow:var(--hp-sh-lg) !important; padding:26px !important;
}
.cart_totals h2, #order_review_heading {
  font-family:'Yeseva One',serif !important; color:var(--hp-tx) !important; font-size:19px !important;
}
.woocommerce table.shop_table tfoot td, .woocommerce table.shop_table tfoot th { font-weight:800; }
.woocommerce .order-total .amount, .cart_totals .order-total .amount {
  font-family:'Yeseva One',serif !important; color:var(--hp-tx) !important; font-size:20px !important;
}

/* ── Champs de formulaire (checkout, mon compte, adresses) ── */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea,
.woocommerce-account form input.input-text,
.woocommerce-account form textarea {
  border:1px solid var(--hp-cream-d) !important; border-radius:var(--hp-r) !important;
  padding:12px 14px !important; background:#fff !important; font-family:'Nunito',sans-serif !important;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row select:focus { border-color:var(--hp-gold) !important; outline:none !important; }
.woocommerce-checkout #payment { background:var(--hp-cream) !important; border-radius:var(--hp-r-lg) !important; }
.woocommerce-checkout #payment div.payment_box { background:#fff !important; border-radius:var(--hp-r) !important; }
.woocommerce-checkout #payment ul.payment_methods { border-bottom:none !important; }

/* ── Mon compte ── */
.woocommerce-account .woocommerce-MyAccount-navigation {
  background:#fff; border-radius:var(--hp-r-lg); box-shadow:var(--hp-sh); padding:10px 0; overflow:hidden;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul { margin:0; }
.woocommerce-account .woocommerce-MyAccount-navigation li { border:none !important; }
.woocommerce-account .woocommerce-MyAccount-navigation li a {
  padding:12px 20px !important; color:var(--hp-tx-l) !important; font-weight:700; text-decoration:none; display:block;
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
  background:var(--hp-cream) !important; color:var(--hp-gold-d) !important;
}
.woocommerce-account .woocommerce-MyAccount-content {
  background:#fff; border-radius:var(--hp-r-lg); box-shadow:var(--hp-sh); padding:28px;
}
.woocommerce-MyAccount-content table.shop_table { box-shadow:none; }
/* Astra positionne son icône (::before) en absolute, calée sur SON padding
   par défaut (~3.5em à gauche). En réduisant ce padding pour matcher notre
   charte, l'icône se retrouvait par-dessus le début du texte (ex : "«S" de
   "«Séance..." masqué). Corrigé en repassant tout en flex : plus d'icône
   absolute, l'icône (si elle existe) suit le texte normalement dans le flux. */
.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews {
  background:var(--hp-cream) !important; border-top-color:var(--hp-gold) !important;
  border-radius:var(--hp-r) !important; color:var(--hp-tx) !important;
  padding:14px 20px !important;
  display:flex !important; align-items:center; flex-wrap:wrap; gap:10px 16px;
}
.woocommerce-message::before, .woocommerce-info::before, .woocommerce-error::before {
  display:none !important; /* icône par défaut retirée : positionnement absolute incompatible avec notre padding */
}
.woocommerce-message > a.button, .woocommerce-info > a.button {
  margin:0 !important; flex-shrink:0;
}

/* ── Champs Stripe/gateway (cadres génériques, sans dépendre d'un gateway précis) ── */
.woocommerce-checkout .wc_payment_method label { font-weight:700; color:var(--hp-tx); }

/* ── Bloc "Votre commande" (#order_review) — panier + checkout ──────────
   Le tableau récap (sous-total / livraison / total) réutilisait le style
   générique de .shop_table, pensé pour un tableau produits classique, pas
   pour un récap compact : lignes mal alignées, note TVA qui retombe à la
   ligne n'importe où, ligne "Livraison : <vendeur>" sans hiérarchie visuelle.
   Repris spécifiquement, desktop et mobile. */
#order_review table.shop_table,
.cart_totals table.shop_table {
  box-shadow:none; background:transparent;
}
#order_review table.shop_table td,
#order_review table.shop_table th,
.cart_totals table.shop_table td,
.cart_totals table.shop_table th {
  background:transparent !important; padding:12px 4px !important;
}
#order_review .cart_item td.product-name,
.cart_totals .cart_item td.product-name {
  font-size:14px; line-height:1.5;
}
#order_review .cart_item td.product-name .astral-rdv-meta,
#order_review .cart_item td.product-name > *:not(.product-quantity) {
  display:block;
}
/* Métadonnées de ligne (vendeur, "📅 Rendez-vous : ...") : sous-texte
   discret plutôt que la même taille que le nom du produit. */
#order_review .wc-item-meta, #order_review dl.variation,
.cart_totals .wc-item-meta, .cart_totals dl.variation {
  margin-top:6px !important; font-size:12.5px; color:var(--hp-tx-l);
}
#order_review .wc-item-meta p, #order_review dl.variation p { margin:2px 0; }

#order_review tfoot tr, .cart_totals tfoot tr,
#order_review table.shop_table tbody tr:not(.cart_item) {
  border-top:1px solid var(--hp-cream-d);
}
#order_review tfoot th, .cart_totals tfoot th {
  text-transform:uppercase; font-size:11px; letter-spacing:.05em;
  color:var(--hp-tx-l); font-weight:800; text-align:left; vertical-align:top;
}
#order_review tfoot td, .cart_totals tfoot td { text-align:right; }
/* La note "(dont X € TVA)" sous le total se coupait en 3 lignes hasardeuses
   ("(dont" / "17,01 €" en gras / "TVA)") : le montant qu'elle contient est
   un <span class="amount"> qui héritait du style du GRAND total (grosse
   police serif dorée, règle plus haut dans ce fichier) au lieu de rester
   discret. Neutralisé spécifiquement + passage en nowrap pour que la note
   reste un seul bloc, sur sa propre ligne sous le total. */
#order_review .order-total small, .cart_totals .order-total small,
#order_review .includes_tax, .cart_totals .includes_tax {
  display:block; font-size:11px !important; font-weight:400 !important;
  color:var(--hp-tx-l) !important; margin-top:4px; white-space:nowrap;
}
#order_review .order-total small .amount, .cart_totals .order-total small .amount,
#order_review .includes_tax .amount, .cart_totals .includes_tax .amount {
  font-family:'Nunito',sans-serif !important; font-size:11px !important;
  font-weight:400 !important; color:var(--hp-tx-l) !important;
}
#order_review tr.order-total th, .cart_totals tr.order-total th { font-size:14px; }

/* Case à cocher/radio des moyens de paiement (checkout) — cf. header pour
   le même souci : le rond de sélection restait en bleu natif du navigateur
   au lieu de la couleur du site. */
.woocommerce ul.payment_methods input[type="radio"],
.woocommerce ul.payment_methods input[type="checkbox"],
.woocommerce form .form-row input[type="radio"],
.woocommerce form .form-row input[type="checkbox"] { accent-color:var(--hp-gold); }

@media (max-width:768px) {
  body.woocommerce-cart .content-area, body.woocommerce-checkout .content-area, body.woocommerce-account .content-area {
    padding:20px 16px 48px;
  }
  body.woocommerce-cart .entry-header .entry-title,
  body.woocommerce-checkout .entry-header .entry-title,
  body.woocommerce-account .entry-header .entry-title { font-size:22px !important; }
  .woocommerce-cart .cart-collaterals .cart_totals,
  .woocommerce-checkout .woocommerce-checkout-review-order,
  .woocommerce-checkout #order_review { padding:18px !important; border-radius:var(--hp-r-lg) !important; }
  .woocommerce table.shop_table td, .woocommerce table.shop_table th { padding:10px !important; font-size:13px; }
  .woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews {
    padding:12px 14px !important; font-size:13px;
  }
  .woocommerce form .form-row { margin-bottom:12px; }
}
@media (max-width:480px) {
  #order_review tfoot th, .cart_totals tfoot th,
  #order_review tfoot td, .cart_totals tfoot td { font-size:12.5px; }
  #order_review tr.order-total th, .cart_totals tr.order-total th,
  #order_review tr.order-total td .amount, .cart_totals tr.order-total td .amount { font-size:16px !important; }
}
