  We prove that, given $2<p<\infty$, the Fourier coefficients of functions in
$L_2(\mathbb{T}, \lvert t \rvert^{1-2/p}\, dt)$ belong to $\ell_p$, and that,
given $1<p<2$, the Fourier series of sequences in $\ell_p$ belong
$L_2(\mathbb{T}, \lvert t \rvert^{2/p-1}\, dt)$. Then, we apply these results
to the study of conditional Schauder bases and conditional almost greedy bases
in Banach spaces. Specifically, we prove that, for every $1<p<\infty$ and every
$0\le \alpha<1$, there is a Schauder basis of $\ell_p$ whose conditionality
constants grow as $(m^\alpha)_{m=1}^\infty$, and there is an almost greedy
basis of $\ell_p$ whose conditionality constants grow as $((\log
m)^\alpha)_{m=2}^\infty$.
