@font-face {
	font-family: "Font Awesome 5 Brands";
	src: url("https://cdn.publidata.io/_next/static/fonts/fa-brands-400.woff") format("woff"),
	     url("https://cdn.publidata.io/_next/static/fonts/fa-brands-400.ttf") format("truetype");
	font-style: normal;
	font-weight: normal;
}

@font-face {
	font-family: "Font Awesome 5 Pro";
	src: url("https://cdn.publidata.io/_next/static/fonts/fa-regular-400.woff2") format("woff2"),
	     url("https://cdn.publidata.io/_next/static/fonts/fa-regular-400.woff") format("woff"),
	     url("https://cdn.publidata.io/_next/static/fonts/fa-regular-400.ttf") format("truetype");
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}

@mixin publidata_font($family, $qualifier, $weight) {
	@font-face {
		font-family: $family;
		src: url("https://cdn.publidata.io/_next/static/fonts/#{$family}#{$qualifier}.woff") format("woff"),
		     url("https://cdn.publidata.io/_next/static/fonts/#{$family}#{$qualifier}.ttf") format("truetype");
		font-style: normal;
		font-weight: $weight;
	}
}

@include publidata_font("MaisonNeue", "-Book", 400);
@include publidata_font("MaisonNeue", "-Medium", 500);
@include publidata_font("MaisonNeue", "-Bold", 700);

@include publidata_font("GTWalsheimPro", "Medium", 500);
@include publidata_font("GTWalsheimPro", "Bold", 700);

@include publidata_font("icomoon", "", normal);

%title {
	@extend %title;
	text-align: left;
	@media screen and (max-width: $nav-mobile-limit) {
	}
	font-weight: bold;
}

%bigtitle {
	@extend %title;
	position: relative;
	&::before {
		content: "";
		display: inline-block;
		position: relative;
		top: -4px;
		height: 18px;
		width: 18px;
		background: $primary-color;
		margin-right: 10px;
	}
	font-size: 2.778rem;
	@media screen and (max-width: $nav-mobile-limit) {
		font-size: 2.222rem;
		&::before {
			content: none;
		}
		text-align: center;
	}
}

%button {
	@extend %button;
	text-transform: uppercase;
	font-size: 0.833rem;
	font-weight: bold;
}

body {
	background: white;
	-moz-osx-font-smoothing: grayscale;  // some people don't like their OS
	line-height: 1.5;
}

.site-header {
	position: fixed;
	z-index: 1000;
	width: 100%;
	@media screen and (max-width: $nav-mobile-limit) {
		left: 0px;  // no burger menu
		width: 100%;
		background: white;
	}
}

div#site-title {
	clear: both;
	padding-top: 58px;
	padding-bottom: 20px;
	position: fixed;
	width: 100%;
	background: white;
	z-index: 200;
	h1 {
		max-width: $width;
		margin: 0 auto;
		text-align: left;
		padding-left: 150px;
		@media screen and (max-width: $nav-mobile-limit) {
			padding-left: 0;
			text-align: center;
		}
	}
	@media screen and (max-width: $nav-mobile-limit) {
		position: static;
		padding-bottom: 10px;
	}
}

div#search-top-wrapper {
	margin-top: 130px;
	@media screen and (max-width: $nav-mobile-limit) {
		margin-top: 0;
	}
}

div#search-top-wrapper,
div#shortcuts-top-wrapper {
	clear: both;
	margin-bottom: 2rem;
	div.search-top,
	div.shortcuts-top {
		max-width: $width;
		margin: 0 auto;
		@media screen and (max-width: $nav-mobile-limit) {
			padding: 1rem;
		}
	}
}

div#search-top-wrapper {
	h2 {
		color: black;
	}
	form {
		padding: 0;
		margin: 0;
		display: flex;
		flex-wrap: wrap;
		p:first-child {
			margin-top: 0;
		}
		input {
			flex-grow: 1;
			margin-right: 1rem;
		}
		button {
			@extend %button;
			background: white;
			color: $pink;
			flex: 0;
		}
	}
}

div#page div#shortcuts-top-wrapper {
	background: $turquoise;
	margin-top: 40px;
	padding-top: 2rem;
	padding-bottom: 2rem;
	@media screen and (max-width: $nav-mobile-limit) {
		text-align: center;
	}
	h2 {
		@extend %bigtitle;
		background: transparent;
		color: white;
		&::before {
			background: white;
		}
	}
	p {
		color: #e0e0e0;
		margin-left: 0;
		margin-bottom: 1rem;
		padding-left: 0;
	}

	a.shortcut-link {
		box-sizing: content-box;
		font-family: "GTWalsheimPro", sans-serif;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		position: relative;
		height: 194px;
		width: 194px;
		border-radius: 100%;
		border: 2px solid white;
		transition: all 0.1s;
		text-align: center;
		font-weight: bold;
		color: white;
		@media screen and (max-width: $nav-mobile-limit) {
			margin: 0 auto 1rem auto;
		}
		div {
			padding: 1rem;
		}
		&:hover {
			border-color: $pink;
			text-decoration: none;
			background: $pink;
			box-shadow: 0 11px 25px -1px rgba(206, 16, 62, 0.27);
		}
	}
	+ main #main-content-wrapper {
		margin-top: 0;
	}
}

