/*
 * Made by Erik Terwan
 * 24th of November 2015
 * MIT License
 *
 *
 * If you are thinking of using this in
 * production code, beware of the browser
 * prefixes.
 
 note: le code original est ici:   https://codepen.io/erikterwan/pen/EVzeRP
 
 */
 
 /* pour faire disparaitre le checkbox - largeur desktop */
 
 #menuToggle input { display: none; }
 
 /*  ci dessous: le trigger width, pour la version mobile (1024px) changé pour 1082 (bug Pixel 2) */
 
@media only screen and (max-width : 1082px)
{

/* modifs au menu de base version mobile */


 #menu {
    margin-left: -40px;
    width:100%;
    margin-top:0px;
    padding:20px; /* tassé le menu du bord un peu */
}


#menu ul {
    margin-left: -300px;
    margin-top:0px; height:auto; 
}

#menu ul li {
    margin-left: 0px;
    width:100%;
    margin-top:15px; margin-bottom:10px;
}

#menu ul li a { padding-top:0px; font-size:24px; }

#menu ul li ul {
    padding-left:20px; 
    visibility:visible; opacity:1; margin-bottom:20px;
}



/*
 * Make this absolute positioned
 * at the top left of the screen
 */
 
#menu_burger
{
  position: absolute;
  width: 300px;
  margin: 0px 500px 0px 500px;
  padding: 40px;
  padding-top: 20px;
  border: 1px solid #e2e2e2;
  background: #fff;
  list-style-type: none;
  -webkit-font-smoothing: antialiased;
  /* to stop flickering of text in safari - note: opacity might not work on mobiles? */
  opacity: 0.9;
  transform-origin: 0% 0%;
  transform: translate(+100%, 0); 
  transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
}

#menu_burger li
{
  clear:both;
  padding: 0px 0px;
  font-size: 22px;
}
 

#menuToggle
{
  display: block;
  position: relative;
  top: 20px;
  left: 10px;
  float:right; padding-right:40px;
  
  z-index: 1;
  
  -webkit-user-select: none;
  user-select: none;
}

#menuToggle input
{
  display: block;
  width: 40px;
  height: 32px;
  position: absolute;
  top: -7px;
  left: -5px; 
  float:right;
  
  cursor: pointer;
  
  opacity: 0; /* hide this */
  z-index: 2; /* and place it over the hamburger */
  
  -webkit-touch-callout: none;
}

/*
 * Just a quick hamburger, using spans
 */
 
#menuToggle span
{
  display: block;
  width: 33px;
  height: 4px;
  margin-bottom: 5px;
  position: relative;
  
  background: #000000;
  border-radius: 3px;
  
  z-index: 1;
  
  transform-origin: 4px 0px;
  
  transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
              background 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
              opacity 0.55s ease;
}

#menuToggle span:first-child
{
  transform-origin: 0% 0%;
}

#menuToggle span:nth-last-child(2)
{
  transform-origin: 0% 100%;
}

/* 
 * Transform all the slices of hamburger
 * into a crossmark.
 */
#menuToggle input:checked ~ span
{
  opacity: 1;
  transform: rotate(45deg) translate(-2px, -1px);
  background: #232323;
}

/*
 * But let's hide the middle one.
 */
#menuToggle input:checked ~ span:nth-last-child(3)
{
  opacity: 0;
  transform: rotate(0deg) scale(0.2, 0.2);
}

/*
 * Ohyeah and the last one should go the other direction
 */
#menuToggle input:checked ~ span:nth-last-child(2)
{
  transform: rotate(-45deg) translate(0, -1px);
}

/*
 * And let's slide it in from the left
 */
#menuToggle input:checked ~ ul
{
  transform: none;
}

}

/* start - Retina 2x Media Query for Pixel 2 devices */

@media
  only screen and (-webkit-min-device-pixel-ratio: 2),
  only screen and (   min--moz-device-pixel-ratio: 2),
  only screen and (     -o-min-device-pixel-ratio: 2/1),
  only screen and (        min-device-pixel-ratio: 2),
  only screen and (                min-resolution: 192dpi),
  only screen and (                min-resolution: 2dppx) { 
    /* Retina styles here
	#menu_burger {  }
	#menu ul { }
 */
}

/* end - Retina 2x Media Query for Pixel 2 devices */

/*  backups ------------------------------------------ 

/*  pour enlever les contours gris des sous menus déroulants  

#menu ul li ul li { border:none; margin-bottom:10px; }
#menu ul li:hover ul li { border:none; }
#menu ul li ul li.top_border { border:none; padding-bottom:10px;}
#menu ul li.more ul li.bottom_border { border:none; padding-bottom:0px; margin-bottom:10px; }
#menu ul li.more ul li.business {  border:none; padding-bottom:0px; margin-bottom:10px; }

/*  fin - contours gris des sous menus déroulants  */

/*  avec ajout d'une classe sur le ul li : ça marche, avec display:contents;  

#menu ul li.more { display:contents; border-bottom:0px; }
#menu ul li.more ul { display:contents; width:250px; height:350px; visibility:visible; opacity:1; margin-left:50px; margin-bottom:0px;}
#menu ul li.more ul li { float:none; display:block; width:100%; height:25px; margin:0px; padding-left:20px; visibility:visible; opacity:1; margin-bottom:0px; padding-bottom:0px; }
#menu ul li.more:active ul { display:contents; visibility:visible; opacity:1; }
#menu ul li.more:hover ul { display:contents; }

/*  fin essai avec une classe sur le ul li */

/* fin des modifs mobile au menu de base */
*/


