Optomechanical device for actuating and/or detecting movement of a mechanical element, in particular for gravimetric detection. It includes a support with a mechanical element anchored to the support which is designed to move relative to the element, and a device for actuating and/or detecting movement or of variations in frequency of movement of the element. A portion of the device is arranged beneath at least part of the element, between the element and the support. The device includes a fixed optical device with at least one optical waveguide arranged beneath all or part of the element at a determined distance from the element, and which is designed to propagate at least one optical wave having a given wavelength designed to interact with the element. The optical waveguide is at a determined distance from the mechanical element so that the evanescent field of the optical waveguide interacts with the mechanical element.