/* ================================================================
   Direct Exchange Widget (.dcx-*)
   Composant embeddable — fonctionne sur dashboard et pages publiques
   ================================================================ */

.dcx-widget {
  --dcx-radius: 16px;
  --dcx-border: var(--mp-border, rgba(255, 255, 255, 0.08));
  --dcx-bg: var(--mp-bg-2, #0c1810);
  --dcx-card-bg: var(--mp-glass, rgba(255, 255, 255, 0.04));
  --dcx-text: var(--mp-text, #e8f0ea);
  --dcx-muted: var(--mp-text-muted, #8fa896);
  --dcx-green: var(--mp-green, #1b6b35);
  --dcx-gold: var(--mp-gold, #c9a227);
  --dcx-send: #e05252;
  --dcx-receive: #2ecc71;
  font-family: inherit;
  color: var(--dcx-text);
}

.dcx-widget-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--mp-heading, #fff);
}

.dcx-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 991px) {
  .dcx-layout {
    grid-template-columns: 1fr;
  }
}

.dcx-card {
  background: var(--dcx-card-bg);
  border: 1px solid var(--dcx-border);
  border-radius: var(--dcx-radius);
  padding: 24px;
  box-shadow: var(--mp-shadow-sm, 0 4px 24px rgba(0, 0, 0, 0.15));
}

.dcx-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--mp-heading, #fff);
}

.dcx-section {
  margin-bottom: 24px;
}

/* Taux courant ExchangeRate — affiché dès la sélection de la paire */
.dcx-pair-rate {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: rgba(27, 107, 53, 0.1);
  border: 1px solid rgba(27, 107, 53, 0.25);
  font-size: 0.85rem;
  color: var(--dcx-receive);
}

.dcx-pair-rate i {
  opacity: 0.7;
  flex-shrink: 0;
}

.dcx-pair-rate-fees {
  color: var(--dcx-muted);
  font-size: 0.78rem;
}

/* Hint min/max */
.dcx-amount-hint {
  font-size: 0.8rem;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(224, 82, 82, 0.1);
}

/* Taux dans la liste du modal */
.dcx-asset-item-rate {
  font-size: 0.73rem;
  color: var(--dcx-receive);
  margin-top: 2px;
}

.dcx-section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dcx-send);
  margin-bottom: 10px;
}

.dcx-section-label--receive {
  color: var(--dcx-receive);
}

.dcx-amount-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.dcx-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dcx-field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dcx-muted);
}

.dcx-input,
.dcx-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--dcx-border);
  border-radius: 12px;
  background: var(--dcx-bg);
  color: var(--dcx-text);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dcx-input:focus,
.dcx-select:focus {
  outline: none;
  border-color: var(--dcx-green);
  box-shadow: 0 0 0 3px rgba(27, 107, 53, 0.2);
}

.dcx-amount-input {
  font-size: 1.25rem;
  font-weight: 600;
}

.dcx-amount-input--readonly {
  opacity: 0.85;
  cursor: default;
}

/* ── Calcul bidirectionnel ──────────────────────────────── */

/* Champ qui "pilote" le calcul — bordure colorée selon le sens */
.dcx-amount-input--driving-send {
  border-color: var(--dcx-send) !important;
  box-shadow: 0 0 0 3px rgba(224, 82, 82, 0.15) !important;
}
.dcx-amount-input--driving-recv {
  border-color: var(--dcx-receive) !important;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.15) !important;
}

/* Champ calculé — discret */
.dcx-amount-input--driven {
  opacity: 0.75;
}

/* Badge "active" affiché à côté du label pilote */
.dcx-driving-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 8px;
  color: var(--dcx-send);
  vertical-align: middle;
  animation: dcx-pulse 1.6s ease-in-out infinite;
}
.dcx-driving-badge--receive {
  color: var(--dcx-receive);
}
@keyframes dcx-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

.dcx-asset-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  min-width: 180px;
  max-width: 220px;
  border: 1px solid var(--dcx-border);
  border-radius: 12px;
  background: var(--dcx-bg);
  color: var(--dcx-text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: left;
}

.dcx-asset-btn:hover {
  border-color: var(--dcx-green);
  background: rgba(27, 107, 53, 0.08);
}

