Firefighters in France on Thursday were hopeful a massive forest fire was no longer spreading, as Spain said there were "almost no flames" left after a similar blaze near Madrid.