/* ===== Namespace / Reset ===== */
#stix-onramp, #stix-onramp * { box-sizing: border-box; }
body { font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;background: #f6f7fa; }
#stix-onramp button, #stix-onramp input, #stix-onramp select {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ===== Layout ===== */
.stix-wrap{max-width:640px;margin:24px auto;padding:16px;background:#ffffff;border-radius:16px;--tw-shadow:0px 4px 10px #0000000d;--tw-shadow-colored:0px 4px 10px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);}

  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);}
.stix-header{display:flex;gap:12px;align-items:center;justify-content:center;margin-top: 12px;}
.stix-left{display:flex;gap:12px;align-items:center}
.stix-fiat-wrap select{background:#ffffff;color:#0b0b0d;border:1px solid #e5e7eb;border-radius:9999px;padding:10px 34px 10px 14px;font-weight:700;text-align:center}
#stix-fiat-icon.stix-coin{left:10px}
.stix-select{position:relative;display:inline-flex;align-items:center}
.stix-select select{
  appearance:none;-webkit-appearance:none;-moz-appearance:none;
  background:#ffffff;border:1px solid #e5e7eb;border-radius:9999px;
  color:#0b0b0d;padding:10px 34px 10px 14px;font-weight:700;letter-spacing:.2px;cursor:pointer;
  box-shadow:0 1px 0 rgba(0,0,0,.03)
}
.stix-caret{position:absolute;right:10px;pointer-events:none;color:#6b7280;font-size:12px;line-height:1}
.stix-gear{width:36px;height:36px;border:1px solid #e5e7eb;background:#ffffff;border-radius:9999px;display:inline-flex;align-items:center;justify-content:center;color:#0b0b0d}
.stix-gear:hover{filter:brightness(0.98)}

/* ===== Steps header ===== */
.stix-steps{display:flex;flex-direction:column;gap:6px;margin-bottom:8px}
.stix-step-title{font-weight:700;color:#0b0b0d}
.stix-step-count{color:#c537ec;font-weight:700;margin-left:auto}
.stix-bars{display:flex;gap:6px;width:100%}
.stix-bar{height:4px;border-radius:9999px;overflow:hidden;background:#f3d1ff;width:100%}
.stix-fill{height:100%;width:0;background:#c537ec}

/* ===== Dropdowns ===== */
.stix-select{position:relative;display:inline-flex;align-items:center}
.stix-select select{
  appearance:none;-webkit-appearance:none;-moz-appearance:none;
  background:#ffffff;border:1px solid #e5e7eb;border-radius:9999px;
  color:#0b0b0d;padding:10px 34px 10px 14px;font-weight:700;letter-spacing:.2px;cursor:pointer;
  box-shadow:0 1px 0 rgba(0,0,0,.03)
}
.stix-caret{position:absolute;right:10px;pointer-events:none;color:#000000;font-size:12px;line-height:1}

/* ===== Amount / Quote ===== */
.stix-amount{display:flex;justify-content:center;align-items:flex-start;margin:26px 0 8px;gap:8px;overflow:visible}
.stix-prefix{display:inline-flex;align-items:flex-start;justify-content:center;font-weight:700;font-size:26px;margin-right:6px;color:#0b0b0d;background:transparent;border:none;padding:0;line-height:1}
#stix-fiat-amount{width:auto; max-width:100%; text-align:center; border:none; outline:none; background:transparent;font-weight:900;font-size:72px;letter-spacing:1px;color:#0b0b0d; padding:0 8px 0 0; display:inline-block; line-height:1; box-sizing:content-box}
#stix-amount-mirror{position:absolute;visibility:hidden;white-space:pre;pointer-events:none;font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;font-weight:900;font-size:72px;letter-spacing:1px;line-height:1;display:inline-block}
#stix-fiat-amount::-webkit-outer-spin-button,#stix-fiat-amount::-webkit-inner-spin-button{appearance:none;margin:0}

.stix-rate{display:flex;gap:8px;justify-content:center;align-items:center;color:#6b7280;font-weight:600;margin-bottom:18px}
.stix-swap{width:18px;height:18px}
.stix-spin{width:16px;height:16px;animation:stix-rot 1.2s linear infinite}
@keyframes stix-rot{to{transform:rotate(360deg)}}

/* ===== Pills ===== */
.stix-pills{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;margin:12px 0 18px}
.stix-pills button{border:1px solid #e5e7eb;background:#fff;border-radius:9999px;padding:10px 18px;border: 1px solid #e5e7eb;font-weight:700;color:#0b0b0d}
.stix-pills button:hover{filter:brightness(0.98)}

/* ===== Pay with (image 1) ===== */
.stix-paywith-row{display:flex;align-items:center;justify-content:space-between;margin:10px 0 8px}
.stix-paywith-label{font-weight:700;color:#374151}
.stix-viewall{background:transparent;border:none;color:#6b7280;text-decoration:underline;font-weight:600;cursor:pointer}

/* Panneau OFFERS */
.stix-offers-panel{position:relative; overflow:hidden;max-height:0; transform:translateY(8px);transition:max-height .35s ease, transform .35s ease, opacity .2s ease;opacity:0; display:flex; flex-direction:column; gap:8px;margin:10px 0 8px;}
.stix-offers-panel.open{max-height:360px; transform:translateY(0); opacity:1; margin-bottom:14px;}
.stix-offers-panel.open ~ #stix-offer-optimal{display:none}
.stix-offer-item{display:flex; align-items:center; gap:12px;padding:10px 12px; border-radius:8px; background:#fff;border:1px solid #e6ebf2; cursor:pointer;}
.stix-offer-item input{accent-color:#c537ec; margin-right:4px}
.stix-offer-left{display:flex; align-items:center; gap:10px}
.stix-offer-logo{width:24px; height:24px}
.stix-offer-meta{display:flex; align-items:center; gap:10px}
.stix-offer-name{font-weight:700; color:#0b0b0d}
.stix-offer-paylogos{display:flex; align-items:center; gap:8px}
.stix-offer-paylogos::before{content:'/'; color:#6b7280; margin:0 6px}
.stix-cc{height:24px}
.stix-offer-badge{margin-left:auto; border-radius:6px; padding:6px 10px;background:#c537ec; color:#ffffff;font-weight:900; font-size:10px; line-height:1; letter-spacing:.4px; text-transform:uppercase}
.stix-offer-badge.stix-ok{ background:#c537ec; color:#ffffff }

/* Carte OPTIMALE */
.stix-offer-optimal{display:flex; align-items:center; gap:12px; padding:12px; border-radius:10px; cursor:pointer;background:linear-gradient(#fff,#fff) padding-box,linear-gradient(90deg,#c537ec,#e5b4ff) border-box;border:1px solid transparent;box-shadow:0 0 0 1px rgba(197,55,236,.15) inset;margin-bottom:12px}
.stix-offer-optimal input{accent-color:#c537ec; margin-right:4px}
.stix-opt-left{display:flex; align-items:center; gap:10px}
.stix-opt-logo{width:24px;height:24px}
.stix-opt-name{font-weight:700}
.stix-opt-sep{color:#6b7280}
.stix-opt-pay{display:flex;align-items:center;gap:8px}
.stix-opt-badge{margin-left:auto; border-radius:6px; padding:6px 10px;background:#c537ec; color:#ffffff;font-weight:900; font-size:10px; line-height:1; letter-spacing:.4px; text-transform:uppercase}
.stix-viewall{background:transparent !important; border:none !important; text-decoration:underline !important; color:#6b7280 !important; cursor:pointer; padding:0; appearance:none; box-shadow:none}
@media (max-width:480px){ .stix-opt-sep{display:none} }
.stix-opt-pay img{height:24px}
.stix-offer-paylogos img{height:24px}

/* ===== Step 2: Wallet ===== */
.stix-advanced{background:#fff;border:1px dashed #e5e7eb;border-radius:16px;padding:12px 14px;margin:0 0 16px}
.stix-advanced label{font-weight:700;font-size:13px;color:#374151;display:block;margin-bottom:6px}
.stix-input{position:relative}
.stix-input input{width:100%;border:1px solid #e5e7eb;border-radius:12px;height:52px;padding:12px 52px 12px 12px;font-weight:600;color:#0b0b0d;background:#fafafa}
.stix-input input::placeholder{color:#9aa0a6}
.stix-paste{position:absolute;right:8px;top:50%;transform:translate3d(0,-50%,0);width:36px;height:36px;border:none;background:#0b0b0d;color:#fff;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;line-height:0;padding:0;cursor:pointer}
.stix-paste svg{width:18px;height:18px;display:block}

/* ===== CTA + actions ===== */
.stix-cta{width:100%;border:none;background:#0b0b0d;color:#fff;border-radius:10px;padding:16px 18px;font-weight:800;font-size:16px}
.stix-cta:hover{filter:brightness(1.04)}

.stix-crypto-wrap{position:relative;display:inline-flex;align-items:center}
.stix-crypto-wrap select{background:#ffffff;color:#0b0b0d;border:1px solid #e5e7eb;border-radius:9999px;padding:10px 34px 10px 38px;font-weight:700;text-align:center}
.stix-crypto-wrap .stix-caret{color:#6b7280}
.stix-coin{position:absolute;left:10px;width:20px;height:20px}

/* ===== Errors ===== */
.stix-error{color:#b91c1c;font-weight:700;font-size:12px;margin-top:6px;display:none}
.stix-input.invalid input{border-color:#ef4444 !important;background:#fff5f5 !important}
