
// header

div#header {
	padding-top: 5px;
	padding-bottom: 5px;
	padding-left: 20px;
	@media (max-width: $very-small-limit) {
		padding-left: 0.7em;
	}
	@media (max-width: $nav-mobile-limit) {
		h1 {
			padding-left: calc(#{$nav-menu-side} + 8px);
		}
	}
}
div#top {
	display: flex;
	align-items: center;
}
#logo {
	flex-grow: 1;
	font-size: $fz-h4;
	& a, &.has-logo a {
		text-indent: 0;
		color: #555;
		display: flex;
		align-items: center;
		padding-left: calc(75px + 1em);
		height: $logo-wrapper-height;
		background: url(img/logo_IDEAU_166x234.svg) no-repeat left center;
		background-size: $logo-height;
	}
	&:hover a, & a:hover, &.has-logo:hover a, &.has-logo a:hover {
		text-decoration: none;
	}
	@media (max-width: $very-small-limit) {
		font-size: 1rem;
		& a, &.has-logo a {
			height: $very-small-logo;
			background-size: $very-small-logo-bg;
		}
	}
	@media ($min-desktop-viewport) {
		font-size: $fz-h2;
	}
}

// toplinks
#toplinks {
	// reset
	border: none;
	padding: 0;
	border-radius: none;
	box-shadow: none;
	position: static;

	span.connected-user {
		padding-right: 0.3em;
	}

	line-height: 1.7;
	@media ($max-mobile-viewport) {
		font-size: $fz-small;

		span.connected-user {
			padding-right: 0.3em;
		}
	}

	.account-link {
		border-right: 2px solid #ddd;
	}
	@media (max-width: $very-small-limit) {
		span.connected-user {
			padding-right: 0;
		}
		.account-link {
			border-right: none;
		}
	}
}

// nav
body {
	border-left: 0 none;
}
div.gru-nav {
	font-size: $fz-small;

	.gru-nav-button {
		height: $header-height;
		border: 10px solid $primary-color;
		border-width: #{$header-height / 3} 10px;
		top: 0;
		left: 0;
		margin-left: 0;

		@media (max-width: $very-small-limit) {
			height: $very-small-header;
			border-width: #{$very-small-header / 3} 10px;
		}

		&.toggled {
			border-color: transparent;

			.icon-bar {
				background-color: #ccc;
			}

			+ ul {
				background: $blue;
			}
		}

		& + ul {
			border: none;
			@media (max-width: $nav-mobile-limit) {
				padding: 0;
			}
		}
	}
	> ul {
		overflow: visible;
		margin: 0;
		padding: 0;
		text-align: center;

		li a {
			font-weight: 600;
		}
		> li:first-child {
			border-left: 0;
		}

		@media ($min-desktop-viewport) {
			> li {
				position: relative;
				padding: 0;
				> a {
					padding: 0.8em 1em;
				}
				ul {
					left: -1px;
					padding-top: 1em;
				}
			}
		}

		// sep line
		li {
			@media ($max-mobile-viewport) {
				border-top: 1px solid $sep-color;
			}
			@media ($min-desktop-viewport) {
				border-left: 1px solid $sep-color;
			}
		}
	}
	li.selected > a {
		color: $nav-item-selected-color;
	}
}
.gru-nav-wrapper {
	@media (max-width: $nav-mobile-limit) {
		margin-top: -$header-height;
	}
	@media (max-width: $very-small-limit) {
		margin-top: -$very-small-header;
	}
}


// Page Image
body.has-picture {
	.site-nav::after {
		top: 0;
		height: 0;
		padding-top: 10%;
	}
	@media ($min-desktop-viewport) {
		div#main-content-wrapper {
			margin-top: -1.9rem;
		}
	}
}

// Main content
div#main-content-wrapper {
	background-color: white;
	padding: $columns-gutter;
	@media (max-width: $very-small-limit) {
		padding-left: #{$columns-gutter / 2};
		padding-left: 0;
		padding-right: #{$columns-gutter / 2};
		padding-right: 0;
	}
}

// Cells
.column div.a2-block,
.gru-content div.cell,
.block {
	margin-bottom: $columns-gutter;
}
div.gru-content .cell.trackingcodeinputcell button {
	color: white;
}
div.gru-content .cell.text-cell > div {
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}
div.a2-continue,
div#services > ul > li,
div.a2-block,
.gru-content .cell,
.block {
	input, input[type="search"], textarea, select {
		background: $widget-background-in-cell;
	}
}
.a2-block {
	padding: 1rem;
}


// Links-list
div#rub_service div.category ul,
div#services > ul > li > ul,
div#account-management ul,
div.links-list ul,
div.menucell ul,
div.wcsformcell,
div.categoriescell ul,
div.wcscurrentdraftscell ul,
div.wcscurrentformscell ul {
	& > li {
		> a {
			padding-left: 2rem;

			&::before {
				content: "\f04b";
				color: $link-color;
				font-family: fontawesome;
				font-size: 0.7em;
				position: absolute;
				left: 1rem;
				line-height: 1.7;
			}
		}
	}
}
div.gru-content .cell.wcs-category-cell > div > div > p {
	padding: 0 1rem 1rem;
}

.search-cell {
	@extend .pk-transparent;
	input[type=search] {
		background-color: white;
		border-color: $font-color;
		border-radius: 2em;
	}
}

// Authenticated links
div.links-list ul > li.required-authentication {
	> a {
		padding-right: 2rem;
	}

	> a::after {
		right: 0.8rem;
	}
}


// Forms
.form-content--title {
	font-size: 2.5em;
}
input[readonly], select[readonly], textarea[readonly] {
	background-color: transparent;
}

div#rub_service {
	background-color: white;

	& > h2 {
		font-size: $fz-h1;
		padding-left: 0.5rem;
	}
}

div.gru-content div#rub_service,
div#rub_service {
	h3 {
		font-size: $fz-h2;
		color: $title-color;
	}
	h4 {
		color: $title-color;
		font-size: $fz-h3;
	}
}

div#summary h2,
div#evolution-log h2 {
	border-bottom: 1px solid currentColor;
}

ul#evolutions div.evolution-metadata,
ul#evolutions li div.msg {
	background-color: white;
}


// Footer
#footer {
	font-size: $fz-small;
	padding-left: 0.7rem;
	padding-right: 0.7rem;

	h2, h3 {
		font-weight: 500;
	}

	.menucell {
		li a {
			&::before {
				content: none;
			}
		}
	}

	div.links-list ul {
		& > li {
			border: none;
			> a {
				padding: 0;
				margin-bottom: 1em;
				&::before {
					content: none;
				}
				&:hover {
					text-decoration: underline;
				}
			}
		}
	}
}
#footer-wrapper {
	margin-top: 0;
}
.has-pwa-navigation footer {
	@media (max-width: $nav-mobile-limit) {
		margin-bottom: 0;
	}
}
