%figure
\scalebox{0.41}{
\begin{tikzpicture}
\tikzstyle{monNoeud}=[draw, circle, inner sep=1pt, minimum size = 2em]
\tikzstyle{mafleche}=[-stealth, thick]


%source
\node [monNoeud, line width = 2pt] (s1) at (-8.5,0.5) {s1};

%col 1
\node [monNoeud] (n11) at (-4,3.5) {n11};
\node [monNoeud] (n12) at (-4,0.5) {n12};
\node [monNoeud] (n13) at (-4,-2.5) {n13};

%col 2
\node [monNoeud] (n21) at (1,3.5) {n21};
\node [monNoeud] (n22) at (1,0.5) {n22};
\node [monNoeud] (n23) at (1,-2.5) {n23};

%col 3
\node [monNoeud] (n31) at (5.5,3.5) {n31};
\node [monNoeud] (n32) at (5.5,0.5) {n32};
\node [monNoeud] (n33) at (5.5,-2.5) {n33};

%col 4
\node [monNoeud] (n41) at (9.5,3.5) {n41};
\node [monNoeud] (n42) at (9.5,0.5) {n42};
\node [monNoeud] (n43) at (9.5,-2.5) {n43};

%puit
\node [monNoeud, line width = 2pt] (s2) at (14.5,0.5) {s2};


%loops du haut

%premiere loop
\uncover<1|handout:1>{
\draw[mafleche]  (n11) to[loop, looseness=20] (n11);
}
\uncover<2|handout:2>{
\draw[mafleche, red, very thick]  (n11) to[loop, looseness=20] (n11);
}
\uncover<3-|handout:3->{
\draw[mafleche]  (n11) to[loop, looseness=20] (n11);
}

%deuxieme loop
\uncover<1-2|handout:1>{
\draw[mafleche]  (n21) to[loop above, looseness=40] (n21);
}
\uncover<3|handout:2>{
\draw[mafleche, red, very thick]  (n21) to[loop above, looseness=40] (n21);
}
\uncover<4-|handout:3>{
\draw[mafleche]  (n21) to[loop above, looseness=40] (n21);
}

%3e loop
\draw[mafleche]  (n31) to[loop, looseness=20] (n31);
%4e loop
\draw[mafleche]  (n41) to[loop, looseness=20] (n41);


%------------------------------
%loops du bas
\uncover<1-3|handout:1>{
\draw[mafleche]  (n13) to[loop below, looseness=40] (n13);
}
\uncover<4|handout:2>{
\draw[mafleche, red]  (n13) to[loop below, looseness=40] (n13);
}
\uncover<5-|handout:3->{
\draw[mafleche]  (n13) to[loop below, looseness=40] (n13);
}

\draw[mafleche]  (n23) to[loop below, looseness=40] (n23);
\draw[mafleche]  (n33) to[loop below, looseness=40] (n33);
\draw[mafleche]  (n43) to[loop below, looseness=40] (n43);


%--------------------------------------
%depart de la source


%double depart vers le haut
\only<1-4|handout:1>{
\draw[mafleche]  (s1.45) to (n11.205);
\draw[mafleche]  (s1) to (n11);
}
\only<5|handout:0>{
\draw[mafleche, red]  (s1.45) to (n11.205);
\draw[mafleche, red]  (s1) to (n11);
}

\only<6|handout:2>{
\draw[mafleche, red]  (s1) to[bend left] (n11);
\draw[mafleche, red]  (s1) to (n11);
}
\only<7-|handout:3>{
\draw[mafleche]  (s1) to[bend left] (n11);
\draw[mafleche]  (s1) to (n11);
}

%double depart vers le bas
\only<1-6|handout:1>{
\draw[mafleche]  (s1.-45) to (n13.160);
\draw[mafleche]  (s1) to (n13);
}

\only<7|handout:0>{
\draw[mafleche, red]  (s1.-45) to (n13.160);
\draw[mafleche, red]  (s1) to (n13);
}

\only<8|handout:2>{
\draw[mafleche, bend right, red]  (s1) to (n13);
\draw[mafleche, red]  (s1) to (n13);
}
\only<9-|handout:3>{
\draw[mafleche, bend right]  (s1) to (n13);
\draw[mafleche]  (s1) to (n13);
}


\draw[mafleche]  (s1) to (n12);

%-----------------------------------
%fleches qui bend
\only<1-8|handout:1-2>{
\draw[mafleche]  (s1) to (n22);
}
\only<9|handout:0>{
\draw[mafleche, red]  (s1) to (n22);
}
\only<10|handout:3>{
\draw[mafleche, red]  (s1) to[bend left] (n22);
}
\only<11|handout:0>{
\draw[mafleche]  (s1) to[bend left] (n22);
}

%autre fleche
\only<1-10|handout:1-2>{
\draw[mafleche]  (n11) to (n33);
}
\only<11|handout:0>{
\draw[mafleche, red]  (n11) to (n33);
}
\only<12|handout:3>{
\draw[mafleche, red]  (n11) to[bend left] (n33);
}
\only<13-|handout:0>{
\draw[mafleche]  (n11) to[bend left] (n33);
}

%autre fleche
\only<1-10|handout:1-2>{
\draw[mafleche]  (n12) to (n32);
}
\only<11|handout:0>{
\draw[mafleche, red]  (n12) to (n32);
}
\only<12|handout:3>{
\draw[mafleche, red]  (n12) to[bend right] (n32);
}
\only<13|handout:0>{
\draw[mafleche]  (n12) to[bend right] (n32);
}

%bend left 10
\only<1-12|handout:1-2>{
\draw[mafleche]  (n13) to (n31);
}
\only<13|handout:0>{
\draw[mafleche, red]  (n13) to (n31);
}
\only<14|handout:0>{
\draw[mafleche, red]  (n13) to[bend left] (n31);
}
\only<15|handout:3>{
\draw[mafleche, red]  (n13) to[bend left=10] (n31);
}
\only<16-|handout:0>{
\draw[mafleche]  (n13) to[bend left=10] (n31);
}

%in=... ,out=...
\only<1-15|handout:1-2>{
\draw[mafleche]  (n31) to (s2);
\draw[mafleche]  (n41) to (s2);
}
\only<16|handout:0>{
\draw[mafleche, red]  (n31) to (s2);
\draw[mafleche, red]  (n41) to (s2);
}
\only<17|handout:3>{
\draw[mafleche, red]  (n31) to[out = -10, in = 135] (s2);
\draw[mafleche, red]  (n41) to[out=0, in=90] (s2);
}
\only<18|handout:0>{
\draw[mafleche]  (n31) to[out = -10, in = 135] (s2);
\draw[mafleche]  (n41) to[out=0, in=90] (s2);
}




\draw[mafleche]  (n11) to (n22);
\draw[mafleche]  (n11) to (n21);
\draw[mafleche]  (n12) to (n23);
\draw[mafleche]  (n12) to (n31);


\draw[mafleche]  (n22) to (n32);
\draw[mafleche]  (n32) to (n42);


\draw[mafleche]  (n32) to (n43);

\draw[mafleche]  (n32) to (n41);

\draw[mafleche]  (n13) to (n23);
\draw[mafleche]  (n23) to (n32);
\draw[mafleche]  (n33) to (n42);
\draw[mafleche]  (n33) to (n43);


%arrivee au puit
\draw[mafleche]  (n42) to (s2);
\draw[mafleche]  (n21) to (s2);



\draw[mafleche]  (n43) to (s2);

\end{tikzpicture}
}
