/* ═══════════════════════════════════════════════════════
   Lexia Button Design System — lexia-buttons.css
   Palette : primaire #FF6B4A / secondaire gris / danger #DC2626
   Usage : ajouter .lex-btn + modificateur sur tout bouton
   ═══════════════════════════════════════════════════════ */

/* ── Base ─────────────────────────────────────────────── */
.lex-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
  box-sizing: border-box;
  transition: background .15s, border-color .15s, transform .12s, box-shadow .15s;
}
.lex-btn:focus-visible { outline: 2px solid #FF6B4A; outline-offset: 2px; }
.lex-btn:active { transform: scale(0.97); }
.lex-btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ── Couleurs ─────────────────────────────────────────── */

/* Primaire — orange Lexia, action principale par écran */
.lex-btn-primary {
  background: #FF6B4A;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(255,107,74,.22);
}
.lex-btn-primary:hover {
  background: #E8563A;
  box-shadow: 0 4px 14px rgba(255,107,74,.35);
  transform: scale(1.02);
}

/* Secondaire — gris neutre, actions secondaires */
.lex-btn-secondary {
  background: #F3F4F6;
  color: #374151;
  border-color: #E5E7EB;
}
.lex-btn-secondary:hover {
  background: #E9EAEC;
  border-color: #D1D5DB;
  transform: scale(1.01);
}

/* Ghost — transparent, actions tertiaires / utilitaires */
.lex-btn-ghost {
  background: transparent;
  color: #6B7280;
  border-color: #E5E7EB;
}
.lex-btn-ghost:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
  color: #374151;
}

/* Danger — rouge, actions destructrices */
.lex-btn-danger {
  background: #DC2626;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(220,38,38,.2);
}
.lex-btn-danger:hover {
  background: #B91C1C;
  transform: scale(1.02);
}

/* Icône seule — carré 40×40, tooltip obligatoire */
.lex-btn-icon-only {
  width: 40px;
  padding: 0;
  justify-content: center;
}

/* ── Tailles ──────────────────────────────────────────── */
.lex-btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.lex-btn-sm.lex-btn-icon-only { width: 32px; }

.lex-btn-md { height: 40px; } /* défaut */

.lex-btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.lex-btn-lg.lex-btn-icon-only { width: 48px; }

/* ── Icône intégrée ───────────────────────────────────── */
.lex-btn .lex-icon { font-size: 15px; line-height: 1; flex-shrink: 0; }
.lex-btn-sm .lex-icon { font-size: 13px; }

/* ── Tab pills (Toutes / Stripe / Virement…) ─────────── */
.lex-tab-pills {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border, #E5E7EB);
  margin-bottom: 14px;
}
.lex-tab-pill {
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text2, #6B7280);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: "Plus Jakarta Sans", sans-serif;
  transition: color .15s, border-color .15s, font-weight .1s;
}
.lex-tab-pill:hover { color: var(--text, #1a1a1a); }
.lex-tab-pill.active {
  border-bottom-color: var(--accent, #FF6B4A);
  color: var(--accent, #FF6B4A);
  font-weight: 600;
}

/* ── Dark mode ────────────────────────────────────────── */
body.dark .lex-btn-secondary {
  background: #2a2a2a;
  color: #D1D5DB;
  border-color: #3a3a3a;
}
body.dark .lex-btn-secondary:hover { background: #333; border-color: #444; }

body.dark .lex-btn-ghost {
  color: #9CA3AF;
  border-color: #3a3a3a;
}
body.dark .lex-btn-ghost:hover { background: #2a2a2a; color: #D1D5DB; border-color: #444; }

body.dark .lex-tab-pill { color: #9CA3AF; }
body.dark .lex-tab-pill:hover { color: #E5E7EB; }
body.dark .lex-tab-pill.active { color: #FF6B4A; border-bottom-color: #FF6B4A; }
