@font-face {
  font-family: "nunito";
  src: url("../font/Nunito-VariableFont_wght-e7b91e794041332480e88a10e400b0f6.ttf");
}

@font-face {
  font-family: "Amaranth";
  src: url("../font/Amaranth/Amaranth-Regular-87055c39dbf6afbf1e930ed63f0739d2.ttf");
}

* {
  margin: 0;
  padding: 0;
  list-style-type: none;
  text-decoration: none;
}

body {
  background-color: #fffbeb;
  font-family: "nunito", sans-serif;
  height: 100%;
  width: auto;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* -----------------Header style------------------ */
header {
  position: sticky;
  top: 0;
  width: 100%;
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
  background-color: #0b2c3d;
}

.hreflogo {
  text-decoration: none;
  /* height: 100%; */
  display: flex;
  align-items: center;
}

.logo-design {
  width: 13%;
}

.logo-name {
  width: 50%;
}

.logo {
  margin-left: 30px;
  display: flex;
  align-items: center;
  height: 100%;
}

.navbar {
  width: 500px;
  margin-right: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav {
  text-decoration: none;
  color: white;
}

.nav-connect {
  background-color: #07b01f;
  border-radius: 8px;
  width: 120px;
  height: 40px;
  text-decoration: none;
  color: #0b2c3d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.nav {
  position: relative;
  padding: 10px 0;
}

.nav::after {
  content: "";
  position: absolute;
  width: 0;
  height: 3px;
  background-color: rgb(255, 90, 60);
  left: 50%;
  bottom: 0;
  transition: width 0.3s ease, left 0.3s ease;
}

.nav:hover::after {
  width: 100%;
  left: 0;
}

.logo-container {
  display: flex;
  position: relative;
}

.img-profil {
  height: 50px;
  padding-left: 40px;
}

.notifs-circle {
  color: white;
  width: 30px;
  height: 25px;
  background-color: #ff0000;
  border-radius: 40%;
  text-align: center;
  position: relative;
  transform: translate(-8px, 35px);
  z-index: 1;
  text-decoration: none;
}

.notifs-circle::after {
  content: "";
  position: absolute;
  bottom: 95%;
  left: 30%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent #ff0000 transparent;
}

#burger {
  display: none;
}

/* ---------------Banner Style---------------------- */

.banner {
  height: 480px;
  width: 100%;
  background-image: url("../images/Banner1-f246213307b9ce96457916f293c43abd.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: bottom;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.welcome {
  font-size: 30px;
  font-weight: 700;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), -2px -2px 4px rgba(0, 0, 0, 0.8),
    2px -2px 4px rgba(0, 0, 0, 0.8), -2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* ---------------Home style------------- */
main {
  margin-top: 100px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.introduction {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  gap: 120px;
  width: 80%;
}

.about {
  align-self: flex-start;
  margin-left: 100px;
}

.img-about,
.img-step {
  /* height: 350px; */
  width: 72%;
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: 5px;
}

.about-text,
.objective,
.text-step-one,
.text-step-two,
.text-step-three,
.text-step-four {
  font-family: "Amaranth", sans-serif;
  font-size: 20px;
  color: rgb(27, 4, 4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 60px;
  word-spacing: 6px;
}

.about-text,
.objective {
  line-height: 45px;
  word-spacing: 2px;
  display: flex;
  flex-direction: column;
}

.booksinder {
  font-size: 32px;
}

.how-it-works {
  margin-top: 50px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(11, calc(300px / 4));
  column-gap: 150px;
  row-gap: 15px;
  width: 80%;
}

.step-one,
.step-two,
.step-three,
.step-four {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.step-one {
  grid-column: 1;
  grid-row: 1;
}

.step-two {
  grid-column: 2;
  grid-row: 3 / span 4;
}

.step-three {
  grid-column: 1;
  grid-row: 6 / span 4;
}

.step-four {
  grid-column: 2;
  grid-row: 8 / span 4;
}

.step-one-container,
.step-two-container,
.step-three-container,
.step-four-container {
  display: flex;
}

.step-number {
  font-weight: bold;
  font-size: 40px;
}

.text-step-two {
  line-height: 57px;
}

.text-step-three {
  line-height: 47px;
}

.step-title {
  font-size: 20px;
  font-family: sans-serif;
  font-style: normal;
}

.green-word {
  color: #25a65b;
  text-decoration: none;
}

.img-step {
  height: 260px;
}

.decorative-line {
  border: none;
  height: 4px;
  /* Épaisseur de la ligne */
  background-color: #ccc;
  /* Couleur de la ligne */
  margin: 20px 0;
  /* Espacement autour de la ligne */
  width: 50%;
  /* Largeur de la ligne, ajuste selon tes besoins */
  margin-left: auto;
  margin-right: auto;
  margin-top: 100px;
  margin-bottom: 100px;
}

/* -------------------Announces Style ------------------- */
.announces {
  margin-top: 20px;
  width: 96%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 15px;
}

.grid {
  margin-top: 20px;
  width: 100%;
  max-width: 1300px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.titles {
  position: relative;
  width: 100%;
  max-width: 1300px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.listings-title {
  font-size: 24px;
  font-weight: bold;
  color: #000;
}

.listings-options {
  display: flex;
  gap: 15px;
}

.add {
  text-decoration: none;
  background-color: #07b01f;
  padding: 8px 12px;
  border-radius: 5px;
  color: white;
  font-weight: bold;
}

.filter-listings {
  position: absolute;
  left: 100%;
  display: flex;
  flex-direction: column;
  /* align-items: flex-end; */
  background: #fffbeb;
  padding: 10px;
  border-radius: 5px;
  z-index: 1;
}

.showresults-li,
.showresults-isbn-li {
  cursor: pointer;
  transition: all 0.3s;
}

.showresults-li:hover,
.showresults-isbn-li:hover {
  background-color: #f2f2f2;
}

.toggle-item {
  display: none;
}

.filter-listings.active .toggle-item {
  display: block;
}

/*------------------------ pagination style --------------*/
.navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.navigation a {
  margin: 0 5px;
  padding: 8px 12px;
  text-decoration: none;
  background-color: #f0f0f0;
  border-radius: 4px;
  color: #333;
  transition: background-color 0.3s;
}

.navigation a:hover {
  background-color: #e0e0e0;
}

.navigation .current {
  font-weight: bold;
  background-color: #d0d0d0;
  pointer-events: none;
}

.navigation .current {
  font-weight: bold;
  background-color: #d0d0d0;
  pointer-events: none;
  border: 2px solid #333;
  border-radius: 4px;
  padding: 6px 10px;
}

/* ------------------------Choose style-------------------------------- */

.why-choose-section {
  margin-top: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  background-color: #c4bb99;
  height: 550px;
  padding-bottom: 60px;
}

.top-choose {
  justify-items: center;
}

.bottom-choose {
  display: flex;
  justify-content: space-around;
  width: 100%;
}

.choose-box-one,
.choose-box-two,
.choose-box-three,
.choose-box-four {
  background-color: #fffbeb;
  width: 19%;
  height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  border-radius: 5px;
  padding: 20px;
  margin: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.svg-container svg {
  margin-bottom: 10px;
}

.choose-text {
  text-align: center;
  color: #333;
}

.choose-box-one {
  margin-left: 40px;
}

.choose-box-four {
  margin-right: 40px;
}

.svg-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 120px;
  height: 120px;
  background-color: #07b01f;
  border-radius: 50%;
}

/* -------------------Footer style------------------------------ */

/* Footer Styling */
.footer {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: space-around;
  padding: 40px 0;
  background-color: #0b2a3e;
  color: #ffffff;
  flex-wrap: wrap;
}

.footer-section {
  max-width: 250px;
  margin-bottom: 20px;
}

.logo-section .logo {
  width: 150px;
}

.logo-design-footer {
  height: 40px;
  width: 60px;
}

.logo-name-footer {
  height: 40px;
  width: 180px;
}

.footer-section h3 {
  font-size: 18px;
  margin-bottom: 10px;
  position: relative;
}

.footer-section h3::after {
  content: "";
  display: block;
  width: 30px;
  height: 3px;
  background-color: #e74c3c;
  margin-top: 5px;
}

.logo-section p {
  font-size: 14px;
  line-height: 1.5;
}

.social-icons {
  margin-top: 15px;
}

.social-icons a {
  display: inline-block;
  width: 30px;
  height: 30px;
  margin-right: 10px;
  background-color: #374a5a;
  color: #ffffff;
  text-align: center;
  line-height: 30px;
  border-radius: 5px;
  text-decoration: none;
}

.quick-links ul {
  list-style: none;
  padding: 0;
}

.quick-links ul li {
  margin: 8px 0;
}

.quick-links ul li a {
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
}

.newsletter form {
  display: flex;
  flex-direction: column;
}

.newsletter input[type="email"] {
  padding: 10px;
  border-radius: 5px;
  border: none;
  margin-bottom: 10px;
  font-size: 14px;
  color: #333;
}

.newsletter button {
  padding: 10px;
  background-color: #27ae60;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.newsletter p {
  font-size: 12px;
  color: #bdc3c7;
  margin-top: 10px;
}

.contact p {
  display: flex;
  align-items: center;
  font-size: 14px;
  margin: 8px 0;
}

.contact p i {
  margin-right: 10px;
}

footer p.copyright {
  position: absolute;
  bottom: 10px;
  width: 100%;
  text-align: center;
  font-size: 0.9em;
  color: #666;
}
/* -------------------------Messages------------------------ */

.messages-container {
  font-family: Arial, sans-serif;
  background-color: #f4f4f9;
  margin: 0;
  padding: 0;
  position: relative;
}

.conversation-header {
  font-size: 1.5em;
  color: #333;
  margin: 20px;
  text-align: center;
}

.messages-list {
  list-style: none;
  padding: 0;
  margin: 20px auto;
  width: 90vw;
  max-height: 430px;
  overflow: auto;
}

.message-item.received {
  background-color: #e0f7fa; 
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin: 10px auto; /* Centré */
  max-width: 75%; 
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message-item.sent {
  background-color: #c8e6c9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin: 10px auto;
  max-width: 75%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message-writer {
  font-weight: bold;
  color: #333;
}

.message-content {
  display: block;
  font-size: 1em;
  color: #555;
  margin-top: 5px;
}

.message-date {
  display: block;
  font-size: 0.8em;
  color: #888;
  margin-top: 5px;
  text-align: right;
}

.form-group,
.form-input {
  margin: 20px auto;
  width: 70%;
}

.form-group label {
  font-size: 1em;
  color: #333;
  font-weight: bold;
}

.form-input textarea {
  width: 100%;
  height: 80px;
  padding: 10px;
  font-size: 1em;
  border: 1px solid #ddd;
  border-radius: 5px;
  resize: none;
}

.navigation-msg {
  position: absolute;
}

.submit-button {
  display: block;
  width: 100%;
  max-width: 150px;
  margin: 10px auto;
  padding: 10px 15px;
  background-color: #4caf50;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  font-weight: bold;
  transition: background-color 0.3s;
}

.submit-button:hover {
  background-color: #45a049;
}

/* -------------------- notification --------------------------------*/
.alert-container {
  position: relative;
  max-width: 400px;
  margin: 10px auto;
  padding: 15px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  font-family: Arial, sans-serif;
  transition: all 0.3s ease;
}

.alert-container.success {
  background-color: #d4edda;
  border-left: 6px solid #28a745;
}

.alert-container.error {
  background-color: #f8d7da;
  border-left: 6px solid #dc3545;
}

.alert-content {
  flex: 1;
  margin-right: 10px;
}

.alert-title {
  font-weight: bold;
  font-size: 1.1em;
  color: #155724;
}

.alert-container.error .alert-title {
  color: #721c24;
}

.alert-message {
  font-size: 0.95em;
  color: #155724;
}

.alert-container.error .alert-message {
  color: #721c24;
}

.alert-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.close-icon {
  width: 20px;
  height: 20px;
  fill: #155724;
  transition: fill 0.2s ease;
}

.alert-container.error .close-icon {
  fill: #721c24;
}

.alert-close:hover .close-icon {
  fill: #000;
}

/* ----------------------Mobile------------------------ */

@media (max-width: 576px) {
  header {
    width: 100%;
    display: flex;
    justify-content: space-around;
  }

  .navbar {
    display: none;
    position: absolute;
    top: 83px;
    /* right: 20px; */
    background-color: #333;
    flex-direction: column;
    padding: 10px;
    border-radius: 5px;
    width: 100%;
    height: 350px;
    margin: 0;
  }

  .img-profil {
    padding-left: 0;
  }

  .navbar a {
    padding: 10px 0;
    color: white;
    text-decoration: none;
  }

  #burger {
    display: block;
    font-size: 24px;
    cursor: pointer;
    color: white;
  }

  .navbar.open {
    display: flex;
  }

  /* ---------------Banner Style---------------------- */
  p.welcome {
    font-size: 20px;
  }

  .welcome {
    margin-left: 15px;
  }

  /* ---------------Home style------------- */
  main {
    margin-top: 50px;
    width: 98%;
    margin-left: 10px;
  }

  .hreflogo {
    width: 60%;
  }

  .logo {
    width: 70%;
  }

  .logo-name {
    width: 95%;
  }

  .logo-design {
    width: 26%;
  }

  .about {
    margin-left: 20px;
  }
  .introduction {
    grid-template-columns: 1fr;
    margin-left: 20px;
  }

  .img-about-display {
    display: none;
  }

  .how-it-works {
    margin-top: 5px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr 1fr 1fr;
    column-gap: 0;
    row-gap: 100px;
  }

  .step-one {
    grid-column: 1;
    grid-row: 1;
  }

  .step-two {
    grid-column: 1;
    grid-row: 2;
  }

  .step-three {
    grid-column: 1;
    grid-row: 3;
  }

  .step-four {
    grid-column: 1;
    grid-row: 4;
  }

  .about-text,
  .text-step-one,
  .text-step-two,
  .text-step-three,
  .text-step-four {
    margin-left: 20px;
  }

  .step-one-container,
  .step-two-container,
  .step-three-container,
  .step-four-container {
    display: flex;
    flex-direction: column;
  }

  /* -----------------------Announces style-------------- */
  @media (max-width: 576px) {
    .announces {
      margin-top: 20px;
      padding: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .titles {
      width: 90%;
      flex-direction: column;
      align-items: center;
      text-align: center;
      margin-bottom: 20px;
    }

    .listings-title {
      font-size: 1.2em;
      margin-bottom: 10px;
    }

    .listings-options {
      display: flex;
      flex-direction: row;
      justify-content: center;
      width: 100%;
    }

    .add {
      padding: 8px 12px;
      font-size: 0.9em;
    }

    .filter-listings {
      left: 80%;
      z-index: 1;
    }

    .svg-icon {
      width: 25px;
      height: 25px;
    }

    .grid {
      width: 70%;
      display: grid;
      grid-template-columns: 1fr;
      gap: 20px;
    }

    .navigation {
      width: 100%;
      margin-top: 15px;
      display: flex;
      justify-content: center;
    }
  }

  /* ------------------------choose--------------------------- */
  .why-choose-section {
    width: 100%;
    height: 1500px;
  }

  .top-choose {
    justify-items: center;
  }

  .bottom-choose {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .choose-box-one,
  .choose-box-two,
  .choose-box-three,
  .choose-box-four {
    width: 80%;
    margin: 10px;
  }

  .footer {
    flex-direction: column;
    align-items: center;
  }

  .footer-section {
    max-width: 100%;
    text-align: center;
  }

  .logo-design-footer,
  .logo-name-footer {
    width: 100px; 
    height: auto;
  }

  .social-icons {
    margin-top: 10px;
  }

  .social-icons a {
    width: 25px;
    height: 25px;
    line-height: 25px;
    margin: 0 5px;
  }

  .quick-links ul li a,
  .contact p,
  .newsletter p {
    font-size: 13px; 
  }

  .newsletter form {
    width: 100%; 
  }

  .newsletter input[type="email"] {
    font-size: 12px;
  }

  .newsletter button {
    font-size: 14px;
    padding: 8px;
  }
}
