  We present the first statistical study on the intrinsic three-dimensional
(3D) shape of a sample of 83 galactic bars extracted from the CALIFA survey. We
use the galaXYZ code to derive the bar intrinsic shape with a statistical
approach. The method uses only the geometric information (ellipticities and
position angles) of bars and discs obtained from a multi-component photometric
decomposition of the galaxy surface-brightness distributions. We find that bars
are predominantly prolate-triaxial ellipsoids (68%), with a small fraction of
oblate-triaxial ellipsoids (32%). The typical flattening (intrinsic C/A
semiaxis ratio) of the bars in our sample is 0.34, which matches well the
typical intrinsic flattening of stellar discs at these galaxy masses. We
demonstrate that, for prolate-triaxial bars, the intrinsic shape of bars
depends on the galaxy Hubble type and stellar mass (bars in massive S0 galaxies
are thicker and more circular than those in less massive spirals). The bar
intrinsic shape correlates with bulge, disc, and bar parameters. In particular
with the bulge-to-total (B/T) luminosity ratio, disc g-r color, and central
surface brightness of the bar, confirming the tight link between bars and their
host galaxies. Combining the probability distributions of the intrinsic shape
of bulges and bars in our sample we show that 52% (16%) of bulges are thicker
(flatter) than the surrounding bar at 1$\sigma$ level. We suggest that these
percentages might be representative of the fraction of classical and disc-like
bulges in our sample, respectively.
