We are interested in the spectroscopic behaviour of a gas confined in a micrometric or even nanometric volume. Such a situation could be encountered by the filling-up of a porous medium, such as a photonic crystal, with an atomic gas. Here, we discuss the