avec cette fonction : 
public static (ushort, ulong) EncodeNumberNegaFibo(long numberToEncode)
    {
        if (numberToEncode == 0)
        {
            throw new ArgumentOutOfRangeException(nameof(numberToEncode), "Zero cannot be encoded in NegaFibonacci.");
        }

        bool isNumberPositive = numberToEncode > 0;
        int bitCount;
        long cumulativeSum = 0;

        if (isNumberPositive)
        {
            bitCount = 1;

            while (true)
            {
                long fibonacciNumber = ComputeFibonacciNumber(bitCount);
                long negafibonacci = (bitCount % 2 == 1) ? fibonacciNumber : -fibonacciNumber;

                cumulativeSum += negafibonacci;

                if (cumulativeSum >= numberToEncode)
                {
                    break;
                }

                bitCount += 2;

                if (bitCount + 1 > 64)
                {
                    throw new ArgumentOutOfRangeException(nameof(numberToEncode),
                        "Number cannot be encoded within 64 bits.");
                }
            }
        }
        else
        {
            bitCount = 2;
            while (true)
            {
                long fibonacciNumber = ComputeFibonacciNumber(bitCount);
                long negafibonacci = (bitCount % 2 == 1) ? fibonacciNumber : -fibonacciNumber;

                cumulativeSum += negafibonacci;

                if (cumulativeSum <= numberToEncode)
                {
                    break;
                }

                bitCount += 2;

                if (bitCount + 1 > 64)
                {
                    throw new ArgumentOutOfRangeException(nameof(numberToEncode),
                        "Number cannot be encoded within 64 bits.");
                }
            }
        }

        ulong encodedBits = 0;
        encodedBits |= 1UL << (bitCount - 1);

        long fibonacciAtN = ComputeFibonacciNumber(bitCount);
        long negafibonacciAtN = bitCount % 2 == 1 ? fibonacciAtN : -fibonacciAtN;
        long remainingValue = numberToEncode - negafibonacciAtN;

        for (int k = bitCount - 1; k >= 1; k--)
        {
            long fibonacciAtK = ComputeFibonacciNumber(k);
            long negafibonacciAtK = k % 2 == 1 ? fibonacciAtK : -fibonacciAtK;
            bool isNextHigherBitSet = (encodedBits & (1UL << k)) != 0;

            if (Math.Abs(remainingValue - negafibonacciAtK) < Math.Abs(remainingValue) && !isNextHigherBitSet)
            {
                encodedBits |= 1UL << (k - 1);
                remainingValue -= negafibonacciAtK;
            }
        }

        ulong finalEncodedBits = (1UL << bitCount) | encodedBits;

        ushort totalBitLength = (ushort)(bitCount + 1);

        return (totalBitLength, finalEncodedBits);
    }

est-ce que je respecte l'énoncé à 100% ?

Write a method that encodes a non-zero character using NegaFibonacci coding.
Your method should return a tuple composed of the length in bits of the encoded number and the encoded number.

You should throw an ArgumentOutOfRangeException exception if we try to encode 0.
As a ulong can only hold 64 bits, if during the following algorithm you realize it isn't possible to encode the number with 64 bits, you should throw an ArgumentOutOfRangeException.

Implement the following algorithm:

To encode a nonzero integer X:
1. If X is positive, then you should compute the largest encodable number by summing the odd NegaFibonacci numbers from 1 until we reach a sum higher than X.
2. If X is negative, then you should compute the smallest encodable number by summing the negative even NegaFibonacci numbers from -2 to a sum lower than X.
3. NegaFibonacciIterative(n) is the last term that was added to the sum. N, the absolute value of n, is the minimum number of bits needed to encode X using NegaFibonacci coding. 
4. The result is written in binary, the end is on the left, and the start is on the right. Write a 1 at the Nth position of the result.
5. Subtract the last NegaFibonacci term computed above from X.
6. Redo the process again with the result from the above expression.
7. Put a one in the N+1th bit to finish (remember that 11 is the end mark).

Method prototype: public static (ushort, ulong) EncodeNumberNegaFibo(long nb) { }

Code examples:
(ushort w1, ulong w2) = Proficiencies.NegaFibonacciCoding.EncodeNumberNegaFibo(-11);   // w1 == 7 && w2 == 0b1101000 => 104
(ushort w3, ulong w4) = Proficiencies.NegaFibonacciCoding.EncodeNumberNegaFibo(-1);    // w3 == 3 && w4 == 0b110 => 6
(ushort w5, ulong w6) = Proficiencies.NegaFibonacciCoding.EncodeNumberNegaFibo(1);     // w5 == 2 && w6 == 0b11 => 3
(ushort w7, ulong w8) = Proficiencies.NegaFibonacciCoding.EncodeNumberNegaFibo(11);    // w7 == 8 && w8 == 0b11001001 => 201