#nav-wrapper {
	position: fixed;
	z-index: 900;
	width: 100%;
	top: 48px;
}

.has-picture div#page div#main-content-wrapper {
	margin-top: 0px;
}

div#page div#main-content-wrapper {
	margin-top: 130px;
	@media screen and (max-width: $nav-mobile-limit) {
		margin-top: 80px;
	}
}


#header-wrapper {
	background: black;
	color: white;
	height: 48px;
	text-transform: uppercase;
	@media screen and (max-width: $nav-mobile-limit) {
		background: transparent;
	}
	#header {
		padding-right: 0;
	}
	#top {
		position: absolute;
		top: 0;
		left: 0;
		a {
			display: block;
			width: 120px;
			height: 120px;
			background: url(img/logo.png) top left no-repeat;
			text-indent: -10000px;
		}
		@media screen and (max-width: $nav-mobile-limit) {
			h1 {
				padding-left: calc(50vw - 30px);
			}
			a {
				width: 60px;
				height: 60px;
				background-size: 60px;
			}
		}
	}
	#header-nav {
		text-align: right;
		line-height: 48px;
		a {
			display: inline-block;
			font-weight: bold;
			font-size: 0.778rem;
			height: 48px;
			line-height: 44px;
			color: white;
			&::before {
				font-family: icomoon;
				color: $turquoise;
				margin-left: 0px;
				padding: 0 10px;
				font-weight: normal;
				font-size: 1rem;
				position: relative;
				top: 2px;
			}
			&:hover {
				text-decoration: none;
			}
			&#around, &#agenda, &#contact {
				border-left: 1px solid #202020;
				margin-left: 0;
				padding-right: 12px;
				&:hover {
					background: #1a1a1a;
				}
			}
			&#around::before { content: "\e93e"; }
			&#agenda::before { content: "\e901"; }
			&#contact::before { content: "\e91f"; }
			&.back-to-home::before,
			&.login::before,
			&.logout::before {
				color: white;
				content: "\e94d";
				margin-left: 0px;
			}
			&.login,
			&.back-to-home,
			&.logout {
				padding-left: 5px;
				background: $turquoise;
				padding-right: 20px;
				&:hover {
					background: #2ec1ae;  // lighter turquoise
				}
			}
			&.login,
			&.back-to-home {
				margin-right: 0;
				margin-left: 0;
				padding-left: 0px;
				&:hover {
					background: #2ec1ae;
				}
			}
			&.logout {
				background: $pink;
				position: relative;
				top: -1px;
				&::before {
					font-family: "Font Awesome 5 Pro";
					content: "\F2F5";
				}
				&:hover {
					background: #d32852;  // ligther pink
				}
			}
			&.social {
				&::before {
					color: inherit;
					font-family: "Font Awesome 5 Brands";
					font-size: 0.778rem;
					position: relative;
					top: -2px;
					left: -5px;
					padding: 0 8px;
				}
				&:hover {
					text-decoration: none;
					color: $turquoise;
				}
			}
		}
		@media screen and (max-width: $nav-mobile-limit) {
			a {
				display: none;
				&.login,
				&.logout {
					display: inline-block;
					text-indent: -10000px;
					&:hover {
						background: transparent;
					}
					&::before {
						color: $turquoise;
					}
				}
			}
		}
	}
}

div.gru-nav > ul {
	display: flex;
	justify-content: space-between;
	height: 72px;
	margin-top: 0;
	margin-bottom: 1rem;
	margin-left: 120px;  // logo overflowing
	@media screen and (max-width: $nav-mobile-limit) {
		margin-left: 0;
		box-shadow: none;
	}
	padding-left: 10px;
	font-family: "GTWalsheimPro", sans-serif;
	font-weight: bold;
	font-size: 1.056rem;
	> li a {
		padding-top: 7px;
		padding-bottom: 7px;
	}
	ul {
		li a {
			font-size: 0.833rem;
			padding-top: 0;
			padding-bottom: 0;
		}
	}
}

body.scrolled div.gru-nav > ul {
	background: white;
	box-shadow: 0 5px 35px -5px rgba(4, 11, 65, 0.15);
}

