/* ============================================================
   BUTTONS.CSS — Styles boutons globaux NovaBank
   ============================================================ */

/* ── Reset total des effets navigateur ── */
button,
.btn,
input[type="submit"],
input[type="button"],
input[type="reset"] {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-appearance: none;
    appearance: none;
    outline: none !important;
    user-select: none;
    cursor: pointer;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

button:focus,
button:focus-visible,
.btn:focus,
.btn:focus-visible,
input[type="submit"]:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* ── Bouton primaire ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: #0052FF;
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 600;
    font-size: 15px;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: 0;
    transition: background 0.15s ease;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary:hover  { background: #003ECB; }
.btn-primary:active { background: #003ECB; transform: none; }

/* ── Bouton secondaire ── */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    background: #ffffff;
    border: 1.5px solid #D1D5DB;
    border-radius: 10px;
    color: #0D1B2A;
    font-weight: 500;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    transition: border-color 0.15s, color 0.15s;
    cursor: pointer;
}

.btn-secondary:hover  { border-color: #0052FF; color: #0052FF; }
.btn-secondary:active { border-color: #003ECB; color: #003ECB; transform: none; }

/* ── Bouton danger ── */
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: #D92B2B;
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 600;
    font-size: 15px;
    font-family: 'DM Sans', sans-serif;
    transition: background 0.15s;
    cursor: pointer;
}

.btn-danger:hover  { background: #B91C1C; }
.btn-danger:active { background: #B91C1C; transform: none; }

/* ── Bouton ghost ── */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: #6B7280;
    font-weight: 500;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    transition: color 0.15s;
    cursor: pointer;
}

.btn-ghost:hover  { color: #0052FF; }
.btn-ghost:active { color: #003ECB; transform: none; }

/* ── Bouton icon ── */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #F2F4F8;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    color: #0D1B2A;
    font-size: 18px;
    transition: background 0.15s, border-color 0.15s;
    cursor: pointer;
}

.btn-icon:hover  { background: #EBF0FF; border-color: #0052FF; color: #0052FF; }
.btn-icon:active { background: #EBF0FF; transform: none; }

/* ── État désactivé ── */
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled,
.btn-ghost:disabled,
button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── État loading ── */
.btn-loading {
    pointer-events: none;
    opacity: 0.85;
}

/* ── Ring loader ── */
.btn-ring {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    animation: btn-spin 0.6s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    flex-shrink: 0;
}

.btn-ring.ring-dark {
    border: 2.5px solid rgba(0, 82, 255, 0.2);
    border-top-color: #0052FF;
}

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

/* ── Row de boutons ── */
.btn-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.btn-row .btn-primary {
    flex: 1;
}

/* ── Tailles ── */
.btn-sm { padding: 9px 16px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 16px 28px; font-size: 16px; border-radius: 12px; }
