Complex-analyticity of harmonic maps, vanishing and Lefschetz theorems