/* Boutons génériques pour l'application */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: var(--color-accent, #5a6fd8);
    color: white;
}

.btn-primary:hover {
    background: var(--color-accent-hover, #4759b8);
}

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-secondary:hover {
    background: #d0d7d8;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-control {
    background: white;
    color: #495057;
    border: 1px solid #ced4da;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-control:hover {
    background: var(--color-accent, #5a6fd8);
    color: white;
    border-color: var(--color-accent, #5a6fd8);
}

.btn-view {
    background: var(--color-accent, #5a6fd8);
    color: white;
    flex: 1;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-success {
    background: #2ecc71;
    color: white;
    border-color: #2ecc71;
}

.btn-success:hover:not(:disabled) {
    background: #27ae60;
    border-color: #27ae60;
}

.btn-success:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-disabled {
    opacity: 0.5;
    pointer-events: auto;
    cursor: not-allowed;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
    border-color: #c0392b;
}

.btn-warning {
    background: #ed8936;
    color: white;
    border-color: #ed8936;
}

.btn-warning:hover {
    background: #c05621;
    border-color: #c05621;
}

.btn-group {
    display: flex;
    gap: 10px;
}

@media (max-width: 768px) {
    .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    #toggle-legend-btn {
        display: block !important;
    }

    .btn-sm {
        width: 100%;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .btn {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
    
    .btn-control {
        flex: 1 1 100%;
    }
}