Oh my dear you are having an emotional affair and you may be "loyal" in a physical sense to your partner, you are apparently not so much loyal in the emotional.
Your friend is backing off more likely then not so that you can cool your jets and re-group mentally to bring this back to a platonic relationship.
Do yourself a favor and STOP crossing relationship boundaries with him (like flirting and being inappropriately innuendo-ing your way through the work day, like hanging out with him one on one, like texting/phoning/emailing him when it doesn't have anything to do with your job) and stop letting him do any of those things to you. Do you guys go to lunch together? Hang out one-on-one outside of work?
Its great that the four of you get along that's fun... it's what the two of you do while "getting along" that is disrespectful to both your and his primary partners.
Like I said, either he's trying to get things back to a less emotional involvment or he sees you're getting too emotionally involved and he's trying to cool your jets by backing away... That's my GUESS anyway. The only person you're going to get the truth from is him so why not ask him outright why he does that rather then just asking him if he's okay.
Here's something to ponder: You're far too close to him emotionally if he doesn't give you attention for a short while and you have a need to ask strangers on a message board why he does it.
I adore him and when we are in that "sweet spot" I feel this is one of my closest relationships.
Funny, that's how I describe my relationship with MY HUSBAND... (sans of course him backing off and playing me with this push / pull stuff this guy is doing to you... oh how he has you in a tither)
“The willingness to accept responsibility for one’s own life is the source from which self-respect springs.” ~Joan Didion