Spain takes the Catalonia problem to the court