/* ==========================================================================
   Modernize PAY — Design system « Ivoire »  v2.0
   Clair, chaleureux, éditorial. Encre profonde + accent orange de la marque.
   Toutes les règles sont scopées sous .ptf pour cohabiter avec n'importe quel thème.
   ========================================================================== */

@font-face {
  font-family: "PTF Manrope";
  src: url("../fonts/manrope-latin.woff2") format("woff2-variations"), url("../fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "PTF Manrope";
  src: url("../fonts/manrope-latin-ext.woff2") format("woff2-variations"), url("../fonts/manrope-latin-ext.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

.ptf {
  /* Couleurs */
  --ptf-bg: #F7F5F1;
  --ptf-bg-2: #F1EEE8;
  --ptf-surface: #FFFFFF;
  --ptf-surface-2: #FBFAF8;
  --ptf-line: #ECE7DF;
  --ptf-line-2: #DED7CC;
  --ptf-ink: #1B1612;
  --ptf-ink-2: #4B433C;
  --ptf-muted: #857B71;
  --ptf-faint: #B3AAA0;
  --ptf-accent: #E8620E;
  --ptf-accent-2: #F59E0B;
  --ptf-accent-soft: #FFF3EA;
  --ptf-success: #157347;
  --ptf-success-soft: #EAF7EF;
  --ptf-warning: #A15C07;
  --ptf-warning-soft: #FFF6E5;
  --ptf-danger: #C0362C;
  --ptf-danger-soft: #FDEEEC;
  --ptf-info: #2457C5;
  --ptf-info-soft: #EDF3FE;
  --ptf-focus: 0 0 0 3px rgba(232, 98, 14, .22);
  /* Typo */
  --ptf-font: "PTF Manrope", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* Rayons */
  --ptf-r-sm: 8px; --ptf-r: 12px; --ptf-r-lg: 18px; --ptf-r-xl: 24px;
  /* Ombres (douces, réalistes) */
  --ptf-sh-1: 0 1px 2px rgba(27, 22, 18, .05);
  --ptf-sh-2: 0 1px 2px rgba(27, 22, 18, .04), 0 6px 20px -6px rgba(27, 22, 18, .10);
  --ptf-sh-3: 0 2px 4px rgba(27, 22, 18, .04), 0 24px 48px -16px rgba(27, 22, 18, .16);
  /* Mouvement */
  --ptf-ease: cubic-bezier(.2, .7, .2, 1);

  font-family: var(--ptf-font);
  color: var(--ptf-ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}
.ptf *, .ptf *::before, .ptf *::after { box-sizing: border-box; }
.ptf :where(h1, h2, h3, p, ol, ul, dl, dd, figure) { margin: 0; padding: 0; }
.ptf :where(button, input, select) { font: inherit; color: inherit; }
.ptf img { max-width: 100%; }
.ptf .ptf-i { flex-shrink: 0; display: block; }
.ptf .ptf-num { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.ptf [hidden] { display: none !important; }
.ptf .ptf-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Page autonome ─────────────────────────────────────────────────────── */
html:has(body.ptf-page) { background: var(--ptf-bg, #F7F5F1); }
body.ptf-page {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background:
    radial-gradient(1100px 520px at 85% -10%, rgba(245, 158, 11, .07), transparent 60%),
    radial-gradient(900px 480px at -10% 110%, rgba(232, 98, 14, .05), transparent 60%),
    var(--ptf-bg);
  display: flex; flex-direction: column;
}

.ptf-topbar { position: sticky; top: 0; z-index: 20; background: rgba(247, 245, 241, .82); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.ptf-topbar.is-scrolled { border-bottom-color: var(--ptf-line); }
.ptf-topbar__in { max-width: 1080px; margin: 0 auto; padding: 12px 20px; padding-top: max(12px, env(safe-area-inset-top)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ptf-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ptf-ink); min-width: 0; }
.ptf-brand img { height: 46px; width: auto; object-fit: contain; }
.ptf-brand span { font-weight: 700; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptf-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--ptf-surface); color: var(--ptf-ink-2); border: 1px solid var(--ptf-line); white-space: nowrap; }
.ptf-pill .ptf-i { color: var(--ptf-success); }

.ptf-main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 28px 20px 48px; }
.ptf-layout { display: grid; gap: 28px; align-items: start; }
@media (min-width: 960px) {
  .ptf-main { padding: 64px 32px 80px; }
  .ptf-layout { grid-template-columns: minmax(0, 1fr) 452px; gap: 72px; }
  .ptf-aside { position: sticky; top: 112px; padding-top: 8px; }
}

/* Colonne éditoriale */
.ptf-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ptf-accent); }
.ptf-eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--ptf-accent), var(--ptf-accent-2)); }
.ptf-display { font-size: clamp(28px, 6.4vw, 44px); line-height: 1.08; letter-spacing: -.035em; font-weight: 750; margin-top: 12px; }
.ptf-lead { margin-top: 12px; color: var(--ptf-ink-2); font-size: 16px; max-width: 30em; }
.ptf-logo-hero { display: block; width: auto; object-fit: contain; margin-bottom: 26px; }
.ptf-trust { display: none; margin-top: 36px; gap: 18px; }
.ptf-trust li { list-style: none; display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.ptf-trust__ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--ptf-surface); border: 1px solid var(--ptf-line); color: var(--ptf-ink); box-shadow: var(--ptf-sh-1); }
.ptf-trust strong { display: block; font-size: 14.5px; font-weight: 700; }
.ptf-trust span { font-size: 13.5px; color: var(--ptf-muted); }
@media (min-width: 960px) { .ptf-trust { display: grid; } }
@media (max-width: 959px) { .ptf-logo-hero { display: none; } }

