X-Ray Scattering Study of a Smectic-A Liquid Crystal Partially Confined Between Free Surface and Microgrooved Substrates