/* Reset CSS */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  max-width: 1920px;
}

/* GENERAL */

html,
body {
  background-color: #b9d5e8;
}

.backgroundUp {
  background: url(../assets/images/backgroundUp.webp);
  background-size: cover;
  background-repeat: no-repeat;
}
/*Effets sur le titre*/
.title {
  padding-top: 100px;
  text-align: center;
  color: #ef7214;
  padding-bottom: 300px;
  margin-bottom: 0;
}

.logo-title {
  height: 50px;
}
.blog-text {
  display: block;
  margin-top: -20px;
}

/* MAIL FORMULAIRE */

h2 {
  text-align: center;
  padding-bottom: 50px;
  color: #322c79;
  margin: 0;
}

h3 {
  color: #ef7214;
  margin-top: 40px;
}

/*Barre de recherche*/
.searchBar {
  display: flex;
  flex-direction: column;
  margin-bottom: 100px;
  #searchInput {
    width: 70%;
    height: 30px;
    margin: auto;
    border-radius: 25px;
  }

  #searchBtn {
    width: 120px;
    margin: auto;
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 1rem;
    color: #fff;
    background-color: #ef7214;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }
}

/*Grille d'articles*/
.articles-grid {
  width: 85%;
  margin: 0 auto;
  display: flex;
  gap: 50px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 20px 0;
  cursor: pointer;
  .article {
    flex: 0 0 26vw;
    background-color: white;
    border-radius: 15px;
    position: relative;
    .imgArticle {
      width: 100%;
      max-height: 350px;
      object-fit: cover;
      border-radius: 15px 15px 0 0;
    }
    .article-title {
      text-align: center;
    }
    .article-content {
      margin-left: 15px;
      .text-content {
        max-height: 150px;
        overflow: hidden;
      }
    }
    .author {
      margin-top: 30px;
    }
    .article-likes {
      font-size: 0.9em;
      color: #555;
      margin-top: 10px;
      margin-left: 10px;
      background-color: transparent;
      border: none;
      cursor: pointer;
      /* position: absolute;
      bottom: 10px;
      right: 10px; */
    }

    .article-likes::before {
      content: "❤️";
      margin-right: 5px;
      color: #e25555;
    }
    @media (max-width: 1024px) {
      flex: 0 0 30vw;
    }
    @media (max-width: 764px) {
      flex: 0 0 50vw;
    }
  }
}

.adminBox {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-right: 10px;
  .buttonModal {
    background-color: transparent;
    border: none;
  }

  #logoutBtn {
    background-color: transparent;
    border: none;
  }
}

.mailingList {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: url(../assets/images/Vague-mailingList.webp);
  background-size: cover;
  padding-top: 50px;
  padding-bottom: 120px;
  background-color: #b9d5e8;
  .second-form {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .mailingList form {
    display: flex;
    gap: 20px;
  }
  .mailingListMail {
    color: #ef7214;
    font-weight: 500;
    padding-bottom: 30px;
  }
  .mailingListMail input {
    border-radius: 10px;
    border-color: transparent;
    width: 350px;
    height: 3em;
    border: 1px solid grey;
  }

  .conditions-mailingList {
    color: #ef7214;
    width: 40%;
    @media (max-width: 1316px) {
      width: 60%;
    }
    p {
      font-size: x-small;
    }
    .privacy-policy-ML {
      color: #b9d5e8;
    }
  }

  .accept-text {
    font-size: small;
  }
  .mailingListSubmit input {
    background-color: #ef7214;
    width: 50px;
    color: white;
    border-radius: 10px;
    border-color: transparent;
    height: 2em;
  }
}

footer {
  background-color: #d9e7f3;
}

/* Styles pour la modale */

.hidden {
  display: none;
}

.modal {
  width: 30%;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  z-index: 1000;
}

#modal {
  width: 70%;
  height: 100vh;
  border-radius: 5px;
}

#loginModal {
  width: 15%;
  border-radius: 5px;
  box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px,
    rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px,
    rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
}

