Hello Hamza,

A residency status is lost after 12 consecutive months out of the country. You should remain in Spain at least 180 days per year, though it is also common that the authorities are not...