/* ==========================================================================
   COMPONENTS — Boutons, badges, statuts
   ========================================================================== */

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-3);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: all var(--t-fast);
    white-space: nowrap;
    user-select: none;
}

.btn:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.btn:active { background: var(--surface-active); }

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn i { font-size: 0.95em; }

.btn-ghost {
    background: transparent;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-inverse);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--text-inverse);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    color: var(--text-secondary);
}

.btn-icon-sm {
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    transition: all var(--t-fast);
}

.btn-icon-sm:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

/* Niveau de zoom */
.zoom-level {
    min-width: 56px;
    text-align: center;
    font-size: var(--fs-xs);
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
}

/* Badges de statut */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    padding: 2px var(--sp-2);
    font-size: var(--fs-xs);
    font-weight: 500;
    border-radius: 999px;
    border: 1px solid transparent;
}

.status-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-ok {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.status-error {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: rgba(239, 68, 68, 0.2);
}

.status-loading {
    color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
}

.status-loading::before {
    animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}
