%-------------------------------------------------------------------------------
% LaTeX Beamer theme "femto" from the femto-st evaluation model (2011) JM Nicod and PC Heam (LIFC)
% 
% author: Christophe Varnier et passage au ".sty" par G. Laurent
%         Joel Abadie (12/06/2012) rajout de fonctionnalites tikzpicture
%         Jean-Marc Nicod (logo + reglage pied de page)
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerthemefemto}[2012/06/05 beamer theme femto package]
\RequirePackage{times}
\RequirePackage{tikz}
%-------------------------------------------------------------------------------

%      _         _             _                     _                     
%  ___| |_ _   _| | ___    ___| |_    ___ ___  _   _| | ___ _   _ _ __ ___ 
% / __| __| | | | |/ _ \  / _ \ __|  / __/ _ \| | | | |/ _ \ | | | '__/ __|
% \__ \ |_| |_| | |  __/ |  __/ |_  | (_| (_) | |_| | |  __/ |_| | |  \__ \
% |___/\__|\__, |_|\___|  \___|\__|  \___\___/ \__,_|_|\___|\__,_|_|  |___/
%          |___/                                                           
%

% commande permettant de dessiner une page de fond
% appel depuis le document par : \setbeamertemplate{background}{\titrefemto}
\newcommand{\titrefemto}{
\begin{tikzpicture}
	%definition du node centre au dimension de la page
	\node[minimum height=\paperheight, minimum width=\paperwidth](centre) {};
	% placement des logos en bas à gauche
	\matrix[above right=4mm, ampersand replacement=\&] at (centre.south west){
		\node[anchor=center]{\includegraphics[width=7mm]{logo-UFC.jpg}}; \&
		\node[anchor=center]{\includegraphics[width=10mm]{logo_ubfc.jpg}}; \&
		\node[anchor=center]{\includegraphics[width=6mm]{logo-CNRS.jpg}}; \&
		\node[anchor=center]{\includegraphics[width=13mm]{logo-ENSMM.jpg}}; \&
		\node[anchor=center]{\includegraphics[width=12mm]{logo-UTBM.jpg}}; \\
	};
	%placement des logos en haut à droite
	\node[below left, inner sep=0] at (centre.north east) {\includegraphics[width=3.5cm]{Hexagones.jpg}};
	%placement des logos en haut à gauche
%	\node[below right=6mm] at (centre.north west) {\includegraphics[width=2.8cm]{Femto-logo_couleur-2012.png}};
	\node[below right=3mm] at (centre.north west) {\includegraphics[width=2cm]{logo-FEMTO.jpg}};
\end{tikzpicture}
}

% commande permettant de dessiner une page de fond
% appel depuis le document par : \setbeamertemplate{background}{\pagefemto}
\newcommand{\pagefemto}{
\begin{tikzpicture}
	% definition du node centre au dimension de la page
	\node[minimum height=\paperheight, minimum width=\paperwidth](centre) {};
	% placement des logos en bas à gauche
%	\node[above right=3mm] at (centre.south west) {\includegraphics[width=1.2cm]{Femto-logo_couleur-2012.png}};
	\node[above right=0.75mm] at ([shift={(0.25,-0.1)}]centre.south west) {\includegraphics[width=1cm]{logo-FEMTO.jpg}};
	%placement des logos en haut à droite
	\node[below left, inner sep=0](hexa) at (centre.north east) {\includegraphics[width=3.5cm]{Hexagones.jpg}};
	%trace des traits
	\coordinate (A) at ([shift={(0.5,-1.4)}]centre.north west);
	\coordinate (B) at (A-| hexa.west);
	\draw[BleuFemtoTitre] (A) -- ([xshift=-3mm]B);
	%trait inferieur
%	\coordinate (A) at ([shift={(0.5,1.1)}]centre.south west);
	\coordinate (A) at ([shift={(0.5,.6)}]centre.south west);
%	\coordinate (B) at ([shift={(-0.5,1.1)}]centre.south east);
	\coordinate (B) at ([shift={(-0.5,.6)}]centre.south east);
	\draw[BleuFemtoTitre] (A) -- (B);
\end{tikzpicture}
}

% \definecolor{GreenYellow}{cmyk}{0.15,0,0.69,0} % PANTONE 388
% \definecolor{Yellow}{cmyk}{0,0,1.,0} % PANTONE YELLOW
% \definecolor{Goldenrod}{cmyk}{0,0.10,0.84,0} % PANTONE 109
% \definecolor{Dandelion}{cmyk}{0,0.29,0.84,0} % PANTONE 123
% \definecolor{Apricot}{cmyk}{0,0.32,0.52,0} % PANTONE 1565
% \definecolor{Peach}{cmyk}{0,0.50,0.70,0} % PANTONE 164
% \definecolor{Melon}{cmyk}{0,0.46,0.50,0} % PANTONE 177
% \definecolor{YellowOrange}{cmyk}{0,0.42,1.,0} % PANTONE 130
% \definecolor{Orange}{cmyk}{0,0.61,0.87,0} % PANTONE ORANGE-021
% \definecolor{BurntOrange}{cmyk}{0,0.51,1.,0} % PANTONE 388
% \definecolor{Bittersweet}{cmyk}{0,0.75,1.,0.24} % PANTONE 167
% \definecolor{RedOrange}{cmyk}{0,0.77,0.87,0} % PANTONE 179
% \definecolor{Mahogany}{cmyk}{0,0.85,0.87,0.35} % PANTONE 484
% \definecolor{Maroon}{cmyk}{0,0.87,0.68,0.32} % PANTONE 201
% \definecolor{BrickRed}{cmyk}{0,0.89,0.94,0.28} % PANTONE 1805
% \definecolor{Red}{cmyk}{0,1.,1.,0} % PANTONE RED
% \definecolor{OrangeRed}{cmyk}{0,1.,0.50,0} % No PANTONE,match
% \definecolor{RubineRed}{cmyk}{0,1.,0.13,0} % PANTONE RUBINE-RED
% \definecolor{WildStrawberry}{cmyk}{0,0.96,0.39,0} % PANTONE 206
% \definecolor{Salmon}{cmyk}{0,0.53,0.38,0} % PANTONE 183
% \definecolor{CarnationPink}{cmyk}{0,0.63,0,0} % PANTONE 218
% \definecolor{Magenta}{cmyk}{0,1.,0,0} % PANTONE PROCESS-MAGENTA
% \definecolor{VioletRed}{cmyk}{0,0.81,0,0} % PANTONE 219
% \definecolor{Rhodamine}{cmyk}{0,0.82,0,0} % PANTONE RHODAMINE-RED
% \definecolor{Mulberry}{cmyk}{0.34,0.90,0,0.02} % PANTONE 241
% \definecolor{RedViolet}{cmyk}{0.07,0.90,0,0.34} % PANTONE 234
% \definecolor{Fuchsia}{cmyk}{0.47,0.91,0,0.08} % PANTONE 248
% \definecolor{Lavender}{cmyk}{0,0.48,0,0} % PANTONE 223
% \definecolor{Thistle}{cmyk}{0.12,0.59,0,0} % PANTONE 245
% \definecolor{Orchid}{cmyk}{0.32,0.64,0,0} % PANTONE 252
% \definecolor{DarkOrchid}{cmyk}{0.40,0.80,0.20,0} %  No PANTONE match
% \definecolor{Purple}{cmyk}{0.45,0.86,0,0} % PANTONE PURPLE
% \definecolor{Plum}{cmyk}{0.50,1.,0,0} % PANTONE 518
% \definecolor{Violet}{cmyk}{0.79,0.88,0,0} % PANTONE VIOLET
% \definecolor{RoyalPurple}{cmyk}{0.75,0.90,0,0} % PANTONE 267
% \definecolor{BlueViolet}{cmyk}{0.86,0.91,0,0.04} % PANTONE 2755
% \definecolor{Periwinkle}{cmyk}{0.57,0.55,0,0} % PANTONE 2715
% \definecolor{CadetBlue}{cmyk}{0.62,0.57,0.23,0} % PANTONE (534+535)
% \definecolor{CornflowerBlue}{cmyk}{0.65,0.13,0,0} % PANTONE 292
% \definecolor{MidnightBlue}{cmyk}{0.98,0.13,0,0.43} % PANTONE 302
% \definecolor{NavyBlue}{cmyk}{0.94,0.54,0,0} % PANTONE 293
% \definecolor{RoyalBlue}{cmyk}{1.,0.50,0,0} % No PANTONE match
% \definecolor{Blue}{cmyk}{1.,1.,0,0} % PANTONE BLUE-072
% \definecolor{Cerulean}{cmyk}{0.94,0.11,0,0} % PANTONE 3005
% \definecolor{Cyan}{cmyk}{1.,0,0,0} % PANTONE PROCESS-CYAN
% \definecolor{ProcessBlue}{cmyk}{0.96,0,0,0} % PANTONE PROCESS-BLUE
% \definecolor{SkyBlue}{cmyk}{0.62,0,0.12,0} % PANTONE 2985
% \definecolor{Turquoise}{cmyk}{0.85,0,0.20,0} % PANTONE (312+313)
% \definecolor{TealBlue}{cmyk}{0.86,0,0.34,0.02} % PANTONE 3145
% \definecolor{Aquamarine}{cmyk}{0.82,0,0.30,0} % PANTONE 3135
% \definecolor{BlueGreen}{cmyk}{0.85,0,0.33,0} % PANTONE 320
% \definecolor{Emerald}{cmyk}{1.,0,0.50,0} % No PANTONE match
% \definecolor{JungleGreen}{cmyk}{0.99,0,0.52,0} % PANTONE 328
% \definecolor{SeaGreen}{cmyk}{0.69,0,0.50,0} % PANTONE 3268
% \definecolor{Green}{cmyk}{1.,0,1.,0} % PANTONE GREEN
% \definecolor{ForestGreen}{cmyk}{0.91,0,0.88,0.12} % PANTONE 349
% \definecolor{PineGreen}{cmyk}{0.92,0,0.59,0.25} % PANTONE 323
% \definecolor{LimeGreen}{cmyk}{0.50,0,1.,0} % No PANTONE match
% \definecolor{YellowGreen}{cmyk}{0.44,0,0.74,0} % PANTONE 375
% \definecolor{SpringGreen}{cmyk}{0.26,0,0.76,0} % PANTONE 381
% \definecolor{OliveGreen}{cmyk}{0.64,0,0.95,0.40} % PANTONE 582
% \definecolor{RawSienna}{cmyk}{0,0.72,1.,0.45} % PANTONE 154
% \definecolor{Sepia}{cmyk}{0,0.83,1.,0.70} % PANTONE 161
% \definecolor{Brown}{cmyk}{0,0.81,1.,0.60} % PANTONE 1615
% \definecolor{Tan}{cmyk}{0.14,0.42,0.56,0} % No PANTONE match
% \definecolor{Gray}{cmyk}{0,0,0,0.50} % PANTONE COOL-GRAY-8
\definecolor{DarkGray}{cmyk}{0,0,0,0.80} % PANTONE COOL-GRAY-8
% \definecolor{Black}{cmyk}{0,0,0,1.} % PANTONE PROCESS-BLACK
% \definecolor{White}{cmyk}{0,0,0,0} % No PANTONE match

% ajout des couleurs Femto
\definecolor{BleuFemtoTitre}{cmyk}{0.94,0.83,0,0.01}
\definecolor{BleuFemtoTexte}{cmyk}{0.92,0.54,0.05,0.09}
\definecolor{BleuFemto}{RGB}{39,84,148}
\definecolor{BleuClairFemto}{RGB}{66,153,214}
\definecolor{VertFemto}{RGB}{175,203,81}
\definecolor{GrisClairFemto}{RGB}{177,179,180}
\definecolor{GrisFemto}{RGB}{112,127,135}

\usetheme{default}

\setbeamertemplate{navigation symbols}{}

\setbeamercolor{structure}{fg=DarkGray}

% _                       _       _         _   _ _            
%| |_ ___ _ __ ___  _ __ | | __ _| |_ ___  | |_(_) |_ _ __ ___ 
%| __/ _ \ '_ ` _ \| '_ \| |/ _` | __/ _ \ | __| | __| '__/ _ \
%| ||  __/ | | | | | |_) | | (_| | ||  __/ | |_| | |_| | |  __/
% \__\___|_| |_| |_| .__/|_|\__,_|\__\___|  \__|_|\__|_|  \___|
%                  |_|                                         

%\pgfdeclareimage[height=\paperheight,width=\paperwidth]{titrefemto}{TitreFemto.png}

\setbeamertemplate{title page}
{
\vskip 5mm 

\usebeamerfont{title}\usebeamercolor[fg]{title}\Large\textcolor{BleuFemto}\inserttitle

%\vspace{5mm} 
\footnotesize
\begin{center}
\insertauthor\\
\vspace{5mm}
\insertdate
\end{center}

\begin{footnotesize}
Rapporteurs~:
\begin{tabular}{p{4cm}l}
Olivier {\sc Bournez}& Professeur à l'Ecole Polytechnique. \\
Jean-Paul {\sc Comet}&  Professeur à l'Université de Nice Sophia Antipolis\\
Juan-Pablo {\sc Ortega} & Professeur à l'Université de St. Gallen--Suisse \\
\end{tabular}


\vspace{5mm} 
Examinateurs~:
\begin{tabular}{p{4cm}l}
Sylvain {\sc Contassot-Vivier} & {Professeur à l'Université de Lorraine} \\
Raphaël {\sc Couturier}& {Professeur à l'Univ. Bourgogne Franche-Comté} \\
Christophe {\sc Guyeux}& {Professeur à l'Univ. Bourgogne Franche-Comté}
\end{tabular}
\end{footnotesize}

% Examinateurs:

% \begin{footnotesize}
% \begin{tabular}{rll}
% 
% 
% 
% \end{tabular}
% \end{footnotesize}

}

% _                       _       _                                
%| |_ ___ _ __ ___  _ __ | | __ _| |_ ___   _ __   __ _  __ _  ___ 
%| __/ _ \ '_ ` _ \| '_ \| |/ _` | __/ _ \ | '_ \ / _` |/ _` |/ _ \
%| ||  __/ | | | | | |_) | | (_| | ||  __/ | |_) | (_| | (_| |  __/
% \__\___|_| |_| |_| .__/|_|\__,_|\__\___| | .__/ \__,_|\__, |\___|
%                  |_|                     |_|          |___/      

%\pgfdeclareimage[height=\paperheight,width=\paperwidth]{pagefemto}{PageFemto.png}

\setbeamertemplate{frametitle}{\vspace{6mm}\hspace{-5mm}\Large\bf\textcolor{BleuFemto} \insertframetitle}

% pour les block
\definecolor{fondFemtotableau}{rgb}{1,0.71,0.754}
\setbeamertemplate{blocks}[rounded]
\setbeamercolor{block title}{fg=BleuClairFemto!60,bg=BleuFemto}
\setbeamercolor{block body}{bg=GrisClairFemto!40,fg=GrisFemto!50!black}
\setbeamerfont{block title}{series=\bfseries}
\setbeamercolor{title in head/foot}{fg=gray}
\newenvironment{femtoBlock}[1]{%
  \textcolor{BleuFemto}{\normalsize\textbf{#1}}\normalsize}

\setbeamertemplate{footline}
{%
  \leavevmode%
  \vspace{-2mm}%
  \hbox{\begin{beamercolorbox}[wd=.85\paperwidth,ht=2.5ex,dp=-2.5ex,leftskip=.3cm plus1fill,rightskip=.3cm]{author in head/foot}%
    \usebeamerfont{author in head/foot} \hfill \textcolor{GrisFemto}{\insertshortinstitute}
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.15\paperwidth,right,ht=2.5ex,dp=1.8ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
    \usebeamerfont{title in head/foot} \hfill \textcolor{BleuFemto}{\insertframenumber\ / \inserttotalframenumber}\hspace{0.25cm}
  \end{beamercolorbox}}%
  \vskip 10pt%
}

\setbeamertemplate{itemize item}[circle]
\setbeamertemplate{itemize subitem}[circle]

\partopsep=0ex % espace apres les blocks et avant le contenu
\topsep=5ex % debut du texte du slide
\parsep=0ex
\itemsep=0ex 

%-------------------------------------------------------------------------------

