From this discussion and this discussion I know that the RSA cryptosystem works like this:
$\bullet$ Let $N=pq$, where $p,q$ are primes, and
$\bullet$ choose $c$, an integer relatively prime to $(p-1)(q-1)$,
Then we can take $m$, the plaintext message, and decode it by computing $$a = m^c \pmod N.$$
To decode the message, we need $d = c^{-1} \pmod {\varphi (N)}$, i.e. $cd \equiv 1 \pmod {\varphi (N)}$, where $\varphi (N) = (p-1)(q-1)$.
My Question
Once we have $d$, then the claim is that $$ m \equiv (m^c)^d \pmod N.$$ Equivalently, since $cd \equiv 1 \pmod {\varphi (N)} \Leftrightarrow cd = 1 + k\varphi (N)$, $k \in \mathbb{Z}$, the claim is that $$ m \equiv m^{1 + k\varphi (N)} \pmod N.$$ Which means that $$m^{\varphi (N)} \equiv 1 \pmod N .$$
Now, I know that by Fermat's little theorem $$ m^{p-1} \equiv 1 \pmod p \quad \text{and} \quad m^{q-1} \equiv 1 \pmod q. $$
This implies that $$ m^{\varphi (N)} \equiv 1 \pmod p \quad \text{and} \quad m^{\varphi (N)} \equiv 1 \pmod q. $$
I don't see how to get from this that $$ m^{\varphi (N)} \equiv 1 \pmod N. $$ I know it follows from the Chinese Remainder Theorem, but I don't know how to use the theorem to get there since I think that the theorem only says that there is a solution and not what the solution is.