:root {
	/* Couleurs */
	--lighter-grey: #f0eeee;
	--light-grey: #c0c0c0;

	/* Animations */
	--transition-time: 0.2s;
}

html, body {
	width: 100%;
	height: 100%;
}


/* Affichage général de la page responsive */
#main_container {
	display: grid;
	grid-template-columns: 200px 1fr;
	grid-template-rows: auto 1fr;
	height: 100%;
	grid-template-areas: "menu_logo menu_top"
	                     "menu_side content";
}

#menu_shading {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background-color: #69696969;
	display: none;
	z-index: 2;
}

#menu_logo {
	display: flex;
	align-items: center;
	justify-content: center;
	grid-area: menu_logo;
	border-bottom: 1px solid var(--light-grey);
}
.menu_volet_buttons {
	font-size: 3em;
	display: none;
	padding: .5em;
	cursor: pointer;
}
#menu_logo_img {
	max-height: 75px;
}

#menu_top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	grid-area: menu_top;
	background-color: var(--lighter-grey);
	border-bottom: 1px solid var(--light-grey);

}
#menu_side {
	grid-area: menu_side;
	background-color: var(--lighter-grey);

}
#content {
	grid-area: content;
	padding: 10px;
	min-width: 0;
}

@media (max-width:1000px) {
	#menu_logo {
		position: sticky;
		top: 0;
		background-color: white;
		justify-content: space-between;
	}
	#main_container {
		grid-template-columns: 0px 1fr 0px;
		grid-template-areas: "menu_logo menu_logo menu_logo"
	                         "menu_side content   menu_top";
	}
	.menu_volet_buttons {
		display: inline-block;
	}
	.menu_volet {
		transition: transform var(--transition-time) ease;
		overflow: auto;
		padding-top: 75px;
		z-index: 3;
	}
	#menu_side {
		position: fixed;
		background-color: var(--lighter-grey);
		top: 0;
		bottom: 0;
		left: 0;
		transform: translateX(-110%);
		box-shadow: 1px 0 5px black;
	}
	#menu_top {
		position: fixed;
		background-color: var(--lighter-grey);
		top: 0;
		right: 0;
		bottom: 0;
		transform: translateX(110%);
		padding: 5px;
		padding-top: 75px;
		border: none;
		box-shadow: -1px 0 5px black;
		justify-content: flex-start;
	}
	#menu_side.displayed, #menu_top.displayed {
		transform: none;
	}
	#menu_side.displayed, #menu_top.displayed, #menu_shading.displayed {
		display: flex;
	}

	#menu_top {
		flex-direction: column;
	}

}














/* Affichage des drapeaux - A nettoyer */





#flags_dropdown_button {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	height: 100%;
	cursor: pointer;
	user-select: none;
}



#menu_flags {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
}
#menu_flags > div {
	display: flex;
	flex-direction: column;
	align-items: center;
}

/*.flag_link {
	padding: 5px 10px;
	display: block;
	border-bottom: 1px solid #f0eeee;
	width: 190px;
	height: 25px;
	box-sizing: border-box;
}

.flag_link img {
	margin-right: 10px;
}
*/#flags_dropdown.active {
	max-height: 80vh;
}

#flags_dropdown .flag_link:hover {
	background-color: #DDD;
}
#flags_dropdown .current_flag {
	background-color: lightgrey;
}

.arrow_down {
	margin-left: 5px;
	border: solid black;
	border-width: 0 3px 3px 0;
	display: inline-block;
	padding: 4px;
	transform: rotate(45deg);
	margin-top: -.5em;
}

.flags_dropdown_close {
	display: none;
}



#flags_dropdown {
	position: absolute;
	z-index: 5;
	background-color: white;
	box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
	overflow-y: scroll;
	margin-top: 25px;
	display: flex;
	flex-direction: column;
	align-content: flex-start;
	max-height: 0px;
	transition: max-height var(--transition-time) ease;
}
.flags_dropdown_popup {
	display: grid;
	grid-template-rows: repeat(20, 1fr);
	grid-auto-flow: column;
	grid-auto-columns: 150px;
}
.flags_dropdown_popup > * {
	padding: 5px 10px;
}
.flags_dropdown_close {
	padding: 5px 10px;
	cursor: pointer;
	font-size: 1.5em;
}
.flags_dropdown_title {
	grid-row: 1;
	grid-column: span 2; /*Un peu nul mais j'ai pas trouvé mieux*/
}
.flags_dropdown_link {
	border-bottom: 1px solid #f0eeee;
	display: flex;
	align-items: center;
}
a.flags_dropdown_link {
	text-decoration: none;
}
.flags_dropdown_link img {
	margin-right: 10px;
}

.flags_dropdown_link:hover {
	background-color: #DDD;
}
.square_flag {
	width: 25px;
	height: 16px;
}
@media (max-width:1000px) {
	#flags_dropdown {
		position: fixed;
		left: 0;
		top: 0;
		right: 0;
		bottom: 0;
		margin: 0;
	}
	.flags_dropdown_popup {
		grid-auto-flow: row;
		grid-template-rows: inherit;
		grid-auto-columns: 1fr;
		overflow: auto;
	}
	#flags_dropdown.active {
		max-height: none;
	}
	.flags_dropdown_title {
		grid-row: auto;
		grid-column: auto;
	}
	.flags_dropdown_close {
		display: block;
	}
}











