/* ============================================================
   AtlasETF — WooCommerce "Kinetic Pulse"
   Restyle sombre du markup WooCommerce natif.
   Tout est scopé sous body.atlasetf-woo pour ne rien casser
   ailleurs. Le tunnel add-to-cart → checkout reste intact :
   ce fichier ne touche QUE l'apparence.
   ============================================================ */

:root {
  --atlas-bg:        #0E0E0E;
  --atlas-card:      #1A1919;
  --atlas-card-hi:   #201F1F;
  --atlas-border:    rgba(255,255,255,0.10);
  --atlas-border-hi: rgba(255,255,255,0.20);
  --atlas-text:      #FFFFFF;
  --atlas-muted:     rgba(255,255,255,0.62);
  --atlas-red:       #FF3131;
  --atlas-orange:    #FF914D;
  --atlas-grad:      linear-gradient(135deg,#FF3131 0%,#FF914D 100%);
}

/* ── Cadre général ───────────────────────────────────────── */
body.atlasetf-woo {
  background-color: var(--atlas-bg);
  color: var(--atlas-text);
}
body.atlasetf-woo .atlasetf-woo-main { padding-top: 0; }

/* ============================================================
   1. BOUTON D'ACHAT (single-product.add_to_cart)
   ============================================================ */
body.atlasetf-woo .single_add_to_cart_button,
body.atlasetf-woo .atlasetf-product .button.alt,
body.atlasetf-woo .atlasetf-cta-buy .single_add_to_cart_button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 4px;
  padding: 16px 28px;
  background: var(--atlas-grad);
  color: #000000 !important;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow .25s ease, transform .2s ease, opacity .2s ease;
}
body.atlasetf-woo .single_add_to_cart_button:hover,
body.atlasetf-woo .atlasetf-product .button.alt:hover {
  box-shadow: 0 0 32px rgba(229,26,34,0.30);
  transform: translateY(-1px);
  color: #000000 !important;
}
body.atlasetf-woo .single_add_to_cart_button:disabled,
body.atlasetf-woo .single_add_to_cart_button.disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Formulaire cart : disposition propre */
body.atlasetf-woo form.cart {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  margin: 0;
}
body.atlasetf-woo form.cart .quantity { flex: 0 0 auto; }
body.atlasetf-woo form.cart .single_add_to_cart_button { flex: 1 1 auto; }

/* ── Champ quantité ──────────────────────────────────────── */
body.atlasetf-woo .quantity input.qty,
body.atlasetf-woo input[type="number"].qty {
  width: 72px;
  height: 100%;
  min-height: 52px;
  padding: 10px;
  background: #141414;
  color: var(--atlas-text);
  border: 1px solid var(--atlas-border-hi);
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  text-align: center;
  -moz-appearance: textfield;
}
body.atlasetf-woo .quantity input.qty:focus {
  outline: none;
  border-color: var(--atlas-red);
}

/* ── Prix WooCommerce dans la carte produit ──────────────── */
body.atlasetf-woo .atlasetf-price .price,
body.atlasetf-woo .atlasetf-price .amount,
body.atlasetf-woo .atlasetf-price bdi {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}
body.atlasetf-woo .atlasetf-price del { opacity: .45; font-size: .55em; }
body.atlasetf-woo .atlasetf-price ins { text-decoration: none; }

/* ============================================================
   2. NOTICES / MESSAGES WooCommerce
   ============================================================ */
body.atlasetf-woo .woocommerce-message,
body.atlasetf-woo .woocommerce-info,
body.atlasetf-woo .woocommerce-error,
body.atlasetf-woo .woocommerce-notice {
  background: var(--atlas-card);
  color: var(--atlas-text);
  border: 1px solid var(--atlas-border);
  border-left: 3px solid var(--atlas-orange);
  border-radius: 8px;
  padding: 14px 18px;
  font-family: 'Inter', sans-serif;
  list-style: none;
}
body.atlasetf-woo .woocommerce-error { border-left-color: var(--atlas-red); }
body.atlasetf-woo .woocommerce-message a,
body.atlasetf-woo .woocommerce-info a {
  color: var(--atlas-orange);
  font-weight: 600;
}
body.atlasetf-woo .woocommerce-message .button,
body.atlasetf-woo .woocommerce-info .button {
  background: var(--atlas-grad);
  color: #000 !important;
  border: 0;
  border-radius: 6px;
  padding: 8px 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: .75rem;
}

/* ============================================================
   3. PANIER & COMMANDE — restyle sombre minimal
   ============================================================ */
body.atlasetf-woo h1,
body.atlasetf-woo h2,
body.atlasetf-woo h3 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--atlas-text);
}
body.atlasetf-woo .atlasetf-woo-shell { color: var(--atlas-text); }
body.atlasetf-woo .woocommerce-page-title,
body.atlasetf-woo .entry-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

