/****************************************************************/
/* GeoRezo - Forum : adaptation mobile                           */
/*                                                              */
/* Feuille chargee uniquement par les pages du forum (voir      */
/* header.php et include/functions.php). Toutes les regles sont */
/* dans une media query : l'affichage bureau n'est pas modifie. */
/*                                                              */
/* Les !important sont necessaires car georezo_build.css (CSS   */
/* general du site) est charge apres cette feuille.             */
/****************************************************************/

@media (max-width: 768px) {

	/* ---------------------------------------------------------- */
	/* 1. Coque du site (entete, menu, contenu, pied de page)     */
	/* ---------------------------------------------------------- */

	html, body {
		overflow-x: hidden;
	}

	#main-wrapper,
	#wrapper,
	#wrapper #grz_header,
	#content {
		width: 100% !important;
		min-width: 0 !important;
		max-width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
		box-sizing: border-box;
	}

	#content {
		min-height: 0 !important;
		border-left: none !important;
		border-right: none !important;
	}

	.contentpadding {
		padding: 4px !important;
	}

	/* Entete : on remet tout dans le flux normal */
	#wrapper #grz_header {
		height: auto !important;
		background-size: auto 100% !important;
		border-left: none !important;
		border-right: none !important;
		padding-bottom: 6px !important;
	}

	#grz_header > div:first-child {
		position: static !important;
		text-align: center;
	}

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

	#grz_header h1 {
		position: static !important;
		width: auto !important;
		font-size: 13px !important;
		text-align: center;
		padding: 4px 8px !important;
	}

	/* Menu principal : les onglets passent sur plusieurs lignes */
	#menuBar {
		position: static !important;
		top: 0 !important;
		min-width: 0 !important;
	}

	#menuBar table.level1,
	#menuBar table.level1 tbody,
	#menuBar table.level1 tr {
		display: flex !important;
		flex-wrap: wrap;
		width: 100% !important;
		height: auto !important;
	}

	#menuBar .level1 td.sections {
		display: block;
		flex: 1 1 33%;
		width: auto !important;
		height: auto !important;
	}

	#menuBar .level1 td.gr_webservices {
		display: block;
		flex: 1 1 100%;
		text-align: center !important;
		height: auto !important;
	}

	#menuBar .level1 a {
		font-size: 10px !important;
		padding: 0 4px;
	}

	#menuBar .menuBarBottom,
	html > body #menuBar .menuBarBottom {
		min-width: 0 !important;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	#menuBar .level2 table {
		width: auto !important;
	}

	#menuBar .level2 td {
		padding: 0 10px !important;
		white-space: nowrap;
	}

	#menuBar .level3 {
		display: none !important;
	}

	/* Formulaire de connexion / recherche de l'entete */
	#form {
		position: static !important;
		top: 0 !important;
		float: none !important;
		height: auto !important;
		text-align: center !important;
		padding: 6px !important;
		font-size: 12px !important;
	}

	#form input[type="text"],
	#form input[type="password"] {
		width: 40% !important;
	}

	#gr_googlesearch {
		width: auto !important;
		margin: 6px 0 0 0 !important;
	}

	/* Bandeau cookies */
	div#cookies {
		height: auto !important;
		line-height: 1.4 !important;
		padding: 6px;
		box-sizing: border-box;
	}

	/* Pied de page : le tableau de liens devient une grille */
	html body div#main-footer {
		height: auto !important;
		background: #f4f4f4 !important;
		padding: 10px 0;
	}

	html body div#main-footer table,
	html body div#main-footer tbody,
	html body div#main-footer tr {
		display: block !important;
		width: 100% !important;
		height: auto !important;
		background: none !important;
	}

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

	html body div#main-footer tbody tr {
		display: flex !important;
		flex-wrap: wrap;
	}

	html body div#main-footer td,
	html body div#main-footer td.logo {
		display: block;
		flex: 1 1 45%;
		width: auto !important;
		padding: 6px 10px !important;
		box-sizing: border-box;
	}

	html body div#main-footer td.logo {
		flex-basis: 100%;
	}

	/* ---------------------------------------------------------- */
	/* 2. Forum PunBB                                             */
	/* ---------------------------------------------------------- */

	.pun {
		font-size: 13px !important;
	}

	#punwrap {
		margin: 0 !important;
	}

	.pun img {
		max-width: 100%;
		height: auto;
	}

	/* Menu du forum */
	#brdmenu {
		height: auto !important;
	}

	#brdmenu ul li {
		display: inline-block !important;
		margin: 2px 10px 2px 0 !important;
		height: auto !important;
	}

	.box .inbox ul li,
	.blockmenu .box .inbox ul li {
		height: auto !important;
	}

	/* Bloc bienvenue / recherche rapide */
	.conl,
	.conr {
		float: none !important;
		width: auto !important;
		text-align: left !important;
		white-space: normal !important;
	}

	.quicksearch {
		text-align: left !important;
	}

	#qsearch input[type="text"],
	#qsel select {
		width: 100% !important;
		box-sizing: border-box;
	}

	/* Fil d'Ariane et pagination */
	DIV.linkst,
	DIV.linksb,
	DIV.postlinksb {
		margin-top: 0 !important;
	}

	DIV.linkst .conl, DIV.linksb .conl, DIV.postlinksb .conl,
	DIV.linkst .conr, DIV.linksb .conr, DIV.postlinksb .conr,
	FORM DIV.linksb .conr {
		width: auto !important;
	}

	.linkst UL, .linksb UL, .postlinksb UL {
		margin-left: 0 !important;
	}

	DIV.linkst LI, DIV.linksb LI, DIV.postlinksb LI {
		height: auto !important;
	}

	/* Listes de forums / sujets / resultats / membres :
	   on masque les colonnes de compteurs */
	.pun TABLE {
		table-layout: fixed;
	}

	.pun TH, .pun TD {
		padding: 4px !important;
		overflow-wrap: break-word;
		word-wrap: break-word;
	}

	.pun .tc2,
	.pun .tc3 {
		display: none !important;
	}

	.pun .tcl,
	#punsearch #vf .tcl,
	#punmoderate #vf .tcl,
	#users1 .tcl {
		width: auto !important;
	}

	.pun .tcr,
	#users1 .tcr {
		width: 38% !important;
	}

	.pun .tcmod {
		width: 2.5em !important;
	}

	td div.tclcon {
		margin-left: 1.8em !important;
	}

	/* Fiche d'un message : colonne auteur au-dessus du message */
	DIV.postleft,
	DIV.postfootleft {
		float: none !important;
		width: auto !important;
	}

	DIV.postleft DL {
		padding: 4px 6px !important;
	}

	DIV.postleft DT,
	DIV.postleft DD {
		display: inline-block;
		margin-right: 8px;
		vertical-align: middle;
	}

	DIV.postleft DD.postavatar img {
		max-width: 40px;
		max-height: 40px;
	}

	DIV.postright,
	DIV.postfootright {
		border-left-width: 0 !important;
	}

	DIV.postright {
		padding: 6px !important;
	}

	DIV.postfootleft P,
	DIV.postfootright UL,
	DIV.postfootright DIV {
		padding: 4px 6px !important;
	}

	DIV.postfootright LI {
		display: inline-block !important;
		height: auto !important;
		margin: 2px 0;
	}

	DIV.postmsg {
		overflow-wrap: break-word;
		word-wrap: break-word;
	}

	DIV.codebox {
		width: auto !important;
		margin: 5px 0 10px 0 !important;
	}

	.pun BLOCKQUOTE {
		margin: 5px 0 10px 0 !important;
	}

	DIV.scrollbox,
	.pun PRE {
		overflow-x: auto;
		max-width: 100%;
	}

	DIV.searchposts DIV.postmsg {
		height: auto !important;
		max-height: 10em;
	}

	/* Formulaires (message, inscription, profil, recherche...) */
	DIV.blockform FORM,
	DIV.fakeform {
		padding: 8px !important;
	}

	.pun FIELDSET {
		padding: 0 6px !important;
		min-width: 0;
	}

	DIV.txtarea,
	DIV.txtarea TEXTAREA,
	.pun TEXTAREA,
	INPUT.longinput {
		width: 100% !important;
		box-sizing: border-box;
	}

	/* 16px evite le zoom automatique d'iOS au focus */
	.pun INPUT[type="text"],
	.pun INPUT[type="password"],
	.pun INPUT[type="email"],
	.pun SELECT,
	.pun TEXTAREA {
		font-size: 16px !important;
		max-width: 100%;
	}

	DIV.blockform P INPUT {
		margin: 4px 8px 4px 0 !important;
	}

	#qjump SELECT {
		width: 100% !important;
	}

	UL.bblinks LI {
		display: inline-block !important;
		height: auto !important;
		padding-right: 10px !important;
	}

	/* Profil et administration : le menu lateral passe au-dessus */
	DIV.blockmenu {
		float: none !important;
		width: auto !important;
		margin-bottom: 10px;
	}

	DIV.block2col DIV.blockform,
	DIV.block2col DIV.block {
		margin-left: 0 !important;
	}

	#viewprofile DT,
	#viewprofile DD {
		float: none !important;
		width: auto !important;
		margin-left: 0 !important;
		text-align: left !important;
	}

	#viewprofile DT {
		font-weight: bold;
	}

	#profileavatar IMG {
		float: none !important;
		margin: 0 0 6px 0 !important;
	}

	/* Statistiques en bas de l'index */
	#brdstats .conl,
	#brdstats .conr {
		text-align: left !important;
	}

	#onlinelist DD,
	#onlinelist DT {
		display: inline-block !important;
		height: auto !important;
	}

	/* Pages de redirection / maintenance */
	#punredirect DIV.block,
	#punmaint DIV.block {
		margin: 20px 8px !important;
	}

	/* Pages specifiques GeoRezo */
	ul.kisomnou {
		margin: 0 !important;
		padding: 4px !important;
	}

	.map_kisomnou {
		height: 300px !important;
	}
}
