/* Tunnel d'achat Unimart : paiement, confirmation, suivi, pages legales. Tout est sous `.tf-funnel` ; aucune classe
 * du vendor n'est redefinie. Les couleurs viennent des variables du theme (`--color-primary`, `--color-heading`,
 * posees par themes/unimart/base.html), donc un changement de palette dans le constructeur suit jusqu'a la commande.
 * Les couleurs de STATUT (erreur, succes) sont litterales : elles ne suivent pas le theme. */
.tf-funnel{--tf-ink:var(--color-heading,#000);--tf-accent:var(--color-primary,#215ada);--tf-line:#e5e7eb;--tf-soft:#f6f7f9;
  --tf-muted:#4b5563;--tf-faint:#6b7280;--tf-err:#c44a38;--tf-ok:#287a50;
  /* Surfaces : la carte reste claire, les champs prennent un ton nettement plus marque
   * pour ressortir. --tf-field melange l'encre du theme dans la carte (donc toujours plus
   * fonce que la carte, sur clair comme sur fonce) ; --tf-field-bd est une bordure visible. */
  --tf-card:#fff;
  --tf-field:color-mix(in srgb, var(--tf-ink) 6%, var(--tf-card));
  --tf-field-bd:color-mix(in srgb, var(--tf-ink) 20%, var(--tf-line));
  /* alias lus par les styles en ligne repris de l'ancien formulaire */
  --faint:var(--tf-faint);--muted:var(--tf-muted);--ink:var(--tf-ink);--accent:var(--tf-accent);--line:var(--tf-line);}
.tf-funnel .mono{font-variant-numeric:tabular-nums}
.tf-narrow{max-width:42rem;margin:0 auto}
.tf-card{border:1px solid var(--tf-line);border-radius:.5rem;background:var(--tf-card);padding:1.25rem}
.tf-card+.tf-card{margin-top:1.5rem}
.tf-funnel .smallcaps{display:block;font-size:.8125rem;letter-spacing:.08em;text-transform:uppercase;color:var(--tf-faint);margin-bottom:.25rem}
.tf-funnel .blk+.blk{margin-top:1.75rem;padding-top:1.5rem;border-top:1px solid var(--tf-line)}

/* champs */
.tf-funnel .field{margin-top:.75rem}
.tf-funnel .field label{display:block;font-size:.8125rem;color:var(--tf-muted);margin-bottom:.375rem}
.tf-funnel .inp{display:block;width:100%;height:3rem;border:1px solid var(--tf-field-bd);border-radius:.375rem;padding:0 .875rem;font:inherit;font-size:.9375rem;color:var(--tf-ink);background:var(--tf-field)}
.tf-funnel textarea.inp{height:auto;min-height:4.5rem;padding:.6875rem .875rem;resize:vertical}
.tf-funnel .inp:focus{outline:none;border-color:var(--tf-accent);background:var(--tf-card);box-shadow:0 0 0 .1875rem color-mix(in srgb,var(--tf-accent) 18%,transparent)}
.tf-funnel .inp.err{border-color:var(--tf-err)}
.tf-funnel .ferr{font-size:.8125rem;color:var(--tf-err);margin-top:.25rem;min-height:.875rem}
.tf-funnel .row2{display:flex;gap:.75rem}
.tf-funnel .row2 .field{flex:1;min-width:0}
@media (max-width:575.98px){.tf-funnel .row2{flex-direction:column;gap:0}}

/* zone (autocompletion) */
.tf-funnel .zone-wrap{position:relative}
.tf-funnel .zone-list{position:absolute;inset-inline:0;top:100%;background:var(--tf-card);border:1px solid var(--tf-line);border-top:0;z-index:30;max-height:15rem;overflow-y:auto;box-shadow:0 .75rem 1.5rem rgba(0,0,0,.1)}
.tf-funnel .zone-item{padding:.6875rem .875rem;font-size:.875rem;cursor:pointer;border-bottom:1px solid var(--tf-line)}
.tf-funnel .zone-item:hover,.tf-funnel .zone-item.active{background:var(--tf-soft)}
.tf-funnel .zone-pill{margin-top:.5rem;display:none;align-items:center;gap:.5rem;font-size:.8125rem;color:var(--tf-ok)}
.tf-funnel .zone-pill.show{display:inline-flex}

/* paiement, coupon */
.tf-funnel .opt{display:flex;align-items:center;justify-content:space-between;padding:.875rem 1rem;border:1px solid var(--tf-accent);border-radius:.375rem;margin-top:.5rem}
.tf-funnel .opt .t{font-weight:600;font-size:.9375rem}
.tf-funnel .opt .s{font-size:.8125rem;color:var(--tf-muted);margin-top:.1875rem}
.tf-funnel .radio{width:1rem;height:1rem;border-radius:50%;border:2px solid var(--tf-accent);display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.tf-funnel .radio i{width:.5rem;height:.5rem;border-radius:50%;background:var(--tf-accent);display:block}
.tf-funnel .coupon-row{display:flex;gap:.625rem;margin-top:.5rem}
.tf-funnel .coupon-row .inp{flex:1;text-transform:uppercase;letter-spacing:.06em}
.tf-funnel .btn-outline{height:3rem;padding:0 1.125rem;border:1px solid var(--tf-ink);border-radius:.375rem;background:var(--tf-card);color:var(--tf-ink);font-size:.875rem;cursor:pointer;white-space:nowrap}
.tf-funnel .btn-outline:disabled{opacity:.5;cursor:default}
.tf-funnel .coupon-applied{margin-top:.625rem;border:1px solid var(--tf-ok);border-radius:.375rem;padding:.75rem .875rem;display:flex;align-items:center;gap:.625rem}
.tf-funnel .coupon-applied .ca-l{flex:1}
.tf-funnel .coupon-applied .ca-code{font-weight:600}
.tf-funnel .coupon-applied .ca-amt{font-size:.8125rem;color:var(--tf-ok);margin-top:.1875rem}
.tf-funnel .coupon-err{margin-top:.5rem;font-size:.8125rem;color:var(--tf-err)}

/* recapitulatif */
.tf-summary{padding:1.25rem 1.25rem 1rem}
.tf-funnel .sum-line{display:flex;justify-content:space-between;gap:.75rem;padding:.6875rem 0;border-top:1px solid var(--tf-line);font-size:.875rem}
.tf-funnel .sum-line .q{color:var(--tf-muted)}
.tf-funnel .sum-disc{display:flex;justify-content:space-between;padding-top:.625rem;font-size:.875rem}
.tf-funnel .sum-disc .l{color:var(--tf-muted)}
.tf-funnel .sum-disc .v{color:var(--tf-ok)}
.tf-funnel .sum-total{margin-top:.875rem;padding-top:.875rem;border-top:2px solid var(--tf-ink);display:flex;justify-content:space-between;align-items:baseline}
.tf-funnel .sum-total .l{font-weight:600}
.tf-funnel .sum-total .v{font-size:1.5rem;font-weight:600}
.tf-funnel .sum-total .v small{font-size:.8125rem;color:var(--tf-faint)}
.tf-funnel .msg{margin-top:1rem;padding:.875rem 1rem;border-radius:.375rem;font-size:.875rem;line-height:1.5;display:none}
.tf-funnel .msg.show{display:block}
.tf-funnel .msg.error{background:#fbece9;border:1px solid var(--tf-err);color:#7a2a20}
.tf-funnel [hidden],.tf-cta-bar[hidden]{display:none!important}

/* barre d'action fixe, assez de marge pour que le pied de page reste atteignable */
.tf-checkout{padding-bottom:7rem}
.tf-cta-bar{position:fixed;inset-inline:0;bottom:0;z-index:20;background:#fff;border-top:1px solid var(--tf-line);padding:.75rem 0}
.tf-cta-bar .tf-cta{display:flex;justify-content:center;gap:.625rem;border:0;cursor:pointer}
.tf-cta-bar .tf-cta:disabled{opacity:.5;cursor:default}
.tf-cta-bar .tf-cta .t{opacity:.8}
.tf-empty{text-align:center;padding:4rem 0}
.tf-empty .rbt-btn{margin-top:1.25rem}

/* reassurance, aide */
.tf-trust{list-style:none;margin:1.25rem 0 0;padding:1rem 0 0;border-top:1px solid var(--tf-line);display:grid;gap:.625rem}
.tf-trust li{display:flex;align-items:center;gap:.625rem;font-size:.875rem;color:var(--tf-muted)}
.tf-trust i{color:var(--tf-accent);width:1.25rem;text-align:center}
.tf-thanks .tf-trust{justify-content:center;border-top:0;display:flex;flex-wrap:wrap;gap:.625rem 1.5rem;margin-top:2rem}
.tf-help{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-top:1rem;font-size:.875rem;color:var(--tf-ink);text-decoration:underline}
.tf-help i{color:#25d366}

/* confirmation */
.tf-thanks-inner{max-width:30rem;margin:0 auto;text-align:center}
.tf-thanks-icon{font-size:4rem;line-height:1;color:var(--tf-ok)}
.tf-ref{font-size:.8125rem;letter-spacing:.14em;text-transform:uppercase;color:var(--tf-faint);margin:1rem 0 .25rem}
.tf-actions{margin-top:1.75rem;display:flex;flex-direction:column;gap:.75rem}

/* suivi */
.tf-track .steps{display:flex;gap:.5rem;margin-top:1.5rem}
.tf-track .step{flex:1;height:.25rem;background:var(--tf-line)}
.tf-track .step.on{background:var(--tf-accent)}
.tf-track .step.off{background:var(--tf-err)}
.tf-track .tf-card{margin-top:1.5rem;padding:0}
.tf-track .tf-card h2{font-size:.8125rem;letter-spacing:.08em;text-transform:uppercase;color:var(--tf-faint);padding:.875rem 1rem;border-bottom:1px solid var(--tf-line);margin:0}
.tf-row,.tf-li{display:flex;justify-content:space-between;gap:.75rem;padding:.6875rem 1rem;font-size:.9375rem;border-bottom:1px solid var(--tf-line)}
.tf-row:last-child,.tf-li:last-child{border-bottom:0}
.tf-row .k,.tf-li .q{color:var(--tf-muted)}
.tf-row .v,.tf-li .v{text-align:end;font-variant-numeric:tabular-nums}
.tf-row.total{border-top:2px solid var(--tf-ink);font-weight:600}
.tf-foot{margin-top:1.5rem;font-size:.8125rem;color:var(--tf-faint);text-align:center}

/* pages legales */
.tf-legal-body{font-size:1rem;line-height:1.7;color:var(--tf-muted)}
.tf-funnel #capture_note{color:var(--tf-faint)}

/* Le contenu du paiement est dessine par le navigateur (panier local) : une hauteur minimale evite que le pied de page saute. */
.tf-funnel{min-height:60vh}
