Michel Gondry’s films have often been too fussy and smug for their own good—witness the recent “Mood Indigo.” With “Microbe and Gasoline,” however, he’s moderated his penchant for overdoing things. Though a touch of his customary surrealism remains, the result is a charming, if episodic, portrait of an adolescent friendship that finds expression in a quirky road trip.

Daniel Gueret (Ange Dargent) is a fourteen-year old kid in Versailles who’s small for his age, and thus “Microbe” to his classmates, led by bully Steve (Vincent Lamoureux). (His fine features and long hair also lead to his being occasionally mistaken for a girl, even by his teachers.) At home his prim, bookish mother Marie-Therese (Audrey Tautou) encourages him to find solace in New Agey beliefs that don’t seem to help her own depression, while his jock older brother embodies everything he’s not. He does, however, have a talent at drawing and painting, though his work often involves unclad women and has to be hidden under his mattress. He’s also smitten with pretty classmate Laura (Diane Besnier) whose attitude toward him runs unpredictably hot and cold.

Into Daniel’s life comes Theo Leloir (Theophile Baquet), a new classmate with an outgoing personality but a misfit as well. Gregarious, and with a mop of unruly hair and a motorbike outfitted with noisemakers, he comes to be called Gasoline by the other students because of the odor he trails—the result of his tinkering with machines. His home life is no bed of roses, either; his parents are a surly, unhappy couple, and his older brother has left to join the army. He and Daniel quickly become unlikely, mismatched pals, supporting one another when the world hands either yet another setback; a particularly nice sequence has Theo intervening in his customary freewheeling style when Daniel’s art exhibit at a local gallery threatens to become a disaster. In the course of taking some junk to a scrap yard for Theo’s father, they acquire an old lawnmower motor which they get working again and then decide to use as the centerpiece for a makeshift little car.

Unfortunately, their homemade vehicle won’t pass official inspection for a license, so the duo hatch an alternate plan: they’ll build a shack atop it which, in an inventive spin, can conceal the wheels when necessary and so avoid detection by the cops. And when summer comes, they’ll ride off in it on an outing, maybe to a camp Theo remembers fondly from his childhood for reasons that a boy inching toward manhood would naturally have, or maybe to the lake where Daniel’s would-be girlfriend is staying with her family.

It takes a considerable suspension of disbelief to accept that the boys’ contraption even works (let alone that they’re able to scoot around in it for so long without anybody noticing), but that hardly matters, because the film does. Dargent and Baquet make an engaging pair, the one’s shyness and the other’s extroversion meshing cheerily. And Gondry has invented a number of eccentric characters for them to meet (like a dentist played by Laurent Poitrenaux, who welcomes them into his home and can’t bear to see them leave, for a very human reason) and adventures for them to experience (like Daniel’s attempt to get a haircut at a place that also does business in other ways, or an encounter with a bunch of local footballers they manage to irritate, or a drawing contest at a local fair that doesn’t turn out exactly as expected).

One might imagine the movie will become an unbearably sugary ode to adolescent wish-fulfillment, but Gondry is too clever to allow that. He adds some sourness to the mix, even in the pre-road half (a scene in which Theo intervenes during Daniel and his brother’s soccer practice ends on a mixed note, and Theo’s parents are a surly couple). It’s in the last act, however, that Gondry lets us know that such summer flings end with people forced back down to earth. There’s a temporary rift between the boys, of course, but also a cutting observation about how brutally society can treat outsiders like gypsies. And it’s after their brief estrangement is resolved and they return home that things turn truly bittersweet, though it’s obvious that their impact on one another’s lives will persist.

As seemingly handmade as the boys’ car, with cinematography by Laurent Brunet that revels in the ordinariness of the locales through which their goofy vehicle careens, “Microbe and Gasoline” has the feeling of a throwback to the days when live-action movies made for children could be leisurely and laid-back. But if it feels like a nostalgia trip, it’s one that’s well worth taking.