/* Same self-hosted Archivo family as assets/editor/studio-proches.css — kept in sync so the WooCommerce pages never fall back to Fira Sans. */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo/Archivo-Variable.woff2") format("woff2-variations"),
       url("../fonts/archivo/Archivo-Variable.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
/* Idem pour la display de la variante Chaleureuse — voir la note dans
   studio-proches.css : si le woff2 n'est pas déposé, le repli est Archivo. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage/BricolageGrotesque-Variable.woff2") format("woff2-variations"),
       url("../fonts/bricolage/BricolageGrotesque-Variable.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* Tokens du tunnel de vente — mêmes valeurs que le :root de Tunnel de vente.dc.html.
   Ce fichier est chargé seul sur les pages WooCommerce (studio-proches.css n'y est
   pas enqueue), il doit donc redéclarer la palette au lieu d'en hériter. */
body.woocommerce-page {
  --color-bg: #fbf6ee;
  --color-text: #2a2320;
  --color-divider: #e4d9c7;
  --color-neutral-100: #f6efe3;
  --color-neutral-200: #ede3d3;
  --color-neutral-300: #dfd2be;
  --color-neutral-400: #c4b49c;
  --color-neutral-500: #9c8b74;
  --color-neutral-600: #7a6b57;
  --color-neutral-700: #5c4f3f;
  --color-neutral-800: #40362a;
  /* Même rebrand violet que studio-proches.css (#5B3FD0, logo Fabluneo) ;
     --color-danger reste rouge pour les erreurs, voir la note de
     studio-proches.css. Les valeurs sont reprises en dur dans
     CheckoutExperience::stripe_appearance() : l'iframe de Stripe ne lit pas
     les variables CSS de la page. */
  --color-accent: #5b3fd0;
  --color-accent-100: #e8e3fb;
  --color-accent-600: #4c34ad;
  --color-accent-700: #3c298a;
  --color-danger: #b33714;
  --color-danger-soft: #fde7dc;
  /* Aucun arrondi sur le site : même règle que studio-proches.css. */
  --radius-md: 0;
  --font-heading: "Bricolage Grotesque", "Archivo", system-ui, sans-serif;
  --sp-ink: var(--color-text);
  --sp-red: var(--color-accent);
  --sp-red-dark: var(--color-accent-600);
  --sp-page: var(--color-bg);
  --sp-shadow: 0 1px 2px rgba(42, 35, 32, .06), 0 8px 24px rgba(42, 35, 32, .07);
  --sp-header-h: 60px;
  margin: 0;
  background: var(--sp-page);
  color: var(--sp-ink);
  font-family: "Archivo", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
body.woocommerce-page * { box-sizing: border-box; }

/* Le tunnel remplace l'en-tête et le pied du thème par le sien : un seul
   objectif par écran, pas de navigation qui fasse sortir du paiement. Le compte
   client a son propre en-tête, sans étapes (section COMPTE CLIENT). */
body.sp-tunnel-page .wp-site-blocks > header,
body.sp-tunnel-page .wp-site-blocks > footer { display: none; }
/* Angles droits partout, y compris dans les composants de WooCommerce
   (bandeaux, listes, badge de quantité, cases) — sauf les boutons radio, ronds
   par nature. Les champs de carte de Stripe suivent via stripe_appearance(). */
body.sp-tunnel-page [class*="wc-block-"]:not(input[type="radio"]),
body.sp-tunnel-page [class*="wc-block-"] *:not(input[type="radio"]) { border-radius: 0 !important; }

/* ============ EN-TÊTE DU TUNNEL ============ */
.sp-checkout-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-divider);
  background: var(--sp-page);
}
body.admin-bar .sp-checkout-header { top: 32px; }
.sp-checkout-header__bar {
  display: grid;
  max-width: 1240px;
  min-height: var(--sp-header-h);
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 0 auto;
  padding: 10px 20px;
}
.sp-checkout-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--color-neutral-300);
  border-radius: var(--radius-md);
  padding: 7px 12px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.sp-checkout-back:hover { border-color: var(--color-divider); }
/* Confirmation : plus de retour possible, mais la colonne reste réservée pour
   que la barre d'étapes garde sa place. */
.sp-checkout-back--none { visibility: hidden; width: 0; padding: 0; border: 0; }
/* Même wordmark Fablunéo que l'en-tête du site (.sp-header__wordmark). */
.sp-checkout-brand { display: inline-flex; align-items: center; text-decoration: none; }
.sp-checkout-brand img { display: block; width: 112px; height: auto; }
/* Stepper aligné sur celui du tunnel de création (.sp-ob-step* dans
   studio-proches.css, non chargé ici) : pastilles carrées à bordure 2px,
   étape courante en accent, étapes passées pleines à l'encre, filets de 2px
   entre elles. Les deux tunnels s'enchaînent — un style différent donnait
   l'impression de changer de site au passage au panier. */
