Static stability of floating structures