@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@300;400;500;600;700&family=League+Spartan:wght@600;700;800&display=swap');

:root {
  --tls-flow-red: #9a0049;
  --tls-flow-red-light: #f5e6ef;
  --tls-flow-red-dark: #6e0034;
  --tls-flow-green: #16a34a;
  --tls-flow-g50: #f9fafb;
  --tls-flow-g100: #f3f4f6;
  --tls-flow-g200: #e5e7eb;
  --tls-flow-g300: #d1d5db;
  --tls-flow-g400: #9ca3af;
  --tls-flow-g500: #6b7280;
  --tls-flow-g700: #374151;
  --tls-flow-g900: #111827;
  --font-display: 'League Spartan', -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

body.woocommerce-cart,
body.woocommerce-checkout {
  background: var(--tls-flow-g50) !important;
  font-family: 'DM Sans', sans-serif;
}

body.woocommerce-cart .background-blobs,
body.woocommerce-checkout .background-blobs,
body.woocommerce-cart #masthead,
body.woocommerce-checkout #masthead {
  display: none !important;
}

body.woocommerce-cart .entry-header,
body.woocommerce-checkout .entry-header,
body.woocommerce-order-received .entry-header {
  display: none !important;
}

/* Bloc WooCommerce « Nouveau dans la boutique » (page panier par défaut) */
body.woocommerce-cart [data-block-name="woocommerce/product-new"],
body.woocommerce-cart .wp-block-product-new,
body.woocommerce-cart .wc-block-product-new,
body.woocommerce-checkout [data-block-name="woocommerce/product-new"],
body.woocommerce-checkout .wp-block-product-new,
body.woocommerce-checkout .wc-block-product-new {
  display: none !important;
}

body.woocommerce-cart h2.wp-block-heading.has-text-align-center:has(+ [data-block-name="woocommerce/product-new"]),
body.woocommerce-cart h2.wp-block-heading.has-text-align-center:has(+ .wp-block-product-new),
body.woocommerce-checkout h2.wp-block-heading.has-text-align-center:has(+ [data-block-name="woocommerce/product-new"]),
body.woocommerce-checkout h2.wp-block-heading.has-text-align-center:has(+ .wp-block-product-new) {
  display: none !important;
}

/* Works with classic templates and Woo blocks */
body.woocommerce-cart #main.site-main,
body.woocommerce-checkout #main.site-main {
  padding-top: 0 !important;
}

body.woocommerce-cart .wc-block-cart,
body.woocommerce-checkout .wc-block-checkout,
body.woocommerce-checkout .woocommerce-order {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 38px;
}

body.woocommerce-cart .wc-block-cart__main,
body.woocommerce-checkout .wc-block-components-main,
body.woocommerce-checkout .woocommerce-checkout,
body.woocommerce-checkout .woocommerce-order {
  background: #fff;
  border: 1px solid var(--tls-flow-g200);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.tls-flow-topnav {
  background: #fff;
  border-bottom: 1px solid var(--tls-flow-g200);
  min-height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tls-flow-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.tls-flow-logo-svg,
.tls-flow-logo .boutique-brand-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: min(300px, 58vw);
}

.tls-flow-logo-fallback {
  color: var(--tls-flow-g900);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
}

.tls-flow-back {
  border: 1px solid var(--tls-flow-g200);
  background: var(--tls-flow-g100);
  border-radius: 999px;
  color: var(--tls-flow-g700);
  font-size: 13px;
  text-decoration: none;
  padding: 7px 16px;
  font-weight: 500;
}

.tls-flow-stepbar {
  background: #fff;
  border-bottom: 1px solid var(--tls-flow-g200);
  min-height: 52px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.tls-flow-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--tls-flow-g400);
  font-weight: 600;
  white-space: nowrap;
}

.tls-flow-step-num {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tls-flow-g200);
  color: var(--tls-flow-g500);
  font-size: 11px;
  font-weight: 700;
}

.tls-flow-step.is-active { color: var(--tls-flow-red); }
.tls-flow-step.is-active .tls-flow-step-num { background: var(--tls-flow-red); color: #fff; }
.tls-flow-step.is-done { color: var(--tls-flow-green); }
.tls-flow-step.is-done .tls-flow-step-num { background: var(--tls-flow-green); color: #fff; }

.tls-flow-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 38px;
}

.tls-flow-heading h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--tls-flow-g900);
  margin: 0 0 4px;
}