/* Étapes */
.ptf-steps { display: flex; gap: 6px; list-style: none; margin: 0 0 14px; padding: 0; }
.ptf-steps li { flex: 1; font-size: 11.5px; font-weight: 600; color: var(--ptf-faint); }
.ptf-steps li::before { content: ""; display: block; height: 3px; border-radius: 3px; background: var(--ptf-line-2); margin-bottom: 7px; }
.ptf-steps li.is-current { color: var(--ptf-ink); }
.ptf-steps li.is-current::before { background: linear-gradient(90deg, var(--ptf-accent), var(--ptf-accent-2)); }
.ptf-steps li.is-done { color: var(--ptf-ink-2); }
.ptf-steps li.is-done::before { background: var(--ptf-ink); }

/* ── Carte ─────────────────────────────────────────────────────────────── */
.ptf-card { background: var(--ptf-surface); border: 1px solid var(--ptf-line); border-radius: var(--ptf-r-xl); box-shadow: var(--ptf-sh-3); overflow: hidden; overflow: clip; animation: ptf-rise .5s var(--ptf-ease) both; }
.ptf-card__body { padding: 22px; }
@media (min-width: 480px) { .ptf-card__body { padding: 28px; } }
.ptf-card__foot { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 13px 22px; font-size: 12.5px; color: var(--ptf-muted); background: var(--ptf-surface-2); border-top: 1px solid var(--ptf-line); }
.ptf-card__foot .ptf-i { color: var(--ptf-success); }
.ptf-card__title { font-size: 18px; font-weight: 750; letter-spacing: -.02em; }
.ptf-card__sub { font-size: 13.5px; color: var(--ptf-muted); margin-top: 2px; }

/* Récapitulatif facture (lien prérempli) */
.ptf-summary { margin: -22px -22px 22px; padding: 22px; background: linear-gradient(180deg, var(--ptf-surface-2), var(--ptf-surface)); border-bottom: 1px dashed var(--ptf-line-2); }
@media (min-width: 480px) { .ptf-summary { margin: -28px -28px 24px; padding: 24px 28px; } }
.ptf-summary__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ptf-summary__label { font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ptf-muted); }
.ptf-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--ptf-bg-2); color: var(--ptf-ink); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptf-summary__amount { margin-top: 10px; font-size: clamp(30px, 9vw, 38px); font-weight: 780; letter-spacing: -.035em; line-height: 1.05; }
.ptf-summary__amount small { font-size: .42em; font-weight: 700; color: var(--ptf-muted); letter-spacing: 0; margin-left: 4px; }
.ptf-breakdown { margin-top: 14px; display: grid; gap: 6px; font-size: 13.5px; }
.ptf-breakdown div { display: flex; justify-content: space-between; gap: 12px; color: var(--ptf-ink-2); }
.ptf-breakdown dt { color: var(--ptf-muted); }
.ptf-breakdown dd { font-weight: 650; }

