I think I've read numerous times that if you can unplug your AFM (with the car running) and if it doesnt affect idle, then the AFM is bad. You really shouldnt have to since the above is happening, but you could just test your AFM to be sure. I'm having this same problem warm engine = bad idle and i've narrowed it down to either a bad ecu temp sensor or TPS. If Maybe check TPS next