Space inhomogeneity and detuning effects in a laser with a saturable absorber:a first-order approximation