If you travel down the Mediterranean coast from France to Spain, Portbou is the first town over the Spanish border. The short train trip from Cerbère (in France) to Portbou is through a tunnel in the mountain and takes 4 minutes. If you drive the winding road over the mountain, it takes about 20 minutes (somewhat longer if you suffer from vertigo). If you have no problem with heights, the views are incredible (take a look at some of my other photos).
The Mediterranean is only 50 meters beyond the end of the Rambla.