% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %
% Package definition
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %
\ProvidesPackage{gwiftemplate}

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %
% Required Package
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %
\RequirePackage{xcolor}
\RequirePackage{tcolorbox}

% Color definition
\definecolor{ffg_darkblue}{RGB}{21,29,76}
\definecolor{ffg_lightblue}{RGB}{0, 120, 190}
\definecolor{ffg_red}{RGB}{241, 83, 60}

\definecolor{ffg_title_color}{RGB}{12, 97, 158}
\definecolor{ffg_section_color}{RGB}{24, 146, 239}

\definecolor{footer_color}{RGB}{128, 128, 128}
\definecolor{flyingblue}{RGB}{49, 123, 181}
\definecolor{greymoreknowledge}{RGB}{200, 200, 200}

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %
% Define colorbox
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %
\newtcolorbox{knowledgebox}{colback=ffg_red!5!white, colframe=ffg_red!100!black, fonttitle=\bfseries, title={Savoir}, breakable} %breakable
\newtcolorbox{skillsbox}{fonttitle=\bfseries, title={Savoir faire}, breakable} %breakable

\newenvironment{advicebox}
    {
        \begin{tcolorbox}[colback=flyingblue!5!white, colframe=flyingblue!100!black,title={Conseils}]
    }
    {
        \end{tcolorbox}
    }

\newenvironment{memorizebox}
    {
        \begin{tcolorbox}[colback=greymoreknowledge!5!white, colframe=greymoreknowledge!100!black,title={À retenir}]
    }
    {
        \end{tcolorbox}
    }

\newenvironment{dangerbox}
    {
        \begin{tcolorbox}[colback=red!5!white,colframe=red!75!black,title={Important}]
    }
    {
        \end{tcolorbox}
    }

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %
% Define image boxes
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %

\newenvironment{graphic}[1]
%
% I actually tried to make a `newcommand` with two parameters
% instead of a new environnement but captions were not taken back into the correct format.
%
    {
        \begin{figure}[H]
            \centering
            \scalebox{1.0}{\includegraphics[max size={\textwidth}{\textheight}]{#1}}
    }
    {
        \end{figure}
    }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% References
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% https://sources.grimbox.be/Sulley/layout_syllabus_ffg/src/branch/master/ffgTemplate.sty
% Définir une nouvelle commande : https://www.overleaf.com/learn/latex/Commands
% Check empty values : https://latex.org/forum/viewtopic.php?t=5976
