Outside the massive, multi-paneled window, swans serenely glided by on the pond. It was cold out there; it’s always scarf weather in France but never more so than in the dead of winter. But it was warm in here: massive logs were stacked high and blazing away in a walk-in fireplace.

The San Francisco officials within, including our city’s cosmopolitan, young mayor Gavin Newsom, were amply plied with food and wine courtesy of the JCDecaux people. This elegant waterfront farmhouse serves as the strategic centerpiece of the international advertising giant’s headquarters in the bucolic Parisian suburb of Plaisir.

At one point, M. Decaux himself made an appearance to exchange pleasantries with Newsom. Why, yes, recalls a fellow attendee, a few choice bottles of wine suitable for just such an occasion were summoned from M. Decaux’s cave. Toasts were made.

It was warm in here. It was nice in here. Pas mal, pas mal.

After disembarking from the bus that squired them from their elegant Paris hotel to the JCDecaux compound in Plaisir, the San Francisco contingent ambled through a mock-up of San Francisco. Or, at least, the Marie Antoinette village version of San Francisco. The JCDecaux people cleverly march visiting delegations through simulacrums of their home cities, graced with JCDecaux street furniture and locally relevant ads — Giants! Niners! Rice-a-Roni!

And, after the wine was drained and the San Franciscans disembarked, the faux San Francisco could be reset for whomever was coming next — officials from Montreal, Los Angeles, Zanzibar, wherever.

One thing that was missing from the ersatz version of San Francisco on display in the French countryside, however, was the filth and dysfunction. Filth and dysfunction that, in fact, San Francisco and JCDecaux combined to actually worsen.

In 1995 under Mayor Frank Jordan, JCDecaux and the city sealed a pact for the company to supply self-cleaning public toilets to San Francisco and recoup its costs via ad dollars. During his first run for mayor, Willie Brown slammed this contract as a “giveaway.” But, under Mayor Brown in 1998, the contract was expanded and locked in place for decades; JCDecaux eventually installed 25 toilets — at a cost of around $250,000 apiece — and some 114 ad kiosks around the city. (Perhaps coincidentally, Mayor Brown in 1996 was decadently treated to a helicopter ride to the JCDecaux farmhouse while the rest of his contingent took a half-hour bus ride; it’s uncertain whether he wandered through the San Francisco mock-up or merely observed it from above).

This has, quantifiably, been a bad deal for San Francisco — arguably one of the worst deals this city ever struck. The “self-cleaning” toilets weren’t — unless coating mounds of human filth and drug detritus in a layer of detergent counts as “clean.” As such, the commodes were appalling when in service and, often, were out of service. What’s more, when in-service, they were often commandeered by drug users, criminals, or sex workers. Public Works employees tell your humble narrator about people living in the toilets, dying in the toilets, and one entrepreneurial man who, Game of Thrones-style, fended off all challengers, took over a JCDecaux toilet for himself — then turned around and charged entry fees to anyone who needed to use it.

And, all the while, with its toilets either out of commission or occupied by people who were living, working, or recreating — or a combination of all three — JCDecaux continued to collect ad dollars. It has, thus far, earned more than $125 million in ad revenue on this deal — and shared a comically minuscule percentage of this haul with the city; subsequent public advertising contracts San Francisco has ratified with other ad companies require the payment of nearly 10 times the percentage of ad revenue that JCDecaux must disgorge.

And now, after all that, JCDecaux’s contract stands to be renewed. Perhaps as soon as next month.

Pas mal, pas mal.

There’s math, there’s toilets, and there’s toilet math. Here’s some of the latter.

Between 1997 and 2017, JCDecaux amassed $125,012,771 in ad revenue in San Francisco. And, of that, it gave $7,296,548 to the city. That’s a 5.8 percent cut. And that’s all that’s called for. JCDecaux’s contract with the city, which expired in 2016 and has been renewed in short increments since, establishes a ceiling of 7 percent revenue sharing. So, in 2017, JCDecaux banked $10.55 million and gave 7 percent of that to the city — $738,539.

To put that number in perspective, the city spends around $1.19 million a year on toilet paper. The Pit Stop program, which places monitors to clean and keep an eye on the otherwise unusable JCDecaux toilets (and others) runs $3.1 million a year.

To put it in even more perspective, the outdoor advertising deal the city signed with Clear Channel for Muni shelters requires the company to fork over 55 percent of its ad revenue. The ad deal the city ratified with Titan Outdoor for Muni vehicles requires that company to fork over 65 percent.

This city can drive a pretty hard bargain, if it wants to. To wit, if someone can’t relieve himself in a busted JCDecaux toilet and, instead, befouls a Muni shelter — where Clear Channel has that advertising deal with the city — the private company deploys a unionized cleaner. This runs Clear Channel $3 million a year — four times what JCDecaux pays the city annually. In fact, Clear Channel pays the city another $50,000 or so a year in tickets on vehicles double-parked while bus shelters are being tidied up.

Just in case you were wondering, 55 percent of $125,012,771 is $68.8 million. Sixty-five percent is $81.3 million. San Francisco’s deal with JCDecaux has, again, netted $7.3 million.

“There is no question that JCDecaux took the city of San Francisco on a long walk off a short pier,” says Supervisor Aaron Peskin, who has delayed finalizing JCDecaux’s next contract “three or four times,” by his own count due to concerns with the current one. “The bottom line is, there is no city in America, or the world, that got such a bad deal as we did with JCDecaux 20 years ago.”

And yet, we’re coming back for more. Only JCDecaux opted to bid on the city’s present toilets and kiosks contract.

After 20 years of de minimis payment on a toilet contract that, plainly, failed to provide sanitary, working toilets — how could this be? How could nobody see fit to challenge JCDecaux?

Well, perhaps the answer is in the fine print. The terms shared with would-be JCDecaux successors in December 2015 gave them a grand total of 120 days to permit and install dozens of free-standing outdoor toilets — an absurdly short turnaround, during which the city couldn’t be expected to even process the paperwork.

This was followed by a second set of city terms in April 2016, in which the 120-day window was extended to a year — but, at the same time, the importance placed upon how much money the contractor would give the city was slashed from 65 percent of the judgment criteria to only 20 percent.

“Oral interview,” meanwhile, was shifted from 5 percent to a whopping 40 percent of the judgment criteria.

If a competitor hoped to unseat JCDecaux, the most natural way to do so would be to offer more generous financial terms to the city. And yet, for some reason, any company that wanted to pay San Francisco more — perhaps much, much more — was suddenly largely neutralized, to the benefit of the incumbent: JCDecaux.

And the city officials who made this intriguing decision simultaneously ramped up the importance of the “oral interview” — with them, presumably — by a factor of eight.

Would-be competitors took the apparent hint. None of them bid. So here we are.

Pas mal, pas mal.

San Francisco Public Works would not disclose the terms of the inchoate contract with JCDecaux, which may come before the Board of Supervisors next month or, more likely, in April. We’re told it’s “far more favorable” to the city.

Well, thank God.

In a very San Franciscan touch, far more attention has been paid to the aesthetics of the next generation of JCDecaux toilets than their functionality or two decades of wretched, farcical performance that left San Francisco’s neediest ill-served (but served an outdoor advertising company handsomely).

Fine. They look like spaceships. Or a space suppository. They look expensive.

The question now isn’t whether the next contract is decent. It’s whether it will retroactively remunerate this city. “My issue,” says Peskin, “is how much are they willing to pay for their past sins?”

It’s within the Board of Supervisors’ purview, he says, to spurn this contract until desired terms are met.

It remains to be seen if one more JCDecaux product will be clogged up here in San Francisco.