Impossible to invoke a method ("crop") on a null variable.
{% set selectedSeason = get('season') ? get('season') : currentSeason %}
{% set backgrounds = page.structure_background.toStructure().filterBy('saison', selectedSeason) %}
{% for background in backgrounds %}
{% if background.saison == selectedSeason %}
<style>
.bg::after {
background: url({{ background.background.toFile().crop(950).url() }}) no-repeat center center;
background-size: cover;
}
</style>
{% endif %}
{% endfor %}
{% include '@snippets/navigation-years.twig' with {'elements': page.children().listed(), 'selectedSeason': selectedSeason} %}