  We study the scaling limits of looptrees associated with
Bienaym\'e--Galton--Watson (BGW) trees, that are obtained by replacing every
vertex of the tree by a "cycle" whose size is its degree. First, we consider
BGW trees whose offspring distribution is critical and in the domain of
attraction of a Gaussian distribution. We prove that the Brownian CRT is the
scaling limit of the associated looptrees, thereby confirming a prediction of
[CK14b]. Then, we deal with BGW trees whose offspring distribution is critical
and heavy-tailed. We show that the scaling limit of the associated looptrees is
a multiple of the unit circle. This corresponds to a so-called condensation
phenomenon, meaning that the underlying tree exhibits a vertex with macroscopic
degree. Here, we rely on an invariance principle for random walks with negative
drift, which is of independent interest. Finally, we apply these results to the
study of the scaling limits of large faces of Boltzmann planar maps. We
complete the results of [Ric17] and establish a phase transition for the
topology of these maps in the non-generic critical regime.
