EU threatens Hungary with legal action