:root {
  --main-color: #ff0a0a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

/*-----MON HEADER-----*/
#icons {
  cursor: pointer;
  display: none;
}

@media (max-width: 768px) {
  #icons {
    display: flex;
    align-items: center;
    font-size: 3em;
  }
  #icons:before {
    content: "\2630";
  }
  .active #icons:before {
    content: "\2715";
  }
  nav ul {
    position: fixed;
    left: -100%;
    top: 5.3rem;
    flex-direction: column;
    background-color: var(--main-color);
    width: 100%;
    text-align: center;
    transition: 0.25s;
  }
  nav li {
    padding: 3px 0;
  }
  nav li:hover {
    background-color: var(--main-color);
  }
  nav.active ul {
    left: 0;
  }
  nav li {
    font-size: 20px;
    margin: 20px;
  }
}

nav ul {
  display: flex;
  justify-content: space-evenly;
  width: 100%;
  align-items: center;
}

li {
  list-style: none;
}

a,
a:hover {
  color: #0a0903;
  text-decoration: none;
  text-transform: uppercase;
}

a:hover {
  color: white;
}

header {
  display: flex;
}

nav {
  display: flex;
  justify-content: space-between;
  align-content: center;
  background: var(--main-color);
  padding: 10px;
  width: 100%;
  font-size: calc(0.4rem + 0.7vw);
  font-weight: 500;
}

nav img {
  width: 65px;
}

/*-----MON FORMULAIRE DE CONTACT-----*/

body {
  background-image: url("./assets/altere.jpg");
  background-size: cover;
}

main {
  margin: 5rem;

  @media screen and (max-width: 480px) {
    margin: 0;
    margin-top: 3rem;
    margin-bottom: 3rem;
  }
}

form {
  /* On centre le formulaire */
  margin: auto;
  width: 400px;
  background-color: whitesmoke;

  /* Le contour du formulaire */
  padding: 1.5em;
  border: 2px solid var(--main-color);
  border-radius: 1em;

  @media screen and (min-width: 768px) {
    width: 600px;
  }

  @media screen and (max-width: 480px) {
    width: 300px;
  }

  h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.3em;

    @media screen and (max-width: 480px) {
      font-size: 1em;
    }
  }

  ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  label {
    /* Taille et alignement uniformes */
    display: inline-block;
    width: 350px;
    @media screen and (min-width: 768px) {
      width: 550px;
    }
    @media screen and (max-width: 480px) {
      width: 250px;
      font-size: small;
    }
  }

  input {
    padding: 0.2rem;
  }

  select {
    width: 350px;
    padding: 0.2rem;
    @media screen and (min-width: 768px) {
      width: 550px;
    }
    @media screen and (max-width: 480px) {
      width: 250px;
      font-size: small;
    }
  }

  input,
  textarea {
    /* On s'assure que les champs texte ont la même police */
    font: 1em sans-serif;

    /* Taille uniforme pour des champs */
    width: 350px;
    box-sizing: border-box;

    @media screen and (min-width: 768px) {
      width: 550px;
    }

    @media screen and (max-width: 480px) {
      width: 250px;
    }

    /* On utilise la même bordure que pour le formulaire */
    border: 1px solid #999;
  }

  textarea {
    /* On aligne les textes sur plusieurs lignes avec leur
       libellé. */
    vertical-align: top;

    /* On fournit un peut d'espace pour saisir du texte. */
    height: 6em;

    /* On permet de redimensionner verticalement. */
    resize: vertical;
  }

  .Newsletter {
    display: flex;

    input {
      width: 20%;
      justify-content: left;

      @media screen and (max-width: 480px) {
        width: 10%;
        justify-content: center;
      }
    }

    label {
      width: 300px;
      text-align: left;
      font-size: 0.8em;

      @media screen and (max-width: 480px) {
        width: 200px;
        font-size: 0.6em;
      }
    }
    @media screen and (min-width: 768px) {
      display: block;
      text-align: center;
    }
    @media screen and (max-width: 480px) {
      display: block;
      text-align: center;
    }
  }

  .button {
    /* On aligne les boutons avec les champs texte. */
    text-align: center;
    padding-top: 1rem;

    button {
      padding: 0.2rem;
      border-radius: 1em;
      border: 1px solid var(--main-color);
    }
  }
  button:hover {
    background-color: var(--main-color);
  }
}

form li + li {
  margin-top: 1.5em;
}

/*-----MON FOOTER-----*/

footer {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  background-color: var(--main-color);
  width: 100%;
  position: fixed;
  bottom: 0;
}

footer img {
  width: 73px;
}

.copyright {
  font-size: 1em;
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  .copyright {
    font-size: 1.3em;
  }
}