.dcx-asset-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.dcx-asset-name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dcx-asset-btn i {
  color: var(--dcx-muted);
  font-size: 1.1rem;
}

.dcx-address-block {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dcx-link-small {
  font-size: 0.82rem;
  color: var(--dcx-green);
  text-decoration: none;
}

.dcx-link-small:hover {
  text-decoration: underline;
}

.dcx-alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
}

.dcx-alert--error {
  background: rgba(224, 82, 82, 0.12);
  border: 1px solid rgba(224, 82, 82, 0.3);
  color: #f5a5a5;
}

.dcx-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.dcx-badge--send {
  background: rgba(224, 82, 82, 0.15);
  color: var(--dcx-send);
}

.dcx-badge--receive {
  background: rgba(46, 204, 113, 0.15);
  color: var(--dcx-receive);
}

.dcx-summary-block {
  margin-bottom: 16px;
}

.dcx-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dcx-summary-amount {
  font-size: 1.15rem;
  font-weight: 700;
}

.dcx-summary-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.dcx-summary-detail {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--dcx-muted);
  margin-bottom: 6px;
}

.dcx-summary-detail strong {
  color: var(--dcx-text);
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

.dcx-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--dcx-border);
  font-weight: 600;
}

.dcx-summary-total strong {
  color: var(--dcx-send);
  font-size: 1.05rem;
}

.dcx-summary-total--receive strong {
  color: var(--dcx-receive);
}

.dcx-divider {
  border: none;
  border-top: 1px solid var(--dcx-border);
  margin: 20px 0;
}

.dcx-rate-line {
  font-size: 0.82rem;
  color: var(--dcx-muted);
  margin-bottom: 16px;
}

.dcx-fee-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 10px;
  border: 1px dashed rgba(0, 0, 0, 0.08);
}

.dcx-fee-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
}

.dcx-fee-label {
  flex: 1;
  color: var(--dcx-muted);
}

.dcx-fee-detail {
  font-size: 0.7rem;
  color: var(--dcx-muted);
  opacity: 0.7;
}

.dcx-fee-amount {
  font-weight: 700;
  color: #dc3545;
  white-space: nowrap;
}

.dcx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}

.dcx-btn--primary {
  background: linear-gradient(135deg, var(--dcx-green), #228b45);
  color: #fff;
  border: 1px solid transparent;
}

.dcx-btn--primary:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
  color: #fff;
}

.dcx-btn--outline {
  background: transparent;
  color: var(--dcx-text, #0f172a);
  border: 1.5px solid var(--dcx-border, rgba(15, 23, 42, 0.18));
}

.dcx-btn--outline:hover:not(:disabled) {
  border-color: var(--dcx-green, #1b6b35);
  color: var(--dcx-green, #1b6b35);
  background: rgba(27, 107, 53, 0.06);
}

.dcx-btn--block {
  width: 100%;
}

.dcx-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dcx-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.dcx-modal-backdrop:not([hidden]) {
  display: flex;
}

.dcx-modal-backdrop[hidden] {
  display: none !important;
}

.dcx-modal {
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  background: var(--dcx-bg);
  border: 1px solid var(--dcx-border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35), 0 8px 20px rgba(0, 0, 0, 0.12);
}

.dcx-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--dcx-border);
}

.dcx-modal-header h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.dcx-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--dcx-card-bg);
  color: var(--dcx-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 1px solid var(--dcx-border);
  transition: background 0.15s, color 0.15s, transform 0.15s;
}

.dcx-modal-close:hover {
  color: var(--dcx-text);
  background: rgba(255, 255, 255, 0.08);
}

.dcx-modal-toolbar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--dcx-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dcx-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--dcx-border);
}

body[data-theme="light"] .dcx-tabs,
html[data-theme="light"] .dcx-tabs {
  background: #f4f7f5;
}

.dcx-tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--dcx-text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dcx-tab:hover {
  background: rgba(27, 107, 53, 0.1);
  color: var(--dcx-text);
}

