Tried to correct the bug, at least the weird animation does not come now.
BUG REMAINING : when the page is opened in mobile for the first time, a click anywhere on the navbar will open it, but only for the first time.