In France, the law does not specify what counts as a valid ID, which is why official guidelines, like the one cited by @drat, remain deliberately vague (“Elle peut”) and mention things like “witness testimony”. In fact, article 78-2 of the code de procédure pénale provides that
Les officiers de police judiciaire et, sur l'ordre et sous la responsabilité de ceux-ci, les agents de police judiciaire et agents de police judiciaire adjoints mentionnés aux articles 20 et 21-1° peuvent inviter à justifier, par tout moyen, de son identité […]
“Par tout moyen” can be translated as “by any means”. Unlike some other European countries, it is not mandatory for French citizens to carry or even hold a national ID card (but it's free and convenient, which is why many simply presented that during the controls you witnessed). In principle, an official-looking gym membership card or rail card with a photo could be enough. What the police can do if you are uncooperative or they are not satisfied with the information you provided, is keep you up to 4 hours to verify your identity (article 78-3) and, with authorization from the public prosecutor, take a photo and fingerprints (refusing that carries a fine and short jail sentence).
As a foreign national, you might also be asked to show you are in France legally. If you are a EU citizen and you don't have a residence permit, this basically means presenting a passport or national ID card because other documents (including, e.g., a driver's license) would not establish your citizenship (and, consequently the fact that you really do have the right to be in France without residence permit).
But it isn't a punishable offense in itself to not carry ID as a French citizen or a passport as a foreigner. The police might theoretically make your life miserable for a few hours if they choose but if you have a credible means to prove your name and let them know you are a EU citizen, you should be OK.