/* ==========================================================================
   QUÉBEC HD — pages/tunnel.css
   Tunnel de vente CartFlows (Store Checkout) : étapes « Paiement » et
   « Merci » (sections/tunnel-paiement.php, sections/tunnel-merci.php).
   Clé de registre « tunnel » (qhd_current_page_keys()), chargée aussi sur la
   page Commande remplacée par CartFlows. Une feuille pour le tunnel.

   Namespace : .qhd-tunnel-*  ; adaptation des formulaires CartFlows et
   WooCommerce au fond sombre, limitée à .qhd-tunnel (aucune règle globale).
   Couleurs : tokens --qhd-* ; accent #EC3655 (or #ffc800 pour le pack
   Premium) ; liens et focus cyan.
   ========================================================================== */

/* Gabarit CartFlows : conteneurs sans fond ni marge imposés. */
body.qhd-theme .cartflows-container,
body.qhd-theme .cartflows-primary {
  max-inline-size: none;
  margin: 0;
  padding: 0;
  background: none;
}

/* Couleur du tunnel selon le pack : rose pour l'Essentiel (accent du site),
   or pour le Premium (#ffc800, celui de .qhd-pricing.is-premium et du visuel
   « Pack Premium »). Classe body .qhd-tunnel-premium posée par
   qhd_tunnel_body_class() (inc/tunnel.php). Toutes les règles ci-dessous
   passent par --qhd-accent et ces deux variables. */
body.qhd-theme {
  --qhd-tunnel-accent-hover: #f24a67;
  --qhd-tunnel-accent-tint: rgb(236 54 85 / 7%);
}

body.qhd-theme.qhd-tunnel-premium {
  --qhd-accent: #ffc800;
  --qhd-tunnel-accent-hover: #ffc800; /* comme --plan-strong du Premium */
  --qhd-tunnel-accent-tint: rgb(255 200 0 / 7%);
}

/* Aperçu rapide des options produits de CartFlows Pro : fonction non utilisée
   (forfait choisi par le sélecteur du thème) ; sa fenêtre invisible, plus
   large qu'un mobile, créait un défilement horizontal. */
body.qhd-theme #wcf-quick-view-modal {
  display: none;
}

/* --- Barre de marque ------------------------------------------------------- */

.qhd-tunnel-brand {
  border-block-end: 1px solid var(--qhd-border);
  background-color: #05060a;
}

.qhd-tunnel-brand__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-block-size: 68px;
}

.qhd-tunnel-brand .qhd-tunnel-brand__home {
  display: inline-flex;
  align-items: center;
  color: var(--qhd-text);
  text-decoration: none;
}

.qhd-tunnel-brand__logo {
  display: block;
  inline-size: 132px;
  block-size: auto;
}

.qhd-tunnel-brand__secure {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--qhd-success);
}

/* --- Section --------------------------------------------------------------- */

.qhd-tunnel {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: clamp(1.75rem, 1.25rem + 2vw, 3rem) clamp(3rem, 2rem + 3vw, 5rem);
  /* Trame de points discrète, comme le fond des boîtes des packs. */
  background-image: radial-gradient(rgb(255 255 255 / 5%) 1px, transparent 1.6px);
  background-size: 22px 22px;
}

/* Décor demandé : bandes diagonales en coin, reprises des visuels
   « Pack Essentiel » (rose) et « Pack Premium » (or). Couleur = --qhd-accent,
   donc elle suit le pack choisi (body.qhd-tunnel-premium). Statique, sans
   animation ; derrière le contenu (isolation + z-index -1). */
.qhd-tunnel::before,
.qhd-tunnel::after {
  content: "";
  position: absolute;
  z-index: -1;
  inline-size: clamp(260px, 38vw, 560px);
  aspect-ratio: 1;
  pointer-events: none;
}

