%%%
% Cards
%%%
\newtcolorbox{Mybox}[3]{%
  enhanced,%
  nobeforeafter,%
  left=0pt,right=0pt,top=0pt,%
  text fill,%
  width=\largeurcarte,%
  height=\hauteurcarte,%
  arc=5pt,%
  overlay unbroken and first={%
    \coordinate[yshift=-0.5\hauteurtitre] (A1) at (frame.north west);%
    \coordinate[yshift=-0.5\hauteurtitre] (B1) at (frame.north east);%   
    \coordinate[yshift=-\hauteurtitre] (A) at (frame.north west);%
    \coordinate[yshift=-\hauteurtitre] (B) at (frame.north east);%
    \coordinate[xshift=1.5pt,yshift=8mm] (S1) at (frame.south west);%
    \coordinate[xshift=-1.5pt,yshift=8mm] (S2) at (frame.south east);%
    \coordinate[xshift=3mm+(\largeurtitre/2)] (A2) at (A1);%
    \coordinate[xshift=-3mm-(\largeurtitre/2)] (B2) at (B1);%
    \node[rounded corners, draw=black, rectangle,minimum height=1cm,text width=\largeurtitre,fill=TrameCouleur] (T1) at (A2){};%
    \node[TexteCouleur] (T1a) at (T1){\Large #1};%
    \node[yshift=-0.65cm] (T1b) at (T1){\tiny r\'eponse pr\'ec\'edente};%
    \node[inner sep=0pt,rounded corners, rectangle, draw=black,minimum height=1cm,text width=\largeurtitre,fill=TrameCouleur] (T2) at (B2){};%
    \node[inner sep=0pt,TexteCouleur] (T2a) at (T2){%
      \begin{minipage}{\largeurtitre}%
        \begin{center}%
          #2%
        \end{center}%
      \end{minipage}%
    };%
    \node[yshift=-0.65cm] (T2b) at (T2){};%
    \ifboolKV[Cards]{Titre}{\node[] at (T2b) {\tiny\useKV[Cards]{NomTitre}};}{}%
    \node[rectangle,xshift=5pt,yshift=4.25mm,minimum width=2em,rounded corners,fill=TrameCouleur,draw=black,anchor=west] (R) at (frame.south west) {\color{black}\Large\bfseries #3};%
    \draw[dashed] (S1) -- (S2);%
  },%
  colback=white,%
  colbacktitle=TrameCouleur,%
}%

\newcommand\PfCTexteJai{J'ai}
\newcommand\PfCTexteQuia{Qui a ?}

\makeatletter
\newtcolorbox{MyboxJQ}[2]{%
  enhanced,%
  nobeforeafter,%
  left=0pt,right=0pt,top=0pt,%
  text fill,%
  width=\largeurcarte,%
  height=\hauteurcarte,%
  arc=5pt,%
  underlay={%
    \ifboolKV[Cards]{BackgroundAv}{%
      \begin{tcbclipinterior}
        \node[anchor=center,opacity=1]
        at (interior.center) {%
          \includegraphics[%
          height=\tcb@height,
          width=\tcb@width,
          ]{\useKV[Cards]{ImageAv}}};%
      \end{tcbclipinterior}%
    }{}%
  },%
  overlay unbroken and first={%
    \coordinate[yshift=-0.5\hauteurtitre] (A1) at (frame.north west);
    \coordinate[yshift=0\hauteurtitre] (S3) at (frame.center);
    \coordinate[yshift=3mm] (C3) at (frame.south);
    \coordinate[xshift=\largeurcarte/2] (A3) at (A1);
    \node[rounded corners, draw=black, rectangle,minimum height=1cm,text width=\largeurcarte-6mm,fill=TrameCouleur] (T1) at (A3){};
    \node[TexteCouleur] (T1a) at (T1){\Large \PfCTexteJai};
    \node[rounded corners, draw=black, rectangle,minimum height=1cm,text width=\largeurcarte-6mm,fill=TrameCouleur] (T2) at (S3){};
    \node[TexteCouleur] (T2a) at (T2){\Large \PfCTexteQuia};
    \node[minimum height=1cm,text width=\largeurcarte-6mm] (PointTexte1) at ($(A3)!0.5!(S3)$) {\begin{minipage}{\largeurcarte-6mm}%
        \begin{center}%
          #1%
        \end{center}%
      \end{minipage}};
    \node[minimum height=1cm,text width=\largeurcarte-6mm] (PointTexte2) at ($(C3)!0.5!(S3)$) {\begin{minipage}{\largeurcarte-6mm}%
        \begin{center}%
          #2%
        \end{center}%
      \end{minipage}};
  },
  colback=white
}%
%
\newtcolorbox{MyboxJQAr}{%
  enhanced,%
  nobeforeafter,%
  left=0pt,right=0pt,top=0pt,%
  text fill,%
  width=\largeurcarte,%
  height=\hauteurcarte,%
  arc=5pt,%
  underlay={%
    \ifboolKV[Cards]{BackgroundAv}{%
      \begin{tcbclipinterior}
        \node[anchor=center,opacity=1]
        at (interior.center) {%
          \includegraphics[%
          height=\tcb@height,
          width=\tcb@width,
          ]{\useKV[Cards]{ImageAr}}};%
      \end{tcbclipinterior}%
    }{}%
  },%
  colback=white
}%
\makeatother

\makeatletter
%https://tex.stackexchange.com/questions/347434/clip-background-image-inside-tcolorbox
\newtcolorbox{MyboxSimpleAv}[1]{%
  enhanced,%
  nobeforeafter,%
  left=0pt,right=0pt,top=\hauteurtitre,bottom=0pt,%
  text fill,%
  width=\largeurcarte,%
  height=\hauteurcarte,%
  arc=5pt,%
  colback=white,%
  underlay={%
    \ifboolKV[Cards]{BackgroundAv}{%
      \begin{tcbclipinterior}
        \node[anchor=center,opacity=1]
        at (interior.center) {%
          \includegraphics[%
          height=\tcb@height,
          width=\tcb@width,
          ]{\useKV[Cards]{ImageAv}}};%
      \end{tcbclipinterior}%
    }{}%
  },%
  overlay unbroken and first={%
    \coordinate[yshift=-0.5\hauteurtitre] (A) at (frame.north);%
    \node[rounded corners, draw=black, rectangle,minimum height=1cm,text width=\largeurcarte-6mm,fill=TrameCouleur] (T1) at (A){\begin{minipage}{\largeurcarte-6mm}%
        \begin{center}%
          #1%
        \end{center}%
      \end{minipage}};%
    \node[yshift=-0.5em-0.5\hauteurtitre] (B) at (A){};%
    \ifboolKV[Cards]{Titre}{\node[fill=white] at (B) {\useKV[Cards]{NomTitre}};}{}%
  }%
}%

\newtcolorbox{MyboxSimpleAr}[1]{%
  enhanced,%
  nobeforeafter,%
  left=0pt,right=0pt,top=\hauteurtitre,bottom=0pt,%
  text fill,%
  width=\largeurcarte,%
  height=\hauteurcarte,%
  arc=5pt,%
  colback=white,%
  underlay={%
    \ifboolKV[Cards]{BackgroundAr}{%
      \begin{tcbclipinterior}
        \node[anchor=center,opacity=1]
        at (interior.center) {%
          \includegraphics[%
          height=\tcb@height,
          width=\tcb@width,
          ]{\useKV[Cards]{ImageAr}}};
      \end{tcbclipinterior}%,%
    }{}%
  },%
  overlay unbroken and first={%
    \coordinate[yshift=-0.5\hauteurtitre] (A) at (frame.north);%
    \node[rounded corners, draw=black, rectangle,minimum height=1cm,text width=\largeurcarte-6mm,fill=TrameCouleur] (T1) at (A){\begin{minipage}{\largeurcarte-6mm}%
        \begin{center}%
          #1%
        \end{center}%
      \end{minipage}};%
  }%
}%
\makeatother

\newtcolorbox{MyboxTrivial}[1][]{%
  enhanced,%
  nobeforeafter,%
  left=0pt,right=0pt,top=0pt,bottom=0pt,%
  text fill,%
  width=\largeurcarte,%
  height=\hauteurcarte,%
  arc=5pt,%
  colback=white,%
  #1
}%

\newlength{\largeurcards}%
\newlength{\hauteurcards}%
\newlength{\largeurcarte}%
\newlength{\hauteurcarte}%
\newlength{\hauteurtitre}%
\newlength{\largeurtitre}%

\newlength{\margeh}%
\newlength{\margev}%

\newlength{\PfCCardsH}%pour retenir en cas de décalage sur une page paire
\newlength{\PfCCardsEcartH}%Pour décaler sur une page paire
\newlength{\PfCCardsV}%pour retenir en cas de décalage sur une page paire
\newlength{\PfCCardsEcartV}%Pour décaler sur une page paire
\setlength{\PfCCardsEcartH}{0pt}
\setlength{\PfCCardsEcartV}{0pt}

\NewDocumentEnvironment{Trame}{+b}{%
  \ifodd\thepage%
  \setlength{\PfCCardsH}{\largeurcards}%
  \setlength{\PfCCardsV}{\hauteurcards}%
  \else%
  \setlength{\PfCCardsH}{\largeurcards+\PfCCardsEcartH}%
  \setlength{\PfCCardsV}{\hauteurcards+\PfCCardsEcartV}%
  \fi%
  \begin{tikzpicture}[remember picture,overlay]
    % quadrillages horizontal et vertical
    \coordinate[yshift=-\margev] (A) at (current page.north west);%
    \coordinate[yshift=-\margev] (B) at (current page.north east);%
    \coordinate[yshift=-\hauteurcards] (A1) at (A);%
    \coordinate[yshift=-\hauteurcards] (B1) at (B);%
    \coordinate[yshift=-\hauteurcards] (A2) at (A1);%
    \coordinate[yshift=-\hauteurcards] (B2) at (B1);%
    \coordinate[yshift=-\hauteurcards] (A3) at (A2);%
    \coordinate[yshift=-\hauteurcards] (B3) at (B2);%
    \coordinate[yshift=-\hauteurcards] (A4) at (A3);%
    \coordinate[yshift=-\hauteurcards] (B4) at (B3);%
    \coordinate[xshift=\margeh] (C) at (current page.north west);%
    \coordinate[xshift=\margeh] (D) at (current page.south west);%
    \coordinate[xshift=\largeurcards] (C1) at (C);%
    \coordinate[xshift=\largeurcards] (D1) at (D);%
    \coordinate[xshift=\largeurcards] (C2) at (C1);%
    \coordinate[xshift=\largeurcards] (D2) at (D1);%
    \coordinate[xshift=\largeurcards] (C3) at (C2);%
    \coordinate[xshift=\largeurcards] (D3) at (D2);%
    \draw (A)--(B);%
    \draw (A1)--(B1);%
    \draw (A2)--(B2);%
    \draw (A3)--(B3);%
    \draw (A4)--(B4);%
    \draw (C)--(D);%
    \draw (C1)--(D1);%
    \draw (C2)--(D2);%
    \draw (C3)--(D3);%
    % point pour placer les cartes
    \coordinate[xshift=\margeh+0.5\PfCCardsH,yshift=-0.5\PfCCardsV] (Carte1) at (A);%
    \coordinate[xshift=\largeurcards,yshift=0mm] (Carte2) at (Carte1);%
    \coordinate[xshift=2\largeurcards,yshift=0mm] (Carte3) at (Carte1);%
    \coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte4) at (Carte1);%
    \coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte5) at (Carte2);%
    \coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte6) at (Carte3);%
    \coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte7) at (Carte4);%
    \coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte8) at (Carte5);%
    \coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte9) at (Carte6);%
    #1%
  \end{tikzpicture}%
}{}%

