Context. Resonant lines are powerful probes of the interstellar and circumgalactic medium of galaxies. Their transfer in gas being a complex process, the interpretation of their observational signatures, either in absorption or in emission, is often not straightforward. Numerical radiative transfer simulations are needed to accurately describe the travel of resonant line photons in real and in frequency space, and to produce realistic mock observations. Aims. This paper introduces RASCAS, a new public 3D radiative transfer code developed to perform the propagation of any resonant line in numerical simulations of astrophysical objects. RASCAS was designed to be easily customisable and to process simulations of arbitrarily large sizes on large supercomputers. Methods. RASCAS performs radiative transfer on an adaptive mesh with an octree structure using the Monte Carlo technique. RASCAS features full MPI parallelisation, domain decomposition, adaptive load-balancing, and a standard peeling algorithm to construct mock observations. The radiative transport of resonant line photons through different mixes of species (e.g. H I, Si II, Mg II, Fe II), including their interaction with dust, is implemented in a modular fashion to allow new transitions to be easily added to the code. Results. RASCAS is very accurate and efficient. It shows perfect scaling up to a minimum of a thousand cores. It has been fully tested against radiative transfer problems with analytic solutions and against various test cases proposed in the literature. Although it was designed to describe accurately the many scatterings of line photons, RASCAS may also be used to propagate photons at any wavelength (e.g. stellar continuum or fluorescent lines), or to cast millions of rays to integrate the optical depths of ionising photons, making it highly versatile.