.dcx-tab.active {
  background: var(--dcx-card-bg);
  border: none;
  color: var(--dcx-green, #1b6b35);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Adaptation au thème clair */
body[data-theme="light"] .dcx-tab,
html[data-theme="light"] .dcx-tab {
  color: #2d5f3a;
}

body[data-theme="light"] .dcx-tab:hover,
html[data-theme="light"] .dcx-tab:hover {
  background: rgba(27, 107, 53, 0.08);
  color: #1b6b35;
}

body[data-theme="light"] .dcx-tab.active,
html[data-theme="light"] .dcx-tab.active {
  background: #fff;
  color: #1b6b35;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Responsive mobile - optimisation de l'espace */
@media (max-width: 575px) {
  .dcx-tabs {
    gap: 6px;
  }
  
  .dcx-tab {
    padding: 10px 8px;
    font-size: 0.75rem;
    min-width: 0;
  }
}

.dcx-asset-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  flex: 1;
  max-height: 360px;
}

.dcx-asset-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--dcx-border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}

.dcx-asset-item:hover {
  background: rgba(27, 107, 53, 0.12);
}
.dcx-asset-item img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.dcx-asset-item-info {
  flex: 1;
  min-width: 0;
}

.dcx-asset-item-name {
  font-weight: 600;
  font-size: 0.92rem;
}

.dcx-asset-item-limits {
  font-size: 0.75rem;
  color: var(--dcx-muted);
  margin-top: 2px;
}

.dcx-asset-item-code {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dcx-gold);
}

.dcx-empty {
  text-align: center;
  padding: 32px 20px;
  color: var(--dcx-muted);
  font-size: 0.9rem;
}

.dcx-widget--compact .dcx-layout {
  gap: 16px;
}

.dcx-widget--compact .dcx-card {
  padding: 18px;
}

@media (max-width: 575px) {
  .dcx-amount-row {
    grid-template-columns: 1fr;
  }

  .dcx-asset-btn {
    max-width: none;
    width: 100%;
  }
}

.mp-widget .dcx-layout {
  grid-template-columns: 1fr;
  gap: 16px;
}

.mp-widget .dcx-card {
  padding: 16px;
}

.mp-widget .dcx-modal-backdrop {
  z-index: 10050;
}

/* Modale téléportée sur <body> (hors .mp-widget overflow:hidden) */
.dcx-modal-backdrop--teleport {
  z-index: 10050;
}

[data-theme="light"] .dcx-widget,
html[data-theme="light"] .dcx-widget {
  --dcx-bg: #f4f7f5;
  --dcx-card-bg: #fff;
  --dcx-border: rgba(0, 0, 0, 0.1);
}

/* ────────────────────────────────────────────────────────────────
   Push payment overlay — statut après charge directe Flutterwave
   ──────────────────────────────────────────────────────────────── */

/* Modal centré (overlay plein écran) — réutilise le pattern .dcx-modal-backdrop */
.dcx-push-overlay,
.dcx-crypto-overlay {
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  backdrop-filter: blur(4px);
  animation: dcxFadeIn .25s ease;
}

@keyframes dcxFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.dcx-push-card,
.dcx-crypto-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: min(86vh, 520px);
  overflow-x: hidden;
  overflow-y: auto;
  margin: auto;
  background: var(--dcx-card-bg, #fff);
  border-radius: 1rem;
  padding: 1rem 0.95rem 0.85rem;
  text-align: center;
  border: 1px solid var(--dcx-border, rgba(0,0,0,.1));
  box-shadow: 0 20px 48px rgba(0,0,0,.4);
  animation: dcxModalPop .3s cubic-bezier(.16,.84,.44,1);
  scrollbar-width: thin;
}

@keyframes dcxModalPop {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Bouton de fermeture du modal de paiement */
.dcx-pay-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: var(--dcx-bg, rgba(0,0,0,.05));
  color: var(--dcx-muted, #6b7280);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}

.dcx-pay-close:hover {
  color: var(--dcx-text, #111);
  background: rgba(0, 0, 0, .12);
}

/* ── Icône animée ── */
.dcx-push-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 0.45rem;
}

.dcx-push-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid #1E7A3E;
  animation: dcxPulse 1.6s ease-out infinite;
}

@keyframes dcxPulse {
  0%   { opacity: 1;   transform: scale(1); }
  70%  { opacity: 0;   transform: scale(1.6); }
  100% { opacity: 0;   transform: scale(1.6); }
}

.dcx-push-phone {
  font-size: 2rem;
  z-index: 1;
  animation: dcxBounce 1.6s ease-in-out infinite;
}

@keyframes dcxBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

/* ── Texte ── */
.dcx-push-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dcx-text, #1a2e1a);
  margin: 0 0 0.25rem;
}

