There's a big climate difference between the South East of France and the South of Spain.
I go to Sainte Maxime, near St Tropez, not too far from Nice, many times per year and I spent the whole month of July once in Spain.
I visited Madrid, Toledo, Sevilla, Granada and Marbella. The weather, everyday, was over 40C. I couldn't stand it since I suffer of low blood pressure. I could hardly go from the hotel to a museum by cab and back to the hotel, air conditioning on top all the time.
The beach in Marbella was my idea of hell, the sand was burning, too much for me, a real pity because I love Spain but I'll never go back in summer.
The summer in Sainte Maxime is obviously warm but hardly ever over 32C. My house is on a hill, 150 metres from the sea, the air circulates and the house has been built in a way that we don't even need to put a single fan. There's air conditioning but we never ever used it. I go to the beach and for a walk. I only put the air conditioning in the car during the day.