/*** Classes génériques ***/
.margin-auto{
	margin: auto;
}

.margin-0{
	margin: 0;
}

.txt-gras{
	font-weight: bold;
}

.txtalign-left{
	text-align: left;
}

.txtalign-right{
	text-align: right;
}

.txtalign-center{
	text-align: center;
}

.mobileonly{
	display: none;
}

.printonly, .nodisplay{
	display: none;
}

.flex{
	display: flex;
	justify-content: space-around;
	flex-wrap: wrap;
	align-items: flex-start;
}

.width-100{
	width: 100%;
}

.min-content-real{
	width: min-content;
}

.demi{
	width: 49%;
}

.tiers{
	width: 31%;
}

.quart{
	width: 24%;
}

.cinquieme{
	width: 19%;
}

.trois-quarts{
	width: 74%;
}

.min-content{
	width: 1%;
	white-space: nowrap;
}

.nowrap{
	white-space: nowrap;
}

.overflow-y{
	overflow-y: auto;
}

.overflow-x{
	overflow-x: auto;
}

/*** Html ***/
html{
	font-family: sans-serif;
	font-size: 11pt;
}


/*** Body ***/
body{
	margin: 0;
	background: var(--bodyBackground);
}

body *{
	box-sizing: border-box;
}

#connectedAs{
	position: absolute;
	top: 0;
	width: 100%;
	background: #FEC007;
	opacity: 0.7;
	margin-left: -1rem;
	padding: 4px;
	text-align: center;
}


/*** Links a ***/
a{
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}


/*** Table ***/
table{
	border-collapse: collapse;
	margin: auto;
	max-width: 100%;
}

table thead{
	background: var(--lightgrey);
	color: var(--mainColor);
}

td, th, caption{
	padding-left: 1em;
	padding-right: 1em;
	border: 1px solid var(--grey);
	text-align: center;
	vertical-align: top;
}

table img{
	height: 1em;
	width: 1em;
}

.table-striped>tbody>tr:hover{
	background-color: var(--secondaryColor) !important;
}

/*** Icônes d'action ***/
.icons{
	width: min-content;
	text-align: center !important;
	white-space: nowrap;
}

.icon{
	filter: grayscale(100%);
	opacity: 0.5;
	margin-left: 0.5em;
	margin-right: 0.5em;
	display: inline-block;
	width: 1em;
	height: 1em;
}

.icon:hover{
	filter: grayscale(0%);
	opacity: 1;
}

.icon.delete{
	background-image: url("../images/delete-mqT-Jtt.png");
	background-repeat: no-repeat;
	background-size: contain;
}

.icon.edit{
	background-image: url("../images/edit-WVqS881.png");
	background-repeat: no-repeat;
	background-size: contain;
}

.icon.disable{
	background-image: url("../images/disable-xbzgn1p.png");
	background-repeat: no-repeat;
	background-size: contain;
}

.fonction svg{
	height: 1em;
	width: auto;
	margin-left: 0.3em;
	margin-right: 0.3em;
}

svg.edition:hover{
	fill: var(--blue);
}

svg.suppression:hover{
	fill: var(--red);
}

svg.ajout:hover,
button:hover svg.ajout{
	fill: var(--green);
}

svg.enregistrer:hover,
button:hover svg.enregistrer{
	fill: var(--blue);
}

/*** Titles h1 ***/
h1 {
	font-weight: normal;
	font-size: 2rem;
	margin: 0;
	margin-bottom: 1em;
	text-align: left;
	border-bottom: 1px solid var(--mainColor);
}


/*** Header ***/
header{
	background-color: var(--mainColor);
	background-image: url("../images/icon-white-8HDJBKn.png");
	background-repeat: no-repeat;
	background-position: left 4rem top 0.5rem;
	background-size: 1.5rem;
	color: var(--secondaryColor);
	text-align: right;
	position: sticky;
	top: 0;
	z-index: 2;
}

header #ToolName{
	float: left;
	font-size: 1.8rem;
	margin-left: 6rem;
	color: white;
}


/*** Menu ***/
menu{
	margin: 0;
}

menu li{
	list-style-type: none;
	line-height: 1.5em;
}

#menuNiv1{
	font-size: 1.4rem;
	padding-left: 4rem;
	padding-right: 4rem;
	height: 2.6rem;
}

#menuNiv2{
	background: rgba(255,255,255,0.3);
	font-size: 1.2rem;
	padding-left: 4rem;
	padding-right: 4rem;
	height: 2.2rem;
}

menu li{
	display: inline-block;
}

menu li a:hover,
menu li a.selected{
	font-weight: bold;
	border-bottom: 2px solid var(--secondaryColor);
}

menu li a{
	padding-left: 1rem;
	padding-right: 1rem;
	padding-bottom: 0.4rem;
	margin-left: 1rem;
}

.flex.menuAccueil{
	justify-content: space-around;
	padding: 0;
	box-sizing: revert;
}

