:root {
  --couleur-principale: #d8d8f8;
  --couleur-sombre: #404040;
  --couleur-claire: #f0f0f0;
  --border-width: 1.5em;
}

@font-face {
  font-family: ubuntu-regular;
  src: url(fonts/ubuntu-r.ttf);
}

@font-face {
  font-family: alegreya-regular;
  src: url(fonts/alegreya-r.ttf);
}

@font-face {
  font-family: gilbert-color-bold;
  src: url(fonts/gilbert-c-b.otf);
}

/* Gestion de la structure grossière */

body {
  background-color: var(--couleur-sombre);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-items: center;
  padding: 0em;
  margin: var(--border-width);
}


footer, main, aside {
  background-color: var(--couleur-claire);
}

aside {
  z-index: 10;
  position: fixed;
  top: var(--border-width);
  left: var(--border-width);
  width: 20%;
  height: calc(50% - var(--border-width));
  min-width: 15em;
  display: flex;
  flex-direction: column;
  align-items: center;
}

aside div {
  flex-direction: column;
}

main {
  margin: 0em;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
}

main section {
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

footer {
  width: calc(100% - 2 * var(--border-width));
  margin-top: var(--border-width);
  padding: var(--border-width);
}

main section :is(p, ul) {
  width: 90%;
  max-width: 40em;
}

/* Gestion du aside et des menus à montrer/cacher */
/* Par défaut, on cache tout les toggles */
label {
  display: none;
}

input[type=checkbox] {
  display: none;
}

/* Gestion des éléments "locaux" */

label, h1, h2 {
  font-family: gilbert-color-bold;
  font-size: 2em;
  font-weight: normal;
  padding: 0.2em;
}

p, li {
  font-family: ubuntu-regular;
  text-align: justify;
}

ul {
  list-style-type: '\2767  ';
  line-height: 4ex;
}

a {
  text-decoration: none;
  color: var(--couleur-sombre);
  padding-left: 0.2em;
  padding-right: 0.2em;
  background-color: var(--couleur-principale);
  border-top: 0.2em;
  border-left: 0.2em;
  border-bottom: 0.1em;
  border-right: 0.1em;
  border-color: var(--couleur-sombre);
  border-style: solid;
}

a:hover {
  border-top: 0.1em;
  border-left: 0.1em;
  border-bottom: 0.2em;
  border-right: 0.2em;
  border-color: var(--couleur-sombre);
  border-style: solid;
}

span.gay:hover {
  border-radius: 1em;
  background: linear-gradient(90deg, #ff6663, #feb144, #fdfd97, #9ee09e, #9ec1cf, #cc99c9);
}

@media (width <= 60em) {
  p, li {
    font-size: 1.5em;
  }

  h1 {
    font-size: 4.5em;
  }

  h2 {
    font-size: 3em;
  }

  label {
    display: block;
    left: 1em;
    top: 1em;
    font-size: 3em;
  }

  input[type=checkbox] + label {
    z-index: 100;
    position: fixed;
  }
  input[type=checkbox]:not(:checked) + label::before {
    filter: grayscale(100%);
  }
  input[type=checkbox]:checked + label::before {
    filter: grayscale(0%);
  }
  input[type=checkbox] + label::before {
    content: '\2728'
  }
  input[type=checkbox]:not(:checked) + label + aside {
    display: none;
  }
  input[type=checkbox]:checked + label + aside {
    display: flex;
  }

  main section {
    width: 75%;
  }
  aside {
    top: 1.5em;
    left: 25%;
    width: calc(50% - 1em);
    border: .5em solid var(--couleur-sombre);
  }
}
