@font-face {
  font-family: "montserrat";
  src: url("fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

:root {
  --primary-color: #9d3852;
  --light-text: #f5f5f5;
  --secondary-color: #d0d1d6;
  --light: #ffffff;
  --saySomething-color: #535353;
  --dark-shadow: rgb(137, 36, 62);
  --light-shadow: rgb(177, 76, 102);
}

/* Toute les balises */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  background-color: #e2e2e2;
  font-family: "montserrat", Arial, Helvetica, sans-serif;
}

.tweet-message::-webkit-input-placeholder,
#comment-message::-webkit-input-placeholder {
  font-family: "montserrat", Arial, Helvetica, sans-serif;
}

.tweet-message:-ms-input-placeholder,
#comment-message:-ms-input-placeholder {
  font-family: "montserrat", Arial, Helvetica, sans-serif;
}

.tweet-message:-moz-placeholder,
#comment-message:-moz-placeholder {
  font-family: "montserrat", Arial, Helvetica, sans-serif;
}

.tweet-message::-moz-placeholder,
#comment-message::-moz-placeholder {
  font-family: "montserrat", Arial, Helvetica, sans-serif;
}

main {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
}

.tweet {
  display: flex;
  margin: 0rem 0rem 1rem 0rem;
  background-color: var(--secondary-color);
  border-radius: 12px;
  padding: 0.5rem;
  width: 95%;
}

.tweet-header {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.profile {
  margin: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-pic {
  height: 3.5rem;
  width: 3.5rem;
  object-fit: cover;
  margin-bottom: 0.5rem;
  padding: 0;
  border-radius: 12px;
}

.profile-name {
  font-weight: bold;
  color: var(--light-text);
  font-size: small;
  text-align: center;
}

.date {
  height: 1.5rem;
  margin: 0.5rem;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: small;
}

.tweet-body {
  display: flex;
  width: 100%;
  flex-direction: column;
}

.message {
  background-color: var(--light-text);
  height: 7rem;
  border-radius: 12px;
  padding: 0.5rem;
  margin: 0.5rem;
  font-size: small;
  overflow: auto;
  color: black;
}
.message-dark {
  background-color: #313131;
  color: var(--light-text);
}

.tweet-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 1.5rem;
  margin: 0.5rem;
  border-radius: 12px;
}

.icones {
  height: 1.5rem;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-left: 0.5rem;
}

.icones p {
  display: flex;
  font-size: small;
  margin-left: 0.5rem;
}

.compteur-likes {
  cursor: pointer;
}

.compteur-likes img {
  margin-right: 5px;
}

.compteur-comments img {
  margin-right: 5px;
}

.compteur-shares {
  cursor: pointer;
}

.compteur-shares img {
  margin-right: 5px;
}

.reply-button {
  height: 1.5rem;
  color: var(--light-text);
  padding: 0 0.5rem;
  border-radius: 8px;
  background-color: var(--primary-color);
  border: 0;
  cursor: pointer;
}

.new-post {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  margin-top: 12vh;
  width: 100%;
}

.say-something {
  display: flex;
  /* display: none; */
  justify-content: center;
  align-items: center;
  background-color: var(--secondary-color);
  height: 2rem;
  width: 95%;
  border-radius: 12px;
  font-weight: bold;
  font-style: italic;
  color: var(--saySomething-color);
  cursor: pointer;
}

.new-tweet-form {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
}

.new-message {
  display: none;
  width: 95%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--secondary-color);
  margin: auto;
  padding: 1rem;
  border-radius: 12px;
}

.new-message textarea {
  display: block;
  width: 100% !important;
  height: 3rem !important;
  overflow: auto;
  resize: none;
  border: none;
  border-radius: 12px;
  margin-bottom: 1rem;
  padding: 0.5rem;
}

.new-message textarea:focus {
  outline: none;
}

#post {
  cursor: pointer;
  display: block;
  height: 1.5rem;
  color: var(--light-text);
  width: 4rem;
  border-radius: 8px;
  background-color: var(--primary-color);
  border: 0;
}

header {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  background-color: var(--primary-color);
  height: 10vh;
  width: 100%;
  position: fixed;
  top: 0;
}

header h1 {
  color: var(--light-text);
  font-size: 5vh;
  align-self: center;
}

/* Image du header */
header .logo {
  margin-right: 1.25rem;
  padding: 10px;
  cursor: pointer;
  height: 100%;
}

nav {
  width: 100%;
  position: fixed;
  bottom: 0;
  background-color: var(--primary-color);
  z-index: 10;
  color: var(--light-text);
}

ul {
  display: flex;
  list-style: none;
  height: 80px;
  width: 100%;
  justify-content: space-evenly;
  align-items: center;
}

li,
li a {
  text-decoration: none;
  color: var(--light-text);
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}

.icon {
  display: block;
  text-align: center;
  fill: var(--light-text);
}