.menuAccueil *{
	box-sizing: unset;
}

.menuAccueil div{
	font-size: 2rem;
	width: 7.5em;
	height: 5em;
	background: var(--bodyBackground);
	margin: 0.4em;
	border-radius: 15px;
	transition: visibility .5s ease 2.5s;
	padding-top: 1.25em;
	padding-bottom: 1.25em;
	text-align: center;
}

.menuAccueil svg{
	font-size: 2rem;
	width: 3.5em;
	height: 3.5em;
}

.menuAccueil a svg{
	fill: var(--secondaryColor);
}

.menuAccueil a:hover svg{
	fill: var(--mainColor);
}

.animated
{
	-webkit-animation-duration: 1s;
	animation-duration: 1s;
	-webkit-animation-fill-mode: both;
	animation-fill-mode: both;

	-webkit-animation-delay: 0.2s;
	animation-delay: 0.2s;
}

.animated-delay-00{ animation-delay: 0.0s; }
.animated-delay-01{ animation-delay: 0.1s; }
.animated-delay-02{ animation-delay: 0.2s; }
.animated-delay-03{ animation-delay: 0.3s; }
.animated-delay-04{ animation-delay: 0.4s; }
.animated-delay-05{ animation-delay: 0.5s; }
.animated-delay-06{ animation-delay: 0.6s; }


.fade-in
{
	-webkit-animation-name: fadeIn;
	animation-name: fadeIn;
}

@-webkit-keyframes fadeIn {
	0% {
		opacity: 0;
	}

	100% {
		opacity: 1;
	}
}

@keyframes fadeIn {
	0% {
		opacity: 0;
	}

	100% {
		opacity: 1;
	}
}

/*** Main ***/
main{
	width: calc(95vw - 17px);
	background: var(--mainBackground);
	margin: auto;
	padding: 1rem;
	min-height: 88vh;
	box-shadow: 0 0 10px 1px rgba(0,0,0,.2);
	position: relative;
}

main #titre{
	background-color: inherit;
	position: sticky;
	height: 5rem;
	top: 4.8rem;
	z-index: 3;
}

main #content.stickyTable{
	height: calc(100vh - 14.6rem);
	margin-top: -1px;
}

main #content.stickyTable table thead th {
	position: sticky;
	background: var(--lightgrey);
	top: 0;
	z-index:5;
	border: 1px solid var(--grey);
}


/*** Formulaire de connexion ***/
#frmconnexion{
	width: 25rem;
	border: 1px solid var(--mainColor);
	padding: 1rem;
	font-size: 1.2em;
	box-shadow: 0 0 20px 5px rgba(0,0,0,0.3);
	background-repeat: no-repeat;
	background-size: cover;
}

#frmconnexion h1{
	color: var(--secondaryColor);
}

#frmconnexion input[type="text"]{
	background-color: rgba(240,240,240,0.5);
	background-size: contain;
	background-position: right;
}

#frmconnexion input[type="password"]{
	background-color: rgba(240,240,240,0.5);
	background-size: contain;
	background-position: right;
}

#frmconnexion button[type="submit"] {
	display: block;
	margin: auto;
	border: 2px solid var(--mainColor);
	padding: 0 5em;
	font-weight: normal;
}

#frmconnexion input[type="text"]:focus, #frmconnexion input[type="password"]:focus{
	background-color: rgba(240,240,240,1);
}

#frmconnexion img{
	width: 30%;
	display: block;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 2rem;
}

/* FlexField pour libellé dans le champ, y compris en saisie */
.FlexField{
	display: flex;
	flex-flow: column-reverse;
	height: 2.3em;
}

.FlexField label{
	transition: all 0.2s;
	touch-action: manipulation;
}

.FlexField input{
	padding-top: 0.7em;
	transition: all 0.2s;
	touch-action: manipulation;
}

/**
* Translate down and scale the label up to cover the placeholder,
* when following an input (with placeholder-shown support).
* Also make sure the label is only on one row, at max 2/3rds of the
* field—to make sure it scales properly and doesn't wrap.
*/
.FlexField input:placeholder-shown + label {
	cursor: text;
	max-width: 66.66%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transform-origin: left bottom;
	transform: translate(0, 2em); /* scale(1.5);*/
	color: var(--grey);
	opacity: 0;
}

/**
* When the element is focused, remove the label transform.
* Also, do this when the placeholder is _not_ shown, i.e. when
* there's something in the input at all.
*/
.FlexField input:not(:placeholder-shown) + label /*.FlexField input:focus + label*/{
	transform: translate(0.1em, 1.2em);/* scale(1);*/
	cursor: pointer;
	color: var(--grey);
	opacity: 1;
	font-size: 0.67em;
}

/*** Eléments de formulaires de filtres ***/
form.filtres{
	background: var(--lightgrey);
	margin-bottom: 1em;
	background-repeat: no-repeat;
	background-position: 0 0;
	background-size: contain;
	text-align: center;
}

