  KELT-9 b, the hottest known exoplanet with $T\sim4400$ K, is the archetype of
a new planet class known as ultra-hot Jupiters. These exoplanets are presumed
to have an atmosphere dominated by neutral and ionized atomic species. In
particular, H$\alpha$ and H$\beta$ Balmer lines have been detected in the
KELT-9 b upper atmosphere, suggesting that hydrogen is filling the planetary
Roche lobe and escaping from the planet. In this work, we detected $\delta$
Scuti-type stellar pulsation (with a period $P=7.54\pm0.12$ h) and studied the
Rossiter-McLaughlin effect (finding a spin-orbit angle
$\lambda=-85.01^{\deg}\pm0.23^{\deg}$) prior to focussing on the Balmer lines
(H$\alpha$ to H$\zeta$) in the optical transmission spectrum of KELT-9 b. Our
HARPS-N data show significant absorption for H$\alpha$ to H$\delta$. The
precise line shapes of the H$\alpha$, H$\beta$, and H$\gamma$ absorptions allow
us to put constraints on the thermospheric temperature. Moreover, the mass loss
rate, and the excited hydrogen population of KELT-9 b are also constrained,
thanks to a retrieval analysis performed with a new atmospheric model. We
retrieved a thermospheric temperature of $T=13200^{+800}_{-720}$ K and a mass
loss rate of $\dot{M}=10^{12.8\pm0.3}$ g s$^{-1}$ when the atmosphere was
assumed to be in hydrodynamical expansion and in local thermodynamic
equilibrium (LTE). Since the thermospheres of hot Jupiters are not expected to
be in LTE, we explored atmospheric structures with non-Boltzmann equilibrium
for the population of the excited hydrogen. We do not find strong statistical
evidence in favor of a departure from LTE. However, our non-LTE scenario
suggests that a departure from the Boltzmann equilibrium may not be sufficient
to explain the retrieved low number densities of the excited hydrogen. In
non-LTE, Saha equilibrium departure via photo-ionization, is also likely to be
necessary to explain the data.