.dcx-push-msg {
  font-size: 0.78rem;
  color: var(--dcx-muted, #6b7280);
  margin: 0;
  line-height: 1.35;
}

.dcx-push-head {
  margin-bottom: 0.55rem;
}

.dcx-push-footer {
  border-top: 1px solid var(--dcx-border, rgba(0,0,0,.08));
  padding-top: 0.5rem;
  margin-top: 0.1rem;
}

.dcx-push-footer .dcx-push-steps {
  margin-bottom: 0.45rem;
}

.dcx-push-footer .dcx-step {
  gap: 4px;
}

.dcx-push-footer .dcx-push-timer {
  margin-bottom: 0.3rem;
}

/* ── Étapes ── */
.dcx-push-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 0.5rem;
}

.dcx-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.dcx-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dcx-border, #d1d5db);
  border: 2px solid var(--dcx-border, #d1d5db);
  transition: all .35s ease;
}

.dcx-step-label {
  font-size: 0.58rem;
  color: var(--dcx-muted, #9ca3af);
  white-space: normal;
  max-width: 4.2rem;
  line-height: 1.15;
  text-align: center;
  transition: color .35s ease;
}

.dcx-step-line {
  flex: 1;
  height: 2px;
  background: var(--dcx-border, #d1d5db);
  margin-bottom: 10px;
  transition: background .35s ease;
}

/* Étape done */
.dcx-step--done .dcx-step-dot {
  background: #1E7A3E;
  border-color: #1E7A3E;
}
.dcx-step--done .dcx-step-label {
  color: #1E7A3E;
  font-weight: 600;
}

/* Étape active (en cours) */
.dcx-step--active .dcx-step-dot {
  background: #C9A227;
  border-color: #C9A227;
  box-shadow: 0 0 0 4px rgba(201,162,39,.25);
  animation: dcxStepPulse 1.2s ease-in-out infinite;
}
.dcx-step--active .dcx-step-label {
  color: #C9A227;
  font-weight: 600;
}

@keyframes dcxStepPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(201,162,39,.25); }
  50%       { box-shadow: 0 0 0 8px rgba(201,162,39,.1); }
}

/* Étape erreur */
.dcx-step--error .dcx-step-dot {
  background: #dc3545;
  border-color: #dc3545;
}

/* ── Timer / statut ── */
.dcx-push-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--dcx-muted, #6b7280);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.dcx-push-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--dcx-border, #d1d5db);
  border-top-color: #1E7A3E;
  border-radius: 50%;
  animation: dcxSpin .8s linear infinite;
}

@keyframes dcxSpin {
  to { transform: rotate(360deg); }
}

/* ── Référence ── */
.dcx-push-ref {
  font-size: .7rem;
  color: var(--dcx-muted, #9ca3af);
  font-family: 'SFMono-Regular', Menlo, monospace;
  margin-top: 0.15rem;
}

/* ────────────────────────────────────────────────────────────────
   Crypto inline — dépôt via adresse + QR code
   ──────────────────────────────────────────────────────────────── */

/* .dcx-crypto-overlay et .dcx-crypto-card : voir règles modal partagées plus haut
   (fusionnées avec .dcx-push-overlay / .dcx-push-card). */

.dcx-crypto-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dcx-text, #1a2e1a);
  margin: 0 0 0.2rem;
}

.dcx-crypto-sub {
  font-size: 0.72rem;
  color: var(--dcx-muted, #6b7280);
  margin: 0;
  line-height: 1.3;
}

.dcx-crypto-head .dcx-crypto-sub {
  margin-top: 0.2rem;
}

/* En-tête compact (badge + titre) */
.dcx-crypto-head {
  margin-bottom: 0.45rem;
}

.dcx-crypto-head__row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.15rem;
}

.dcx-crypto-head .dcx-crypto-gateway-badge {
  margin-bottom: 0;
}

.dcx-crypto-head .dcx-crypto-title {
  margin: 0;
}

