Effects of tides on a sloping shore: groundwater dynamics and propagation of the tidal wave