Forecasting wildfire danger from days to seasons with machine learning