  Context. Planetary mass and radius data are showing a wide variety in
densities of low-mass exoplanets. This includes sub-Neptunes, whose low
densities can be explained with the presence of a volatile-rich layer. Water is
one of the most abundant volatiles, which can be in the form of different
phases depending on the planetary surface conditions. To constrain their
composition and interior structure, it is required to develop models that
calculate accurately the properties of water at its different phases. Aims. We
present an interior structure model that includes a multiphase water layer with
steam, supercritical and condensed phases. We derive the constraints for
planetary compositional parameters and their uncertainties, focusing on the
multiplanetary system TRAPPIST-1, which presents both warm and temperate
planets. Methods. We use a 1D steam atmosphere in radiative-convective
equilibrium with an interior whose water layer is in supercritical phase
self-consistently. For temperate surface conditions, we implement liquid and
ice Ih to ice VII phases in the hydrosphere. We adopt a MCMC inversion scheme
to derive the probability distributions of core and water compositional
parameters Results. We refine the composition of all planets and derive
atmospheric parameters for planets b and c. The latter would be in a
post-runaway greenhouse state and could be extended enough to be probed by
space mission such as JWST. Planets d to h present condensed ice phases, with
maximum water mass fractions below 20%. Conclusions. The derived amounts of
water for TRAPPIST-1 planets show a general increase with semi-major axis, with
the exception of planet d. This deviation from the trend could be due to
formation mechanisms, such as migration and an enrichment of water in the
region where planet d formed, or an extended CO$_{2}$-rich atmosphere.
