/* ═══════════════════════════════════════════════════════════════════════════
   PHASE 2A — REVOLUT-STYLE COMPONENTS
   Card · Buttons (Primary, Secondary, Ghost) · Form Inputs
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   COMPOSANT 1 — CARD GLASSMORPHISM
   ═══════════════════════════════════════════════════════════════════════════ */

.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 20px;
  transition: all 0.25s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-default);
  transform: translateY(-2px);
}

.card-header {
  margin-bottom: 16px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.card-body {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMPOSANT 2 — BOUTONS
   Primary (CTA gradient) · Secondary · Ghost
   ═══════════════════════════════════════════════════════════════════════════ */

/* --- Primary (CTA gradient) --- */
.btn-primary {
  background: var(--bledna-gradient);
  color: #000;
  font-weight: 700;
  font-size: 16px;
  padding: 18px 24px;
  border: none;
  border-radius: 14px;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 200, 124, 0.3);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  letter-spacing: 0.3px;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 200, 124, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 200, 124, 0.25);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* --- Secondary --- */
.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 16px;
  padding: 18px 24px;
  border: 1px solid var(--border-default);
  border-radius: 14px;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  letter-spacing: 0.3px;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-default);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* --- Ghost --- */
.btn-ghost {
  background: transparent;
  color: var(--bledna-green);
  font-weight: 600;
  font-size: 16px;
  padding: 18px 24px;
  border: none;
  border-radius: 14px;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  letter-spacing: 0.3px;
  text-decoration: none;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* --- Button sizes (modifier) --- */
.btn-sm {
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 10px;
}

.btn-lg {
  padding: 22px 32px;
  font-size: 18px;
  border-radius: 16px;
}

/* --- Icon button --- */
.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMPOSANT 3 — FORM INPUT
   Label · Group · Wrapper · Helper · Input
   ═══════════════════════════════════════════════════════════════════════════ */

/* --- Input base --- */
.form-input {
  width: 100%;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.2s;
  outline: none;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: var(--bledna-green);
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 4px rgba(0, 200, 124, 0.1);
}

.form-input::placeholder {
  color: var(--text-tertiary);
  font-weight: 400;
}

.form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-input.error {
  border-color: var(--color-red);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* --- Input with icon (left) --- */
.input-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper .form-input {
  padding-left: 48px;
}

.input-wrapper .input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  display: flex;
  align-items: center;
}

/* --- Input with icon (right) --- */
.input-wrapper .form-input.has-suffix {
  padding-right: 48px;
}

.input-wrapper .input-suffix {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
  display: flex;
  align-items: center;
}

/* --- Form group (label + input) --- */
.form-group {
  margin-bottom: 20px;
}

/* --- Label --- */
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* --- Helper text --- */
.form-helper {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 6px;
  font-weight: 400;
}

.form-helper.error-text {
  color: var(--color-red);
}

/* --- Field error state --- */
.field-error .form-label {
  color: var(--color-red);
}

.field-error .form-input {
  border-color: var(--color-red);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PHASE 2B — REVOLUT-STYLE SPECIALIZED COMPONENTS
   Badge LIVE · Progress Bar (3 steps) · Gradient Text · Scanner Card
   Trust Strip · Stats Row
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────
   COMPOSANT 4 — BADGE LIVE (taux de change)
   ───────────────────────────────────────────────────────────────────────── */

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bledna-gradient-soft);
  border: 1px solid rgba(0, 200, 124, 0.3);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--bledna-green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: inherit;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: var(--bledna-green);
  border-radius: 50%;
  animation: live-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

/* ─────────────────────────────────────────────────────────────────────────
   COMPOSANT 5 — PROGRESS BAR (3 étapes paiement)
   Steps: 1 = Service · 2 = Détails · 3 = Paiement
   States: completed (gradient + check) · active (gradient + glow) · pending (card)
   ───────────────────────────────────────────────────────────────────────── */

.progress-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.progress-step-inner {
  display: flex;
  align-items: center;
}

.progress-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

/* Completed: gradient bg + check icon */
.progress-step.completed .progress-circle {
  background: var(--bledna-gradient);
  color: #000;
  border: 2px solid transparent;
}

/* Active: gradient bg + number + glow */
.progress-step.active .progress-circle {
  background: var(--bledna-gradient);
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 0 4px rgba(0, 200, 124, 0.2);
}

/* Pending: card bg + tertiary text + subtle border */
.progress-step.pending .progress-circle {
  background: var(--bg-card);
  color: var(--text-tertiary);
  border: 1px solid var(--border-subtle);
}

/* Line between circles */
.progress-line {
  width: 60px;
  height: 2px;
  border-radius: 2px;
  margin: 0 4px;
  transition: background 0.3s ease;
  flex-shrink: 0;
  align-self: center;
  margin-top: 0;
}

.progress-line.completed {
  background: var(--bledna-gradient);
}

.progress-line.pending {
  background: var(--border-subtle);
}

/* Step label */
.progress-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
  font-family: inherit;
  text-align: center;
}

.progress-step.completed .progress-label {
  color: var(--text-secondary);
}

.progress-step.active .progress-label {
  color: var(--bledna-green);
}

.progress-step.pending .progress-label {
  color: var(--text-tertiary);
}

/* ─────────────────────────────────────────────────────────────────────────
   COMPOSANT 6 — GRADIENT TEXT UTILITY
   Applies bleena gradient to any text element
   ───────────────────────────────────────────────────────────────────────── */

.gradient-text {
  background: var(--bledna-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─────────────────────────────────────────────────────────────────────────
   COMPOSANT 7 — SCANNER CARD (feature premium)
   Dashed border card for invoice scanning
   ───────────────────────────────────────────────────────────────────────── */

.scanner-card {
  background: var(--bg-card);
  border: 2px dashed var(--border-default);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: block;
  width: 100%;
}

.scanner-card:hover {
  border-color: var(--bledna-green);
  border-style: solid;
  background: var(--bg-card-hover);
}

.scanner-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  background: var(--bledna-gradient);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 24px;
}

.scanner-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--bledna-gradient);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 9999px;
  letter-spacing: 0.5px;
  font-family: inherit;
}

.scanner-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-family: inherit;
}

.scanner-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 400;
  font-family: inherit;
}

/* ─────────────────────────────────────────────────────────────────────────
   COMPOSANT 8 — TRUST STRIP
   Horizontal security badges row
   ───────────────────────────────────────────────────────────────────────── */

.trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 20px 0;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: inherit;
  letter-spacing: 0.3px;
}

.trust-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bledna-green);
  font-size: 14px;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────────────
   COMPOSANT 9 — STATS ROW
   3-column grid with gradient value + uppercase label
   ───────────────────────────────────────────────────────────────────────── */

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px 0;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 4px;
  font-family: inherit;
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-tertiary);
  font-family: inherit;
}