.sp-steps { display: flex; width: min(620px, 100%); align-items: center; justify-self: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
/* `white-space: nowrap` sur le libellé : sans lui « Livraison et paiement »
   passe sur deux lignes et fait grandir la barre au-delà des 60px. */
.sp-steps li { display: flex; flex: 1 1 auto; align-items: center; gap: 8px; min-width: 0; color: var(--color-neutral-500); font-size: 13px; font-weight: 700; white-space: nowrap; }
.sp-steps li:last-child { flex: 0 0 auto; }
.sp-steps li strong { font-weight: inherit; }
.sp-steps li:not(:last-child)::after { height: 2px; min-width: 12px; flex: 1 1 auto; background: var(--color-neutral-300); content: ""; }
.sp-steps li span { display: grid; width: 24px; height: 24px; flex: none; place-items: center; border: 2px solid var(--color-neutral-400); border-radius: 0; background: var(--sp-page); color: var(--color-neutral-500); font-size: 11px; font-weight: 800; }
.sp-steps li.is-active,
.sp-steps li.is-complete { color: var(--color-text); }
.sp-steps li.is-active span { border-color: var(--color-accent); background: var(--color-accent); color: #fff; }
.sp-steps li.is-complete span { border-color: var(--color-text); background: var(--color-text); color: #fff; }
.sp-steps li.is-complete::after { background: var(--color-text); }
.sp-checkout-header__meta { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.sp-checkout-secure { display: inline-flex; align-items: center; gap: 6px; color: var(--color-neutral-700); font-size: 12px; font-weight: 700; white-space: nowrap; }
.sp-checkout-help { color: var(--color-neutral-700); font-size: 12px; font-weight: 700; }
.sp-checkout-header__mobile { display: none; }

/* ============ STRUCTURE ============ */
/* Seul <main> porte la largeur : le thème y ajoute ses marges globales
   (.has-global-padding) et le contenu de page se recontraint, ce qui empilait
   trois retraits et laissait moins de 280px utiles sur un téléphone. */
body.sp-tunnel-page main {
  width: min(1100px, calc(100% - 40px));
  max-width: none !important;
  margin: 0 auto !important;
  padding: 44px 0 60px !important;
}
body.sp-tunnel-page main .wp-block-post-content,
body.sp-tunnel-page main .entry-content,
body.sp-tunnel-page main .wp-block-group { width: 100%; max-width: none !important; margin-right: 0 !important; margin-left: 0 !important; padding-right: 0 !important; padding-left: 0 !important; }
body.sp-tunnel-page main .wp-block-post-content > * { max-width: none; }
body.woocommerce-page h1 { margin: 0 0 20px; font-family: var(--font-heading); font-size: clamp(24px, 3vw, 34px); font-weight: 900; letter-spacing: -.03em; line-height: 1.1; }
body.woocommerce-page h2,
body.woocommerce-page h3 { font-family: var(--font-heading); font-weight: 800; letter-spacing: -.02em; }
.sp-tunnel a { color: var(--color-accent-700); }

/* ============ COMPOSANTS ============ */
.sp-card { border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: #fff; padding: 18px 20px; }
.sp-card--raised { box-shadow: var(--sp-shadow); }
.sp-card--accent { border-color: var(--color-accent-700); background: var(--color-accent-100); }
.sp-card--alert { border-color: var(--color-danger); background: var(--color-danger-soft); }
.sp-card__title { margin: 0 0 4px; font-size: 15px; }
.sp-card__lede { margin: 0 0 16px; color: var(--color-neutral-600); font-size: 12.5px; }
.sp-card p { margin: 0 0 8px; font-size: 13px; }
.sp-card p:last-child { margin-bottom: 0; }
.sp-tag { display: inline-block; width: fit-content; margin-bottom: 8px; border: 2px solid var(--color-accent-700); border-radius: 0; background: var(--color-accent-100); padding: 2px 10px; color: var(--color-accent-700); font-size: 11.5px; font-weight: 800; }
.sp-eyebrow { display: block; margin-bottom: 6px; color: var(--color-neutral-600); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.sp-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.sp-fineprint { margin: 10px 0 0; color: var(--color-neutral-600); font-size: 11.5px; text-align: center; }
.sp-fineprint--alert { color: var(--color-danger); font-weight: 700; }

/* Mêmes valeurs que .sp-btn de studio-proches.css (non chargé ici). */
.sp-tunnel .sp-btn,
.sp-dialog .sp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid transparent; border-radius: var(--radius-md); background: var(--color-neutral-200); padding: 11px 18px; color: var(--color-text); font: inherit; font-size: 14px; font-weight: 800; line-height: 1.2; text-decoration: none; cursor: pointer; }
.sp-tunnel .sp-btn:hover,
.sp-dialog .sp-btn:hover { background: var(--color-neutral-300); text-decoration: none; }
.sp-tunnel .sp-btn--primary,
.sp-dialog .sp-btn--primary { border-color: var(--color-accent); background: var(--color-accent); color: #fff; }
.sp-tunnel .sp-btn--primary:hover,
.sp-dialog .sp-btn--primary:hover { border-color: var(--color-accent-600); background: var(--color-accent-600); color: #fff; }
.sp-tunnel .sp-btn--ghost { font-weight: 700; }
.sp-tunnel .sp-btn--small { padding: 7px 11px; font-size: 12.5px; }
.sp-tunnel .sp-btn--block { width: 100%; }
.sp-tunnel .sp-btn--danger { color: var(--color-danger); }
.sp-tunnel .sp-btn.is-disabled,
.sp-tunnel .sp-btn:disabled { border-color: transparent; background: var(--color-neutral-100); color: var(--color-neutral-500); cursor: not-allowed; }
.sp-tunnel .sp-btn[aria-busy="true"] { opacity: .6; pointer-events: none; }
.sp-tunnel :focus-visible,
.sp-dialog :focus-visible,
.sp-checkout-header :focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* ============ ÉTAPE 1 : RÉCAPITULATIF ============ */
.sp-review .sp-lede { max-width: 62ch; margin: -14px 0 24px; color: var(--color-neutral-700); font-size: 14.5px; }
.sp-review-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 24px; }
.sp-review-items { display: grid; gap: 16px; min-width: 0; }
.sp-line { padding: 20px; }
.sp-line__body { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; }
.sp-line__visual img,
.sp-line__placeholder { display: block; width: 100%; border: 1px solid var(--color-divider); border-radius: 0; background: var(--color-neutral-200); }
.sp-line__visual img { height: auto; }
.sp-line__placeholder { display: grid; aspect-ratio: 1; place-items: center; color: var(--color-accent-700); }
.sp-line__name { margin: 0 0 10px; font-size: 17px !important; letter-spacing: -.01em; }
.sp-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin: 0 0 14px; color: var(--color-neutral-700); font-size: 13px; }
.sp-specs div { display: flex; gap: 4px; min-width: 0; }
.sp-specs dt { color: var(--color-text); font-weight: 700; white-space: nowrap; }
.sp-specs dt::after { content: " ·"; }
/* Une adresse email (destinataire d'une carte cadeau) n'a aucun point de coupure : sans cela elle débordait sur la colonne voisine. */
.sp-specs dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.sp-line__figures { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 18px 24px; }
.sp-qty { display: inline-grid; min-width: 38px; height: 32px; place-items: center; border: 1px solid var(--color-divider); border-radius: 0; padding: 0 10px; font-size: 13px; font-weight: 700; }
.sp-price { display: block; color: var(--color-neutral-700); font-size: 13px; line-height: 32px; }
.sp-price b { color: var(--color-text); font-size: 15px; }
.sp-line__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; border-top: 2px solid var(--color-neutral-200); padding-top: 14px; }

.sp-status { display: flex; align-items: flex-start; gap: 10px; border-color: var(--color-neutral-200); background: var(--color-bg); padding: 16px 18px; }
.sp-status svg { flex: none; margin-top: 1px; }
.sp-status__text { display: grid; flex: 1 1 auto; gap: 2px; min-width: 0; font-size: 13px; }
.sp-status__text strong { font-size: 13.5px; font-weight: 800; }
.sp-status__text span { color: var(--color-neutral-700); }
.sp-status--ok svg { color: #12786f; }
.sp-status--warning,
.sp-status--erreur { border-color: var(--color-danger); background: var(--color-danger-soft); }
.sp-status--warning svg,
.sp-status--erreur svg { color: var(--color-danger); }
.sp-status .sp-btn { flex: none; white-space: nowrap; }

.sp-summary { position: sticky; top: calc(var(--sp-header-h) + 16px); }
.sp-summary .sp-card { padding: 20px; }
.sp-totals { display: grid; gap: 10px; margin: 0 0 12px; font-size: 13.5px; }
.sp-totals div { display: flex; justify-content: space-between; gap: 12px; }
.sp-totals dt { color: var(--color-neutral-700); }
.sp-totals dd { margin: 0; font-weight: 700; text-align: right; }
.sp-totals__discount dt,
.sp-totals__discount dd { color: var(--color-accent-700); }
.sp-totals__muted { color: var(--color-neutral-600); font-style: italic; font-weight: 400 !important; }
.sp-totals__note dt { color: var(--color-neutral-600); font-size: 11px; }
.sp-totals__grand { align-items: baseline; margin-top: 4px; border-top: 1px solid var(--color-divider); padding-top: 14px; }
.sp-totals__grand dt { color: var(--color-text); font-size: 14px; font-weight: 800; }
.sp-totals__grand dd { font-family: var(--font-heading); font-size: 22px; font-weight: 900; }
.sp-coupon { margin: 0 0 12px; font-size: 12.5px; }
.sp-coupon summary { width: fit-content; color: var(--color-accent-700); font-weight: 700; cursor: pointer; }
.sp-coupon__form { display: flex; gap: 8px; margin-top: 8px; }
.sp-coupon__form input { flex: 1 1 auto; min-width: 0; min-height: 38px !important; padding: 7px 10px; font-size: 12.5px; }
.sp-coupon__message { margin: 6px 0 0; color: var(--color-neutral-600); font-size: 12px; }
.sp-coupon__message.is-error { color: var(--color-danger); }
.sp-coupon__applied { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; border: 2px solid var(--color-accent-700); border-radius: var(--radius-md); background: var(--color-accent-100); padding: 6px 10px; font-weight: 700; }
.sp-coupon__applied button { border: 0; background: none; padding: 0 4px; font-size: 16px; font-weight: 800; cursor: pointer; }

.sp-review-empty { max-width: 420px; margin: 40px auto; text-align: center; }
.sp-review-empty svg { margin: 0 auto 18px; color: var(--color-neutral-400); }
.sp-review-empty h1 { margin-bottom: 8px; font-size: 24px; }
.sp-review-empty p { margin: 0 0 24px; color: var(--color-neutral-700); font-size: 14px; }

.sp-dialog-backdrop { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; background: rgba(42, 35, 32, .45); padding: 16px; }
.sp-dialog-backdrop[hidden] { display: none; }
.sp-dialog { width: min(440px, 100%); border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: var(--color-bg); box-shadow: var(--sp-shadow); padding: 22px; }
.sp-dialog__title { margin: 0 0 8px; font-size: 18px !important; }
.sp-dialog__body { margin: 0 0 18px; color: var(--color-neutral-700); font-size: 14px; }
.sp-dialog__error { margin: -8px 0 14px; color: var(--color-danger); font-size: 13px; font-weight: 700; }
.sp-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

/* ============ ÉTAPE 2 : BLOC CHECKOUT DE WOOCOMMERCE ============ */
body.sp-tunnel-page .wc-block-checkout { padding-top: 0; }
.wc-block-components-sidebar-layout.wc-block-checkout { display: grid !important; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 28px !important; margin: 0 !important; }
.wc-block-checkout .wc-block-components-main,
.wc-block-checkout .wc-block-components-sidebar { width: auto !important; min-width: 0; margin: 0 !important; padding: 0 !important; }
.wc-block-checkout .wc-block-components-sidebar { position: sticky; top: calc(var(--sp-header-h) + 16px); }
.wc-block-checkout__form { display: grid; gap: 16px; }
/* Les conteneurs d'étapes inactives (retrait en magasin, livraison sans
   méthode) restent dans le DOM, vides : sans cela chacun ajoutait un écart. */
.wc-block-checkout__form > :empty { display: none; }
.wc-block-checkout .wc-block-components-checkout-step,
.wc-block-components-express-payment,
.wc-block-checkout__terms { margin: 0 !important; border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: #fff; padding: 18px 20px !important; }
.wc-block-checkout .wc-block-components-checkout-step__container { margin: 0; padding: 0 !important; }
.wc-block-checkout .wc-block-components-checkout-step::after,
.wc-block-checkout .wc-block-components-checkout-step__container::after { display: none !important; }
.wc-block-components-checkout-step__heading { margin: 0 0 12px !important; }
.wc-block-components-checkout-step__title { font-family: var(--font-heading) !important; font-size: 15px !important; font-weight: 800 !important; letter-spacing: -.01em; }
.wc-block-components-checkout-step__description { margin: -6px 0 14px !important; color: var(--color-neutral-600); font-size: 12.5px !important; }
.wc-block-checkout__terms { font-size: 12.5px; }
.wc-block-checkout__actions { margin: 0 !important; padding: 0 !important; }
.wc-block-checkout__actions_row { display: block !important; }
.wc-block-components-checkout-place-order-button { width: 100%; }
.wc-block-components-express-payment__title-container { margin-bottom: 10px; }
.wc-block-components-express-payment-continue-rule { margin: 0 !important; color: var(--color-neutral-600); font-size: 12.5px; }

/* Options de livraison et moyens de paiement : cartes sélectionnables, bordure
   et fond accent sur l'option cochée, comme la maquette. */
.wc-block-components-radio-control__option,
.wc-block-components-radio-control-accordion-option { margin: 0 0 8px !important; border: 2px solid var(--color-neutral-200) !important; border-radius: var(--radius-md) !important; background: var(--color-bg); box-shadow: none !important; }
.wc-block-components-radio-control--highlight-checked::after,
.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control__option-checked::after,
.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option--checked-option-highlighted::after { display: none !important; }
.wc-block-components-radio-control__option-checked,
.wc-block-components-radio-control-accordion-option--checked-option-highlighted { border-color: var(--color-accent-700) !important; background: var(--color-accent-100); }
.wc-block-components-radio-control__option { padding-top: 12px !important; padding-bottom: 12px !important; }
.wc-block-components-radio-control__label { font-size: 13.5px; font-weight: 700; }
.wc-block-components-radio-control__secondary-label { font-size: 13.5px; font-weight: 800; }
.wc-block-components-radio-control__description,
.wc-block-components-radio-control__secondary-description { color: var(--color-neutral-600); font-size: 12px; }
.wc-block-components-radio-control__input { accent-color: var(--color-accent); }
.wc-block-components-radio-control-accordion-content { padding: 4px 16px 16px !important; }
/* Un moyen de paiement enveloppe un <label> qui porte la même classe qu'une
   option de livraison : la carte est l'enveloppe, pas le label. */
.wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option { margin: 0 !important; border: 0 !important; background: transparent !important; }
/* Note de commande : absente de la maquette, gardée pour les instructions de
   livraison mais sans poids visuel de carte. */
.wc-block-checkout .wc-block-checkout__order-notes.wc-block-components-checkout-step { border: 0; background: transparent; padding: 0 4px !important; }

/* Récapitulatif latéral. */
.wp-block-woocommerce-checkout-order-summary-block { border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: #fff; box-shadow: var(--sp-shadow); padding: 20px !important; }
.wc-block-components-checkout-order-summary__title { margin: 0 0 12px !important; }
.wc-block-components-checkout-order-summary__title-text { font-family: var(--font-heading); font-size: 15px !important; font-weight: 800 !important; }
.wc-block-components-order-summary-item__image img { border: 1px solid var(--color-divider); border-radius: 0; background: var(--color-neutral-200); }
.wc-block-components-order-summary-item__quantity { border-color: var(--color-text) !important; background: var(--color-text) !important; color: #fff !important; box-shadow: none !important; }
.wc-block-components-product-name { color: var(--color-text) !important; font-size: 13px !important; font-weight: 700 !important; text-decoration: none !important; }
/* La description courte du produit WooCommerce générique (« Livre illustré
   personnalisé, format… ») répète les options de la création et écrasait la
   colonne de 340px : seules les options réelles de la ligne restent. */
.wc-block-components-order-summary-item .wc-block-components-product-metadata__description { display: none; }
.wc-block-components-product-details { display: grid; gap: 1px; margin-top: 4px !important; color: var(--color-neutral-700); font-size: 11.5px !important; }
.wc-block-components-product-details > span { display: block; }
.wc-block-components-product-details > span > span[aria-hidden="true"] { display: none; }
.wc-block-components-product-details__name { color: var(--color-text); font-weight: 700; }
/* Ligne d'article : image | description | prix. Le badge « Économisez 0,50 € »,
   insécable, fixait la colonne du prix à 111 px et ne laissait qu'une centaine
   de pixels à la description (« personnalis-ée » coupé mot à mot). La remise
   est déjà lisible deux fois — prix barré et « Crédits de création déduits ». */
.wc-block-components-order-summary-item { display: grid !important; grid-template-columns: 48px minmax(0, 1fr) auto; column-gap: 16px; align-items: start; }
.wc-block-components-order-summary-item__description { min-width: 0; padding: 0 !important; }
.wc-block-components-order-summary-item__total-price { padding: 0 !important; white-space: nowrap; font-weight: 800; }
.wc-block-components-order-summary-item .wc-block-components-sale-badge { display: none !important; }
.wc-block-components-product-details > span { overflow-wrap: anywhere; }
.wc-block-components-totals-wrapper { border-color: var(--color-neutral-200) !important; }
.wc-block-components-totals-item__label { color: var(--color-neutral-700); font-weight: 600; }
.wc-block-components-totals-footer-item { border-top: 1px solid var(--color-divider) !important; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label { color: var(--color-text); font-size: 14px; font-weight: 800; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-family: var(--font-heading); font-size: 22px; font-weight: 900; }

/* Champs WooCommerce. Les champs de carte eux-mêmes sont dans l'iframe de
   Stripe : leur apparence est passée par CheckoutExperience::stripe_appearance(). */
body.woocommerce-page input:not([type="checkbox"]):not([type="radio"]),
body.woocommerce-page select,
body.woocommerce-page textarea,
.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input { min-height: 48px; border: 2px solid var(--color-neutral-300) !important; border-radius: var(--radius-md) !important; background: #fff !important; box-shadow: none !important; font-family: inherit !important; }
body.woocommerce-page input:focus,
body.woocommerce-page select:focus,
body.woocommerce-page textarea:focus { border-color: var(--color-accent) !important; outline: 2px solid var(--color-accent) !important; outline-offset: 1px; }
.wc-block-components-text-input.has-error input,
.wc-block-components-combobox.has-error input { border-color: var(--color-danger) !important; }
.wc-block-components-validation-error { color: var(--color-danger) !important; font-size: 12px !important; }
.wc-block-components-checkbox .wc-block-components-checkbox__input { accent-color: var(--color-accent); border-radius: 0 !important; }
.wc-block-components-checkbox__label { font-size: 13px; }

/* Boutons natifs de WooCommerce hors de nos composants. */
.wc-block-components-button:not(.is-link),
body.woocommerce-page .button {
  min-height: 48px;
  /* Aplat sable, sans contour d'encre (2026-11-05), comme les boutons
     secondaires du site. */
  border: 2px solid transparent !important;
  border-radius: var(--radius-md) !important;
  background: var(--color-neutral-200) !important;
  color: var(--color-text) !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-transform: none;
}
.wc-block-components-button.wc-block-components-checkout-place-order-button,
body.woocommerce-page #place_order {
  border-color: var(--color-accent) !important;
  background: var(--color-accent) !important;
  color: #fff !important;
}
.wc-block-components-button.wc-block-components-checkout-place-order-button:hover,
body.woocommerce-page #place_order:hover { border-color: var(--color-accent-600) !important; background: var(--color-accent-600) !important; }
.wc-block-components-checkout-place-order-button:disabled { opacity: .6; }

/* Erreurs de paiement ou de validation : cartes accent de la maquette
   (« Le paiement n'a pas pu être autorisé »). */
.wc-block-components-notice-banner,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error { margin: 0 0 16px !important; border: 1px solid var(--color-divider) !important; border-radius: var(--radius-md) !important; background: #fff !important; color: var(--color-text) !important; font-size: 13px; }
.wc-block-components-notice-banner.is-error,
.woocommerce-error { border-color: var(--color-danger) !important; background: var(--color-danger-soft) !important; color: var(--color-danger) !important; font-weight: 700; }
.wc-block-components-notice-banner > svg { fill: currentColor; }

/* ============ ÉTAPE 3 : CONFIRMATION ============ */
body.sp-tunnel-page.woocommerce-order-received main { width: min(720px, calc(100% - 40px)); }
.wc-block-order-confirmation-address-wrapper:not(:has(> .wp-block-column > *)) { display: none; }
.sp-confirmation { display: grid; gap: 16px; }
.sp-confirmation__head { margin-bottom: 8px; text-align: center; }
.sp-confirmation__head h1 { margin-bottom: 8px; font-size: clamp(22px, 3vw, 30px); }
.sp-confirmation__head p { max-width: 48ch; margin: 0 auto; color: var(--color-neutral-700); font-size: 14px; }
.sp-confirmation__icon { display: grid; width: 52px; height: 52px; margin: 0 auto 16px; place-items: center; border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: var(--color-bg); color: var(--color-text); }
.sp-confirmation__icon--alert { border-color: var(--color-danger); background: var(--color-danger-soft); color: var(--color-danger); }
.sp-order-facts dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 0; font-size: 13px; }
.sp-order-facts dt { color: var(--color-neutral-600); }
.sp-order-facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.sp-timeline ol { display: grid; margin: 0; padding: 0; list-style: none; }
.sp-timeline li { position: relative; display: flex; gap: 12px; padding-bottom: 18px; }
.sp-timeline li:last-child { padding-bottom: 0; }
.sp-timeline li:not(:last-child)::before { position: absolute; top: 24px; bottom: 0; left: 10px; width: 2px; background: var(--color-neutral-300); content: ""; }
.sp-timeline li.is-done:not(:last-child)::before { background: var(--color-text); }
.sp-timeline__dot { position: relative; display: grid; width: 22px; height: 22px; flex: none; place-items: center; border: 2px solid var(--color-neutral-300); border-radius: 0; background: var(--color-bg); }
.sp-timeline__label { color: var(--color-neutral-500); font-size: 13px; font-weight: 700; }
.sp-timeline__label small { display: block; margin-top: 2px; color: var(--color-danger); font-size: 12px; font-weight: 600; }
.sp-timeline li.is-done .sp-timeline__dot { border-color: var(--color-text); background: var(--color-text); color: #fff; }
.sp-timeline li.is-active .sp-timeline__dot { border-color: var(--color-accent); }
.sp-timeline li.is-done .sp-timeline__label,
.sp-timeline li.is-active .sp-timeline__label { color: var(--color-text); }
.sp-timeline li.is-warn .sp-timeline__dot { border-color: var(--color-danger); }
.sp-timeline li.is-warn .sp-timeline__label { color: var(--color-danger); }
.sp-order-items { display: grid; gap: 14px; }
.sp-order-item { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; }
.sp-order-item__visual img,
.sp-order-item__visual .sp-line__placeholder { display: block; width: 84px; height: auto; border: 1px solid var(--color-divider); border-radius: 0; background: var(--color-neutral-200); }
.sp-order-item__name { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 800; }
.sp-order-item__meta { display: block; color: var(--color-neutral-600); font-size: 12.5px; }
.sp-order-items__total { display: flex; align-items: baseline; justify-content: space-between; border-top: 2px solid var(--color-neutral-200); padding-top: 12px; font-size: 13px; font-weight: 700; }
.sp-order-items__total b { font-family: var(--font-heading); font-size: 17px; font-weight: 900; }
.sp-confirmation__actions { display: grid; gap: 10px; margin-top: 4px; }
.sp-confirmation__continue { margin-top: 4px; color: var(--color-neutral-600) !important; font-size: 12.5px; text-align: center; }
/* Bloc « informations complémentaires » laissé à WooCommerce : coordonnées
   bancaires d'un virement, etc. */
body.sp-tunnel-page.woocommerce-order-received .wp-block-woocommerce-order-confirmation-additional-information:not(:empty) { margin-top: 16px; border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: #fff; padding: 18px 20px; font-size: 13px; }
body.sp-tunnel-page.woocommerce-order-received .wp-block-woocommerce-order-confirmation-additional-information h2 { font-size: 15px; }

/* ============ COMPTE CLIENT (suivi de commande) ============
   Pages « Mon compte » de WooCommerce : même en-tête sobre que le tunnel, sans
   barre d'étapes, et le gabarit classique de WooCommerce habillé en cartes. */
body.sp-account-page .wp-site-blocks > header,
body.sp-account-page .wp-site-blocks > footer { display: none; }
.sp-account-header .sp-checkout-header__bar { grid-template-columns: auto minmax(0, 1fr); }
.sp-account-header__links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 20px; }
.sp-account-header__links a { color: var(--color-text); font-size: 13px; font-weight: 700; text-decoration: none; }
.sp-account-header__links a:hover { color: var(--color-accent-700); text-decoration: underline; }
body.sp-account-page main { width: min(1100px, calc(100% - 40px)); max-width: none !important; margin: 0 auto !important; padding: 44px 0 60px !important; }
body.sp-account-page main .wp-block-group,
body.sp-account-page main .wp-block-post-content { width: 100%; max-width: none !important; margin-right: 0 !important; margin-left: 0 !important; padding-right: 0 !important; padding-left: 0 !important; }
body.sp-account-page main .wp-block-post-content > * { max-width: none; }
body.sp-account-page .woocommerce { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 32px; }
body.sp-account-page .woocommerce::before,
body.sp-account-page .woocommerce::after { display: none; }
body.sp-account-page .woocommerce-MyAccount-navigation,
body.sp-account-page .woocommerce-MyAccount-content { float: none !important; width: auto !important; }
.woocommerce-MyAccount-navigation ul { margin: 0; border: 1px solid var(--color-divider); background: #fff; padding: 0; list-style: none; }
/* Le thème espace chaque entrée de liste : !important pour garder un menu compact. */
.woocommerce-MyAccount-navigation li { margin: 0 !important; border-bottom: 2px solid var(--color-neutral-200); padding: 0 !important; line-height: 1.3; }
.woocommerce-MyAccount-navigation li:last-child { border-bottom: 0; }
.woocommerce-MyAccount-navigation a { display: block; padding: 11px 14px; color: var(--color-text); font-size: 13.5px; font-weight: 700; text-decoration: none; }
.woocommerce-MyAccount-navigation a:hover { background: var(--color-neutral-100); }
.woocommerce-MyAccount-navigation li.is-active a { box-shadow: inset 4px 0 0 var(--color-accent); background: var(--color-accent-100); color: var(--color-accent-700); }
.woocommerce-MyAccount-content { display: grid; gap: 16px; min-width: 0; }
.woocommerce-MyAccount-content > p:first-of-type { margin: 0; color: var(--color-neutral-700); font-size: 14px; }
.woocommerce-MyAccount-content mark { background: none; color: var(--color-text); font-weight: 800; }
.woocommerce-MyAccount-content .sp-timeline { margin: 0; }
body.sp-account-page .woocommerce-order-details,
body.sp-account-page .woocommerce-customer-details,
body.sp-account-page .aics-order-production { margin: 0 !important; border: 1px solid var(--color-divider); background: #fff; padding: 18px 20px; }
body.sp-account-page .woocommerce-order-details__title,
body.sp-account-page .woocommerce-column__title,
body.sp-account-page .aics-order-production h2 { margin: 0 0 12px; font-family: var(--font-heading); font-size: 15px !important; font-weight: 800 !important; letter-spacing: -.01em; }
/* Le suivi de colis est rendu à l'intérieur de la carte de commande. */
body.sp-account-page .woocommerce-order-details .aics-order-production { margin-top: 12px !important; border: 0; border-top: 2px solid var(--color-neutral-200); padding: 12px 0 0; }
body.sp-account-page table.shop_table { width: 100%; margin: 0; border: 0 !important; border-collapse: collapse; font-size: 13.5px; }
body.sp-account-page table.shop_table th,
body.sp-account-page table.shop_table td { border: 0 !important; border-top: 2px solid var(--color-neutral-200) !important; padding: 10px 0 !important; text-align: left; vertical-align: top; }
body.sp-account-page table.shop_table thead th { border-top: 0 !important; color: var(--color-neutral-600); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
body.sp-account-page table.shop_table td:last-child,
body.sp-account-page table.shop_table th:last-child { text-align: right; }
body.sp-account-page table.shop_table tfoot tr:last-child th,
body.sp-account-page table.shop_table tfoot tr:last-child td { font-size: 14px; }
body.sp-account-page .woocommerce-table__product-name a { color: var(--color-text); font-weight: 800; text-decoration: none; }
/* Options de la création : WooCommerce enveloppe chaque valeur d'un <p>, dont
   la marge du thème étirait la liste sur toute la hauteur de la carte. */
.wc-item-meta { display: grid; gap: 2px; margin: 6px 0 0; padding: 0; list-style: none; color: var(--color-neutral-700); font-size: 12.5px; }
.wc-item-meta li { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.wc-item-meta p { display: inline; margin: 0; }
.wc-item-meta-label { color: var(--color-text); font-weight: 700; }
body.sp-account-page .woocommerce-customer-details address { margin: 0; border: 0 !important; padding: 0 !important; font-size: 13.5px; font-style: normal; line-height: 1.6; }
body.sp-account-page .woocommerce-customer-details--phone,
body.sp-account-page .woocommerce-customer-details--email { margin: 6px 0 0 !important; padding-left: 0 !important; }
body.sp-account-page .woocommerce-customer-details--phone::before,
body.sp-account-page .woocommerce-customer-details--email::before { display: none !important; }
body.sp-account-page .woocommerce-columns--addresses { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
body.sp-account-page .woocommerce-columns--addresses .woocommerce-column { float: none; width: auto; }
body.sp-account-page .order-again .button { border-color: var(--color-accent) !important; background: var(--color-accent) !important; color: #fff !important; }

/* ============ POINTS DE RUPTURE ============
   Contrat du site : desktop ≥ 1280px, tablette 760–1279px, mobile < 760px. */
@media (max-width: 1279px) {
  .sp-checkout-header__bar { gap: 12px; }
  .sp-checkout-back span,
  .sp-checkout-secure span { display: none; }
  .sp-steps li:not(.is-active) strong { display: none; }
  .sp-review-grid,
  .wc-block-components-sidebar-layout.wc-block-checkout { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 759px) {
  body.sp-tunnel-page { --sp-header-h: 0px; }
  .sp-checkout-header { position: sticky; }
  .sp-checkout-header__bar { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 0; padding: 12px 14px 0; }
  .sp-checkout-brand,
  .sp-steps { display: none; }
  .sp-checkout-back { width: 34px; height: 34px; justify-content: center; padding: 0; }
  .sp-checkout-header__mobile { display: grid; gap: 2px; padding: 0 14px 12px; }
  .sp-checkout-header__bar + .sp-checkout-header__mobile { margin-top: -34px; padding-left: 58px; }
  .sp-checkout-header[data-step="3"] .sp-checkout-header__mobile { padding-left: 14px; }
  .sp-checkout-header__mobile strong { font-family: var(--font-heading); font-size: 15px; font-weight: 900; }
  .sp-checkout-header__mobile span { color: var(--color-neutral-600); font-size: 11.5px; font-weight: 600; }
  .sp-progress { height: 4px; margin: 10px -44px 0 -44px; background: var(--color-neutral-200); }
  .sp-progress i { display: block; height: 100%; background: var(--color-accent); }

  body.sp-tunnel-page main,
  body.sp-tunnel-page.woocommerce-order-received main,
  body.sp-account-page main { width: calc(100% - 32px); padding-top: 20px !important; }
  body.sp-account-page .woocommerce { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .sp-account-header .sp-checkout-brand { display: inline-flex; }
  .sp-account-header .sp-checkout-header__bar { padding: 12px 14px; }
  .sp-price { line-height: 1.5; }
  .sp-review-grid,
  .wc-block-components-sidebar-layout.wc-block-checkout { grid-template-columns: minmax(0, 1fr); }
  .sp-summary,
  .wc-block-checkout .wc-block-components-sidebar { position: static; }
  /* Sur mobile, le récapitulatif passe avant le formulaire, replié par le bloc. */
  .wc-block-checkout .wc-block-components-sidebar { order: -1; }
  .sp-line { padding: 16px; }
  .sp-line__body { grid-template-columns: 1fr; gap: 14px; }
  .sp-line__visual { width: 96px; }
  .sp-specs { grid-template-columns: 1fr; }
  .sp-status { flex-wrap: wrap; }
  .sp-order-facts dl { grid-template-columns: 1fr; }
  .wc-block-checkout .wc-block-components-checkout-step,
  .wc-block-components-express-payment,
  .wc-block-checkout__terms { padding: 16px !important; }
}