/* Corps 2 colonnes dans le modal (QR + champs) — 1 col. sur mobile */
.dcx-crypto-body {
  display: grid;
  grid-template-columns: minmax(88px, 108px) minmax(0, 1fr);
  align-items: start;
  gap: 0.5rem 0.65rem;
  margin-bottom: 0.5rem;
  text-align: left;
}

.dcx-crypto-body__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.dcx-crypto-body__fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.dcx-crypto-footer {
  border-top: 1px solid var(--dcx-border, rgba(0,0,0,.08));
  padding-top: 0.5rem;
  margin-top: 0.1rem;
}

.dcx-crypto-footer .dcx-push-steps {
  margin-bottom: 0.5rem;
}

.dcx-crypto-footer .dcx-step {
  gap: 4px;
}

.dcx-crypto-footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.35rem;
  font-size: 0.74rem;
  color: var(--dcx-muted, #6b7280);
}

.dcx-crypto-footer-meta .dcx-push-timer {
  margin-bottom: 0;
}

/* ── Bandeau réseau (critique) ── */
.dcx-crypto-network {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: .55rem;
  padding: .4rem .55rem;
  font-size: .72rem;
  color: #92400e;
  margin-bottom: 0.55rem;
  line-height: 1.3;
  width: 100%;
  text-align: left;
}
.dcx-crypto-network-ico { margin-right: .2rem; }
.dcx-crypto-network-warn {
  display: inline;
  font-size: .65rem;
  color: #b45309;
  margin-left: 0.2rem;
}

/* ── QR code ── */
.dcx-crypto-qr {
  display: inline-flex;
  padding: .45rem;
  background: #fff;
  border: 1px solid var(--dcx-border, rgba(0,0,0,.08));
  border-radius: .75rem;
  margin-bottom: 0;
}
.dcx-crypto-qr img {
  width: 108px;
  height: 108px;
  display: block;
}

