Yes, a Schengen visa is needed even for transit. This type of visa is valid for 24 hours and can only be used in the transit area of a Schengen country airport. If you want to leave the transit area and go anywhere outside, you need to have a regular Schengen visa in that case.