@media screen and (max-width: $nav-mobile-limit) {
	div#nav {
		margin-top: 5px;
	}
	#nav-wrapper {
		background: white;
		margin-top: 0;
		top: 0;
	}
	div.gru-nav .gru-nav-button + ul {
		margin-top: 4px;
		border-top: 1px solid #f1f1f1;
		padding-left: 0;
		li {
			position: relative;
			span::after {
				content: "→";
				position: absolute;
				right: 1rem;
				color: $pink;
			}
			span.badge::after {
				content: none;
			}
		}
	}
	div.gru-nav .gru-nav-button.toggled + ul {
		height: calc(100vh - 60px - #{$nav-mobile-bottom-bar-height});
	}
	#header-wrapper #header-nav a.login,
	#header-wrapper #header-nav a.logout {
		background: transparent;
		overflow: hidden;
		&::before {
			height: 60px;
			text-indent: 0;
			text-align: center;
			width: 60px;
			line-height: 60px;
			display: block;
			position: absolute;
			top: 0;
			right: 0;
			font-size: 1.333rem;
			color: $turquoise;
		}
	}
}

body.has-picture .site-nav::after {
	background-size: $width;
	position: static;
	margin-top: 160px;
	margin-bottom: 20px;
	@media screen and (max-width: $nav-mobile-limit) {
		margin-top: 60px;
	}
}

a.pk-button.inverted {
	background: white;
	color: $pink;
}

div#footer {
	max-width: 1300px;
	top: 130px;

	padding-top: 30px;
	font-size: 1rem;

	a.pk-button.inverted {
		border: 2px solid white;
		color: white;
		background: $pink;
	}

	h3 {
		margin-bottom: 1rem;
		font-family: $title-font-family;
		font-size: 1.222rem;
	}

	ul {
		margin: 1ex 0.5rem;
		padding: 0;
		list-style: none;
		li {
			margin: 0.7ex 0;
			padding: 0;
		}
	}

	a {
		color: white;
	}

	address {
		font-style: normal;
		padding-bottom: 10px;
		line-height: 1.0;
		a {
			text-decoration: underline;
		}
	}
}

div#form-page {
	position: relative;
	margin-top: 1rem;
	@media screen and (max-width: $nav-mobile-limit) {
		margin-top: 0;
	}
	div#gauche {
		clear: none;
		float: none;
		width: 420px;
		position: absolute;
		top: 0;
		left: 0;
		@media screen and (max-width: $nav-mobile-limit) {
			width: auto;
			position: static;
			margin-bottom: 1rem;
		}
	}
	&.with-sidebar {
		padding-left: 460px;
		@media screen and (max-width: $nav-mobile-limit) {
			padding-left: 0;
		}
	}
	div#rub_service {
		clear: none;
		float: none;
		width: auto;
		padding-top: 0;
		form {
			padding-top: 0;
		}
	}

	#title-section {
		padding-top: 1rem;
		@media screen and (max-width: $nav-mobile-limit) {
			padding-top: 0;
		}
		h1 {
			@extend %bigtitle;
		}
	}
}

div#tracking-code {
	margin-top: 1rem;
	box-shadow: 0 5px 35px -5px rgba(4, 11, 65, 0.15);
	h3 {
		&::before {
			content: none;
		}
	}
	h3, a {
		font-size: 1.111rem;
		display: inline-block;
		padding: 0.6rem;
	}
	a {
		float: right;
	}
}

// Steps
.wcs-step {
	box-shadow: 0 5px 35px -5px rgba(4, 11, 65, 0.15);
	border-radius: 5px;
	padding: 0;
	overflow: hidden;

	@include desktop-vertical-steps() {
		&--marker {
			align-self: stretch;
			height: auto;
			min-height: $wcs-step-marker-size;
		}
	}
}

form p label,
div.widget div.title label {
	text-align: left;
	text-transform: uppercase;
	font-size: 80%;
	color: #54505d;
	font-weight: bold;
}

input, input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="tel"], input[type="number"], input[type="search"], input[type="file"], input[type="date"], input[type="datetime-local"], input[type="month"], input[type="time"], input[type="week"], textarea {
	padding: 1.2ex 0.7em 1.2ex 0.7em;
}

select {
	padding: 1.2ex 3.7rem 1.2ex 0.7em;
}

div.select2-container, span.select2-container {
	span.select2-selection--single,
	a.select2-choice,
	a.select2-choice div {
		padding-top: 0.9ex;
		padding-bottom: 0.9ex;
	}
}

