Given two smooth manifolds $M$ and $N$, it is known that if $M$ is compact, then $C^\infty(M,N)$ is a Fréchet manifold whose tangent space at $f \in C^\infty(M,N)$ is the space $$T_f C^\infty(M,N) = \Gamma(M,f^*TN)$$ of all smooth vector fields $\xi(x) \in T_{f(x)}N$ along $f$.

Suppose we are given a foliation $\mathcal{F}$ of codimension $q$ on $N$ and let $C^\infty_{\mathcal{F}}(M,N)$ be the subset of somooth functions $f:M \to N$ tangent to the leaves. Is $C^\infty_{\mathcal{F}}(M,N)$ still a Fréchet manifold? If it is the case, what is its tangent space at a point?

If it is too general to answer, can we at least say something about the case where $\mathcal{F}$ is a foliation of codimension $1$?