:root {
	--ce-gris: #3D5463;
	--ce-vfonce: #00662c;
	--ce-vclair: #9cbd49;

	--couleur-texte: #000000;
	--couleur-fond: #FFFFFF;
}

.entree, .ouinon button {
	--couleur-texte: #000;
	--couleur-fond: #FFF;
}
aside.style-A {
	--couleur-texte: #FFF;
	--couleur-fond: var(--ce-gris);
}
.form.style-A {
	--couleur-texte: #FFF;
	--couleur-fond: var(--ce-vfonce);
}
table.style-A {
	--couleur-texte: var(--ce-gris);
	--couleur-fond: #FFF;
}
.login {
	--couleur-texte: #FFF;
	--couleur-fond: var(--ce-vfonce);
}
#topBar {
	--couleur-texte: #FFF;
	--couleur-fond: #000;
}
.erreur {
	--couleur-texte: #FFCCCC;
	--couleur-fond: #AA0000;
}

@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 400;
	src: local('Open Sans'), local('OpenSans'), url(/fonts/OpenSans-Regular.woff) format('woff');
}

@keyframes tourne {
	from { transform: rotate( 0deg ); }
	to { transform: rotate( 360deg ); }
}
@keyframes arrive {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0px);
	}
}
@keyframes glisseH {
	from { top: -2em; }
	to { top: 0; }
}

* {
	box-sizing: border-box;
}

html,
body {
	font-family: 'Open Sans', sans-serif;
	font-size: 18px;
	padding: 0;
	margin: 0;
	height: 100%;
	color: var(--couleur-texte);
	background-color: var(--couleur-fond);
	background-image: url(img/fond-feuilles.png);
	background-repeat: no-repeat;
	background-position: top center;
	background-size: cover;
	overflow: hidden;
}
p {
	margin: 0 0 1em 0;
}
header {
	font-weight: bold;
	font-size: 120%;
	margin: 1em 0;
}
footer {
	font-weight: bold;
	margin: 1em 0;
}
input[type=text],
input[type=password],
input[type=date],
select,
.selectcombo,
.input {
	font-size: 100%;
	line-height: normal;
	font: inherit;
	padding: 2px 4px;
	background: var(--couleur-fond);
	border: none;
	border-radius: 4px;
	outline: none;
	color: var(--couleur-texte);
	&[disabled] {
		opacity: .7;
	}
	&:focus {
		outline: 2px dotted var(--couleur-texte);
	}
}

button {
	border: 2px solid color-mix(in srgb, var(--couleur-fond) 50%, var(--couleur-texte));
	border-radius: 10px;
	background-color: color-mix(in srgb, var(--couleur-fond) 70%, var(--couleur-texte));
	color: var(--couleur-texte);
	cursor: pointer;
	padding: .5em 1em;
	font-size: 90%;
	&[disabled] {
		opacity: .5;
	}
	&:not([disabled]):hover {
		background-color: color-mix(in srgb, var(--couleur-fond) 90%, var(--couleur-texte));
		transform: scale(1.05);
	}
	&:not([disabled]):active {
		background-color: var(--couleur-fond);
	}
}

.erreur {
	color: var(--couleur-texte);
	background-color: var(--couleur-fond);
}

.scroll {
	overflow-y: auto;
}

.etiquette {
	display: inline;
	border-style: solid;
	border-width: 1px;
	border-color: rgba(0,0,0,.5);
	border-radius: .5em;
	background-color: rgba(0,0,0,.25);
	padding: 0 .5em;
	font-size: smaller;
}

.form-grid {
	display: grid;
	grid-auto-flow: row;
	grid-template-columns: max-content auto;
	grid-gap: .5em 1em;
	align-items: first baseline;
	> label::after {
		content: " :";
	}
}

.ecran {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	z-index: 10;
	background: rgba(0,0,0,.5);
	backdrop-filter: blur(3px);
	overflow: auto;
	& > * {
		margin: auto;
	}
}