\NewDocumentEnvironment{Trameold}{+b}{%
  \begin{tikzpicture}[remember picture,overlay]
    % quadrillages horizontal et vertical
    \coordinate[yshift=-\margev] (A) at (current page.north west);%
    \coordinate[yshift=-\margev] (B) at (current page.north east);%
    \coordinate[yshift=-\hauteurcards] (A1) at (A);%
    \coordinate[yshift=-\hauteurcards] (B1) at (B);%
    \coordinate[yshift=-\hauteurcards] (A2) at (A1);%
    \coordinate[yshift=-\hauteurcards] (B2) at (B1);%
    \coordinate[yshift=-\hauteurcards] (A3) at (A2);%
    \coordinate[yshift=-\hauteurcards] (B3) at (B2);%
    \coordinate[yshift=-\hauteurcards] (A4) at (A3);%
    \coordinate[yshift=-\hauteurcards] (B4) at (B3);%
    \coordinate[xshift=\margeh] (C) at (current page.north west);%
    \coordinate[xshift=\margeh] (D) at (current page.south west);%
    \coordinate[xshift=\largeurcards] (C1) at (C);%
    \coordinate[xshift=\largeurcards] (D1) at (D);%
    \coordinate[xshift=\largeurcards] (C2) at (C1);%
    \coordinate[xshift=\largeurcards] (D2) at (D1);%
    \coordinate[xshift=\largeurcards] (C3) at (C2);%
    \coordinate[xshift=\largeurcards] (D3) at (D2);%
    \draw (A)--(B);%
    \draw (A1)--(B1);%
    \draw (A2)--(B2);%
    \draw (A3)--(B3);%
    \draw (A4)--(B4);%
    \draw (C)--(D);%
    \draw (C1)--(D1);%
    \draw (C2)--(D2);%
    \draw (C3)--(D3);%
    % point pour placer les cartes
    \coordinate[xshift=\margeh+0.5\largeurcards,yshift=-0.5\hauteurcards] (Carte1) at (A);%
    \coordinate[xshift=\largeurcards,yshift=0mm] (Carte2) at (Carte1);%
    \coordinate[xshift=2\largeurcards,yshift=0mm] (Carte3) at (Carte1);%
    \coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte4) at (Carte1);%
    \coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte5) at (Carte2);%
    \coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte6) at (Carte3);%
    \coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte7) at (Carte4);%
    \coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte8) at (Carte5);%
    \coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte9) at (Carte6);%
    #1%
  \end{tikzpicture}%
}{}%

