It seems we know the essential purpose of your trip is the conference in Barcelona. If that is so it determines where you are supposed to apply - ie Spanish visa centre, regardless of how long you spend in other countries.
From Article V of REGULATION (EC) No 810/2009 OF THE EUROPEAN PARLIAMENT AND OF THE COUNCIL
of 13 July 2009
establishing a Community Code on Visas
(Visa Code):
- The Member State competent for examining and deciding on an application
for a uniform visa shall be:
(a) the Member State whose
territory constitutes the sole destination of the visit(s);
(b) if the visit includes more than one destination, the
Member State whose territory constitutes the main destination
of the visit(s) in terms of the length or purpose of stay;
or
(c) if no main destination can be determined, the Member
State whose external border the applicant intends to cross
in order to enter the territory of the Member States.
Attending the conference is good reason for making the trip. Mention of it strengthens your application and can be expected to improve your chances of being granted a visa (by Spain).
Balance the days in France and Spain and neglect to mention (unless asked, of course!) the conference and France should not refuse (decline to consider) your application on the grounds that you have applied to the wrong visa centre. France would be the Member State whose external border the applicant intends to cross in order to enter the territory of the Member States.
Go a step further and arrange more days in France than in Spain (or anywhere else Schengen) and France should still not refuse your application since it would be the Member State whose territory constitutes the main destination of the visit(s) in terms of the length ... of stay.
However, if France finds out about the conference it might decide for itself that that is the real ('main') purpose for your trip and, for failing to declare it, reject your application under 8. the information submitted regarding justification for the purpose and conditions of the intended stay was not reliable (same link, page 55).
It is up to you to weigh the risk of not obtaining a visa, in time, from either centre (and the possibility of a black mark against you) against the cost/inconvenience. That may sound bleak but if, say, you are very confident France would issue you a visa were there no conference involved at all (for example, there are no doubts about itinerary, subsistence, insurance) it could be a risk worth taking. For example, if this is not the first time you have applied for a Schengen visa and have never been refused any visa.
The risk is not so much that you may be denied entry at Paris but that France won't issue you a visa.