
%%%%%%%%%%%%%%%%% Compétences & Composantes essentielles d'un parcours 
% Usage : \frameParcoursComposantesEssentielles{abbr_parcours}{n°_parcours}
\newcommand\frameParcoursDefinitionsEtComposantesEssentielles[2]{

\xdef\PARABBR{#1} % Nom du parcours : Cyber
\xdef\COUPAR{#2} % N° du parcours : Cyber
%\def\PARABBR{Cyber}
%\def\COUPAR{1}

\begin{frame}[plain]{}
  \begin{tikzpicture}[overlay, remember picture]
	  \coordinate(topleftcorner) at ($ (current page.north west) + (10mm,-12mm) $);
    \coordinate(toprightcorner) at ($ (current page.north east) + (-10mm,-10mm) $);
    \coordinate(bottomleftcorner) at ($ (current page.south west) + (10mm,10mm) $);
    \coordinate(bottomrightcorner) at ($ (current page.south east) + (-10mm,10mm) $);
		
    \stdsetup
    \node[text=titlebg]  [%
    outer sep=0,inner sep=0mm,%
    fit=(lastpoint)(splitpoint),
    align=left%
    ] (xtitle) {\fontsize{20}{40}\scshape\bfseries\selectfont Parcours \PARABBR~: compétences et composantes essentielles}; 
		\fill[shade,left color=titlebg,right color=white] (xtitle.south west) rectangle ($ (xtitle.south east) + (0,1mm) $);
		
		% Qu'est ce qu'une comp essentielle ?
    %\node[%
    %outer sep=0,inner sep=2mm,%
    %fit=(toprightcorner)(splitpointbis),
    %rounded corners=2mm,
    %fill=red!10!white,
    %align=left%
    %] (blob) {Une \textbf{compétence} est un « \textbf{savoir-agir complexe}, prenant appui sur la mobilisation et la combinaison efficaces d’une variété de ressources à l’intérieur d’une famille de situations » (Tardif, 2006). Les ressources désignent ici les savoirs, savoir-faire et savoir-être dont dispose un individu, et qui lui permettent de mettre en œuvre la compétence.};
    \coordinate(lastpoint) at ($ (xtitle.south west) + (0,-4mm) $);
    
		
		\xdef\loopcompparcours{\csname loopcompparcours\PARABBR \endcsname}
		\foreach \CNOM/\CTYPE/\CLETTRE [count=\COUXX] in \loopcompparcours { % Boucle sur les compétences
    %\foreach \XX in \comploop {%
      \coordinate (bottompoint) at ($ (lastpoint)+(0,-20mm) $);
      \coordinate (subrefpoint) at ($ (refpoint)+(150mm,0mm) $); % adaptation séparation def/compo : 60
			
			
      \begin{pgfonlayer}{main}
        % \draw[thick](lastpoint)--++(-1cm,0);
        \node[outer sep=0,inner sep=0mm,% cadre rouge
        minimum height=25mm,%
        text width=100mm,% 190
        align=left,%
        text=comp\CTYPE\CLETTRE p,fill=comp\CTYPE\CLETTRE!70!white%
        ] (rightbox) at (lastpoint-|subrefpoint) [anchor=north west] {%
					\ifcsdef{componame\CNOM A}{ % Si au moins une compo essentielle
						\begin{list}{$\bullet$}{\topsep=0pt \partopsep=0pt \parsep=0pt \itemsep=0pt \leftmargin=1em \itemindent=0em}%
							%% boucle sur les composantes essentielles
							%\item test \compoloop
							\foreach \YY in \compoloop {%
								\ifcsdef{componame\CNOM\YY}{
									\item \textcolor{comp\CTYPE\CLETTRE p}{en \csname componame\CNOM\YY\endcsname}
								}{\linebreak}%
							}
						\end{list}%
					}{}
        };
        \coordinate(bottompoint) at ($ (rightbox.south west)+(-5mm,0) $);
        \coordinate(toppoint) at ($ (lastpoint)+(32mm,0mm) $);
        \node[outer sep=0,inner sep=0mm,%
        % text width=45mm,%
        fit=(bottompoint)(toppoint),
        align=flush center,%
        fill=comp\CTYPE\CLETTRE,text=comp\CTYPE\CLETTRE p%
        ] (leftbox) {%
          \scriptsize\csname compdef\CNOM\endcsname% la définition de le compétence
        };
      \end{pgfonlayer}
			
      \begin{pgfonlayer}{background}
        \coordinate(toppoint) at ($ (lastpoint)+(30mm,2mm) $);
        \coordinate(bottompoint) at ($ (rightbox.south east)+(2mm,-2mm) $);
        \coordinate(bottomwpoint) at ($ (leftbox.south east)+(2mm,-2mm) $);
        \node[outer sep=0,inner sep=0mm,
        fit=(leftbox)(rightbox)(toppoint)(bottompoint)(bottomwpoint),
        fill=comp\CTYPE\CLETTRE,
        blur shadow={shadow blur steps=5}
        ] (bodybox) {};
        \coordinate (tmpa) at ($ (lastpoint)+(80mm,0) $);
        \coordinate (tmpb) at (tmpa|-bodybox.south);
        \fill[fill=comp\CTYPE\CLETTRE!50!white] ($ (leftbox.north east)+(2mm,0mm) $) rectangle ($ (rightbox.south west)+(-2mm,0) $);
        \coordinate(toppoint) at ($ (lastpoint)+(25mm,2mm) $);
        \node[%
        outer sep=0,inner sep=0mm,%
        text width=25mm,%
        fit=(toppoint)(lastpoint|-bodybox.south),%
        align=center,%
        fill=comp\CTYPE\CLETTRE,text=comp\CTYPE\CLETTRE p,%
        blur shadow={shadow blur steps=5}%
        ] (headbox) {\csname compname\CNOM\endcsname};
      \end{pgfonlayer}
      \coordinate(lastpoint) at ($ (lastpoint|-bodybox.south) + (0,-4mm) $);
      
    }
		
				% Le numero de pages
		\node[inner sep=0,outer sep=0,text width=33mm,anchor=north,align=center] (testarrow) at ($ (bottomrightcorner)+(0mm,0mm) $) {
\insertframenumber{}~/~\inserttotalframenumber{}
};
  \end{tikzpicture}
\end{frame}
}