/* Tableaux (panier, récap commande, account) */
body.atlasetf-woo table.shop_table,
body.atlasetf-woo table.woocommerce-table,
body.atlasetf-woo table.cart {
  width: 100%;
  background: var(--atlas-card);
  border: 1px solid var(--atlas-border);
  border-radius: 12px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  color: var(--atlas-text);
}
body.atlasetf-woo table.shop_table th,
body.atlasetf-woo table.cart th {
  background: #141414;
  color: var(--atlas-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  padding: 14px 16px;
  text-align: left;
}
body.atlasetf-woo table.shop_table td,
body.atlasetf-woo table.cart td {
  padding: 14px 16px;
  border-top: 1px solid var(--atlas-border);
  color: var(--atlas-text);
}
body.atlasetf-woo table.shop_table tfoot td,
body.atlasetf-woo table.shop_table tfoot th {
  background: #141414;
}
body.atlasetf-woo table a { color: var(--atlas-orange); }

/* Blocs commande / panier / totaux */
body.atlasetf-woo .cart_totals,
body.atlasetf-woo .cart-collaterals,
body.atlasetf-woo #order_review,
body.atlasetf-woo .woocommerce-checkout-review-order,
body.atlasetf-woo .woocommerce-order-details,
body.atlasetf-woo .woocommerce-customer-details,
body.atlasetf-woo .woocommerce-additional-fields,
body.atlasetf-woo .woocommerce-billing-fields,
body.atlasetf-woo .woocommerce-shipping-fields {
  background: var(--atlas-card);
  border: 1px solid var(--atlas-border);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 20px;
}

/* Champs de formulaire (commande, compte) */
body.atlasetf-woo .input-text,
body.atlasetf-woo input[type="text"],
body.atlasetf-woo input[type="email"],
body.atlasetf-woo input[type="tel"],
body.atlasetf-woo input[type="password"],
body.atlasetf-woo input[type="number"],
body.atlasetf-woo textarea,
body.atlasetf-woo select,
body.atlasetf-woo .select2-container .select2-selection {
  width: 100%;
  background: #141414 !important;
  color: var(--atlas-text) !important;
  border: 1px solid var(--atlas-border-hi) !important;
  border-radius: 8px;
  padding: 12px 14px;
  font-family: 'Inter', sans-serif;
  box-shadow: none;
}
body.atlasetf-woo .input-text:focus,
body.atlasetf-woo input:focus,
body.atlasetf-woo textarea:focus,
body.atlasetf-woo select:focus {
  outline: none;
  border-color: var(--atlas-red) !important;
}
body.atlasetf-woo label,
body.atlasetf-woo .woocommerce-input-wrapper { color: var(--atlas-muted); }
body.atlasetf-woo ::placeholder { color: rgba(255,255,255,0.35); }

/* Select2 (pays, etc.) */
body.atlasetf-woo .select2-dropdown,
body.atlasetf-woo .select2-results__option {
  background: #141414;
  color: var(--atlas-text);
}
body.atlasetf-woo .select2-results__option--highlighted {
  background: var(--atlas-red) !important;
  color: #fff;
}

/* Boutons génériques (panier, commande, compte) */
body.atlasetf-woo .woocommerce a.button,
body.atlasetf-woo button.button,
body.atlasetf-woo input.button,
body.atlasetf-woo #place_order,
body.atlasetf-woo .wc-proceed-to-checkout .checkout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--atlas-grad);
  color: #000 !important;
  border: 0;
  border-radius: 8px;
  padding: 14px 24px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: box-shadow .25s ease, transform .2s ease;
}
body.atlasetf-woo .woocommerce a.button:hover,
body.atlasetf-woo button.button:hover,
body.atlasetf-woo #place_order:hover,
body.atlasetf-woo .wc-proceed-to-checkout .checkout-button:hover {
  box-shadow: 0 0 32px rgba(229,26,34,0.30);
  transform: translateY(-1px);
  color: #000 !important;
}
/* Boutons secondaires (ex: "Mettre à jour le panier") */
body.atlasetf-woo button[name="update_cart"],
body.atlasetf-woo .woocommerce a.button.wc-backward {
  background: transparent;
  color: var(--atlas-text) !important;
  border: 1px solid var(--atlas-border-hi);
}
body.atlasetf-woo button[name="update_cart"]:hover,
body.atlasetf-woo .woocommerce a.button.wc-backward:hover {
  border-color: var(--atlas-red);
  box-shadow: none;
  color: var(--atlas-text) !important;
}

/* Coupon */
body.atlasetf-woo .coupon { display: flex; gap: 10px; flex-wrap: wrap; }
body.atlasetf-woo .coupon .input-text { width: auto; flex: 1 1 160px; }

/* Liens & textes divers */
body.atlasetf-woo .woocommerce-Price-amount,
body.atlasetf-woo .order-total .amount { color: var(--atlas-text); font-weight: 600; }
body.atlasetf-woo p,
body.atlasetf-woo li,
body.atlasetf-woo dd,
body.atlasetf-woo dt { color: var(--atlas-text); }
body.atlasetf-woo a { color: var(--atlas-orange); }

/* Onglets de connexion / colonnes commande */
body.atlasetf-woo .woocommerce-form-login,
body.atlasetf-woo .woocommerce-form-coupon,
body.atlasetf-woo .woocommerce-form-register {
  background: var(--atlas-card);
  border: 1px solid var(--atlas-border);
  border-radius: 12px;
  padding: 22px 24px;
}

/* Encadré confirmation de commande */
body.atlasetf-woo .woocommerce-order {
  background: transparent;
}
body.atlasetf-woo ul.woocommerce-thankyou-order-details {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 0;
  list-style: none;
}
body.atlasetf-woo ul.woocommerce-thankyou-order-details li {
  background: var(--atlas-card);
  border: 1px solid var(--atlas-border);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: .8rem;
  text-transform: uppercase;
  color: var(--atlas-muted);
}
body.atlasetf-woo ul.woocommerce-thankyou-order-details li strong {
  display: block;
  color: var(--atlas-text);
  font-size: 1rem;
  margin-top: 4px;
}

/* Galerie produit (si image présente) — garde-fou sombre */
body.atlasetf-woo .woocommerce-product-gallery { background: transparent; }

/* Prose description produit */
body.atlasetf-woo .atlasetf-woo-prose p { margin: 0 0 1em; }
body.atlasetf-woo .atlasetf-woo-prose ul {
  margin: 0 0 1em;
  padding-left: 1.2em;
}
body.atlasetf-woo .atlasetf-woo-prose strong { color: var(--atlas-text); }
