/* ============================================================
 * buttons-uniform.css — Système de boutons uniforme MDMled
 * Bleu (#1d4ed8) pour toutes les actions
 * Rouge (#C8102E) uniquement pour supprimer / danger
 * border-radius: 8px partout, font-size 13px, padding 7px 14px
 * ============================================================ */

/* ── Base ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 7px 14px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
    border: 0.5px solid transparent !important;
    transition: background 0.15s, border-color 0.15s, color 0.15s !important;
    white-space: nowrap !important;
    text-decoration: none !important;
}
.btn:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* ── Primaire — BLEU — toutes les actions ─────────────────── */
.btn-primary {
    background: #1d4ed8 !important;
    color: #fff !important;
    border-color: #1d4ed8 !important;
}
.btn-primary:hover { background: #1e40af !important; border-color: #1e40af !important; }
.btn-primary:active { background: #1e3a8a !important; }

/* ── Secondaire — outline gris ────────────────────────────── */
.btn-secondary,
.btn-outline {
    background: #fff !important;
    color: #374151 !important;
    border: 0.5px solid #d1d5db !important;
}
.btn-secondary:hover, .btn-outline:hover { background: #f3f4f6 !important; }

/* ── Ghost — très discret ─────────────────────────────────── */
.btn-ghost {
    background: transparent !important;
    color: #6b7280 !important;
    border-color: transparent !important;
}
.btn-ghost:hover { background: #f3f4f6 !important; color: #374151 !important; }

/* ── Danger — ROUGE — supprimer uniquement ────────────────── */
.btn-danger {
    background: #C8102E !important;
    color: #fff !important;
    border-color: #C8102E !important;
}
.btn-danger:hover { background: #A30D24 !important; border-color: #A30D24 !important; }
.btn-danger:active { background: #7E0A1C !important; }

/* ── Succès (validation, paiement reçu) ───────────────────── */
.btn-success {
    background: #059669 !important;
    color: #fff !important;
    border-color: #059669 !important;
}
.btn-success:hover { background: #047857 !important; }

/* ── Tailles ──────────────────────────────────────────────── */
.btn-sm { padding: 4px 10px !important; font-size: 12px !important; }
.btn-lg { padding: 10px 18px !important; font-size: 14px !important; }
.btn-icon { padding: 7px 8px !important; }

/* ── Dark mode ────────────────────────────────────────────── */
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn-outline {
    background: #1f2937 !important;
    color: #e5e7eb !important;
    border-color: #374151 !important;
}
[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .btn-outline:hover {
    background: #374151 !important;
}
[data-theme="dark"] .btn-ghost {
    color: #9ca3af !important;
}
[data-theme="dark"] .btn-ghost:hover {
    background: #374151 !important;
    color: #e5e7eb !important;
}

/* ── Correction boutons inline-style bleus déjà corrects ─── */
/* (le bleu inline #1d4ed8 est désormais la couleur standard) */

/* ── Suppression des border-radius aberrants ─────────────── */
/* Certains boutons avaient border-radius: 999px, 4px, etc. */
/* Le !important sur .btn ci-dessus uniformise tout. */

/* ── Focus accessibility ──────────────────────────────────── */
.btn:focus-visible {
    outline: 2px solid #1d4ed8 !important;
    outline-offset: 2px !important;
}
.btn-danger:focus-visible {
    outline-color: #C8102E !important;
}
