  [abridged] We quantify the morphological evolution of z~0 massive galaxies
($M*/M_\odot\sim10^{11}$) from z~3 in the 5 CANDELS fields. The progenitors are
selected using abundance matching techniques to account for the mass growth.
The morphologies strongly evolve from z~3. At z<1, the population matches the
massive end of the Hubble sequence, with 30% of spheroids, 50% of galaxies with
equally dominant disk and bulge components and 20% of disks. At z~2-3 there is
a majority of irregular systems (~60-70%) with still 30% of spheroids.
  We then analyze the SFRs, gas fractions and structural properties for the
different morphologies independently. Our results suggest two distinct channels
for the growth of bulges in massive galaxies.
  Around 30-40% were already bulges at z~2.5, with low average SFRs and
gas-fractions (10-15%), high Sersic indices (n>3-4) and small effective radii
($R_e$~1 kpc) pointing towards an early formation through gas-rich mergers or
VDI. Between z~ 2.5 and z~0, they rapidly increase their size by a factor of
~4-5, become all passive but their global morphology remains unaltered. The
structural evolution is independent of the gas fractions, suggesting that it is
driven by ex-situ events.
  The remaining 60% experience a gradual morphological transformation, from
clumpy disks to more regular bulge+disks systems, essentially happening at z>1.
It results in the growth of a significant bulge component (n~3) for 2/3 of the
systems possibly through the migration of clumps while the remaining 1/3 keeps
a rather small bulge (n~1.5-2). The transition phase between disturbed and
relaxed systems and the emergence of the bulge is correlated with a decrease of
the star formation activity and the gas fractions. The growth of the effective
radii scales roughly with $H(z)^{-1}$ and it is therefore consistent with the
expected growth of disks in galaxy haloes.
