/*
 * laminute3 - en-tête et pied de page du portail GeoRezo sur petit écran.
 *
 * Chargée seulement avec media="(max-width: 768px)" : l'affichage sur ordinateur
 * du bandeau, du menu et du pied de page communs reste strictement inchangé.
 * Le portail est conçu en positions fixes (menu décalé de 169px, largeurs
 * minimales de 890 et 1080px) : ces règles le remettent dans le flux.
 */

/* ---------- Bandeau ---------- */

#wrapper #grz_header {
	display: flex;
	flex-direction: column;
	min-width: 0 !important;
	min-height: 0 !important;
	height: auto !important;
	margin-bottom: 0;
	border-left: 0;
	border-right: 0;
}

/* Logo GeoRezo (div en position absolue dans le portail) */
#grz_header > div:first-child {
	position: static !important;
	padding: 6px 10px 0;
}

#grz_header > div:first-child img {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Accroche, placée sous le logo au lieu d'être superposée au bandeau */
#grz_header h1 {
	order: 1;
	position: static;
	width: auto;
	padding: 0 10px 8px;
	font-size: 13px;
	letter-spacing: 0;
}

/* ---------- Menu du portail ---------- */

#grz_header #mainMenu {
	order: 2;
}

#menuBar {
	position: static;
	top: auto;
	min-width: 0;
}

html > body #menuBar .menuBarBottom,
#menuBar .menuBarBottom {
	min-width: 0;
}

/* Onglets de premier niveau : trois par ligne */
#menuBar table.level1,
#menuBar table.level1 > tbody {
	display: block;
	width: 100%;
	height: auto;
}

#menuBar table.level1 tr {
	display: flex;
	flex-wrap: wrap;
}

#menuBar .level1 td,
#menuBar .level1 td.gr_webservices {
	flex: 1 1 33%;
	width: auto;
	height: auto;
	box-sizing: border-box;
	border-bottom: 1px solid #fff;
}

#menuBar .level1 a {
	height: auto;
	line-height: 40px;
}

#menuBar .level1 td.gr_webservices {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

#menuBar .level1 .gr_webservices a {
	line-height: 0;
}

/* Liens de second niveau : à la ligne au lieu de déborder */
#menuBar .level2 table,
#menuBar .level2 table > tbody {
	display: block;
	width: 100%;
}

#menuBar .level2 tr {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	padding: 4px 0;
}

#menuBar .level2 td {
	height: auto;
	padding: 0 10px;
}

#menuBar .level2 td a {
	display: inline-block;
	padding: 8px 0;
}

/* ---------- Lien « Le blog » (positionné en absolu à 500px sur ordinateur) ---------- */

.laminute3-blog-link {
	position: static !important;
	width: auto !important;
	max-width: none !important;
}

.laminute3-blog-link a {
	position: static !important;
	display: block;
	padding: 4px 6px 0;
	font-size: 1.4em !important;
	text-align: right;
}

/* ---------- Pied de page commun : rubriques deux par deux ---------- */

html body div#main-footer {
	height: auto;
	padding-bottom: 20px;
}

html body div#main-footer table {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 12px;
	width: auto !important;
	height: auto;
	margin: 0;
	padding: 10px;
	background: none !important;
	font-size: 13px;
}

html body div#main-footer thead,
html body div#main-footer tbody,
html body div#main-footer tr {
	display: contents;
}

html body div#main-footer th {
	height: auto;
	margin-top: 12px;
	padding: 4px 8px;
	border-radius: 3px;
	text-align: left;
	background-color: #456baa;
}

html body div#main-footer thead td {
	display: none;
}

html body div#main-footer td {
	width: auto;
	padding: 6px 8px 0;
	line-height: 2;
}

html body div#main-footer td.logo {
	grid-column: 1 / -1;
	order: 20;
	width: auto;
	margin-top: 16px;
}

/* Chaque titre suivi de sa colonne de liens, par paires */
html body div#main-footer th:nth-child(1) { order: 1; }
html body div#main-footer th:nth-child(2) { order: 2; background-color: #54baba; }
html body div#main-footer tbody td:nth-child(1) { order: 3; }
html body div#main-footer tbody td:nth-child(2) { order: 4; }
html body div#main-footer th:nth-child(3) { order: 5; background-color: #8fc002; }
html body div#main-footer th:nth-child(4) { order: 6; background-color: #ef7103; }
html body div#main-footer tbody td:nth-child(3) { order: 7; }
html body div#main-footer tbody td:nth-child(4) { order: 8; }
html body div#main-footer th:nth-child(5) { order: 9; }
html body div#main-footer th:nth-child(6) { order: 10; background-color: #8a8a8a; }
html body div#main-footer tbody td:nth-child(5) { order: 11; }
html body div#main-footer tbody td:nth-child(6) { order: 12; }

/* Bordure du conteneur comprise dans ses 100 % de largeur */
#content {
	box-sizing: border-box;
}
