I suppose you could say that the Fmaj and Em7 chords are in the key of C. You could also say that Em7 is a chord from both D and C major, it creates an ambiguity, and serves to tie the two keys together. Not sure of the terminology involved, I don't know the English terms for this.
A simpler way of looking at it is that when you reach the Fmaj7 chord, you are creating a pattern of descending seconds (and sequencing maj7 chords). If you play a Cmaj7 instead of Em7 the pattern will be more obvious, but the Em7 is also a common substitution for C major chords. The Em7 breaks the pattern, but in a gentle way.