form.filtres input, form.filtres select{
	background: white;
	opacity: 0.7;
	width: 100%;
}

form.filtres input:hover, form.filtres select:hover{
	opacity: 1;
}

form.filtres input[type="submit"], form.filtres button{
	background: var(--darkgrey);
	font-size: 0.9rem;
	color: white;
	cursor: pointer;
	padding-right: 1em;
	padding-left: 1em;
}

form.filtres input[type="submit"]:hover, form.filtres button:hover{
	color: var(--secondaryColor);
}

form.filtres button svg{
	fill: white;
	margin-right: 0.4em;
}

form.filtres button:hover svg{
	fill: var(--secondaryColor);
}

input:required, select:required, textarea:required, .ts-wrapper.required .ts-control{
	background-color: var(--requiredFieldColor);
}

/*** Eléments de tables de filtres ***/
table.filtres tr, table.filtres td, table.filtres th{
	border: none;
	font-size: 0.9rem;
	text-align: left;
	background: transparent !important;
}

table.filtres td{
	padding: 2px;
}

table.filtres caption{
	width: 100%;
	background: var(--grey);
	border: none;
	color: white;
}

table.filtres{
	border: 1px solid var(--darkgrey);
	width: 100%;
}


/*** Formulaires ***/
form *{
	font-family: inherit;
	font-size: inherit;
}

button, input, select, textarea{
	font-size: inherit;
	border: none;
}

.btop{
	border-top: 1px solid var(--grey);
}

input:not([type="button"]):not([type="submit"]):not(:required), select, textarea{
	background: transparent;
}

input:focus, select:focus, textarea:focus{
	border: 1px solid var(--mainColor);
	outline: none;
}

button{
	font-weight: bold;
	padding: 0.5em;
}

button img,
button svg{
	height: 1em;
	width: auto;
}

input[type=search]{
	font-family: inherit;
	font-size: inherit;
}


/*** Footer ***/
footer:not(.modal__footer){
	color: var(--footerColor);
	width: 50vw;
	text-align: left;
	margin-left: calc(2.5vw + 8px);
	border-top: 1px solid var(--footerColor);
	margin-top: 1rem;
	height: 1rem;

	animation-duration: 1s;
	animation-fill-mode: both;
	animation-delay: 0.2s;
	animation-name: fadeIn;
}

/*************************************************************************/
/***** DESIGN GENERAL - ERREURS DES FORMULAIRES *****/
/*************************************************************************/
.error_list{
	background: var(--orange);
	color: white;
	margin: 0;
	padding: 1px 5px;
	list-style: none;
	font-size: 1em;
}

.error_list li:before{
	content: "\26A0\00A0";
	position: relative;
}

.infobulle {
	position: relative;
	display: inline-block;
}

.infobulle .error_list {
	/*visibility: hidden;*/
	width: 120px;
	background-color: var(--orange);
	text-align: center;
	border-radius: 6px;
	position: absolute;
	z-index: 1;
	bottom: 125%;
	left: 50%;
	margin-left: -60px;
	margin-bottom: -0.5em;
	padding: 1px 5px;
	/*opacity: 0;*/
	transition: opacity 0.3s;
}

.infobulle .error_list::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -5px;
	border-width: 5px;
	border-style: solid;
	border-color: var(--orange) transparent transparent transparent;
}


/*** Mobile ***/
@media screen and (max-height: 599px), screen and (max-width: 899px) {
	html{
		font-size: 8pt;
	}

	.mobile-w100{
		width: 100%;
	}

	.overflow-y-mobile{
		overflow-y: auto;
	}

	.overflow-x-mobile{
		overflow-x: auto;
	}

	.mobile-w100vw {
		width: calc(100vw - 2rem);
	}

	main{
		width: 100vw;
	}

	main #content{
		overflow: auto;
	}

	header{
		background-image: none;
	}

	header #ToolName{
		display: none;
	}

	form.criteres table tr{
		display: block;
		float: left;
	}

	form.criteres table th,
	form.criteres table td{
		display: block;
		height: 2.3em;
	}

	#menuNiv1,
	#menuNiv2{
		padding: 0;
	}

	#menuMobile a{
		width: 12rem;
		height: 5rem;
		background: var(--secondaryColor);
		color: var(--mainColor);
		font-size: 1.5rem;
		margin: 1rem;
		text-align: center;
		position: relative;
		border-radius: 3rem;
		border: 2px solid var(--mainColor);
	}

	#menuMobile a:hover{
		font-weight: bold;
	}

	#menuMobile span{
		position: absolute;
		left: 0;
		top: 50%;
		transform: translateY(-50%);
		width: 100%;
	}

	.nomobile{
		display: none;
	}

	.mobileonly.inlineblock{
		display: inline-block;
	}

	.mobileonly.block{
		display: block;
	}

	footer:not(.modal__footer){
		width: 100%;
		margin-left: 0;
	}
}