/* 
** Floating label:
** https: //codepen.io/devesh8/pen/MWYEJEP 
*/

.floating {
	position: relative;
	margin-bottom: 20px;

	label {
		color: var(--fonce);
		font-size: 1.2rem;
		font-weight: normal;
		position: absolute;
		pointer-events: none;
		left: 15px;
		top: 11px;
		padding: 0 5px;
		background: var(--input-bg);
		transition: 0.2s ease all;
		-moz-transition: 0.2s ease all;
		-webkit-transition: 0.2s ease all;
	}

	input {
		font-size: 1.2rem;
		display: block;
		width: 100%;
		height: 40px;
		padding: 0 20px;
		background: var(--input-bg);
		color: black;
		border: 1px solid var(--clair);
		border-radius: 4px;
		box-sizing: border-box;

		&:focus {
			outline: none;

			~label {
				top: -10px;
				font-size: 1rem;
			}
		}
	}

	input:not(:placeholder-shown)~label {
		top: -10px;
		font-size: 1rem;
	}
}

.floating.error {
	input {
		border: 2px solid var(--error);
		color: var(--error);
	}

	label {
		font-weight: 600;
		color: var(--error);
	}
}

.button {
	font-size: 1.2rem;
	background: var(--input-bg);
	border: 1px solid var(--clair);
	border-radius: 4px;
	box-sizing: border-box;
	width: 100%;
	max-width: 200px;
	color: var(--fonce);
}

.button:hover {
	background: var(--fonce);
	color: white;
}