PARIS — It's fair to say that 2018 was a difficult year for the cause of democracy in the world. And yet, as the old saying goes, "While there's life, there's hope." The words are particularly appropriate for the European Union, where despite some obvious setbacks, there are still reasons — however dim they may seem to be — for optimism.

We can draw an inventory of them, with no particular order or hierarchy, and note, for example, that in its Brexit negotiations with Theresa May, the EU maintained its unity, despite attempts at division and successive renegotiations in London. It's also worth pointing out that the populists in power — from Hungary to Italy by way of Poland — no longer wish to leave Europe. They hope, rather, to steer the European project in a new direction, or at least to give it a new meaning.

In this quick catalogue of "almost good news," there are some specifically national developments as well. In Poland, for example, resistance to the ruling government is growing and organizing itself, even if the youth are now much more conservative and nationalist than they've been at any point since the fall of Communism. Still, Polish society remains deeply divided. Unlike in Hungary with Viktor Orbán, Polish society hasn't blindly followed the line of populist party leader Jaroslaw Kaczynski.

The return to power of the followers of classical liberal democracy, committed to Europe's traditional values, is no longer a distant ideal, but a scenario that may be close and could come true as early as the next elections, in the spring. After all, Poland's current prime minister, Mateusz Morawiecki, is himself the moderate face of the country's ultra-conservative regime and, as such, a possible transitional figure.

In Germany, the Green Party's strong showing in the last regional elections is another source of hope, and not just for Germany. In some states, the Greens fared much better, than the far-right party AfD. They are united, responsible, "centrist" and deeply pro-European. In short, they're a model that environmentalist parties in other EU countries would do well to follow.

Also in Germany, Angela Merkel, although weakened and on the way out, has managed to make "her" candidate, Annegret Kramp-Karrenbauer, her successor as head of her party, the CDU. Her end of reign is less humiliating than one could have feared.

This is a lose-lose game.

In Britain, the British vote for Brexit was even more nightmarish in its political and economic consequences than its worst opponents had assumed. To avoid a vote that would have been disastrous for her, Theresa May was forced to stall and ask for a new deadline without any guarantee that time is on her side. This is, of course, a lose-lose game between Britain and the EU, but the probability of a second referendum, although still low, is increasing significantly. A few days ago, I heard a fine connoisseur of British political life estimate the probability to be more than 25%.

Even in France, though nothing is yet resolved, the intervention of President Emmanuel Macron has helped to calm at least some of the protesters who were eager, in the aftermath of a terrorist attack in Strasbourg, not to add more unrest. How can you make a revolution without revolutionaries? The "yellow vests" are neither a repeat of 1789 nor the equivalent of the 1917 Russian Bolshevik party. My apologies to the few far-left supporters who believe this.

The United States, meanwhile, has been moving further and further away from Europe in recent years. Still, there's a very strong psychological interdependence between the two continents. The victory of Brexit in the British referendum paved the way for Donald Trump's victory, and the latter strengthened the populist side in Europe, if not in the world, as evidenced most recently in Brazil.

Now that some time has passed and all results have been properly counted, the mid-term elections of this past November appear to be an encouragement for the Democrats and a warning for the Republicans. A defeat for Donald Trump in the 2020 presidential election is far from guaranteed, but is certainly possible and could open a new cycle and provide a source of hope and encouragement for supporters of classical liberal democracy on both sides of the Atlantic.

On a more global level, the evolution of global geopolitics is at the heart, if not the primary raison d'être, of the European project. It's no longer a matter of ensuring "never again" through reconciliation and gradual integration, as was the case in the aftermath of World War II. Nor is it a matter of giving the world the image and reality of a more humane and effective governance model, even if this objective remains. It's quite simply a matter of guaranteeing the security of the European Union and of its member states. A security that is less self-evident than ever, since America is moving away, Russia is moving closer, China is expanding its ambitions and Britain is scuppering itself.

But neither can the European Union be content with an exclusively security-oriented purpose. Today, the French are expressing the impossible double wish of having more protection from their government and paying less in taxes. In their relations with the EU, Europeans too are perfectly contradictory. They want to free themselves from its shackles, and yet expect it to protect them more than ever.

See more from Opinion / Analysis here