/* .modal:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
} */

.close {
  float: right;
  font-size: x-large;
  cursor: pointer;
  margin-right: 5px;
}

#loginForm {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
  gap: 10px;
}

.idSubmit {
  background-color: #ef7214;
  color: #fff;
  border: transparent;
  padding: 5px;
}

#articleForm {
  display: flex;
  gap: 30px;
  padding-left: 30px;
  margin-top: 30px;
  label {
    font-size: larger;
  }
  .first-part {
    display: flex;
    flex-direction: column;
    width: 20%;
    #image {
      background-color: #ef7214;
      color: #fff;
      border-radius: 5px;
      border: transparent;
    }
    .submitModal {
      background-color: #322c79;
      margin-top: 10px;
      color: #fff;
      border-radius: 5px;
      border: transparent;
    }
  }
  .second-part {
    display: flex;
    flex-direction: column;
    width: 70%;
    #content {
      height: 400px;
    }
  }
}

.articlesAdmin-grid {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 20px;
  margin-top: 30px;
  margin-left: 30px;
  .article-admin {
    display: flex;
    flex-direction: column;
    .delete-article {
      cursor: pointer;
      font-size: x-large;
    }
    .imgArticle-admin {
      width: 200px;
    }
  }
}

/* Conteneur principal des articles */
/* Overlay */
#loader-overlay {
  position: fixed;
  top: 20%;
  left: 0;
  width: 100vw;
  height: 80vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loader {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  position: relative;
  animation: rotate 1s linear infinite;
}
.loader::before,
.loader::after {
  content: "";
  box-sizing: border-box;
  position: absolute;
  inset: 0px;
  border-radius: 50%;
  border: 5px solid #fff;
  animation: prixClipFix 2s linear infinite;
}
.loader::after {
  border-color: #ef7214;
  animation: prixClipFix 2s linear infinite, rotate 0.5s linear infinite reverse;
  inset: 6px;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes prixClipFix {
  0% {
    clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);
  }
  25% {
    clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);
  }
  50% {
    clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);
  }
  75% {
    clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);
  }
  100% {
    clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);
  }
}

/* Article-afichage complet*/
.modal-content {
  margin-top: 20px;
  #article-image {
    max-width: 400px;
    display: flex;
    margin: auto;
    margin-bottom: 30px;
  }

  #article-content {
    width: 80%;
    margin-top: 40px;
    margin: auto;
    overflow-y: auto;
  }

  #like-button {
    background-color: #ef7214;
    color: white;
    border: transparent;
    padding: 20px;
    border-radius: 15px;
    margin-left: 50%;
    margin-top: 40px;
  }

  #like-button:hover {
    transform: scale(1.1);
    transition: all 0.6s ease;
    cursor: pointer;
  }
}

/* Tablettes ou petits écrans */

@media (max-width: 1200px) {
  .backgroundUp {
    background: url(../assets/imagesService/background-up-medium.png);
    background-size: cover;
    background-repeat: no-repeat;
  }
  .title {
    padding-bottom: 170px;
  }
}

/* Téléphones portables moyens en mode portrait */
@media (max-width: 768px) {
  .backgroundUp {
    background: url(../assets/imagesService/background-upmobile.png);
    background-size: cover;
    background-repeat: no-repeat;
  }
  .title {
    padding-bottom: 100px;
  }
  h2 {
    padding: 50px;
  }
  .mailingListMail {
    padding-bottom: 0;
  }
  .mailingList form {
    width: 80%;
    flex-direction: column;
  }
  .text-content {
    width: 100%;
  }

  .mailingList {
    padding-top: 100px;
    padding-bottom: 150px;
    background: url(../assets/images/Vague-bas-page-tel.png);
    background-repeat: no-repeat;
    background-size: cover;
  }

  .mailingList input {
    width: 300px;
  }
}

/*Petits portables*/
@media (max-width: 350px) {
  .mailingList input {
    width: 200px;
  }
}