/* Coin haut droit : deux bandes, une pleine et une fine. */
.qhd-tunnel::before {
  inset-block-start: 0;
  inset-inline-end: 0;
  background-image: linear-gradient(
    225deg,
    transparent 0 22%,
    color-mix(in srgb, var(--qhd-accent) 55%, transparent) 22% 27%,
    transparent 27% 33%,
    color-mix(in srgb, var(--qhd-accent) 35%, transparent) 33% 34%,
    transparent 34%
  );
  -webkit-mask-image: linear-gradient(225deg, #000 30%, transparent 62%);
  mask-image: linear-gradient(225deg, #000 30%, transparent 62%);
}

/* Coin bas gauche : même motif, en miroir. */
.qhd-tunnel::after {
  inset-block-end: 0;
  inset-inline-start: 0;
  background-image: linear-gradient(
    45deg,
    transparent 0 14%,
    color-mix(in srgb, var(--qhd-accent) 45%, transparent) 14% 18%,
    transparent 18% 24%,
    color-mix(in srgb, var(--qhd-accent) 30%, transparent) 24% 25%,
    transparent 25%
  );
  -webkit-mask-image: linear-gradient(45deg, #000 20%, transparent 55%);
  mask-image: linear-gradient(45deg, #000 20%, transparent 55%);
}

/* Progression : trois étapes reliées, l'étape courante en accent. */
.qhd-tunnel-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 0 0 clamp(1.25rem, 1rem + 1vw, 2rem);
  padding: 0;
  list-style: none;
  counter-reset: qhd-tunnel-step;
}

.qhd-tunnel-progress li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--qhd-text-muted);
  counter-increment: qhd-tunnel-step;
}

.qhd-tunnel-progress li::before {
  content: counter(qhd-tunnel-step);
  display: grid;
  place-items: center;
  inline-size: 26px;
  block-size: 26px;
  border: 1px solid var(--qhd-control-border);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
}

.qhd-tunnel-progress li + li::after {
  order: -1;
  content: "";
  inline-size: 22px;
  block-size: 1px;
  background-color: var(--qhd-border);
}

.qhd-tunnel-progress li.is-done {
  color: var(--qhd-text-secondary);
}

.qhd-tunnel-progress li.is-done::before {
  content: "✓";
  border-color: var(--qhd-success);
  color: var(--qhd-success);
}

.qhd-tunnel-progress li.is-current {
  color: var(--qhd-text);
}

.qhd-tunnel-progress li.is-current::before {
  border-color: var(--qhd-accent);
  background-color: var(--qhd-accent);
  color: var(--qhd-bg);
}

.qhd-tunnel__head {
  display: grid;
  gap: 10px;
  margin-block-end: clamp(1.5rem, 1.2rem + 1vw, 2.25rem);
}

.qhd-tunnel__head--center {
  justify-items: center;
  text-align: center;
}

/* --- Grille : formulaire + réassurance ------------------------------------- */

.qhd-tunnel__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.qhd-tunnel__form {
  min-inline-size: 0;
}

.qhd-tunnel__aside {
  padding: 22px 24px;
  border: 1px solid var(--qhd-border);
  border-radius: 18px;
  background-color: var(--qhd-surface);
}

.qhd-tunnel__aside-title {
  margin: 0 0 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--qhd-accent);
}

.qhd-tunnel__perks {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.qhd-tunnel__perks li {
  position: relative;
  display: grid;
  gap: 2px;
  margin: 0;
  padding-inline-start: 30px;
}

.qhd-tunnel__perks li::before {
  content: "✓";
  position: absolute;
  inset-block-start: 1px;
  inset-inline-start: 0;
  display: grid;
  place-items: center;
  inline-size: 20px;
  block-size: 20px;
  border-radius: 50%;
  background-color: rgb(114 217 170 / 16%);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--qhd-success);
}

.qhd-tunnel__perks strong {
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--qhd-text);
}

.qhd-tunnel__perks span {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--qhd-text-secondary);
}

.qhd-tunnel__payments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0 0;
  padding: 16px 0 0;
  border-block-start: 1px solid var(--qhd-border);
  list-style: none;
}