#login-pre {
	text-align: center;
	max-width: 60ex;
	margin: 0 auto;
	h2 {
		font-size: 2.222rem;
		color: black;
	}
	+ div#login-page div.block {
		width: auto;
		max-width: 40ex;
		margin: 0 auto;
		float: none;
		border: none;
		text-align: center;
		&.block-password {
			label,
			input {
				text-align: left;
				width: 100%;
			}
			label {
				text-transform: uppercase;
				color: #5b5864;
				font-size: 80%;
			}
			button {
				margin: 0 1rem;
			}
		}
		&.block-fc {
			box-shadow: 0 5px 35px -5px rgba(4, 11, 65, 0.15);
		}
		.fc-explanation-text,
		.login-actions {
			font-size: 0.778rem;
			color: #4b5259;
		}
	}
}

div.a2-block {
	margin-top: 0;
}

#registration-pre {
	text-align: center;
	max-width: 60ex;
	margin: 0 auto;
	h1, h2 {
		margin-top: 20px;
		text-align: center;
		font-size: 2.222rem;
		color: black;
	}
	+ form,
	+ div.registration_frontend {
		width: auto;
		max-width: 40ex;
		margin: 0 auto;
		float: none;
		border: none;
		text-align: center;
		margin-bottom: 2rem;
		span.helptext {
			text-align: left;
		}
	}
}

#registration-complete {
	text-align: center;
	max-width: 60ex;
	margin: 5rem auto;
	h1, h2 {
		margin-top: 20px;
		text-align: center;
		font-size: 2.222rem;
		color: black;
	}
	@media screen and (max-width: $nav-mobile-limit) {
		margin-top: 1rem;
	}
}


#pwa-navigation {
	text-transform: uppercase;
	a {
		background-position: 50% 10px;
		background-size: 20px;
		padding-top: 32px;
		span {
			font-size: 0.611rem;
		}
		span.badge {
			position: absolute;
			top: 5px;
			background: $pink;
		}
	}
	@media screen and (min-width: $nav-mobile-limit - 1px) {
		box-shadow: 0 5px 35px -5px rgba(4, 11, 65, 0.15);
		display: block;
		top: 200px;
		height: auto;
		bottom: auto;
		right: 0;
		width: 80px;
		ul {
			padding: 1rem 0;
			flex-direction: column;
			a {
				filter: grayscale(100%);
				&.selected,
				&:hover {
					filter: none;
				}
			}
		}
	}
}

span#environment-label {
	font-size: 0.556rem;
}

form.quixote div.buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	.submit-button {
		order: 1;
		width: 49%;
	}
	.cancel-button {
		order: 2;
		width: 49%;
		button {
			color: $pink;
			background: white;
		}
	}
	.previous-button {
		order: 0;
		width: 49%;
	}
	.previous-button + .cancel-button {
		width: 100%;
	}
	div.content {
		display: block;
		button {
			width: 100%;
		}
	}
}

a.social {
	&::before {
		font-family: "Font Awesome 5 Brands";
		margin-left: 0px;
		color: inherit;
		padding-right: 8px;
	}
	&#facebook::before { content: "\f39e"; }
	&#twitter::before { content: "\f099"; }
	&#instagram::before { content: "\f16d"; }
	&#youtube::before { content: "\f167"; }
}

div.cell {
	&.shadow {
		box-shadow: 0 5px 35px -5px rgba(4, 11, 65, 0.15);
		border-radius: 5px;
	}
	&.foldable > div > h2:first-child::after {
		content: "\f106";  // angle-up
		background: $pink;
		color: white;
		border-radius: 100%;
		font-weight: normal;
		font-size: 0.889rem;
		height: 20px;
		width: 20px;
		text-align: center;
		line-height: 16px;
	}
	&.foldable.folded > div > h2:first-child::after {
		line-height: 20px;
	}
}

.cell.trackingcodeinputcell {
	button {
		width: 100%;
		background: white;
		color: $pink;
		border: 2px solid $pink;
	}
}

div.textcell {
	h1 {
		@extend %bigtitle;
	}
}

#page div.wcsformsofcategorycell {
	position: relative;
	h2 {
		@extend %bigtitle;
		font-size: 2rem;
		&::before {
			content: none;
		}
		padding-left: 3rem;
		@media screen and (max-width: $nav-mobile-limit) {
			padding-left: 2rem;
		}
	}
	picture {
		position: absolute;
		top: 0.9rem;
		img {
			width: 50px;
			height: 50px;
		}
	}

	ul {
		li {
			border-radius: 8px;
			box-shadow: 0px 1px 35px -5px rgba(4, 11, 65, 0.15);
			border-left: 20px solid $turquoise;
			a {
				border: none;
				border-radius: 0 8px 8px 0;
			}
			div.description {
				display: none;
			}
			margin-bottom: 1rem;
		}
		.add-more-items {
			box-shadow: none;
			border: none;
			a {
				background: url(img/charger-plus.png) top center no-repeat;
				height: 134px;
				color: transparent;
			}
		}
	}
}

div#demarches-title {
	h2 {
		@extend %bigtitle;
	}
}
