You will almost certainly arrive in T4, making your connection a breeze (well, including a very long walk).
You will arrive at the South end (low H gates) and depart from the North end (high K gates).
There is a lounge, Sala Dalí, near the middle of the terminal, around J50 or so.