/* nav.css : styles de base pour une navigation responsive.
Attention : ne fonctionne pas toujours très bien sur les anciens navigateurs ou OS mobiles (par exemple Android 2.1) */

/* Menu */
.nav-open, .nav-close {display: none !important}
#navigation ul {
	margin: 0;
	padding: 0;
}
#navigation li { display: inline; }
#navigation a:link,
#navigation a:visited {
	display: inline-block;
	background: #007f0e;
	color: #fff;
	text-decoration: none;
	padding: .6em 1em;
	border : 1px solid #f7941e;
	-webkit-border-radius: 5px;
	border-radius: 5px;
}

#navigation li a:focus,
#navigation li a:hover,
#navigation li a:active {
	background: #f7941e;
	color: #262262;
	text-decoration: none;
	border : 1px solid #262262;
}
	
@media (max-width: 800px) {
	
	/* styling menu button */
	.nav-open:before {content: "▼ ";}
	.nav-close:before {content: "▲ ";}	

	nav ul {		
		max-height: 35em; /* number of items x5 */
		-webkit-transition: max-height .4s;
		-moz-transition: max-height .4s;
		-ms-transition: max-height .4s;
		-o-transition: max-height .4s;
		transition: max-height .4s;
		-webkit-transform: translateZ(0); /* activating hardware acceleration */
		-moz-transform: translateZ(0);
		-ms-transform: translateZ(0);
		-o-transform: translateZ(0);
		transform: translateZ(0);
	}
	/* handling clic and touch with CSS :target */
	#body:not(:target) nav ul {
		max-height: 0;
		overflow: hidden;
	}
	#body:not(:target) .nav-open, #body:target .nav-close {display: block !important;}
	#body:not(:target) .nav-close, #body:target .nav-open {display: none !important;}

	#navigation > a:link {
		display: block;
		padding: .9em .6em;
		border: 0; 
		background: #256937;
		font-size: 1.1em;
	}
	#navigation li a:link {
		display: block;
		padding: .9em .6em;
		border: 0; border-bottom: 1px solid #f7941e;
		font-size: 1.1em;
	}
	#navigation li a:before {
		content: "›";
		font-size: 1.2em;
		margin-right: .6em;
		line-height: 1;
	}

	#navigation li a:focus,
	#navigation li a:hover,
	#navigation li a:active {
		text-decoration: none;
		color: #262262;
		background: #ddeedd;
	}
}