.loaded::before ,
.loading::before {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: block;
	background: black;
	content: " ";
}
.loaded::before {
	z-index: initial;
	opacity: 0;
	transition: opacity linear .25s, z-index .01s linear .25s;
}
.loading::before {
	z-index: 98;
	opacity: .5;
	transition: opacity linear 1s;
}
.loading::after {
	position: absolute;
	top: calc( (100% - 128px) / 2 );
	left: calc( (100% - 128px) / 2 );
	height: 128px;
	width: 128px;
	display: block;
	z-index: 99;
	background: transparent;
	content: url("/img/roue.png");
	animation-name: tourne ;
	animation-duration: 10s;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
}

.arrive,
aside.style-A,
.form.style-A {
	animation-name: arrive ;
	animation-timing-function: ease;
	animation-duration: .7s;
	animation-iteration-count: 1;
}

.aside-a-droite {
	& > div,
	& > aside {
		display: inline-block;
		vertical-align: top;
		margin: 0 1em 1em 0;
	}
	& > aside {
		width:15em;
	}
}

.cartes {
	display: flex;
	gap: .5em;
	flex-wrap: wrap;
	justify-content: center;
	> div {
		flex-basis: 25em;
		max-height: 80vh;
	}
	> .form {
		justify-content: stretch;
		> div {
			flex-grow: 1;
		}
	}
}

aside.style-A {
	font-size: 85%;
	color: var(--couleur-texte);
	padding: 0;
	& > div {
		margin: 0;
		padding: 0 0 10px 0;
		background-color: color-mix(in srgb, var(--couleur-fond) 80%, transparent);
		backdrop-filter: blur(3px);
		box-shadow: 2px 2px rgba(0,0,0,.5);
		border-radius: 10px;
		header {
			text-shadow: 0px 0px 2px black;
			margin: 0;
			padding: 10px;
			text-align: center;
		}
		& > span {
			display: block;
			padding: 10px;
		}
		& > button {
			display: block;
			width: calc(100% - 20px);
			margin: 0 10px;
			border-radius: 5px;
		}
	}
}

.form.style-A {
	display: inline-flex;
	flex-direction: column;
	color: var(--couleur-texte);

	background: color-mix(in srgb, var(--couleur-fond) 80%, transparent);
	backdrop-filter: blur(3px);
	border-radius: 10px;
	box-shadow: 2px 2px rgba(0,0,0,.5);

	label {
		font-weight: bold;
	}
	& > header {
		padding: 1em;
		margin: 0;
		text-shadow: 0px 0px 2px black;
	}
	& > p,
	& > div {
		margin: 0;
		padding: 1em;
		&.erreur {
			border: solid 1px var(--couleur-texte);
			color: var(--couleur-texte);
			background-color: var(--couleur-fond);
			padding: .2em 1em;
		}
	}
	& > footer {
		padding: 1em;
		margin: 0;
		text-align: right;
		button {
			font-size: 100%;
		}
	}

	div.entree > span.erreur {
		display: inline-block;
		padding: 2px;
		border-radius: 5px;
		color: var(--couleur-texte);
		background-color: var(--couleur-fond);
		font-size: 80%;
		font-weight: bold;
	}
	.saisie {
		.entree select,
		.entree input[type=text],
		.entree input[type=password],
		.entree input[type=date],
		.entree .ouinon,
		.info .input {
			width: 15em;
		}
		.ouinon {
			display: flex;
			&> button { flex-grow: 1 };
		}
	}
}

