:root {
  --primary: #e41837;
  --primary-hover: #c4122d;
  --primary-light: #fef2f2;
  --text-main: #111827;
  --text-muted: #6b7280;
  --bg-page: #f3f4f6;
  --bg-card: #ffffff;
  --border-color: #e5e7eb;
  --border-focus: #e41837;
  --moncash-color: #b91c1c;
  --natcash-color: #0369a1;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
}

.header-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.25rem;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.lang-switcher {
  display: flex;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  background: none;
  border: none;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.lang-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.main-content {
  flex: 1;
  max-width: 680px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1rem;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  border: 1px solid var(--border-color);
}

.card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.card-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.card-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.form-section {
  margin-bottom: 1.75rem;
}

.section-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 480px) {
  .amount-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.amount-btn {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.amount-btn:hover {
  border-color: #cbd5e1;
}

.amount-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.input-text {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s ease;
  background: var(--bg-card);
}

.input-text:focus {
  border-color: var(--border-focus);
}

.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.method-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.method-card:hover {
  border-color: #cbd5e1;
}

.method-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.method-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.method-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 1rem;
}

.badge-moncash {
  background: #fee2e2;
  color: var(--moncash-color);
}

.badge-natcash {
  background: #e0f2fe;
  color: var(--natcash-color);
}

.hint-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.error-banner {
  display: none;
  background: #fef2f2;
  border-left: 4px solid var(--primary);
  color: #991b1b;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.btn-primary {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s ease;
  box-shadow: 0 4px 6px -1px rgba(228, 24, 55, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.security-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.secondary-card {
  margin-top: 1.5rem;
  background: #fafafa;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}

.secondary-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.secondary-card a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  font-size: 0.9rem;
}

.back-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--text-main);
  text-decoration: underline;
}

/* Status pages (merci, en-attente, erreur) */
.status-icon-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  font-size: 2.5rem;
}

.status-success {
  background: #dcfce7;
  color: #16a34a;
}

.status-pending {
  background: #fef3c7;
  color: #d97706;
}

.status-error {
  background: #fee2e2;
  color: #dc2626;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid #fde68a;
  border-top-color: #d97706;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.ref-box {
  background: var(--bg-page);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.95rem;
  margin: 1.5rem 0;
  word-break: break-all;
}