.qhd-tunnel__payments li {
  margin: 0;
  padding: 2px 4px;
  border-radius: 5px;
  background-color: #ffffff;
}

.qhd-tunnel__payments img {
  display: block;
  inline-size: 46px;
  block-size: 19px;
  object-fit: contain;
}

.qhd-tunnel__help {
  margin: 16px 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--qhd-text-secondary);
}

/* --- Récapitulatif du forfait (qhd_tunnel_summary()) ---------------------- */

.qhd-tunnel-summary {
  padding: 22px 24px;
  border: 1px solid var(--qhd-border);
  border-radius: 18px;
  background-color: var(--qhd-surface);
}

/* Visuel : image du produit WooCommerce, sinon tuile de marque. */
.qhd-tunnel-summary__visual {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 26px 16px 22px;
  border: 1px solid var(--qhd-border);
  border-radius: 14px;
  background-color: #05060a;
  text-align: center;
}

.qhd-tunnel-summary__logo {
  display: block;
  inline-size: 150px;
  block-size: auto;
  margin-block-end: 6px;
}

.qhd-tunnel-summary__visual.has-image {
  padding: 14px 16px 18px;
}

.qhd-tunnel-summary__image {
  display: block;
  inline-size: 100%;
  max-inline-size: 260px;
  block-size: auto;
}

.qhd-tunnel-summary__formula {
  font-family: var(--qhd-font-title);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--qhd-text);
}

.qhd-tunnel-summary.is-premium .qhd-tunnel-summary__formula {
  color: var(--qhd-accent);
}

.qhd-tunnel-summary__details {
  font-size: 0.875rem;
  color: var(--qhd-text-secondary);
}

.qhd-tunnel-summary__title {
  margin: 20px 0 6px;
  font-family: var(--qhd-font-title);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--qhd-text);
}

.qhd-tunnel-summary__rows {
  margin: 0;
}

.qhd-tunnel-summary__rows > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-block: 11px;
  border-block-start: 1px solid var(--qhd-border);
}

.qhd-tunnel-summary__rows > div:first-child {
  border-block-start: 0;
}

.qhd-tunnel-summary__rows dt {
  font-size: 0.9375rem;
  color: var(--qhd-text-secondary);
}

.qhd-tunnel-summary__rows dd {
  margin: 0;
  font-weight: 600;
  white-space: nowrap;
  color: var(--qhd-text);
}

.qhd-tunnel-summary__item dt {
  font-weight: 600;
  color: var(--qhd-text);
}

.qhd-tunnel-summary__item dt span {
  display: block;
  margin-block-start: 2px;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--qhd-text-muted);
}

.qhd-tunnel-summary__total dt {
  font-weight: 700;
  color: var(--qhd-text);
}

.qhd-tunnel-summary__total dd {
  font-family: var(--qhd-font-title);
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--qhd-accent);
}

/* --- Sélecteur « Votre forfait » (qhd_tunnel_plan_picker()) -------------- */

/* clear : les coordonnées de CartFlows (#customer_details) sont flottantes. */
.qhd-tunnel-plan {
  clear: both;
  min-inline-size: 0;
  margin: 28px 0 0;
  padding: 0;
  border: 0;
}

.qhd-tunnel-plan__title {
  margin: 0 0 4px;
  padding: 0;
  font-family: var(--qhd-font-title);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--qhd-text);
}

.qhd-tunnel-plan__hint {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--qhd-text-muted);
}

.qhd-tunnel-plan__list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  transition: opacity 0.2s ease;
}

.qhd-tunnel-plan[aria-busy="true"] .qhd-tunnel-plan__list {
  opacity: 0.6;
}

.qhd-tunnel-plan__list li {
  margin: 0;
}

.qhd-tunnel-plan__option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "radio name price"
    "radio meta price";
  align-items: center;
  gap: 4px 14px;
  margin: 0;
  padding: 15px 18px;
  border: 1px solid var(--qhd-border);
  border-radius: 14px;
  background-color: var(--qhd-bg);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.qhd-tunnel-plan__option:hover {
  border-color: var(--qhd-control-border);
}