table.style-A {
	--couleur-fond-att: color-mix(in srgb, var(--couleur-fond) 60%, transparent);
	&.id {
		thead th:first-child { visibility: hidden; }
		tfoot th:first-child { visibility: hidden; }
	}
	&.actions {
		thead th:last-child { visibility: hidden; }
		tbody td:last-child { background: var(--couleur-fond-att); }
		tfoot td:last-child { visibility: hidden; }
	}
	color: var(--couleur-texte);
	th, td {
		padding: .5em 1em;
		background: var(--couleur-fond);
	}
	thead {
		th {
			font-weight: bold;
			font-size: 90%;
			border-radius: 5px 5px 0 0;
			background: var(--couleur-fond-att);
		}
	}
	tbody {
		th {
			font-size: 60%;
			border-radius: 5px 0 0 5px;
			background: var(--couleur-fond-att);
		}
		td {
			del {
				color: color-mix(in srgb, var(--couleur-texte) 70%, transparent);
			}
			ins {
				text-decoration: none;
			}
		}
	}
	tfoot {
		td {
			background: var(--couleur-fond-att);
			border-radius: 0 0 5px 5px;
		}
		td:nth-child(2) {
			font-size: 90%;
			text-align: right;
			font-style: italic;
			border-radius: 0 0 0 5px;
		}
	}
}

.login {
	display: flex;
	align-items: center;
	position: absolute;
	height: 100%;
	width: 100%;
	overflow: auto;
	.erreur {
		padding: .5em;
		border: solid 1px var(--couleur-texte);
	}
	.bandeau {
		color: var(--couleur-texte);
		background-color: color-mix(in srgb, var(--couleur-fond) 60%, transparent);
		backdrop-filter: blur(3px);
		width: 100%;
		border-color: var(--couleur-texte);
		border-style: solid;
		border-width: 2px 0 2px 0;
		text-align: center;
	}
	.form {
		display: inline-block;
		text-align: left;
	}
	footer {
		text-align: right;
	}
}

#logo {
	position: absolute;
	top: 2em;
	left: 0;
	height: 150px;
	img {
		width: auto;
		height: 100%;
	}
}

#hero {
	position: absolute;
	top: calc( 50% - ( var(--cote) / 2 ) );
	left: calc( 50% - ( var(--cote) / 2 ) );
	--cote: min( 80vh, 80vw);
	height: var(--cote);
	width: var(--cote);
	img {
		width: 100%;
		height: 100%;
		object-fit: contain;
	}
	z-index: 0;
	opacity: .2;
}

#slogan {
	position: absolute;
	text-align: right;
	bottom: 1em;
	right: 1em;
	font-size: 2em;
	line-height: 1em;
	color: var(--ce-gris);
	padding-right: 300px;
	img.logo-gris {
		position: absolute;
		height: auto;
		width: 172px;
		bottom: 0px;
		right: 135px;
	}
	img.debord {
		position: absolute;
		height: auto;
		width: 172px;
		right: 0px;
		bottom: -75px;
	}
}

#topBar {
	animation-name: glisseH ;
	animation-timing-function: ease;
	animation-duration: 1s;
	animation-iteration-count: 1;
	position: absolute;
	left: 0;
	top: 0;
	height: 2em;
	width: 100%;
	z-index: 1;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 90%;
	color: var(--couleur-texte);
	border-bottom: 1px solid var(--couleur-fond);
	background-color: color-mix(in srgb, var(--couleur-fond) 60%, transparent);
	backdrop-filter: blur(3px);
	padding : 0;
	> span {
		display: inline-block;
		padding: .1em 1em;
		&.ressort {
			flex-grow: 1;
		}
	}
	button {
		margin-left: .5em;
		font-size: 80%;
		padding: 0.2em 0.8em;
		border-radius: 5px;
		border-width: 1px;
	}
	.titreApplication {
		cursor: pointer;
		font-size: 120%;
	}
	.infoConnexion {
	}
	.infoProfil {
		font-style: italic;
	}
}

#content {
	position: absolute;
	top: 0;
	padding-top: 2em;
	padding: 2em 1em 1em 1em;
	height: 100%;
	width: 100%;
	overflow: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: auto;

	&::before ,
	&::after {
		content:'';
		flex:1;
	}
}
