A self-described “expert in despondency” meets his match in “In the Courtyard,” a wry, oh-so-gentle dual character study saved from sleepiness by the unexpected star pairing of Catherine Deneuve and Gustave Kervern. Their tender, good-humored performances — as, respectively, a restless Parisian retiree and aimless caretaker who discover an unlikely kinship in differently transitional life stages — lend this slight tale more gravity than we’ve come to expect from Tunisian-born helmer Pierre Salvadori, who recently struck gold internationally with the Audrey Tautou-starring romantic comedies “Priceless” and “Beautiful Lies.” More melancholy but still eminently easygoing, Salvadori’s latest doesn’t have quite the same crossover potential as those films, but the Deneuve brand should ensure widespread arthouse bookings all the same.

Now in her eighth decade, Deneuve’s late-career evolution into France’s most glamorous character actress continues apace. Like Emmanuelle Bercot’s “On My Way” last year, “In the Courtyard” makes a poignant virtue of the contrast between the actress’ lioness-like physical presence and the modest stature of her careworn character; it’s the network of worry lines in that marvelous face, as much as its enduring beauty, that interests Salvadori and d.p. Gilles Henry. Also playing against type, in a sense, is Kervern, a name associated with more manically eccentric comedy than this kind of soft-shoe diversion. (He’s best known for his zany work behind the camera with fellow writer-director Benoit Delepine, including “Le grand soir” and “Mammuth.”). As such, he brings a necessary frisson of danger to a story that suggests the capacity for madness in even the most staid of lives.

Indeed, the film opens with Kervern’s character, Antoine, just past the brink of breakdown. A fortysomething rock singer afflicted with insomnia and assorted addictions, he bails on a gig immediately after arriving onstage. Calling time on his music career and looking to disappear from life for a while, he shows up at an employment agency seeking something less stress-inducing. The position of custodian for a quiet Parisian apartment building is just the ticket. Interviewing him for the job, retired resident Serge (Feodor Atkine) is wary of his spaced-out demeanor and evident lack of janitorial experience; his kindly but distracted wife, Mathilde (Deneuve), however, deems him a breath of fresh air, and he’s duly hired.

Proving, not for the first time in the film, the wobbliness of Mathilde’s judgment, Antoine is amiably ineffective in his new role. He shares drugs with wastrel tenant Stephane (Pio Marmai, underused) while turning a blind eye to his stolen-bicycle racket, and allows homeless cult member Lev (Oleg Kupchik) and his dog to move into the building’s storeroom, all to the consternation of resident fussbudget Maillard (Nicolas Bouchaud).

Mathilde, meanwhile, has her own concerns: Convincing herself that the building is on the verge of collapse after discovering a crack in her hallway, she neurotically resolves to fight city hall. Antoine humors her efforts in this regard more than her husband, who dismisses her fears as merely boredom-induced, without seeing the larger psychological cracks behind them. (The script, written by the helmer with David Colombo-Leotard, may be low-key, but it’s not exactly subtle in its symbolism.)

After initially flirting with the tonal and structural properties of an ensemble sitcom, then, “In the Courtyard” grows into more of a two-hander. Mathilde and Antoine’s friendship builds slowly and sweetly, based on their mutual understanding of foibles and vulnerabilities that others find it easier to ignore, though it doesn’t go anywhere particularly surprising. As a comedy, it’s bigger on smiles of recognition than outright belly laughs, but even at its breeziest, the threat of tragedy hangs over the proceedings like an initially unobtrusive raincloud that looks increasingly likely to burst. A more dramatically substantial film could have been fashioned around these characters, but so could a more vapidly sentimental one.

Guided by Salvadori’s sensitive but excessively mollifying direction, the film occasionally pulls back from more piercing insights. (The invocation at one point of Raymond Carver’s exquisite poem “Sleeping,” meanwhile, is reaching for a profundity that isn’t quite there.) But the leads effectively fill in the pain between the lines: Deneuve is immensely sympathetic as a proud woman frightened by the unfamiliarity of her own mental state, with Kervern shaggily touching as someone who has a little more knowledge of the abyss they’re facing, but not the self-control to avoid it.

Bar one segue into surrealist whimsy — visualizing a dog’s destruction of personal property as an act of “Godzilla”-scale carnage — that suggests Michel Gondry has assumed the directorial reins for a few seconds, tech contributions are proficient rather than inspired. The recurring presence of Magnetic Fields frontman Stephin Merritt’s singular bass voice on the soundtrack adds an additional note of tasteful sadness.

Berlin Film Review: ‘In the Courtyard’

<p>Reviewed at Berlin Film Festival (Berlinale Special Gala), Feb. 9, 2013. Running time: <strong>97 MIN</strong>. Original title: "Dans la cour"</p>

  • Production: <p>(France) A Les Films Pelleas production in association with France 2 Cinema, Delta Cinema. (International sales: Wild Bunch, Paris.) Produced by Philippe Martin. Co-producers, Hugues de Chastellux, Valerie Boyer.</p>
  • Crew: <p>Directed by Pierre Salvadori. Screenplay, David Colombo-Leotard, Salvadori. Camera (color, widescreen), Gilles Henry; editor, Isabelle Devinck; music, Stephin Merritt, Gregoire Hetzel; production designer, Michel Barthelemy; set decorator, Boris Piot; costume designer, Virginie Montel; sound (Dolby Digital), Brigitte Taillandier; supervising sound editor, Germain Boulay; associate producer, David Thion; assistant director, Luc Bricault; casting, Alain Charbit.</p>
  • With: <p>Catherine Deneuve, Gustave Kervern, Feodor Atkine, Pio Marmai, Nicolas Bouchaud, Michele Moretti, Oleg Kupchik, Garance Clavel, Carole Franck, Olivier Charmasson, Bruno Netter. (French dialogue)</p>