/* ── Formulaire ────────────────────────────────────────────────────────── */
.ptf-form { display: grid; gap: 18px; }
.ptf-field { display: grid; gap: 7px; }
.ptf-label { font-size: 13.5px; font-weight: 650; color: var(--ptf-ink); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ptf-label em { font-style: normal; font-weight: 500; font-size: 12px; color: var(--ptf-muted); }
.ptf-control { position: relative; display: flex; align-items: stretch; background: var(--ptf-surface); border: 1.5px solid var(--ptf-line-2); border-radius: var(--ptf-r); transition: border-color .15s, box-shadow .15s, background .15s; min-height: 52px; }
.ptf-control:hover { border-color: #CFC6B9; }
.ptf-control:focus-within { border-color: var(--ptf-accent); box-shadow: var(--ptf-focus); }
.ptf-control.is-invalid { border-color: var(--ptf-danger); background: #FFFCFB; }
.ptf-control.is-invalid:focus-within { box-shadow: 0 0 0 3px rgba(192, 54, 44, .16); }
.ptf-control.is-valid .ptf-control__ok { opacity: 1; transform: scale(1); }
.ptf-control.is-locked { background: var(--ptf-surface-2); border-style: dashed; }
.ptf .ptf-input { flex: 1; min-width: 0; width: 100%; border: 0 !important; outline: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 14px !important; height: auto !important; min-height: 49px; font-size: 16px !important; /* 16px : pas de zoom iOS */ font-weight: 600; color: var(--ptf-ink); letter-spacing: .005em; margin: 0 !important; border-radius: 0 !important; }
.ptf .ptf-input::placeholder { color: var(--ptf-faint); font-weight: 500; }
.ptf .ptf-input[readonly] { cursor: default; color: var(--ptf-ink-2); }
.ptf-addon { display: flex; align-items: center; gap: 7px; padding: 0 13px; font-size: 14px; font-weight: 650; color: var(--ptf-ink-2); white-space: nowrap; }
.ptf-addon--start { border-right: 1px solid var(--ptf-line); }
.ptf-addon--end { color: var(--ptf-muted); font-size: 13px; letter-spacing: .02em; }
.ptf-flag { width: 20px; height: 14px; border-radius: 3px; overflow: hidden; display: inline-grid; grid-template-columns: repeat(3, 1fr); box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.ptf-flag i:nth-child(1) { background: #00853F; } .ptf-flag i:nth-child(2) { background: #FDEF42; position: relative; } .ptf-flag i:nth-child(3) { background: #E31B23; }
.ptf-flag i:nth-child(2)::after { content: ""; position: absolute; inset: 0; margin: auto; width: 5px; height: 5px; background: #00853F; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.ptf-control__ok { display: grid; place-items: center; width: 34px; color: var(--ptf-success); opacity: 0; transform: scale(.6); transition: .2s var(--ptf-ease); }
.ptf-control__lock { display: grid; place-items: center; width: 38px; color: var(--ptf-faint); }
.ptf-hint { font-size: 12.5px; color: var(--ptf-muted); line-height: 1.45; }
.ptf-error { font-size: 12.5px; font-weight: 600; color: var(--ptf-danger); display: flex; gap: 6px; align-items: flex-start; animation: ptf-fade .2s ease both; }
.ptf-error .ptf-i { margin-top: 1px; }

/* ── Boutons ───────────────────────────────────────────────────────────── */
.ptf .ptf-btn { appearance: none; -webkit-appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 20px; border-radius: var(--ptf-r); border: 1px solid transparent; font-size: 15px; font-weight: 700; letter-spacing: -.005em; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .12s, box-shadow .15s; -webkit-tap-highlight-color: transparent; user-select: none; line-height: 1.2; }
.ptf .ptf-btn:focus-visible { outline: none; box-shadow: var(--ptf-focus); }
.ptf .ptf-btn:active:not(:disabled) { transform: translateY(1px) scale(.995); }
.ptf .ptf-btn:disabled, .ptf .ptf-btn[aria-disabled="true"] { cursor: not-allowed; opacity: .55; }
.ptf .ptf-btn--primary { background: var(--ptf-ink); color: #FFF; box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 8px 20px -8px rgba(27, 22, 18, .55); }
.ptf .ptf-btn--primary:hover:not(:disabled) { background: #2B241E; }
.ptf .ptf-btn--accent { background: linear-gradient(180deg, #F0731F, var(--ptf-accent)); color: #FFF; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 8px 22px -8px rgba(232, 98, 14, .6); }
.ptf .ptf-btn--accent:hover:not(:disabled) { background: linear-gradient(180deg, #F27E2E, #DB5A0B); }
.ptf .ptf-btn--ghost { background: var(--ptf-surface); color: var(--ptf-ink); border-color: var(--ptf-line-2); }
.ptf .ptf-btn--ghost:hover:not(:disabled) { border-color: #CDC4B7; background: var(--ptf-surface-2); }
.ptf .ptf-btn--quiet { background: transparent; color: var(--ptf-ink-2); min-height: 40px; padding: 0 12px; }
.ptf .ptf-btn--quiet:hover { background: var(--ptf-bg-2); color: var(--ptf-ink); }
.ptf .ptf-btn--block { width: 100%; }
.ptf .ptf-btn--lg { min-height: 56px; font-size: 16px; border-radius: 14px; }
.ptf .ptf-btn .ptf-btn__amount { opacity: .78; font-weight: 650; }
.ptf .ptf-btn.is-loading { pointer-events: none; }
.ptf .ptf-btn.is-loading .ptf-btn__label { opacity: .85; }
.ptf-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ptf-spin .7s linear infinite; flex-shrink: 0; }

/* Zone d'action collante sur mobile */
.ptf-actions { display: grid; gap: 10px; margin-top: 4px; }
@media (max-width: 559px) {
  .ptf-actions--sticky { position: sticky; bottom: 0; z-index: 5; margin: 6px -22px -22px; padding: 14px 22px; padding-bottom: max(14px, env(safe-area-inset-bottom)); background: #FFF; box-shadow: 0 -1px 0 var(--ptf-line), 0 -10px 24px -12px rgba(27,22,18,.18); }
  .ptf-actions--sticky .ptf-fineprint { font-size: 11.5px; }
  .ptf-lead--generic { display: none; }
}
.ptf-fineprint { display: flex; gap: 7px; align-items: flex-start; justify-content: center; text-align: center; font-size: 12px; color: var(--ptf-muted); line-height: 1.45; }
.ptf-fineprint .ptf-i { margin-top: 1px; color: var(--ptf-faint); }

/* ── Alertes ───────────────────────────────────────────────────────────── */
.ptf-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--ptf-r); font-size: 13.5px; line-height: 1.5; border: 1px solid; animation: ptf-fade .25s ease both; }
.ptf-alert .ptf-i { margin-top: 2px; }
.ptf-alert--error { background: var(--ptf-danger-soft); border-color: #F5CFCA; color: #8E2A22; }
.ptf-alert--warn { background: var(--ptf-warning-soft); border-color: #F6DDB0; color: #7A4505; }
.ptf-alert--info { background: var(--ptf-info-soft); border-color: #CFDDF8; color: #1C438F; }
.ptf-alert--success { background: var(--ptf-success-soft); border-color: #C5E7D2; color: #0F5534; }
.ptf-alert a { color: inherit; font-weight: 700; }

/* ── Moyens de paiement ────────────────────────────────────────────────── */
.ptf-methods { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--ptf-line); }
.ptf-methods__title { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ptf-faint); text-align: center; margin-bottom: 12px; }
.ptf-methods__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.ptf-methods__list li { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px 0 5px; border: 1px solid var(--ptf-line); border-radius: 10px; background: var(--ptf-surface); font-size: 12.5px; font-weight: 650; color: var(--ptf-ink-2); }
.ptf-methods__list li.is-text { padding: 0 12px; }
.ptf-methods__list img { width: 24px; height: 24px; border-radius: 6px; object-fit: contain; }

/* ── Aide / pied de page ───────────────────────────────────────────────── */
.ptf-help { margin-top: 18px; text-align: center; font-size: 13px; color: var(--ptf-muted); }
.ptf-help a { color: var(--ptf-ink); font-weight: 650; text-decoration: none; border-bottom: 1px solid var(--ptf-line-2); }
.ptf-help a:hover { border-color: var(--ptf-ink); }
.ptf-foot { padding: 22px 20px; padding-bottom: max(22px, env(safe-area-inset-bottom)); text-align: center; font-size: 12.5px; color: var(--ptf-faint); }
.ptf-foot a { color: var(--ptf-muted); text-decoration: none; }
.ptf-foot a:hover { color: var(--ptf-ink); }

/* ── Page de résultat (confirmation / annulation / vérification) ──────── */
.ptf-result { max-width: 480px; margin: 0 auto; }
.ptf-result .ptf-card__body { text-align: center; padding-top: 34px; }
.ptf-status { width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; position: relative; }
.ptf-status::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 1px solid currentColor; opacity: .14; }
.ptf-status--success { background: var(--ptf-success-soft); color: var(--ptf-success); }
.ptf-status--danger { background: var(--ptf-danger-soft); color: var(--ptf-danger); }
.ptf-status--pending { background: var(--ptf-warning-soft); color: var(--ptf-warning); }
.ptf-status--neutral { background: var(--ptf-bg-2); color: var(--ptf-ink-2); }
.ptf-status svg { animation: ptf-pop .5s var(--ptf-ease) .15s both; }
.ptf-status--pending .ptf-status__ring { position: absolute; inset: -3px; border-radius: 50%; border: 3px solid transparent; border-top-color: currentColor; animation: ptf-spin 1.1s linear infinite; }
.ptf-result__title { font-size: 24px; font-weight: 780; letter-spacing: -.03em; line-height: 1.2; }
.ptf-result__text { margin: 8px auto 0; color: var(--ptf-ink-2); font-size: 14.5px; max-width: 26em; }
.ptf-receipt { margin: 24px 0 22px; text-align: left; border: 1px solid var(--ptf-line); border-radius: var(--ptf-r-lg); background: var(--ptf-surface-2); overflow: hidden; }
.ptf-receipt__amount { padding: 18px 18px 16px; border-bottom: 1px dashed var(--ptf-line-2); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ptf-receipt__amount span { font-size: 12.5px; color: var(--ptf-muted); font-weight: 600; }
.ptf-receipt__amount strong { font-size: 22px; font-weight: 780; letter-spacing: -.03em; }
.ptf-receipt dl { padding: 6px 18px 10px; }
.ptf-receipt dl div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--ptf-line); font-size: 13.5px; }
.ptf-receipt dl div:last-child { border-bottom: 0; }
.ptf-receipt dt { color: var(--ptf-muted); }
.ptf-receipt dd { font-weight: 650; text-align: right; word-break: break-all; }
.ptf-receipt dd.is-ref { font-size: 11.5px; font-weight: 600; color: var(--ptf-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ptf-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ptf-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ptf-badge--paid { background: var(--ptf-success-soft); color: var(--ptf-success); }
.ptf-badge--pending { background: var(--ptf-warning-soft); color: var(--ptf-warning); }
.ptf-badge--failed { background: var(--ptf-danger-soft); color: var(--ptf-danger); }
.ptf-progress { height: 4px; border-radius: 4px; background: var(--ptf-bg-2); overflow: hidden; margin: 20px auto 0; max-width: 220px; }
.ptf-progress i { display: block; height: 100%; width: 40%; border-radius: 4px; background: linear-gradient(90deg, var(--ptf-accent), var(--ptf-accent-2)); animation: ptf-indeterminate 1.4s var(--ptf-ease) infinite; }

/* ── Animations ────────────────────────────────────────────────────────── */
@keyframes ptf-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes ptf-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ptf-spin { to { transform: rotate(360deg); } }
@keyframes ptf-pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes ptf-indeterminate { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
@keyframes ptf-shake { 10%, 90% { transform: translateX(-1px); } 30%, 70% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }
.ptf .is-shake { animation: ptf-shake .35s ease both; }
@media (prefers-reduced-motion: reduce) {
  .ptf *, .ptf *::before, .ptf *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ── Impression du reçu ────────────────────────────────────────────────── */
@media print {
  body.ptf-page { background: #FFF !important; }
  .ptf-topbar, .ptf-foot, .ptf-no-print, .ptf-actions { display: none !important; }
  .ptf-card { box-shadow: none; border-color: #CCC; }
  .ptf-main { padding: 0; }
}

/* ── Variante intégrée (shortcode dans une page du thème) ─────────────── */
.ptf-embed { max-width: 480px; margin: 32px auto; }
.ptf-embed .ptf-embed__head { margin-bottom: 14px; }

/* ── Ajustements petits écrans : le formulaire doit apparaître tout de suite ── */
@media (max-width: 559px) {
  .ptf-main { padding: 16px 16px 32px; }
  .ptf-layout { gap: 18px; }
  .ptf-display { font-size: 26px; margin-top: 8px; }
  .ptf-lead { font-size: 14.5px; margin-top: 8px; }
  .ptf-eyebrow { font-size: 11px; }
  .ptf-card { border-radius: 20px; }
  .ptf-card__body { padding: 20px 18px; }
  .ptf-summary { margin: -20px -18px 20px; padding: 18px; }
  .ptf-actions--sticky { margin: 6px -18px -20px; padding-left: 18px; padding-right: 18px; }
  .ptf-methods__list li { height: 30px; font-size: 12px; }
  .ptf-methods__list img { width: 20px; height: 20px; }
  .ptf-card__foot { font-size: 12px; padding: 12px 16px; }
  .ptf-result__title { font-size: 22px; }
}
@media (max-width: 380px) {
  .ptf-pill span, .ptf-pill { font-size: 0; gap: 0; padding: 8px; }
  .ptf-pill .ptf-i { width: 16px; height: 16px; }
  .ptf-brand span { font-size: 14px; }
}

/* ── Choix du moyen de paiement ── */
.ptf-gws { border: 0; margin: 0; padding: 0; min-width: 0; }
.ptf-gws legend { padding: 0; margin-bottom: 8px; }
.ptf-gw-list { display: grid; gap: 8px; }
.ptf-gw { position: relative; display: grid; grid-template-columns: 40px 1fr 22px; gap: 12px; align-items: center; min-height: 62px; padding: 10px 14px 10px 10px; border: 1.5px solid var(--ptf-line-2); border-radius: var(--ptf-r); background: var(--ptf-surface); cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; -webkit-tap-highlight-color: transparent; }
.ptf-gw:hover { border-color: #CFC6B9; }
.ptf-gw input { position: absolute; opacity: 0; pointer-events: none; }
.ptf-gw__mark { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--gw, #1B1612); color: #FFF; font-weight: 800; font-size: 17px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.ptf-gw__mark img { width: 100%; height: 100%; object-fit: cover; }
.ptf-gw__txt strong { display: block; font-size: 15px; font-weight: 700; color: var(--ptf-ink); line-height: 1.25; }
.ptf-gw__txt span { display: block; font-size: 12.5px; color: var(--ptf-muted); line-height: 1.35; }
.ptf-gw__check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ptf-line-2); display: grid; place-items: center; color: transparent; transition: .15s; }
.ptf-gw:has(input:checked) { border-color: var(--ptf-ink); box-shadow: 0 0 0 1px var(--ptf-ink); background: var(--ptf-surface-2); }
.ptf-gw:has(input:checked) .ptf-gw__check { background: var(--ptf-ink); border-color: var(--ptf-ink); color: #FFF; }
.ptf-gw:has(input:focus-visible) { box-shadow: var(--ptf-focus); }
.ptf-gw.is-checked { border-color: var(--ptf-ink); box-shadow: 0 0 0 1px var(--ptf-ink); background: var(--ptf-surface-2); }
.ptf-gw.is-checked .ptf-gw__check { background: var(--ptf-ink); border-color: var(--ptf-ink); color: #FFF; }
.ptf-gw__mark.has-logo { background: #FFF; box-shadow: inset 0 0 0 1px var(--ptf-line); padding: 4px; }
.ptf-gw__mark.has-logo img { object-fit: contain; }
.ptf-methods__list li.has-logo { padding: 0 10px; background: #FFF; }
.ptf-methods__list li.has-logo img { width: auto; height: 22px; max-width: 76px; border-radius: 0; }
.ptf-gw__mark.has-logo { display: flex; align-items: center; justify-content: center; }
.ptf-gw__mark.has-logo img { width: auto; height: auto; max-width: 100%; max-height: 100%; }
.ptf-gw__mark.has-logo.is-tile { padding: 0; background: transparent; box-shadow: none; }
.ptf-gw__mark.has-logo.is-tile img { width: 100%; height: 100%; }
.ptf-methods__list li.has-logo img[src*="brand/methods/"] { border-radius: 6px; }
.ptf-methods__list li.has-logo.is-tile { padding: 0 11px 0 5px; gap: 7px; } .ptf-methods__list li.has-logo.is-tile img { width: 22px; height: 22px; max-width: none; border-radius: 6px; }

/* ── PI-SPI (BCEAO) : QR code à scanner ── */
.ptf-pispi { display: grid; justify-items: center; gap: 12px; margin: 6px 0 4px; }
.ptf-pispi__qr { width: 260px; height: 260px; max-width: 100%; padding: 10px; background: #FFF; border-radius: 22px; box-shadow: 0 16px 36px -18px rgba(27,22,18,.4), inset 0 0 0 1px var(--ptf-line); display: grid; place-items: center; box-sizing: content-box; }
.ptf-pispi__qr img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.ptf-pispi__logo { height: 28px; width: auto; }
.ptf-pispi__steps { margin: 4px 0 0; padding: 0; list-style: none; counter-reset: p; display: grid; gap: 8px; text-align: left; width: 100%; max-width: 360px; }
.ptf-pispi__steps li { counter-increment: p; display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: 13.5px; line-height: 1.5; color: var(--ptf-ink-2); }
.ptf-pispi__steps li::before { content: counter(p); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #FFF4D6; color: #5A2D0C; font-weight: 800; font-size: 12px; }
.ptf-pispi__same { width: 100%; max-width: 380px; border: 1px solid var(--ptf-line); border-radius: 14px; background: var(--ptf-surface-2); text-align: left; }
.ptf-pispi__same summary { cursor: pointer; padding: 12px 14px; font-size: 13.5px; font-weight: 700; color: var(--ptf-ink); list-style: none; }
.ptf-pispi__same summary::-webkit-details-marker { display: none; }
.ptf-pispi__same summary::after { content: "▾"; float: right; color: var(--ptf-muted); }
.ptf-pispi__same[open] summary::after { content: "▴"; }
.ptf-pispi__same > p { margin: 0 14px 10px; font-size: 12.5px; color: var(--ptf-muted); line-height: 1.5; }
.ptf-pispi__same > .ptf-btn { margin: 0 14px 10px; width: calc(100% - 28px); }
.ptf-pispi__info { margin: 0; padding: 4px 14px 12px; display: grid; gap: 8px; }
.ptf-pispi__info div { display: grid; gap: 2px; }
.ptf-pispi__info dt { font-size: 11.5px; font-weight: 700; color: var(--ptf-muted); text-transform: uppercase; letter-spacing: .04em; }
.ptf-pispi__info dd { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.ptf-pispi__info code { font-size: 12px; background: #FFF; border: 1px solid var(--ptf-line); padding: 3px 6px; border-radius: 6px; word-break: break-all; }

/* ══ Preuve de paiement ══════════════════════════════════════════════════ */
.ptf-receipt-box { display: grid; gap: 10px; padding: 16px; margin-bottom: 4px; border-radius: 16px; background: var(--ptf-surface-2); border: 1px solid var(--ptf-line); text-align: left; }
.ptf-receipt-box__t { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14.5px; font-weight: 800; color: var(--ptf-ink); }
.ptf-receipt-box__t .ptf-i { color: var(--ptf-success); }
.ptf-receipt-box__x { margin: -4px 0 2px; font-size: 13px; color: var(--ptf-ink-2); }
.ptf-receipt-form { display: grid; gap: 6px; }
.ptf-receipt-form .ptf-label { font-size: 13px; }
.ptf-receipt-form__row { display: flex; gap: 8px; }
.ptf-receipt-form__row .ptf-input { flex: 1; min-width: 0; height: 46px; padding: 0 12px; border: 1px solid var(--ptf-line-2, #DDD5CA); border-radius: 12px; background: #FFF; font: inherit; font-size: 15px; }
.ptf-receipt-form__row .ptf-input:focus { outline: none; border-color: var(--ptf-accent); box-shadow: var(--ptf-focus); }
.ptf-receipt-form__row .ptf-btn { flex-shrink: 0; }
.ptf-receipt-msg { margin: 0; min-height: 18px; font-size: 12.5px; font-weight: 650; color: var(--ptf-muted); }
.ptf-receipt-msg.is-ok { color: var(--ptf-success); } .ptf-receipt-msg.is-ko { color: var(--ptf-danger); }

.ptf-receipt-page .ptf-main { padding-top: 24px; }
.ptf-proof { width: min(720px, 100%); margin: 0 auto; background: #FFF; border: 1px solid var(--ptf-line); border-radius: 22px; box-shadow: var(--ptf-sh-2); overflow: hidden; }
.ptf-proof__empty { display: grid; justify-items: center; gap: 8px; padding: 48px 24px; text-align: center; color: var(--ptf-ink-2); }
.ptf-proof__empty h1 { margin: 6px 0 0; font-size: 22px; color: var(--ptf-ink); }
.ptf-proof__empty p { margin: 0; max-width: 420px; font-size: 14px; line-height: 1.6; }
.ptf-proof__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 26px 30px; border-bottom: 1px solid var(--ptf-line); flex-wrap: wrap; }
.ptf-proof__brand { display: flex; gap: 14px; align-items: center; min-width: 0; }
.ptf-proof__brand img { height: 60px; width: auto; flex-shrink: 0; }
.ptf-proof__brand div { display: grid; gap: 2px; min-width: 0; }
.ptf-proof__brand strong { font-size: 16px; color: var(--ptf-ink); }
.ptf-proof__brand span { font-size: 12.5px; color: var(--ptf-muted); overflow-wrap: anywhere; }
.ptf-proof__doc { text-align: right; display: grid; gap: 2px; }
.ptf-proof__doc span { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ptf-accent); }
.ptf-proof__doc strong { font-size: 16px; font-variant-numeric: tabular-nums; color: var(--ptf-ink); }
.ptf-proof__hero { display: grid; justify-items: center; gap: 6px; padding: 30px 24px 22px; text-align: center; background: linear-gradient(180deg, #F6FBF8, #FFF); }
.ptf-proof__stamp { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--ptf-success-soft); color: var(--ptf-success); font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.ptf-proof__amt { margin: 6px 0 0; font-size: 44px; font-weight: 800; letter-spacing: -.03em; color: var(--ptf-ink); }
.ptf-proof__sub { margin: 0; font-size: 14px; color: var(--ptf-ink-2); }
.ptf-proof__kv { margin: 0; padding: 6px 30px 10px; display: grid; }
.ptf-proof__kv div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--ptf-line); }
.ptf-proof__kv div:last-child { border-bottom: 0; }
.ptf-proof__kv dt { font-size: 13.5px; color: var(--ptf-muted); }
.ptf-proof__kv dd { margin: 0; font-size: 14px; font-weight: 700; color: var(--ptf-ink); text-align: right; overflow-wrap: anywhere; }
.ptf-proof__kv dd.is-ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; font-weight: 600; }
.ptf-proof__foot { display: flex; gap: 18px; align-items: center; padding: 20px 30px 26px; background: var(--ptf-surface-2); border-top: 1px dashed var(--ptf-line-2, #DDD5CA); }
.ptf-proof__qr { width: 96px; height: 96px; flex-shrink: 0; background: #FFF; border-radius: 10px; padding: 4px; box-shadow: inset 0 0 0 1px var(--ptf-line); }
.ptf-proof__qr svg { width: 100%; height: 100%; display: block; }
.ptf-proof__foot p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--ptf-ink-2); }
.ptf-proof__actions { width: min(720px, 100%); margin: 18px auto 0; display: grid; gap: 10px; text-align: center; }
@media (max-width: 560px) {
  .ptf-proof__head { padding: 20px; } .ptf-proof__doc { text-align: left; }
  .ptf-proof__brand img { height: 48px; }
  .ptf-proof__amt { font-size: 36px; }
  .ptf-proof__kv { padding: 4px 20px 8px; } .ptf-proof__kv div { flex-direction: column; gap: 2px; } .ptf-proof__kv dd { text-align: left; }
  .ptf-proof__foot { padding: 18px 20px; flex-direction: column; text-align: center; }
}
@media print {
  .ptf-receipt-page { background: #FFF !important; }
  .ptf-receipt-page .ptf-main { padding: 0; }
  .ptf-proof { box-shadow: none; border: 1px solid #DDD; border-radius: 0; width: 100%; }
  .ptf-proof__hero { background: #FFF; }
  .ptf-no-print { display: none !important; }
  @page { margin: 14mm; }
}
