pH-responsive chitosan-based flocculant for precise dye flocculation control and the recycling of textile dyeing effluents