Pressure-confined clumps in magnetized molecular clouds