/* ── Champs copiables ── */
.dcx-crypto-field {
  text-align: left;
  margin-bottom: 0;
}
.dcx-crypto-field > label {
  display: block;
  font-size: .66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--dcx-muted, #9ca3af);
  margin-bottom: .25rem;
}
.dcx-crypto-copy {
  display: flex;
  align-items: stretch;
  gap: .35rem;
  background: var(--dcx-input-bg, #f9fafb);
  border: 1px solid var(--dcx-border, rgba(0,0,0,.1));
  border-radius: .55rem;
  padding: .28rem .28rem .28rem .55rem;
}
.dcx-crypto-copy code {
  flex: 1;
  display: flex;
  align-items: center;
  font-family: 'SFMono-Regular', Menlo, monospace;
  font-size: .78rem;
  color: var(--dcx-text, #1a2e1a);
  word-break: break-all;
  background: none;
  line-height: 1.3;
}
.dcx-crypto-addr { font-size: .7rem; }

.dcx-copy-btn {
  flex-shrink: 0;
  border: none;
  background: #1E7A3E;
  color: #fff;
  font-size: .68rem;
  font-weight: 600;
  padding: .32rem .6rem;
  border-radius: .45rem;
  cursor: pointer;
  transition: background .2s ease, transform .1s ease;
}
.dcx-copy-btn:hover  { background: #166534; }
.dcx-copy-btn:active { transform: scale(.96); }
.dcx-copy-btn.dcx-copied { background: #C9A227; }

/* ── Expiration ── */
.dcx-crypto-expire {
  font-size: .72rem;
  color: var(--dcx-muted, #6b7280);
  margin-bottom: 0;
}
.dcx-crypto-expire--over {
  color: #dc3545;
  font-weight: 600;
}

@media (max-width: 479px) {
  .dcx-push-overlay,
  .dcx-crypto-overlay {
    padding: 8px;
    align-items: flex-end;
  }

  .dcx-push-card,
  .dcx-crypto-card {
    max-height: calc(100dvh - 12px);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding: 0.85rem 0.8rem 0.8rem;
  }

  .dcx-crypto-body {
    grid-template-columns: 1fr;
  }

  .dcx-crypto-body__visual {
    justify-content: center;
  }

  .dcx-step-label {
    display: none;
  }

  .dcx-step-line {
    margin-bottom: 0;
  }

  .dcx-crypto-qr img {
    width: 100px;
    height: 100px;
  }

  .dcx-crypto-copy code {
    font-size: .68rem;
  }

  .dcx-push-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 380px) {
  .dcx-crypto-qr img {
    width: 88px;
    height: 88px;
  }
}

/* ────────────────────────────────────────────────────────────────
   Paiement manuel — instructions dans le modal (gateway sans API)
   ──────────────────────────────────────────────────────────────── */

.dcx-manual-amount {
  background: linear-gradient(135deg, #14532d, #1E7A3E);
  color: #fff;
  border-radius: .75rem;
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.75rem;
}
.dcx-manual-amount-label {
  font-size: .68rem;
  opacity: .8;
  margin-bottom: .15rem;
}
.dcx-manual-amount-val {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
}
.dcx-manual-amount-val span {
  font-size: .9rem;
  font-weight: 600;
  opacity: .85;
}

.dcx-manual-instr {
  text-align: left;
  font-size: .85rem;
  line-height: 1.7;
  color: var(--dcx-text, #374151);
  background: var(--dcx-bg, rgba(0,0,0,.03));
  border-radius: .75rem;
  padding: .85rem 1rem;
  margin-bottom: 1.1rem;
}

.dcx-manual-steps {
  text-align: left;
  font-size: .85rem;
  line-height: 1.7;
  color: var(--dcx-text, #374151);
  padding-left: 1.2rem;
  margin: 0 0 1.1rem;
}
.dcx-manual-steps li { margin-bottom: .35rem; }

.dcx-manual-proof {
  text-align: left;
  margin-bottom: 1rem;
}
.dcx-manual-proof label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: .4rem;
  color: var(--dcx-text, #374151);
}
.dcx-manual-proof label span {
  font-weight: 400;
  color: var(--dcx-muted, #6b7280);
}
.dcx-manual-proof input[type="file"] {
  width: 100%;
  font-size: .8rem;
  color: var(--dcx-text, #374151);
}

.dcx-manual-btn {
  width: 100%;
  border: none;
  background: #1E7A3E;
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  padding: .85rem 1rem;
  border-radius: .75rem;
  cursor: pointer;
  transition: background .2s ease, transform .1s ease;
  margin-bottom: .9rem;
}
.dcx-manual-btn:hover:not(:disabled) { background: #166534; }
.dcx-manual-btn:active:not(:disabled) { transform: scale(.99); }
.dcx-manual-btn:disabled { opacity: .7; cursor: default; }
.dcx-manual-btn--done { background: #C9A227; }

/* ── Page /direct-change-form ───────────────────────────────── */
.dcx-form-page {
  padding: 32px 0 64px;
  min-height: calc(100vh - 180px);
}

.dcx-form-page-inner {
  max-width: 960px;
  margin: 0 auto;
}

/* ── Widget compact guidé (inspiré Express Change) ───────────── */
.dcx-widget--compact .dcx-form-compact {
  max-width: 920px;
  margin: 0 auto;
}

.dcx-widget--compact .dcx-guide-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(27, 107, 53, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.22);
}

.dcx-widget--compact .dcx-guide-banner-icon {
  font-size: 1.15rem;
  color: var(--dcx-receive, #2ecc71);
  flex-shrink: 0;
}

.dcx-widget--compact .dcx-guide-banner-text {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.dcx-widget--compact .dcx-step-track {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.dcx-widget--compact .dcx-step-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--dcx-border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dcx-muted);
}

.dcx-widget--compact .dcx-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.62rem;
}

.dcx-widget--compact .dcx-step-item--active {
  border-color: rgba(46, 204, 113, 0.45);
  background: rgba(46, 204, 113, 0.1);
  color: var(--dcx-receive, #2ecc71);
}

.dcx-widget--compact .dcx-step-item--active .dcx-step-num {
  background: var(--dcx-receive, #2ecc71);
  color: #0a120c;
}

.dcx-widget--compact .dcx-step-item--done {
  border-color: rgba(46, 204, 113, 0.25);
  color: var(--dcx-receive, #2ecc71);
}

.dcx-widget--compact .dcx-compact-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.dcx-widget--compact .dcx-section-send,
.dcx-widget--compact .dcx-section-receive {
  margin-bottom: 0;
  min-width: 0;
}

.dcx-widget--compact .dcx-compact-swap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dcx-widget--compact .dcx-compact-swap-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--dcx-border);
  color: var(--dcx-muted);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.dcx-widget--compact .dcx-compact-swap-icon:hover {
  color: var(--dcx-receive, #2ecc71);
  border-color: rgba(46, 204, 113, 0.45);
  background: rgba(46, 204, 113, 0.08);
}

.dcx-widget--compact .dcx-compact-swap-icon:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dcx-widget--compact .dcx-section-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  border-radius: 50%;
  background: rgba(224, 82, 82, 0.15);
  color: var(--dcx-send, #e05252);
  font-size: 0.65rem;
  font-weight: 800;
  vertical-align: middle;
}

.dcx-widget--compact .dcx-section-step--recv {
  background: rgba(46, 204, 113, 0.15);
  color: var(--dcx-receive, #2ecc71);
}

.dcx-widget--compact .dcx-section-hint {
  margin: -4px 0 8px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--dcx-muted);
}

.dcx-widget--compact .dcx-asset-btn--compact {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.dcx-widget--compact .dcx-asset-btn--compact:hover {
  border-color: rgba(46, 204, 113, 0.45);
  background: rgba(46, 204, 113, 0.08);
}

.dcx-widget--compact .dcx-asset-btn--compact .dcx-asset-icon {
  width: 28px;
  height: 28px;
}

.dcx-widget--compact .dcx-asset-btn--compact .dcx-asset-name {
  font-size: 0.82rem;
}

.dcx-widget--compact .dcx-field-micro-hint {
  margin: 3px 0 0;
  font-size: 0.58rem;
  line-height: 1.35;
  color: var(--dcx-muted);
}

.dcx-widget--compact .dcx-inline-summary {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--dcx-border);
  background: rgba(255, 255, 255, 0.02);
}

.dcx-widget--compact .dcx-inline-summary--send {
  border-color: rgba(224, 82, 82, 0.2);
  background: rgba(224, 82, 82, 0.04);
}

.dcx-widget--compact .dcx-inline-summary--receive {
  border-color: rgba(46, 204, 113, 0.2);
  background: rgba(46, 204, 113, 0.04);
}

.dcx-widget--compact .dcx-inline-summary .dcx-summary-detail {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
  padding: 2px 0;
}

.dcx-widget--compact .dcx-inline-summary .dcx-summary-total {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  font-size: 0.78rem;
}

.dcx-widget--compact .dcx-compact-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--dcx-border);
}

.dcx-widget--compact .dcx-fee-details .dcx-fee-breakdown-title {
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dcx-muted);
}

.dcx-widget--compact .dcx-fee-details .dcx-fee-breakdown-title::-webkit-details-marker {
  display: none;
}

.dcx-widget--compact .dcx-fee-details .dcx-fee-breakdown-list {
  padding: 0 12px 10px;
}

.dcx-widget--compact .dcx-checklist {
  list-style: none;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px dashed var(--dcx-border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
}

.dcx-widget--compact .dcx-checklist-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--dcx-muted);
}

.dcx-widget--compact .dcx-checklist-item--done {
  color: var(--dcx-receive, #2ecc71);
}

.dcx-widget--compact .dcx-pay-hint {
  margin: 8px 0 0;
  text-align: center;
  font-size: 0.72rem;
  color: var(--dcx-muted);
}

.dcx-widget--compact .dcx-pay-hint--ready {
  color: var(--dcx-receive, #2ecc71);
}

@media (max-width: 767px) {
  .dcx-widget--compact .dcx-compact-columns {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dcx-widget--compact .dcx-compact-swap {
    justify-content: center;
    padding: 4px 0;
  }

  .dcx-widget--compact .dcx-compact-swap-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    border-radius: 50%;
    transform: none;
    flex-shrink: 0;
  }

  .dcx-widget--compact .dcx-compact-swap-icon i {
    display: inline-block;
    transform: rotate(90deg);
  }

  .dcx-widget--compact .dcx-checklist {
    grid-template-columns: 1fr;
  }

  .dcx-widget--compact .dcx-step-label {
    display: none;
  }
}

