The survival of our planet as we know it is in danger.

We have at hand a bipartisan, rigorous plan to address that danger.

And now it is more than possible that we will end up with two presidential candidates who reject that plan in favor of two varieties of utter unseriousness.

The first is the denialism of President Trump. He either believes or cynically pretends to believe that climate change is not a threat. His administration has gravely aggravated the threat, for example by recklessly relaxing regulation of the super-warming gas methane.

The second version is the fantasy extremism of Sen. Bernie Sanders. He would prosecute oil executives “for the destruction they have knowingly caused” (he “welcomes their hatred”) and phase out carbon-neutral nuclear power. The Vermont independent would ban the fracking of natural gas, which is — if you control the methane emissions — a useful transitional fuel from dirty coal to clean wind and solar.

As though by magic, Sanders’s proposals will “dramatically decrease the cost of energy storage” and (why not?) make electricity “virtually free” after 2035 (though, sadly, we would still have to pay for “operations and maintenance costs”). All fossil fuels will be gone by 2030, the renewable energy that takes its place will be “publicly owned,” and — not to worry — the plan “will pay for itself over 15 years.”

Unfortunately, there is no magic wand to make such things happen, as Patrick Pouyanné told me last week. Pouyanné is one of those people whose hatred Sanders might welcome; he is chairman and chief executive of Paris-based Total, one of the world’s biggest oil and gas companies.

On a recent visit to Washington, ­Pouyanné himself did not seem particularly hateful; on the contrary. Unlike the U.S. president, he has no doubt that climate change is real and “a huge challenge for mankind.”

“I believe the scientists,” he said, and he favors a global (and corporate) evolution away from fossil fuels. He wrote to the Environmental Protection Agency to oppose Trump’s methane regulation rollback.

As an executive doing business in many countries, however, he is aware of some realities:

Eighty percent of the world’s energy comes from fossil fuels.

● Despite growing awareness, and the Paris accord, last year, coal use increased and forests (the best means to pull carbon out of the atmosphere) shrank.

● Close to 1 billion of the world’s 7 billion people have no access to electricity, and their governments are not going to be satisfied with that situation.

● When it comes to energy, every nation is concerned first with the security of supply; second with the cost of supply; and only third with its ­cleanliness.

● The technology does not exist today to allow a system to rely only on intermittent sources of energy such as wind and sunshine.

● Climate change is a global challenge, “and we do not have a global government.”

Pouyanné said a U.S. ban on fracking — or the jailing of oil executives, for that matter — would have little impact on climate change. Why? Because much of the world’s oil is located in poorer countries that depend desperately on oil exports, and they will gladly make up any shortfall.

“Change will not come from changing the source of supply,” he said. “You have to reduce demand.”

Which brings us back to the plan, put forward this month by the Climate Leadership Council, that would actually work. Supported by energy companies (including Total) and environmental groups alike, it would impose a steadily rising tax on carbon. That would lead to reduced consumption and increased innovation in alternatives, including battery storage for solar and wind power. To get buy-in from industry, the plan would do away with a lot of regulation — but only so long as emissions were, in fact, going down.

By imposing a tariff on imports from countries without similar carbon taxes, the plan would pressure those countries to follow suit. And the tax would be politically palatable, because every dollar would be returned in equal shares to taxpayers — with 70 percent of U.S. households ending up better off.

“A carbon tax offers the most cost-effective lever to reduce carbon emissions at the scale and speed that is necessary,” several thousand economists, including virtually every prominent economist to have served in Democratic or Republican administrations, said in a statement.

It should be encouraging, then, that when The Post asked the Democratic candidates whether they would support setting a price on carbon, almost all either said yes (Joe Biden, Mike Bloomberg, Pete Buttigieg, Amy Klobuchar, Tom Steyer) or maybe (Elizabeth Warren). There were two naysayers: ­Tulsi Gabbard and Sanders.

It should be encouraging, but it won’t be — if both parties end up with nominees who each, in his own way, rejects reality.

Read more: