Your question's premise is incorrect. You write
the Schengen visa's main destination is the place where I must spend most of my days in Schengen countries
In fact, the main destination country, if one can be determined, is the country that must evaluate your visa application.
In Article 5, the Schengen Visa Code says:
Member State competent for examining and deciding on an application
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.
Thus, as noted in o.m.'s answer, the main destination may be determined in terms of either the length or the purpose of your visit to each country. As noted in dda's answer, when considering length, the threshold is not a majority of the days but rather a plurality, although as you can see even that threshold is not explicit in the code.
So if your trip to the Schengen area is for the purpose of attending a conference in France, you could argue that France is your main destination even if you will spend more time in Spain.
If your purpose in each country is the same, then your main destination in terms of the length of stay is Spain.