\setKVdefault[Cards]{Largeur=59,Hauteur=89,HauteurTheme=15,Marge=4,Landscape=false,Couleur=Cornsilk,Theme=Th\'eor\`eme\\de
  Pythagore,ThemeSol=Solution,Trame=false,Titre=false,NomTitre=Jeu 1,Loop,JaiQuia=false,BackgroundAv=false,BackgroundAr=false,ImageAv=4813762.jpg,ImageAr=4813762.jpg,AffichageSolution=true,SolutionSeule=false,%
  % Pour le trivial
  Trivial=false,Symboles={\faInfinity,\faSignal,\faProjectDiagram,\faHiking,\faRuler,\faLockOpen}
}%

\NewDocumentCommand\Cartes{o +m}{%[2][]{%
  \useKVdefault[Cards]%
  \setKV[Cards]{#1}%
  \setsepchar[*]{§*/}%
  \readlist*\ListeCards{#2}%
  \setsepchar{,}%
  \ifboolKV[Cards]{Landscape}{%
    \setlength{\hauteurcarte}{\fpeval{\useKV[Cards]{Largeur}-\useKV[Cards]{Marge}}mm}%
    \setlength{\largeurcarte}{\fpeval{\useKV[Cards]{Hauteur}-\useKV[Cards]{Marge}}mm}%
    \setlength{\largeurcards}{95mm}%
    \setlength{\hauteurcards}{65mm}%
    \setlength{\margeh}{(297mm-3\largeurcards)/2}%
    \setlength{\margev}{(210mm-3\hauteurcards)/2}%
  }{%
    \setlength{\hauteurcarte}{\fpeval{\useKV[Cards]{Hauteur}-\useKV[Cards]{Marge}}mm}%
    \setlength{\largeurcarte}{\fpeval{\useKV[Cards]{Largeur}-\useKV[Cards]{Marge}}mm}%
    \setlength{\largeurcards}{65mm}%
    \setlength{\hauteurcards}{95mm}%
    \setlength{\margeh}{(210mm-3\largeurcards)/2}%
    \setlength{\margev}{(297mm-3\hauteurcards)/2}%
  }%
  \setlength{\hauteurtitre}{\fpeval{\useKV[Cards]{HauteurTheme}}mm}%
  \setlength{\largeurtitre}{\fpeval{(\useKV[Cards]{Largeur}-\useKV[Cards]{Marge}-9)/2}mm}%
  \colorlet{TexteCouleur}{black}%
  \colorlet{TrameCouleur}{\useKV[Cards]{Couleur}}%
  \ifboolKV[Cards]{Trivial}{%
    \xdef\PfCListeSymbolTrivial{\useKV[Cards]{Symboles}}%
    \setsepchar{,}\readlist*\ListeSymbolesTrivial{\PfCListeSymbolTrivial}%
    \setlength{\tabcolsep}{0.25\tabcolsep}
    \ifboolKV[Cards]{Trame}{%
      \clearpage%
      \thispagestyle{empty}%
      \begin{Trame}%
        \multido{\i=1+1}{9}{%
          \node[] at (Carte\i) {%
            \begin{MyboxTrivial}%
              \begin{center}
                \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[9,m]}[hvlines]%
                  \xintFor* ##1 in{\xintSeq{1}{6}}\do{%
                    \rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[\i,\fpeval{1+2*(##1-1)}]\\
                  }%
                \end{NiceTabular}%
              \end{center}%
            \end{MyboxTrivial}%
          };%
        }%
      \end{Trame}%
      \ifboolKV[Cards]{AffichageSolution}{%
        \clearpage%
        \thispagestyle{empty}%
        \begin{Trame}%
          \multido{\i=1+1}{3}{%
            \node at (Carte\i) {%
              \begin{MyboxTrivial}%
                \begin{center}%
                  \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]%
                    \xintFor* ##1 in{\xintSeq{1}{6}}\do{%
                      \rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[\fpeval{4-\i},\fpeval{2*##1}]\\
                    }%
                  \end{NiceTabular}%
                \end{center}%
              \end{MyboxTrivial}%
            };%
          }%
          \multido{\i=4+1}{3}{%
            \node at (Carte\i) {%
              \begin{MyboxTrivial}%
                \begin{center}%
                  \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]%
                    \xintFor* ##1 in{\xintSeq{1}{6}}\do{%
                      \rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[\fpeval{10-\i},\fpeval{2*##1}]\\
                    }%
                  \end{NiceTabular}%
                \end{center}%
              \end{MyboxTrivial}%
            };%
          }%
          \multido{\i=7+1}{3}{%
            \node at (Carte\i) {%
              \begin{MyboxTrivial}%
                \begin{center}%
                  \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]%
                    \xintFor* ##1 in{\xintSeq{1}{6}}\do{%
                      \rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[\fpeval{16-\i},\fpeval{2*##1}]\\
                    }%
                  \end{NiceTabular}%
                \end{center}%
              \end{MyboxTrivial}%
            };%
          }%
        \end{Trame}%
        \clearpage%
      }{}%
    }{%
      \begin{MyboxTrivial}%
        \begin{center}%
          \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]%
            \xintFor* ##1 in{\xintSeq{1}{6}}\do{%
              \rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[1,\fpeval{1+2*(##1-1)}]\\
            }%
          \end{NiceTabular}%
        \end{center}%
      \end{MyboxTrivial}%
      \ifboolKV[Cards]{AffichageSolution}{%
        \begin{MyboxTrivial}%
          \begin{center}%
            \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]%
              \xintFor* ##1 in{\xintSeq{1}{6}}\do{%
                \rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[1,\fpeval{2*##1}]\\
              }%
            \end{NiceTabular}%
          \end{center}%
        \end{MyboxTrivial}%
      }{}%
    }%
    \setlength{\tabcolsep}{4\tabcolsep}%
  }{%
    \ifboolKV[Cards]{JaiQuia}{%
      \ifboolKV[Cards]{Trame}{%
        \clearpage%
        \thispagestyle{empty}%
        \begin{Trame}%
          \multido{\i=1+1}{9}{%
            \node at (Carte\i) {%
              \begin{MyboxJQ}{\ListeCards[\i,1]}{\ListeCards[\i,2]}%
                %% 
              \end{MyboxJQ}%
            };%
          }%
        \end{Trame}%
        \clearpage%
        \ifboolKV[Cards]{AffichageSolution}{%
          \thispagestyle{empty}%
          \begin{Trame}
            \multido{\i=1+1}{3}{%
              \node at (Carte\i) {%
                \begin{MyboxJQAr}%
                \end{MyboxJQAr}%
              };%
            }%
            \multido{\i=4+1}{3}{%
              \node at (Carte\i) {%
                \begin{MyboxJQAr}%
                \end{MyboxJQAr}%
              };%
            }%
            \multido{\i=7+1}{3}{%
              \node at (Carte\i) {%
                \begin{MyboxJQAr}%
                \end{MyboxJQAr}%
              };%
            }%
          \end{Trame}%
          \clearpage%
        }{}%
      }{%
        \begin{MyboxJQ}{\ListeCards[1,1]}{\ListeCards[1,2]}%
          %%
        \end{MyboxJQ}%
        \ifboolKV[Cards]{AffichageSolution}{%
          \begin{MyboxJQAr}%
            %% 
          \end{MyboxJQAr}%
        }{}%
      }%
    }{%
      \ifboolKV[Cards]{Loop}{%
        \ifboolKV[Cards]{Trame}{%
          \clearpage%
          \thispagestyle{empty}%
          \begin{Trame}
            \multido{\i=1+1}{9}{%
              \node at (Carte\i) {%
                \begin{Mybox}{\ListeCards[\i,1]}{\useKV[Cards]{Theme}}{\ListeCards[\i,2]}%
                  \ListeCards[\i,3]%
                \end{Mybox}%
              };%
            }%
          \end{Trame}%
          \clearpage%
        }{%
          \begin{Mybox}{\ListeCards[1,1]}{\useKV[Cards]{Theme}}{\ListeCards[1,2]}%
            \ListeCards[1,3]%
          \end{Mybox}%
        }%
      }{%
        \ifboolKV[Cards]{Trame}{%
          \clearpage%
          \thispagestyle{empty}%
          \begin{Trame}
            \multido{\i=1+1}{9}{%
              \node[] at (Carte\i) {%
                \begin{MyboxSimpleAv}{\useKV[Cards]{Theme}}%
                  \ListeCards[\i,1]%
                \end{MyboxSimpleAv}%
              };%
            }%
          \end{Trame}%
          \ifboolKV[Cards]{AffichageSolution}{%
            \clearpage%
            \thispagestyle{empty}%
            \begin{Trame}
              \multido{\i=1+1}{3}{%
                \node at (Carte\i) {%
                  \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
                    \ListeCards[\fpeval{4-\i},2]%
                  \end{MyboxSimpleAr}%
                };%
              }%
              \multido{\i=4+1}{3}{%
                \node at (Carte\i) {%
                  \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
                    \ListeCards[\fpeval{10-\i},2]%
                  \end{MyboxSimpleAr}%
                };%
              }%
              \multido{\i=7+1}{3}{%
                \node at (Carte\i) {%
                  \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
                    \ListeCards[\fpeval{16-\i},2]%
                  \end{MyboxSimpleAr}%
                };%
              }%
            \end{Trame}%
            \clearpage%
          }{}%
        }{%
          \ifboolKV[Cards]{SolutionSeule}{}{%
            \begin{MyboxSimpleAv}{\useKV[Cards]{Theme}}%
              \ListeCards[1,1]%
            \end{MyboxSimpleAv}%
          }%
          \ifboolKV[Cards]{AffichageSolution}{%
            \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
              \ListeCards[1,2]%
            \end{MyboxSimpleAr}%
          }{}%
        }%
      }%
    }%
  }%
}%

\newcommand\SolutionCarte[2]{%
  \begin{center}
    \bfseries#1
  \end{center}
  
  #2
}%