/* Affichage de la liste des liens à gauche - A nettoyer */

div.menu_login_info {
	padding: 5px;
}

.menu_parent,
.menu_child {
	list-style: none;
	padding: 0;
	flex-direction: column;
	justify-content: center;
}

.menu_title_radio {
	display: none;
}
.menu_title {
	line-height: 50px;
	font-size: 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-top: 1px solid #e6e6e6;
	cursor: pointer;
	padding-left:10px;
}
.menu_title i.icon-flecheDroite {
	margin-left: auto;
	transition-duration: 50ms;
}
.menu_title:hover {
	background-color: #e1e1e1;
}
.menu_title_radio + .menu_title:checked, .menu_title_radio + .menu_title:checked + div, .menu_title_displayed, .menu_title_displayed + div {
	background-color: #e6e6e6;
}
.menu_title_radio:checked + .menu_title > i, .menu_title_displayed > i {
	color: #c30040;
}
.menu_title_radio:checked + .menu_title > i.icon-flecheDroite, .menu_title_displayed > i.icon-flecheDroite {
	transform: rotate(90deg);
}
.menu_title_hidden {
	display: none;
}
.menu_title + div {
	margin-bottom: 0;
	overflow: hidden;
}
.menu_title + div a {
	height: 0 !important;
	line-height: 0 !important;
	overflow: hidden;
	transition: height var(--transition-time) ease,
		line-height var(--transition-time) ease;
}
.menu_title_radio:checked + .menu_title + div a, .menu_title_displayed + div a {
	height: 35px !important;
	line-height: 35px !important;
	border-bottom:1px solid #e6e6e6;
}
.menu_title > i {
	font-size: 28px;
}
.menu_title > span {
	white-space: nowrap;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	padding-left: 10px;
	user-select: none;
}
.menu_child > a {
	display:block;
	font-size: 12px;
	line-height: 35px;
	width: 100%;
	padding: 0 15px;
	background-color: #cfcfcf;
}
.menu_child > a.selected {
	background-color: #fff;
}
.menu_child > a:hover {
	background-color: #ddd;
}













/* Affichage du menu du haut (droite du mobile) - A nettoyer */

.toolbar {
	display: flex;
	align-items: center;
	background-color: var(--lighter-grey);
	justify-content: space-between;
	flex-grow: 1;
}
.title_container {
	display: flex;
	flex-direction:column;
	align-items: flex-start;
	padding: 6px;
	margin-left:10px;
}

.environment_buttons {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: space-around;
}

.environment_buttons > * {
	margin: 3px;
}

.menu_login_info {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.menu_login_info_buttons {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-top: 5px;
}

.menu_login_info_buttons>a {
    margin-left: 2px;
    margin-right: 2px;
}

#active_perf_level {
	padding: 8px 0 8px 0;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
}
.active_perf_level_link {
	cursor: pointer;
	color: black;
	padding: 0 2px 0 2px;
	font-size: 1em;
}
.active_perf_level_link.active {
	font-weight: bold;
	color: green;
}

#menu_extra_buttons {
	padding: 8px;
}

.logout:link,
.logout:visited {
	color: red;
}

.session_info {
	font-weight: bold;
}


#search_menu_side {
	box-sizing: border-box;
	width: 100%;
	border: none;
	background-color: transparent;
	font-size: 1.2em;
	padding: 0.5em 0.5em 0.5em 2em;
	margin: 0;
}

@media (max-width:1000px) {
	#menu_flags {
		order: -1;
	}

	.title_container {
		flex-direction:column;
		justify-content: space-between;
		align-items: center;
		margin:initial;
	}
	.environment_buttons > a, .environment_buttons > a.btn.x-small,
	.merchant_link.btn {
		box-sizing: border-box;
		padding: 8px;
		min-height:34px;
	}
	.environment_buttons > a:last-child {
		margin-left:10px;
	}
	.menu_login_info a {
		width:100%;
		border-top: 1px solid #c3c3c3;
		text-align:center;
		height:35px;
		line-height:35px;
	}
	.menu_login_info a:first-of-type {
		margin-top: 10px
	}

	#active_perf_level,
	div.menu_login_info {
		font-size: 1.5em;
		align-items: start;
	}
	div.menu_login_info > * {
		padding: 4px;
	}
	.menu_child > a {
		font-size: 14px;
	}
	#merchant_grouped_buttons {
		flex-direction:column;
	}
	#merchant_links {
		width:100%;
		display:flex;
		flex-direction:column;
	}
	#merchant_links .btn {
		margin:2px;
	}

	#search_menu_side {
		display:none;
	}

}

@media print {
	html, body {
		height: 80%;
	}
	@page {
		margin: 0;
	}
}