.tls-flow-heading p {
  color: var(--tls-flow-g500);
  margin: 0 0 18px;
  font-size: 14px;
}

.tls-flow-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.tls-flow-grid--single,
body.tls-subscription-checkout-page .tls-flow-grid {
  grid-template-columns: 1fr;
}

body.tls-subscription-checkout-page .tls-flow-form,
body.tls-subscription-checkout-page .wc-block-components-main {
  max-width: 100%;
  width: 100%;
}

body.tls-subscription-checkout-page .wc-block-components-sidebar,
body.tls-subscription-checkout-page .wc-block-checkout__sidebar {
  display: none !important;
}

body.tls-subscription-checkout-page .tls-flow-stripe,
body.tls-subscription-checkout-page tr.tls-ds-recurring-total {
  display: none !important;
}

.tls-flow-card {
  background: #fff;
  border: 1px solid var(--tls-flow-g200);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.tls-flow-card-title {
  font-size: 16px;
  font-weight: 700;
  border-bottom: 1px solid var(--tls-flow-g100);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.tls-flow-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--tls-flow-g100);
}
.tls-flow-item:last-child { border-bottom: none; }

.tls-flow-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--tls-flow-g100);
  flex: none;
}

.tls-flow-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tls-flow-info { flex: 1; }
.tls-flow-name { font-size: 14px; font-weight: 700; color: var(--tls-flow-g900); }
.tls-flow-sub {
  font-size: 12px;
  color: var(--tls-flow-g500);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tls-flow-line-label {
  display: block;
  font-weight: 600;
  color: var(--tls-flow-g700);
}

.tls-flow-recurring {
  display: block;
  color: var(--tls-flow-g600);
}

.tls-flow-price { font-size: 15px; font-weight: 700; color: var(--tls-flow-red); }

.tls-flow-qty {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
}

.tls-flow-qty .quantity {
  margin: 0 !important;
}

.tls-flow-qty input.qty {
  width: 38px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--tls-flow-g300);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.tls-flow-qbtn {
  width: 22px;
  height: 22px;
  border: 1px solid var(--tls-flow-g300);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}

.tls-flow-qbtn:hover {
  background: var(--tls-flow-red);
  border-color: var(--tls-flow-red);
  color: #fff;
}

.tls-flow-summary {
  position: sticky;
  top: 110px;
}

.tls-flow-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--tls-flow-g500);
  padding: 4px 0;
}

.tls-flow-total-row.is-grand {
  border-top: 2px solid var(--tls-flow-g200);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 17px;
  font-weight: 800;
  color: var(--tls-flow-g900);
}

.tls-flow-total-row.is-grand strong { color: var(--tls-flow-red); }

.tls-flow-primary {
  width: 100%;
  border: none;
  border-radius: 8px;
  background: var(--tls-flow-red);
  color: #fff;
  padding: 14px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

.tls-flow-primary:hover { background: var(--tls-flow-red-dark); color: #fff; }

.tls-flow-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 12px;
  color: var(--tls-flow-g400);
}

.tls-flow-note {
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 12px;
  color: #92400e;
  margin-top: 12px;
}

.tls-flow-form .form-row label { font-size: 13px; font-weight: 600; color: var(--tls-flow-g700); }
.tls-flow-form .form-row input.input-text,
.tls-flow-form .form-row textarea,
.tls-flow-form .form-row select {
  border: 1px solid var(--tls-flow-g200);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 14px;
}

.tls-flow-form #payment {
  background: transparent;
  border: 0;
  border-radius: 12px;
  padding: 0;
}

.tls-flow-form #payment ul.payment_methods {
  border: none;
  margin: 0 0 8px;
  padding: 0;
}

.tls-flow-form #payment div.payment_box {
  background: var(--tls-flow-g50);
  border: 1px solid var(--tls-flow-g200);
  border-radius: 8px;
}

.tls-flow-form #payment #place_order {
  background: var(--tls-flow-red);
  border-radius: 8px;
  font-weight: 700;
}

.tls-flow-stripe {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--tls-flow-g50);
  border: 1px solid var(--tls-flow-g200);
  border-radius: 8px;
  padding: 10px 13px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--tls-flow-g500);
}

.tls-flow-success {
  max-width: 620px;
  margin: 24px auto;
  text-align: center;
}

.tls-flow-success-icon {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
}

.tls-flow-success h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 30px;
  margin-bottom: 10px;
}

