/* Savoira — page publique d'achat (/acheter/{parcours}).
   On paie d'abord, le compte se crée après le paiement.
   Tokens de la vitrine : --pine, --moss, --cream, --ink (site-chrome.css). */

/* Surcouche : plein écran par-dessus la fiche, fond crème du site. */
.ach-overlay { position: fixed; inset: 0; z-index: 140; overflow-y: auto; background: #FAF8F2;
  opacity: 0; pointer-events: none; transition: opacity 180ms ease; }
.ach-overlay.on { opacity: 1; pointer-events: auto; }
.ach-lock, .ach-lock body { overflow: hidden; }
.ach-overlay-bar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: flex-start;
  padding: 14px 20px 0; background: linear-gradient(#FAF8F2 70%, rgba(250,248,242,0)); }
.ach-overlay-close { display: inline-flex; align-items: center; gap: 7px; font: inherit; cursor: pointer;
  font-size: 13px; font-weight: 600; color: #0E3B2C; background: #fff; border: 1px solid #e2ded3;
  border-radius: 999px; padding: 9px 16px; font-family: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  transition: border-color 140ms ease; }
.ach-overlay-close:hover { border-color: #0E3B2C; }
.ach-overlay .ach { padding-top: 12px; }

/* Les tokens du chrome sont scopés à .nav/.footer : on les redéclare ici,
   sinon var(--pine) est vide et la tête du récapitulatif devient invisible. */
.ach {
  --pine: #0E3B2C; --pine-hover: #0C3225; --moss: #DFEBE3; --cream: #FAF8F2;
  --ink: #101613;
  max-width: 1020px; margin: 0 auto; padding: 46px 20px 80px;
  font-family: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
}
.ach-title { font-family: "Instrument Sans", "Helvetica Neue", Arial, sans-serif; }
.ach-head { text-align: center; margin-bottom: 30px; }
.ach-kicker { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pine); }
.ach-title { font-size: clamp(26px, 4vw, 34px); font-weight: 700; letter-spacing: -0.02em; margin: 8px 0 6px; color: var(--ink); }
.ach-sub { font-size: 15px; color: #5d6a63; margin: 0 auto; max-width: 520px; line-height: 1.6; }

/* Fil des trois moments : payer → confirmer → créer le compte */
.ach-flow { display: flex; justify-content: center; gap: 8px; margin: 22px 0 34px; flex-wrap: wrap; }
.ach-flow span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: #5d6a63;
  padding: 7px 13px; border: 1px solid #e2ded3; border-radius: 999px; background: #fff; }
.ach-flow span.on { border-color: var(--pine); color: var(--pine); background: var(--moss); font-weight: 600; }
.ach-flow b { font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 500; }

.ach-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.ach-card { background: #fff; border: 1px solid #e2ded3; border-radius: 18px; padding: 30px 30px 26px; box-shadow: 0 12px 34px rgba(14,59,44,0.06); }
.ach-card.center { text-align: center; max-width: 600px; margin: 0 auto; }

.ach-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin: 0 0 8px; }
.ach-field { margin-bottom: 18px; }
.ach-help { font-size: 12px; color: #7d8a83; margin-top: 6px; display: block; line-height: 1.5; }
.ach-input { width: 100%; box-sizing: border-box; font: inherit; font-size: 14.5px; padding: 12px 14px;
  border: 1px solid #d9d4c7; border-radius: 11px; background: #fff; color: var(--ink); }
.ach-input:focus { outline: 2px solid var(--pine); outline-offset: 1px; border-color: var(--pine); }
.ach-row { display: flex; gap: 8px; }
.ach-row .ach-input { flex: 1; }
.ach-cc { display: grid; place-items: center; padding: 0 13px; border: 1px solid #d9d4c7; border-radius: 11px;
  background: var(--cream, #faf8f2); font-size: 13.5px; white-space: nowrap; font-family: "IBM Plex Mono", monospace; }

/* Opérateurs (vrais logos) */
.ach-ops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.ach-op { position: relative; display: flex; align-items: center; justify-content: center; min-height: 64px; padding: 13px 8px;
  cursor: pointer; border: 1.5px solid #e2ded3; border-radius: 13px; background: #fff; font: inherit;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease; }
.ach-op:hover { border-color: var(--pine); transform: translateY(-1px); }
.ach-op.on { border-color: var(--pine); box-shadow: 0 0 0 3px var(--moss); }
.ach-op img { height: 30px; width: 94px; object-fit: contain; }
.ach-op-name { font-size: 13.5px; color: var(--ink); }
.ach-op .tick { position: absolute; top: 7px; right: 7px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--pine); color: #fff; display: none; place-items: center; font-size: 10px; }
.ach-op.on .tick { display: grid; }

.ach-coupon-ok { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--pine);
  padding: 11px 13px; border: 1px solid var(--moss); background: var(--moss); border-radius: 11px; }
.ach-coupon-ok button { margin-left: auto; background: none; border: 0; font: inherit; font-size: 12.5px;
  color: var(--pine); text-decoration: underline; cursor: pointer; }

.ach-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font: inherit; cursor: pointer;
  font-size: 15px; font-weight: 600; padding: 14px 22px; border-radius: 12px; border: 1.5px solid transparent;
  background: var(--pine); color: #fff; transition: background 140ms ease, transform 140ms ease; }
.ach-btn:hover { background: var(--pine-hover, #0C3225); }
.ach-btn:disabled { opacity: 0.55; cursor: default; }
.ach-btn.block { width: 100%; }
.ach-btn.ghost { background: #fff; color: var(--ink); border-color: #d9d4c7; }
.ach-btn.ghost:hover { border-color: var(--pine); background: #fff; }

.ach-error { margin: 12px 0 0; font-size: 13px; color: #b3452f; }
.ach-note { font-size: 12px; color: #7d8a83; text-align: center; margin: 12px 0 0; line-height: 1.55; }
.ach-account-note { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: #5d6a63; line-height: 1.55; margin: 0 0 18px; padding: 12px 14px;
  background: var(--cream, #faf8f2); border: 1px solid #e2ded3; border-radius: 11px; }
.ach-account-note > span:first-child { flex: 1; min-width: 200px; }
.ach-account-actions { display: flex; gap: 8px; flex: none; }
.ach-minibtn { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 600;
  padding: 7px 13px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  background: var(--pine); color: #fff; border: 1.5px solid var(--pine); transition: background 140ms ease; }
.ach-minibtn:hover { background: var(--pine-hover, #0C3225); }
.ach-minibtn.ghost { background: #fff; color: var(--pine); }
.ach-minibtn.ghost:hover { background: var(--moss); }
.ach-login-hint { text-align: center; font-size: 13px; color: #5d6a63; margin-top: 18px; }
.ach-login-hint a { color: var(--pine); }

/* Récapitulatif */
.ach-sum { background: #fff; border: 1px solid #e2ded3; border-radius: 18px; overflow: hidden; position: sticky; top: 86px; }
.ach-sum-head { background: var(--pine); color: #fff; padding: 18px 20px 16px; }
.ach-sum-head .k { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75; }
.ach-sum-head h3 { margin: 6px 0 0; font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; }
.ach-sum-body { padding: 16px 20px 20px; }
.ach-sum-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.ach-sum-list li { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: #5d6a63; line-height: 1.5; }
.ach-sum-list li::before { content: "✓"; color: var(--pine); font-weight: 700; flex: none; }
.ach-sum-rows { border-top: 1px dashed #e2ded3; padding-top: 13px; display: grid; gap: 8px; }
.ach-sum-rows > div { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink); }
.ach-sum-rows .promo { color: var(--pine); }
.ach-sum-rows .total { border-top: 1px dashed #e2ded3; padding-top: 11px; font-weight: 600; }
.ach-sum-rows .total b { font-size: 21px; letter-spacing: -0.01em; }
.ach-sum-rows s { opacity: 0.5; font-weight: 400; margin-right: 7px; }

/* Attente PIN */
.ach-wait-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.ach-wait-head img { height: 30px; max-width: 110px; object-fit: contain; }
.ach-timer { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: #5d6a63; background: var(--cream, #faf8f2);
  border: 1px solid #e2ded3; padding: 4px 11px; border-radius: 999px; }
.ach-steps { display: grid; text-align: left; }
.ach-step { display: flex; gap: 13px; padding: 11px 0; position: relative; }
.ach-step + .ach-step::before { content: ""; position: absolute; left: 13px; top: -9px; height: 18px; width: 1.5px; background: #e2ded3; }
.ach-step .dot { flex: none; width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid #d9d4c7; background: #fff; font-size: 12px; font-weight: 600; color: #7d8a83; }
.ach-step.done .dot { background: var(--pine); border-color: var(--pine); color: #fff; }
.ach-step.active .dot { border-color: var(--pine); }
.ach-step.warn .dot { border-color: #c98a2b; color: #c98a2b; background: #fdf6ea; }
.ach-step .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--pine); animation: ach-pulse 1.1s ease-in-out infinite; }
@keyframes ach-pulse { 0%, 100% { transform: scale(0.8); opacity: 0.5; } 50% { transform: scale(1.25); opacity: 1; } }
.ach-step b { display: block; font-size: 14px; color: var(--ink); }
.ach-step em { font-style: normal; font-size: 12.5px; color: #7d8a83; line-height: 1.5; }
.ach-step.idle { opacity: 0.55; }
.ach-hint { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; text-align: left;
  border: 1px solid #e7dcbf; background: #fdf8ec; border-radius: 12px; font-size: 12.5px; line-height: 1.55; color: #6b5a2a; }
.ach-hint.warn { border-color: #ecd9c8; background: #fdf3ea; color: #7a5030; }
.ach-wait-foot { display: flex; justify-content: center; margin-top: 16px; }
.ach-link { background: none; border: 0; font: inherit; font-size: 13px; color: var(--pine); text-decoration: underline; cursor: pointer; }

/* Succès / reçu / création de compte */
.ach-ok { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px;
  background: var(--moss); color: var(--pine); font-size: 24px; font-weight: 700; }
.ach-ko { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px;
  background: #fbeeea; color: #b3452f; font-size: 22px; }
.ach-receipt { text-align: left; border: 1px solid #e2ded3; border-radius: 14px; margin: 6px 0 24px; overflow: hidden; }
.ach-receipt-head { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px;
  background: var(--cream, #faf8f2); border-bottom: 1px dashed #e2ded3; font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: #7d8a83; }
.ach-receipt-head b { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; color: var(--ink); }
.ach-receipt-rows { padding: 12px 16px 14px; display: grid; gap: 9px; }
.ach-receipt-rows > div { display: flex; justify-content: space-between; gap: 14px; font-size: 13.5px; }
.ach-receipt-rows span { color: #7d8a83; }
.ach-receipt-rows b { font-weight: 500; text-align: right; color: var(--ink); }
.ach-receipt-rows .total { border-top: 1px dashed #e2ded3; padding-top: 11px; }
.ach-receipt-rows .total b { font-weight: 700; font-size: 16px; }

.ach-claim { text-align: left; border-top: 1px dashed #e2ded3; margin-top: 4px; padding-top: 22px; }
.ach-claim h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 4px; color: var(--ink); }
.ach-claim p { font-size: 13.5px; color: #5d6a63; margin: 0 0 16px; line-height: 1.55; }
.ach-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: #7d8a83; font-size: 12px; }
.ach-or::before, .ach-or::after { content: ""; flex: 1; height: 1px; background: #e2ded3; }
.ach-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; box-sizing: border-box;
  font: inherit; font-size: 14px; font-weight: 500; padding: 12px 16px; border-radius: 11px; cursor: pointer;
  border: 1px solid #d9d4c7; background: #fff; color: var(--ink); text-decoration: none;
  transition: border-color 140ms ease; }
.ach-google:hover { border-color: var(--pine); }

/* Aide WhatsApp */
.ach-helpwa { display: flex; justify-content: center; margin-top: 18px; }
.ach-helpwa a { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500;
  color: #128c50; background: #fff; border: 1px solid #e2ded3; border-radius: 999px; padding: 8px 15px;
  text-decoration: none; transition: border-color 140ms ease, box-shadow 140ms ease; }
.ach-helpwa a:hover { border-color: #128c50; box-shadow: 0 4px 14px rgba(18,140,80,0.12); }

@media (max-width: 880px) { .ach-grid { grid-template-columns: 1fr; } .ach-sum { position: static; order: -1; } }
@media (max-width: 620px) { .ach-ops { grid-template-columns: 1fr; } .ach-op { min-height: 54px; } .ach-card { padding: 22px 18px; } }
.ach-op-mono { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--cream, #faf8f2); border: 1px solid #e2ded3; font-weight: 700; font-size: 15px; color: #5d6a63; }
.ach-sum-rows .approx { justify-content: flex-end; }