.nav-toggler {
  /* z-index: 10; */
  height: 100%;
  width: 100%;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
}

.line {
  position: absolute;
  display: block;
  width: 32px;
  height: 2px;
  background: var(--light-text);
  transition: all 0.3s ease-out;
}

.l1 {
  transform: translateY(-10px);
}

.l3 {
  transform: translateY(10px);
}

.nav-toggler.active .l1 {
  transform: translateY(0px) rotate(135deg);
}

.nav-toggler.active .l2 {
  opacity: 0;
}

.nav-toggler.active .l3 {
  transform: translateY(0px) rotate(-135deg);
}

.menu {
  color: var(--light-text);
  position: fixed;
  bottom: 80px;
  right: 0;
  width: 25%;
  height: 50%;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex-direction: column;
  background: var(--primary-color);
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  border-radius: 0.5em 0 0 0;
}

.menu.active {
  transform: translate(0);
}

.menu a {
  color: var(--light-text);
  display: flex;
  text-decoration: none;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
}

.menu div {
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  height: 100%;
}

.menu a:hover,
.menu div:hover,
.nav-toggler:hover,
nav a:hover,
nav div:hover {
  box-shadow: 5px 5px 10px var(--dark-shadow),
    -5px -5px 10px var(--light-shadow);
  width: 92%;
  height: 100%;
  border-radius: 15px;
  margin-top: 5px;
}

.menu p {
  width: auto;
  text-align: center;
}

.menu label {
  width: auto;
  text-align: center;
}

.theme-button {
  height: 24px;
  width: 24px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

nav,
.menu {
  font-size: 3.5vw;
}

.icon-description {
  display: none;
}

.profil-section {
  display: none;
  z-index: 20;
  background-color: rgba(0, 0, 0, 0.8);
  position: fixed;
  width: 102%;
  height: 102%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-sizing: content-box;
}

.my-profil {
  z-index: 24;
  background-color: var(--primary-color);
  position: fixed;
  height: 80%;
  width: 80%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.trend {
  display: none;
}

.popup {
  display: none;
}

.popup-back {
  z-index: 50;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.popup-container {
  z-index: 51;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 50%;
  left: 50%;
  padding: 25px;
  background: var(--secondary-color);
  transform: translate(-50%, -50%);
  border-radius: 8px;
  animation: zoom-in 1s ease 1;
}

@keyframes zoom-in {
  0% {
    transform: scale(0, 0) translate(-50%, -50%);
  }

  100% {
    transform: scale(1, 1) translate(-50%, -50%);
  }
}

#popup-close {
  cursor: pointer;
  display: block;
  height: 1.5rem;
  color: var(--light-text);
  padding: 0 0.5rem;
  border-radius: 8px;
  background-color: var(--primary-color);
  border: 0;
}

#comment-message {
  display: block;
  /* /* width: 100% !important; */
  height: 4rem;
  overflow: auto;
  resize: none;
  border: none;
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 0.5rem;
}

#comment-message:focus {
  outline: none;
}

.dark {
  background-color: #313338;
  color: white;
}

.dark-tweet {
  background-color: #6b6b6b;
  color: white;
}

@media screen and (min-width: 600px) {
  /* Header deskop */
  nav {
    position: fixed;
    left: 0;
    height: 90%;
    width: 15%;
    min-width: 90px;
    max-width: 185px;
  }

  ul {
    flex-direction: column;
    height: 100%;
  }

  nav ul * {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--light-text);
    text-align: center;
  }

  .dark-theme,
  .color-theme {
    width: 92%;
  }

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

  .menu-button {
    display: none;
  }

  .menu {
    display: none;
  }

  nav,
  .menu {
    font-size: 1rem;
  }

  main {
    width: 70%;
    margin: auto;
  }

  .new-post {
    width: 70%;
    margin-left: auto;
    margin-right: auto;
  }

  .trend {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    position: fixed;
    right: 0;
    top: 50%;
    width: 12vw;
    height: 70vh;
    transform: translate(0, -40%);
    margin-right: 1rem;
    border-left: 1px solid var(--saySomething-color);
  }

  .trend h2 {
    font-size: 1rem;
    text-align: center;
    position: relative;
    bottom: 5%;
  }

  .trend a {
    text-decoration: none;
    color: var(--saySomething-color);
  }

  .trend-dark:visited, .trend-dark {
    color: var(--light-text);
  }

  .trend a:hover {
    text-decoration: underline;
    color: var(--primary-color);
  }

  .trend div {
    width: 100%;
    text-align: center;
  }

  nav a:hover,
  nav div:hover {
    border-radius: 0;
    width: 100%;
    box-shadow: 0px 5px 10px var(--dark-shadow),
      0px -5px 10px var(--light-shadow);
  }
}

@media screen and (600px <=width <=890px) {
  .trend {
    font-size: 1.5vw;
  }
  .trend h2 {
    font-size: 1.5vw;
  }
}
