Catalan separatists win majority in snap elections