  The main purpose of this work is the study of the homotopy theory of
dg-categories up to quasi-equivalences. Our main result provides a natural
description of the mapping spaces between two dg-categories $C$ and $D$ in
terms of the nerve of a certain category of $(C,D)$-bimodules. We also prove
that the homotopy category $Ho(dg-Cat)$ is cartesian closed (i.e. possesses
internal Hom's relative to the tensor product). We use these two results in
order to prove a derived version of Morita theory, describing the morphisms
between dg-categories of modules over two dg-categories $C$ and $D$ as the
dg-category of $(C,D)$-bi-modules. Finally, we give three applications of our
results. The first one expresses Hochschild cohomology as endomorphisms of the
identity functor, as well as higher homotopy groups of the \emph{classifying
space of dg-categories} (i.e. the nerve of the category of dg-categories and
quasi-equivalences between them). The second application is the existence of a
good theory of localization for dg-categories, defined in terms of a natural
universal property. Our last application states that the dg-category of
(continuous) morphisms between the dg-categories of quasi-coherent (resp.
perfect) complexes on two schemes (resp. smooth and proper schemes) is
quasi-equivalent to the dg-category of quasi-coherent complexes (resp. perfect)
on their product.