.qhd-tunnel-plan__option:has(input:checked) {
  border-color: var(--qhd-accent);
  background-color: var(--qhd-tunnel-accent-tint);
  box-shadow: inset 0 0 0 1px var(--qhd-accent);
}

.qhd-tunnel-plan__option input[type="radio"] {
  grid-area: radio;
  inline-size: 18px;
  block-size: 18px;
  margin: 0;
  accent-color: var(--qhd-accent);
  cursor: pointer;
}

.qhd-tunnel-plan__option input[type="radio"]:focus-visible {
  outline: 3px solid var(--qhd-cyan);
  outline-offset: 3px;
}

.qhd-tunnel-plan__name {
  grid-area: name;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--qhd-text);
}

.qhd-tunnel-plan__meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 0.8125rem;
  color: var(--qhd-text-secondary);
}

.qhd-tunnel-plan__chip {
  padding: 2px 10px;
  border-radius: var(--qhd-radius-pill);
  background-color: rgb(101 210 243 / 12%);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--qhd-cyan);
}

.qhd-tunnel-plan__option:has(input:checked) .qhd-tunnel-plan__chip {
  background-color: var(--qhd-accent);
  color: var(--qhd-bg);
}

.qhd-tunnel-plan__price {
  grid-area: price;
  font-family: var(--qhd-font-title);
  font-size: 1.125rem;
  font-weight: 800;
  white-space: nowrap;
  color: var(--qhd-text);
}

.qhd-tunnel-plan__option:has(input:checked) .qhd-tunnel-plan__price {
  color: var(--qhd-accent);
}

/* Repli sans JavaScript ; masqué quand tunnel.js met à jour à chaque choix. */
.qhd-tunnel-plan__submit {
  min-block-size: 44px;
  margin-block-start: 12px;
  padding: 10px 20px;
  border: 1px solid var(--qhd-control-border);
  border-radius: var(--qhd-radius-pill);
  background: none;
  font: inherit;
  font-weight: 700;
  color: var(--qhd-text);
  cursor: pointer;
}

.qhd-tunnel-plan.is-enhanced .qhd-tunnel-plan__submit {
  display: none;
}

.qhd-tunnel-plan__status {
  margin: 10px 0 0;
  font-size: 0.875rem;
  color: var(--qhd-success);
}

.qhd-tunnel-plan__status:empty {
  display: none;
}

/* --- Merci : coche, prochaines étapes, récapitulatif ----------------------- */

.qhd-tunnel__check {
  display: grid;
  place-items: center;
  inline-size: 64px;
  block-size: 64px;
  border-radius: 50%;
  background-color: rgb(114 217 170 / 14%);
  box-shadow: 0 0 0 6px rgb(114 217 170 / 8%);
  color: var(--qhd-success);
}

.qhd-tunnel-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 0 0 clamp(2rem, 1.5rem + 1.5vw, 3rem);
  padding: 0;
  list-style: none;
  counter-reset: qhd-tunnel-next;
}

.qhd-tunnel-next li {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--qhd-border);
  border-radius: 16px;
  background-color: var(--qhd-surface);
  counter-increment: qhd-tunnel-next;
}

.qhd-tunnel-next li::before {
  content: counter(qhd-tunnel-next);
  display: grid;
  place-items: center;
  inline-size: 32px;
  block-size: 32px;
  margin-block-end: 6px;
  border-radius: 50%;
  background-color: var(--qhd-accent);
  font-weight: 800;
  color: var(--qhd-bg);
}

.qhd-tunnel-next strong {
  font-family: var(--qhd-font-title);
  font-size: 1.0625rem;
  color: var(--qhd-text);
}

.qhd-tunnel-next span {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--qhd-text-secondary);
}

.qhd-tunnel__details {
  max-inline-size: 880px;
  margin-inline: auto;
}

