But how is it with the intonation?
My violin teacher is primarily a viola player. He started off playing the violin and switched after a year or two to viola. He brings his violin along to lessons and occasionally plays. In the interests of maintaining a good relationship I keep my mouth shut and instead tell myself "Not bad intonation for a viola player". By the way, there is a long tradition in the violinist world of telling violist jokes.
Of course there are top class players who can play both, Maxim Vengerov would be the obvious example. At his level putting in the extra hours of practice to maintain good intonation on the viola as well is probably not a problem but you should understand that good intonation on either instrument requires a lot of practice. Having good intonation on one instrument will not give you good intonation on the other.
To have good intonation on both instruments you will need to put in the practice on both instruments. However there is an important crossover. Both instruments have the same pitched (although different length) G, D and A strings. That means the finger patterns for scales on these three strings will be the same. For example. G major scale starting on the G string will go whole step, whole step, half step and this is obviously the same on both instruments and this will save you learning time. Of course a whole step in first position on the viola will be fractionally longer than the same on the violin.
Is it a bad idea to learn both violin and viola?
As long as you have the time and inclination learning to play another musical instrument is always a good idea.
Most social playing in the classical string instrument world is in string quartets - two violins, a viola and a cello. Having a violinist who can also play the viola can save the evening for a string quartet when the violist has to pull out at the last minute.