Structure and dynamics of a polymer melt at an attractive surface