/* ==========================================================================
   Formulaire CartFlows « one-column » sur fond sombre
   --------------------------------------------------------------------------
   Préfixe .qhd-tunnel #wcf-embed-checkout-form : passe devant les styles de
   CartFlows et de WooCommerce, sans rien toucher hors du tunnel.
   ========================================================================== */

/* Variables de CartFlows : ses propres feuilles reprennent ces couleurs
   (libellés flottants, champs, erreurs, paiement, liens, boutons). */
.qhd-tunnel #wcf-embed-checkout-form {
  --qhd-cf-field-bg: var(--qhd-bg);
  --wcf-primary-color: var(--qhd-accent);
  --wcf-heading-color: var(--qhd-text);
  --wcf-text-color: var(--qhd-text-secondary);
  --wcf-link-color: var(--qhd-cyan);
  --wcf-field-label-color: var(--qhd-text-secondary);
  --wcf-field-text-color: var(--qhd-text);
  --wcf-field-bg-color: var(--qhd-bg);
  --wcf-field-border-color: var(--qhd-control-border);
  --wcf-field-error-color: var(--qhd-error);
  --wcf-field-error-label-color: var(--qhd-error);
  --wcf-field-error-border-color: var(--qhd-error);
  --wcf-btn-text-color: var(--qhd-bg);
  --wcf-btn-hover-text-color: var(--qhd-bg);
  --wcf-btn-bg-color: var(--qhd-accent);
  --wcf-btn-bg-hover-color: var(--qhd-tunnel-accent-hover);
  --wcf-payment-section-bg-color: var(--qhd-surface-raised);
  --wcf-payment-section-desc-bg-color: var(--qhd-surface);
  --wcf-payment-section-desc-text-color: var(--qhd-text-secondary);
  --wcf-payment-section-label-color: var(--qhd-text);
  color: var(--qhd-text-secondary);
  font-family: var(--qhd-font-body);
}

/* Largeur : toute la colonne, pas la boîte étroite par défaut. */
.qhd-tunnel .qhd-tunnel__form #wcf-embed-checkout-form {
  max-inline-size: none;
  margin-inline: 0;
}

/* Boîte du formulaire (une seule étape) : coordonnées, forfait, paiement. */
.qhd-tunnel #wcf-embed-checkout-form > .woocommerce {
  padding: clamp(18px, 14px + 1.2vw, 30px);
  border: 1px solid var(--qhd-border);
  border-radius: 18px;
  background-color: var(--qhd-surface);
}

.qhd-tunnel #wcf-embed-checkout-form h3,
.qhd-tunnel #wcf-embed-checkout-form #order_review_heading {
  margin: 0 0 16px;
  font-family: var(--qhd-font-title);
  font-size: 1.125rem;
  color: var(--qhd-text);
}

/* Le forfait et les totaux sont dans le récapitulatif (.qhd-tunnel-summary) :
   le tableau de commande du formulaire ferait doublon. Il reste dans le
   document, car WooCommerce le met à jour à chaque changement. */
.qhd-tunnel #wcf-embed-checkout-form .woocommerce-checkout-review-order-table {
  display: none;
}

/* Champs vides de CartFlows (livraison, notes) : aucun espace réservé. */
.qhd-tunnel #wcf-embed-checkout-form .wcf-customer-shipping:empty {
  display: none;
}

.qhd-tunnel #wcf-embed-checkout-form .wcf-order-wrap {
  margin-block-start: 28px;
}

/* Champs : opaques et sombres (règle du projet), contour visible. */
.qhd-tunnel #wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
.qhd-tunnel #wcf-embed-checkout-form .woocommerce form .form-row textarea,
.qhd-tunnel #wcf-embed-checkout-form .woocommerce form .form-row select,
.qhd-tunnel #wcf-embed-checkout-form .select2-container--default .select2-selection--single {
  border: 1px solid var(--qhd-control-border);
  border-radius: 12px;
  background-color: var(--qhd-cf-field-bg);
  color: var(--qhd-text);
  box-shadow: none;
}

.qhd-tunnel #wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--qhd-text);
}

