Others have covered Fermat's note specifically, so I'll respond to this sub-question:
I am extremely interested in the idea that there was a period in time when, at least in the west, people looked upon the ancients (Romans/Greeks) as possessors of wisdom that had been lost.
After the fall of the Roman empire (around 476 AD - exact opinions vary at what point it "fell"), western civilization basically collapsed, and nearly everyone was forced back into subsistence living (i.e. barely having enough food to survive) for several generations.
When in subsistence living, there isn't enough excess food to support full-time scientific jobs like teachers and scholars, especially when also having to deal with raids from foreign Germanic (and later viking) tribes.
As such, literacy plummeted and knowledge non-essential to farming and survival mostly evaporated.
This is what people (wrongly) call "the Dark Ages" and (also wrongly) blame on Christianity for 'persecuting scholars' (in actuality, Christianity preserved a lot of documents, and mostly supported scholars (with some notable exceptions in various places and times), and started schools, hospitals, and universities. As you noted, plenty of scientific progress was still made during this period).
The actual cause of the (now rejected by historians) ages being "dark" was the several generations of illiteracy due to the civilization collapse that basically "reset" western scientific knowledge, forcing scientific truths to be rediscovered gradually. Further, the lack of central authorities made travel more dangerous, slowing the sharing of knowledge. Scientific progress usually comes by one person having an initial seed of an idea, and several others in other locations seeing the significance of it - when communication between scientists in hampered, science itself is hampered.
Word-of-mouth oral history of the grandeur of the Roman empire persisted through the ages, so people were aware of it, as well as capable of seeing the Roman ruins in Italy and around Europe as a whole (including in Britain), so Roman achievements and capabilities were definitely admired and worshiped (in a non-religious sense) by scholars and poets.
Eventually, ancient Roman/Greek scientific books from the Eastern half of the old Roman empire (which had never collapsed to subsistence living in the first place), now under Islamic control, and formerly centered in Constantinople/Istanbul, made their way back to the West and greatly aided Western recovery of, and surpassing, the knowledge of the Greeks and Romans. These books confirmed the wisdom of the ancients, and added to their superhuman status, basically proving the myths about their superior civilization.
However, only some of the Greek and Roman scientific books survived through the intervening centuries - even in the East, which never 'collapsed' per se but endured repeated wars, lootings, and destruction of cities (Constantinople alone was laid siege to over 20 times; most failing, but still taking a serious toll on the surrounding regions). It was these lootings and destructions that actually drove or carried some of the books back into the West for the first time in centuries.
So, the myth persisted (partially correct) that the Greeks and Romans had immense amounts of knowledge lost after the collapse, and that (mostly incorrect) any new scientific discovery was just rediscovering something the ancients already knew, especially in the "purer" branches of sciences or philosophy and the various fields of math (especially geometry).
(Because many of the ancient works that survived through the ages reference other works that remain undiscovered, we (and the scholars of Fermat's time) get a glimpse at how much was lost - thousands and thousands of works, and those are only what we know about).