@media (max-width: 760px) {
  .tls-flow-topnav { padding: 0 16px; }
  .tls-flow-stepbar { padding: 0 16px; }
  .tls-sub-flow-intro { width: calc(100% - 32px); }
  .tls-flow-grid { grid-template-columns: 1fr; }
  .tls-flow-summary { position: static; }
}

/* Sign-up fee : ligne doublon masquée dans les totaux Blocks */
.tls-ds-hidden-signup-fee,
.wc-block-components-totals-fees .tls-ds-hidden-signup-fee {
  display: none !important;
}

/* Abonnement avec sign-up fee : uniquement le montant du sign-up fee sur la ligne */
.wc-block-cart-items__row.tls-ds-signup-fee-only .wc-block-cart-item__prices,
.wc-block-components-order-summary-item.tls-ds-signup-fee-only .wc-block-components-product-price,
.wc-block-cart-items__row.tls-ds-signup-fee-only .wc-block-components-product-metadata,
.wc-block-components-order-summary-item.tls-ds-signup-fee-only .wc-block-components-product-metadata {
  display: none !important;
}

body.woocommerce-cart .wc-block-components-product-price,
body.woocommerce-checkout .wc-block-components-product-price {
  font-weight: 600;
}

body.woocommerce-cart .woocommerce-price-suffix,
body.woocommerce-checkout .woocommerce-price-suffix {
  font-size: 0.85em;
  font-weight: 400;
  color: var(--tls-flow-g500);
}

/* Tunnel abonnement */
body.tls-checkout-flow--subscription {
  --tls-flow-accent: var(--tls-flow-red, #9a0049);
}

body.tls-checkout-flow--subscription .wp-block-post-title,
body.tls-checkout-flow--subscription .entry-header {
  display: none;
}

body.tls-checkout-flow--subscription .entry-content {
  padding-top: 0;
  margin-top: 0;
}

body.tls-checkout-flow--subscription .entry-content > .woocommerce {
  padding-top: 0;
}

body.tls-checkout-flow--subscription .woocommerce.wp-block-group.alignwide {
  padding-top: 12px;
}

body.tls-checkout-flow--subscription .tls-flow-shell {
  padding-top: 0;
}

body.tls-checkout-flow--subscription .tls-flow-heading {
  margin-top: 0;
}

body.tls-checkout-flow--subscription .tls-flow-heading h1 {
  font-family: var(--font-display);
  font-weight: 700;
}

.tls-sub-flow-intro {
  box-sizing: border-box;
  width: calc(100% - 64px);
  max-width: 1080px;
  margin: 24px auto 12px;
  padding: 16px 24px;
  border-radius: 12px;
  background: #fff7fb;
  border: 1px solid #f3d6e6;
  color: var(--tls-flow-g700, #374151);
  font-size: 0.95rem;
}

.tls-sub-flow-intro p {
  margin: 0 0 8px;
}

.tls-sub-flow-intro p:last-child {
  margin-bottom: 0;
}

.tls-sub-flow-intro-login a {
  color: var(--tls-flow-accent);
  font-weight: 600;
}

.tls-flow-stepbar--subscription .tls-flow-step.is-active .tls-flow-step-num {
  background: var(--tls-flow-accent);
}

body.tls-checkout-flow--subscription .wc-block-components-totals-shipping,
body.tls-checkout-flow--subscription .wc-block-checkout__shipping-fields,
body.tls-checkout-flow--subscription .wc-block-components-shipping-address,
body.tls-checkout-flow--subscription .wc-block-components-shipping-rates-control,
body.tls-checkout-flow--subscription .wc-block-components-totals-shipping__via,
body.tls-checkout-flow--subscription .wc-block-components-address-form__address_2-toggle {
  display: none !important;
}

body.tls-checkout-flow--subscription .wc-block-checkout__actions .wc-block-components-checkout-return-to-cart-button {
  display: none !important;
}

body.tls-checkout-flow--subscription .woocommerce-form-login-toggle,
body.tls-checkout-flow--subscription .woocommerce-form-coupon-toggle,
body.tls-checkout-flow--subscription .checkout_coupon {
  display: none !important;
}

body.tls-checkout-flow--subscription #wc-stripe-express-checkout-element,
body.tls-checkout-flow--subscription #wc-stripe-express-checkout-button-separator {
  display: none !important;
}

body.tls-checkout-flow--subscription tr.recurring-total:not(.tls-ds-recurring-total) {
  display: none !important;
}

.tls-ds-recurring-total .tls-ds-recurring-price {
  font-weight: 700;
}
