Thin-layer approximation and algebraic model for separated turbulent flows