Particle and energy confinement bifurcation in tokamaks