This question already has an answer here:
I am planning a 10-day visit to France and Spain. We will be visiting Paris first and then Barcelona and then Madrid.
Which country should we apply for the visa? Our entry point is Paris and we are planning to stay 6 days in Spain.