You're correct, TAM lounge is in Terminal 1 and AC in Terminal 2. Both terminals are connected airside, so no worries there. Leaving the AC, just turn left and walk all the way.
Not much stays open overnight in GRU, if anything at all. I'd have at least some water and a little snack with me just in case.