Herbig AejBe stars are pre-main sequence stars of intermediate masses (2-5 Mc) that exhibit strong signs of activity and stellar winds. The origin of these phenomenons remain unclear since mechanisms proposed for stars in other parts of the HR diagram do not apply here. We have studied the line formation in the winds of these stars thanks to a semiempirical, spherically symmetric model of wind. Modelling the resonance lin es of CIV and MgII, as weIl as the Balmer lines and continua of hydrogen for a representative sample of stars, we showed that the winds of these stars share the same structures, with, for instance, extended chromospheres of moderate temperatures (T ~ 20,000 K). Theoretical mass loss rates are consistent with those obtained...