A former president's party won substantial legislative seats, but the presidential race may be lost to an ultra-right candidate, signaling a potential shift in control within the right-wing political landscape.