/* sea : #a2ccb6
sand : #fceeb5
peach : #ee786e
*/


/* Simple reset: */
html, body {
  margin: 0;
  padding: 0;
}

* {
  box-sizing: border-box;
}
/* --- */

body {
  display: flex;
  flex-direction: column;
  background-color: #a2ccb6;
  color: #555;
  font-family: sans-serif;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  background-color: #fceeb5;
  border-bottom: #ee786e;
  box-shadow: 0px 2px 6px rgb(0,0,0,0.6);
}

header h1 {
  margin: 0;
  line-height: 32px;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

main > section {
  flex: 1;
  background-color: #fceeb5;
  margin-top: 2rem;
  padding: 1rem;
}

.mobile-menu {
  cursor: pointer;
}

#mobile-menu-checkbox {
  opacity: 0;
}

#mobile-menu-checkbox:checked ~ aside {
  min-width: 200px;
}

/* Important d'utiliser fixed ici, 
absolute apparaîtrait toujours en haut à 
droite même si on est légèrement scrollé */
aside {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  background-color: #fceeb5;
  box-shadow: 2px 0px 6px rgb(0,0,0,0.5);
  padding: 0;
  min-width: 0;
  width: 0;
  transition: all 0.3s;
  overflow: hidden;
}

aside nav ul {
  list-style: none;
  margin-top: 1.2rem;
  padding: 0;
}

aside nav a {
  width: 100%;
  display: block;
  color: #ee786e;
  text-decoration: none;
  padding: 0.6rem 1rem 0.6rem 1rem;
  transition: background-color 0.8s ease-out;
}

aside nav a:hover {
  background-color: #ee786e;
  color: #ebebeb;
}

@media (min-width: 900px) {

  .mobile-menu {
    display: none;
  }

  aside {
    min-width: 200px;
    box-shadow: none;
    border-right: #ee786e 2px solid;
  }

  header {
    margin-left: 200px;
  }

  main {
    margin-left: 200px;
  }

}
