@font-face {
	font-family: "DIN Regular";
	src: url("fonts/DIN_Regular.ttf");
}

@font-face {
	font-family: "consolas";
	src: url("fonts/consolas.ttf");
}

@font-face {
	font-family: "fontawesome";
	src: url("fonts/fontawesome-webfont.woff2");
}

html {
	font-family: "DIN Regular", sans-serif;
	font-optical-sizing: auto;
	font-style: normal;
	font-size: 16px;
}

body {
	margin: 0px;
}

nav {
	display: flex;
	padding: 10px;
	padding-left: 50px;
	padding-right: 50px;
	gap: 10px;
	box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
	height: 50px;
	background-color: white;
}

.discret {
	color: rgb(58, 58, 58);
	font-size: 12px;
}

.flex-container {
	display: flex;
	flex-wrap: wrap;
	column-gap: 1em;
	row-gap: 0.2em;
	align-items: center;
}

.btn {
	cursor: pointer;
	padding: 5px;
	margin-left: 3px;
	margin-right: 3px;
}

.btn:disabled {
	cursor: not-allowed;
}


.btn-icon {
	font-family: "fontawesome";
	font-size: 25px;
	width: 41px;
	height: 41px;
	cursor: pointer;
}

.btn-icon:disabled {
	cursor: not-allowed;
}

.btn-icon-small {
	font-family: "fontawesome";
	font-size: 16px;
}

label {
	user-select: none;
}

/*-----------------*/
/* MICROCONTROLLER */
/*-----------------*/
#console-uc {
	resize: none;
	width: 100%;
	box-sizing: border-box;
	/* Fix tiny padding error on the right*/
	cursor: text;
	text-wrap: nowrap;
}

#console-uc-input {
	width: 100%;
	box-sizing: border-box;
	/* Fix tiny padding error on the right*/
	height: 35px;
	margin-bottom: 10px;
}

/*-----------------*/
/* PULSE           */
/*-----------------*/
@keyframes pulse {
	0% {
		background-color: #11922d;
		transform: scale(1);
		opacity: 1;
	}

	1% {
		transform: scale(1.2);
		opacity: 0.7;
	}

	2% {
		transform: scale(1);
		opacity: 1;
	}

	50% {
		background-color: #11922d;
	}
}

#pulse {
	display: inline-block;
	margin-top: auto;
	margin-bottom: auto;
	min-width: 40px;
	min-height: 40px;
	background-color: #d10d0d;
	border-radius: 50%;
	animation: pulse 15s;
}

#pulse-container {
	margin-bottom: auto;
	margin-top: auto;
}

#pulse-spacing {
	display: inline;
	flex-grow: 1;
}

/*-----------------*/
/* CAMERA          */
/*-----------------*/
.content-camera {
	gap: 10px;
}

#video-feed-container {
	resize: vertical;
	overflow: hidden;
	min-height: 200px;
	display: flex;
	flex-direction: column;
}

#video-feed {
	height: 100%;
	margin-left: auto;
	margin-right: auto;
	max-width: 100%;
	object-fit: contain;
}


/*-----------------*/
/* MOTORS           */
/*-----------------*/
.content-motor {
	gap: 10px;
}

#stop-btn {
	text-align: center;
}

#stop-btn-img {
	height: 70px;
	cursor: pointer;
	transition: 0.2s;
}

#stop-btn-img:hover {
	scale: 1.1;
}

.motor-controls {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 10px;
}

.motor-controls-row {
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	gap: 10px;
}

#motors-state {
	font-family: "consolas";
}

.btn-motor-controls {
	font-family: 'fontawesome';
	font-size: 2.5em;
	padding: 15px;
}

.btn-motor-controls:disabled {
	cursor: not-allowed;
	color: #9d9d9d;
}

#motors-speed-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

#motor-speed:disabled {
	cursor: not-allowed;
}

#motors-steps-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

/*-----------------*/
/* SECTION         */
/*-----------------*/
.help-icon {
	border-radius: 100%;
	width: 20px;
	height: 20px;
	display: inline-block;
	text-align: center;
	cursor: help;
	color: white;
	font-weight: bolder;
	background: gray;
	font-size: 16px;
	user-select: none;
}

#sections-container {
	display: flex;
	flex-direction: column;
	padding-bottom: 100px;
}

/* https://codepen.io/markcaron/pen/RVvmaz */
.section-container {
	padding-left: 50px;
	padding-right: 50px;
}

.section-container>input[type="checkbox"] {
	position: absolute;
	left: -100vw;
}

.section-container>input[type="checkbox"]:checked~.content {
	height: auto;
	overflow: visible;
}

.section-container>input[type="checkbox"]:checked~.content {
	padding: 15px;
	border: 1px solid #e8e8e8;
	border-top: 0;
}

.section-container .content {
	overflow-y: hidden;
	height: 0;
	transition: height 0.3s ease;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-content: center;
}

.section-container .section-handle {
	margin: 0;
	font-size: 1.125em;
	line-height: 1.2em;
}

.section-container .section-label {
	display: block;
	user-select: none;
	cursor: pointer;
	font-weight: normal;
	text-align: center;
	padding: 15px;
	background-color: #e8e8e8;
	transition: .7s;
}

.section-container .section-label:hover,
.section-container .section-label:focus {
	background-color: #c8c8c8;
	transition: .2s;
}

.section-container .section-handle .section-label:after {
	font-family: 'fontawesome';
	content: "\00a0\00a0\00a0\f054";
	display: inline-block;
	font-size: 0.8em;
	vertical-align: middle;
}

.section-container>input[type="checkbox"]:checked~.section-handle .section-label:after {
	content: "\00a0\00a0\00a0\f078";
}

.data-table,
.data-table td,
.data-table th {
	border: 1px solid lightgray;
	border-collapse: collapse;
}

.data-table td,
.data-table th {
	padding: 5px;
	max-width: 200px;
}

/*-----------------*/
/* RESPONSIVE */
/* Cette partie permet de modifier les styles */
/* lorsqu'on est sur le site avec le téléphone */
/*-----------------*/
@media only screen and (max-width : 700px) {
	html {
		font-size: 10px;
	}

	nav {
		height: 35px;
		font-size: 8px;
		padding-left: 20px;
		padding-right: 20px;
	}

	.help-icon {
		width: 11px;
		height: 11px;
		font-size: 8px;
	}

	.section-container {
		padding-left: 20px;
		padding-right: 20px;
	}

	.btn {
		margin: 1px;
		padding: 2px;
		font-size: 8px;
	}

	.btn-motor-controls {
		padding: 15px;
		font-size: 2.5em;
	}

	#aperture-logo {
		padding-top: 5px;
		padding-bottom: 5px;
		user-select: none;
	}

	#pulse {
		min-width: 20px;
		min-height: 20px;
	}

	#console-uc {
		font-size: 8px;
	}

	#console-uc-input {
		font-size: 8px;
		height: 16px;
	}
}