.qhd-tunnel #wcf-embed-checkout-form .woocommerce form .form-row input.input-text:focus,
.qhd-tunnel #wcf-embed-checkout-form .woocommerce form .form-row select:focus,
.qhd-tunnel #wcf-embed-checkout-form .woocommerce form .form-row textarea:focus {
  border-color: var(--qhd-cyan);
  outline: 3px solid rgb(101 210 243 / 35%);
  outline-offset: 1px;
}

/* Libellés (y compris les libellés flottants des listes déroulantes, gris
   foncé par défaut dans CartFlows). */
.qhd-tunnel #wcf-embed-checkout-form .woocommerce form .form-row label,
.qhd-tunnel #wcf-embed-checkout-form.wcf-field-modern-label .woocommerce form p.form-row.wcf-anim-label label,
.qhd-tunnel #wcf-embed-checkout-form.wcf-field-modern-label .woocommerce form p.form-row label.required_field {
  color: var(--qhd-text-secondary);
}

.qhd-tunnel #wcf-embed-checkout-form .woocommerce form .form-row .required {
  color: var(--qhd-error);
}

/* Champ obligatoire vide : CartFlows et WooCommerce affichent chacun leur
   message. On garde celui de CartFlows à l'écran ; celui de WooCommerce
   reste lié au champ (aria-describedby) et lu par les lecteurs d'écran. */
.qhd-tunnel #wcf-embed-checkout-form .form-row:has(.wcf-field-required-error:not(:empty)) .checkout-inline-error-message {
  display: none;
}

.qhd-tunnel #wcf-embed-checkout-form ::placeholder {
  color: var(--qhd-text-muted);
  opacity: 1;
}

/* Récapitulatif de commande. */
.qhd-tunnel #wcf-embed-checkout-form .woocommerce-checkout-review-order-table,
.qhd-tunnel #wcf-embed-checkout-form .woocommerce-checkout-review-order-table th,
.qhd-tunnel #wcf-embed-checkout-form .woocommerce-checkout-review-order-table td {
  border-color: var(--qhd-border);
  background: none;
  color: var(--qhd-text-secondary);
}

.qhd-tunnel #wcf-embed-checkout-form .woocommerce-checkout-review-order-table .order-total th,
.qhd-tunnel #wcf-embed-checkout-form .woocommerce-checkout-review-order-table .order-total td {
  color: var(--qhd-text);
  font-weight: 700;
}

.qhd-tunnel #wcf-embed-checkout-form del {
  color: var(--qhd-text-muted);
}

.qhd-tunnel #wcf-embed-checkout-form ins {
  background: none;
  color: var(--qhd-text);
  text-decoration: none;
}

/* Zone de paiement. */
.qhd-tunnel #wcf-embed-checkout-form #payment,
.qhd-tunnel #wcf-embed-checkout-form #payment ul.payment_methods,
.qhd-tunnel #wcf-embed-checkout-form #payment div.payment_box {
  border-color: var(--qhd-border);
  background-color: var(--qhd-surface-raised);
  color: var(--qhd-text-secondary);
}

.qhd-tunnel #wcf-embed-checkout-form #payment div.payment_box::before {
  border-block-end-color: var(--qhd-surface-raised);
}

.qhd-tunnel #wcf-embed-checkout-form .woocommerce-info,
.qhd-tunnel #wcf-embed-checkout-form .woocommerce-error,
.qhd-tunnel #wcf-embed-checkout-form .woocommerce-message {
  border-color: var(--qhd-border);
  background-color: var(--qhd-surface-raised);
  color: var(--qhd-text);
}

.qhd-tunnel #wcf-embed-checkout-form a:not(.button):not(.wcf-next-button) {
  color: var(--qhd-cyan);
}

/* Bouton « Payer » : accent, texte sombre. */
.qhd-tunnel #wcf-embed-checkout-form #place_order,
.qhd-tunnel #wcf-embed-checkout-form button.button {
  min-block-size: 52px;
  border: 0;
  border-radius: var(--qhd-radius-pill);
  background-color: var(--qhd-accent);
  color: var(--qhd-bg);
  font-family: var(--qhd-font-body);
  font-weight: 700;
  text-decoration: none;
}

