  In dense parts of interstellar clouds (> 10^5 cm^-3), dust & gas are expected
to be in thermal equilibrium, being coupled via collisions. However, previous
studies have shown that the temperatures of the dust & gas may remain decoupled
even at higher densities. We study in detail the temperatures of dust & gas in
the photon-dominated region S 140, especially around the deeply embedded
infrared sources IRS 1-3 and at the ionization front. We derive the dust
temperature and column density by combining Herschel PACS continuum
observations with SOFIA observations at 37 $\mu$m and SCUBA at 450 $\mu$m. We
model these observations using greybody fits and the DUSTY radiative transfer
code. For the gas part we use RADEX to model the CO 1-0, CO 2-1, 13CO 1-0 and
C18O 1-0 emission lines mapped with the IRAM-30m over a 4' field. Around IRS
1-3, we use HIFI observations of single-points and cuts in CO 9-8, 13CO 10-9
and C18O 9-8 to constrain the amount of warm gas, using the best fitting dust
model derived with DUSTY as input to the non-local radiative transfer model
RATRAN. We find that the gas temperature around the infrared sources varies
between 35 and 55K and that the gas is systematically warmer than the dust by
~5-15K despite the high gas density. In addition we observe an increase of the
gas temperature from 30-35K in the surrounding up to 40-45K towards the
ionization front, most likely due to the UV radiation from the external star.
Furthermore, detailed models of the temperature structure close to IRS 1 show
that the gas is warmer and/or denser than what we model. Finally, modelling of
the dust emission from the sub-mm peak SMM 1 constrains its luminosity to a few
~10^2 Lo. We conclude that the gas heating in the S 140 region is very
efficient even at high densities, most likely due to the deep UV penetration
from the embedded sources in a clumpy medium and/or oblique shocks.
