Y CVn is a carbon star surrounded by a detached dust shell that has been imaged by the Infrared Space Observatory at 90 microns. With the Nancay Radio Telescope we have studied the gaseous counterpart in the 21-cm HI emission line. New data have been acquired and allow to improve the signal to noise ratio on this line. The high spectral resolution line profiles obtained at the position of the star and at several offset positions set strong constraints on the gas temperature and kinematics within the detached shell; the bulk of the material should be at ~ 100-200 K and in expansion at ~ 1-2 km/s. In addition, the line profile at the central position shows a quasi-rectangular pedestal that traces an 8 km/s outflow of ~ 1.0 10^-7 Msol/yr, stable for about 2 10^4 years, which corresponds to the central outflow already studied with CO rotational lines. We present a model in which the detached shell results from the slowing-down of the stellar wind by surrounding matter. The inner radius corresponds to the location where the stellar outflow is abruptly slowed down from ~ 8 km/s to 2 km/s (termination shock). The outer radius corresponds to the location where external matter is compressed by the expanding shell (bow shock). In this model the mass loss rate of Y CVn has been set constant, at the same level of 1.0 10^-7 Msol/yr, for ~ 4.5 10^5 years. The gas temperature varies from ~ 1800 K at the inner limit to 165 K at the interface between circumstellar matter and external matter. Our modelling shows that the presence of a detached shell around an AGB star may not mean that a drastic reduction of the mass loss rate has occurred in the past. The inner radius of such a shell might only be the effect of a termination shock rather than of an interruption of the mass loss process.