/* Texte long (libellé + prix) : retour à la ligne sur mobile, sans débordement. */
.qhd-tunnel #wcf-embed-checkout-form #place_order {
  block-size: auto;
  max-inline-size: 100%;
  padding: 14px 20px;
  line-height: 1.35;
  white-space: normal;
}

.qhd-tunnel #wcf-embed-checkout-form #place_order:hover {
  background-color: var(--qhd-tunnel-accent-hover);
  color: var(--qhd-bg);
}

.qhd-tunnel #wcf-embed-checkout-form #place_order * {
  color: inherit;
}

/* Récapitulatif CartFlows de la page Merci. */
.qhd-tunnel__details .woocommerce-order,
.qhd-tunnel__details .woocommerce-order * {
  border-color: var(--qhd-border);
}

.qhd-tunnel__details .woocommerce-order {
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  border: 1px solid var(--qhd-border);
  border-radius: 18px;
  background-color: var(--qhd-surface);
  color: var(--qhd-text-secondary);
}

.qhd-tunnel__details h2,
.qhd-tunnel__details h3,
.qhd-tunnel__details .woocommerce-thankyou-order-received {
  color: var(--qhd-text);
}

/* CartFlows peint ces blocs en gris clair (#f1f1f1) : version sombre. */
.qhd-tunnel__details #wcf-thankyou-wrap .woocommerce-order ul.order_details,
.qhd-tunnel__details #wcf-thankyou-wrap .woocommerce-order section.woocommerce-order-details,
.qhd-tunnel__details #wcf-thankyou-wrap .woocommerce-order section.woocommerce-customer-details {
  border: 1px solid var(--qhd-border);
  border-radius: 14px;
  background-color: var(--qhd-surface-raised);
  color: var(--qhd-text-secondary);
}

.qhd-tunnel__details #wcf-thankyou-wrap ul.order_details li {
  color: var(--qhd-text-secondary);
}

.qhd-tunnel__details #wcf-thankyou-wrap ul.order_details li strong,
.qhd-tunnel__details #wcf-thankyou-wrap td,
.qhd-tunnel__details #wcf-thankyou-wrap td a,
.qhd-tunnel__details #wcf-thankyou-wrap address {
  color: var(--qhd-text);
}

.qhd-tunnel__details #wcf-thankyou-wrap table,
.qhd-tunnel__details #wcf-thankyou-wrap th,
.qhd-tunnel__details #wcf-thankyou-wrap td {
  background: none;
}

.qhd-tunnel__details #wcf-thankyou-wrap th {
  color: var(--qhd-text-secondary);
}

.qhd-tunnel__details #wcf-thankyou-wrap address {
  border-color: var(--qhd-border);
  background: none;
}

/* --- Focus clavier --------------------------------------------------------- */

.qhd-tunnel a:focus-visible,
.qhd-tunnel button:focus-visible,
.qhd-tunnel-brand a:focus-visible {
  outline: 3px solid var(--qhd-cyan);
  outline-offset: 3px;
  box-shadow: none;
}

/* --- Points de rupture ----------------------------------------------------- */

@media (max-width: 767px) {
  .qhd-tunnel__details #wcf-thankyou-wrap ul.order_details li {
    border-inline-end: 0;
  }
}

@media (min-width: 768px) {
  .qhd-tunnel-next {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  /* Formulaire à gauche ; récapitulatif puis réassurance à droite. */
  .qhd-tunnel__grid {
    grid-template-columns: minmax(0, 1fr) 360px;
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "form summary"
      "form aside";
    gap: 20px clamp(2rem, 1rem + 2vw, 3rem);
  }

  .qhd-tunnel__form {
    grid-area: form;
  }

  .qhd-tunnel-summary {
    grid-area: summary;
  }

  .qhd-tunnel__aside {
    grid-area: aside;
    align-self: start;
  }
}
