.sidebar {
  position: relative;
  width: 22%;
  height: max-content;
  background-color: #0f172a;
  color: white;
  padding: 15px;
  margin-left: 1%;
  margin-top: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  border-right: 1px solid #ccc;
}


.container {
  display: flex;
  gap: 20px;
}


.search-bar input {
  width: fit-content;
  padding: 6px;
  border: none;
  border-radius: 4px;
  margin-bottom: 15px;
}


/*********************** style de filtre ****************************/

.category {
  margin-bottom: 10px;
}

.category .types {
  width: 95%;
  background-color: #11245e;
  color: white;
  padding: 8px;
  border: none;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.237);
}

.category .filters .types {
  margin-top: 10px;
  background-color: #081330;
}

.filters {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding-left: 10px;
  margin-top: 10px;
  font-size: 13px;
  padding-bottom: 5px;
}

.filters label {
  display: block;
  margin: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.874);
  border-radius: 10px;
  cursor: pointer;
  margin-top: 10px;
  padding-left: 10px;
  padding-top: 10px;
  transition: 0.1s ease;
}

.filters label:hover {
  border-bottom: 3px solid rgba(255, 255, 255, 0.874);
}



/******************* style des resultats *******************/

.main {
  flex-grow: 1;
  padding: 30px;
}

#results {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  /*animation: up 0.5s ease forwards;*/
}

@keyframes up {
  0% {
    opacity: 0;
    transform: translateY(100px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1068px) {
  .container {
    display: block;
  }

  .sidebar {
    width: auto;
  }

  #results {
    grid-template-columns: 1fr;
  }
}


.result-item {
  border: 1px solid #ccc;
  padding: 10px;
  background: #f9f9f9;
}

:root {
  --color-muted: #a4a4a4;
  --color-text: #2b2d29;
}

.card {
  display: flex;
  flex-direction: column;
  position: relative;
  background: #ffffff;
  box-shadow: 0 20px 50px rgb(0 0 0 / 8%);
  border-radius: 36px;
  padding: auto;
  width: 100%;
  border: solid rgba(0, 0, 0, 0.466);
}

.image {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  object-fit: cover;
  border-radius: 28px;
}

.content {
  position: relative;
  z-index: 1;
  padding: 200px 32px 32px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.594), rgba(0, 0, 0, 0.53), rgba(0, 0, 0, 0.169), rgba(0, 0, 0, 0));
  color: #f9f9f9;
}


.buttons {
  display: flex;
  gap: 8px;
}

.primary-btn {
  width: 100%;
  border: 0;
  background: #ffffff;
  color: black;
  font-family: inherit;
  border-radius: 32px;
  padding: 0 24px;
  height: 48px;
  font-size: 15px;
  cursor: pointer;
  transition: 0.5s ease;
}

.primary-btn:hover {
  background-color: #F97316;
  color: white;
}

.primary-btns{
  background: rgb(36, 89, 212);
  width: 100%;
  border: 0;
  color: black;
  font-family: inherit;
  border-radius: 32px;
  padding: 0 24px;
  height: 48px;
  font-size: 15px;
  cursor: pointer;
  transition: 0.5s ease;
}

.primary-btns:hover {
  background-color: #F97316;
  color: white;
}


.item {
  display: flex;
  gap: 4px;
  align-items: center;
  animation: up 0.5s ease forwards;
}


.button_filtre {
  background-color: #ff6a00;
  /* vert succès */
  padding: 5px;
  color: white;
  border: none;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.button_filtre:hover {
  background-color: #ff6a00b9;
  /* vert succès */
}


@media (width >=1840px) {

  p {
    white-space: inherit;
    margin-bottom: 24px;
  }

  .card {
    max-width: 700px;
    padding: 24px 16px;
    flex-direction: row;
  }

  .image {
    position: static;
    width: 50%;
    min-width: 50%;
    margin-left: -56px;
    align-self: stretch;
    box-shadow: 0 20px 50px rgb(0 0 0 / 8%);
  }

  .content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 auto;
    background: transparent;
    color: var(--color-text);
    padding-top: 0;
    padding-bottom: 0;
  }


}



/************************** style en savoir plus **************************/

body.no-scroll {
  overflow: hidden;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9998;
}

.overlay-content {
  position: relative;
  background-color: white;
  padding: 20px;
  border-radius: 12px;
  max-width: 1000px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE 10+ */
  -webkit-overflow-scrolling: touch;
  /* iOS pour scroll fluide */
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  z-index: 9999;
}

.overlay-content::-webkit-scrollbar {
  display: none;
  /* Chrome, Brave, Edge, Safari, Opera */
}


.close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
}


.read-more {
  all: unset;
  font-size: 14px;
  display: inline-block;
  margin-bottom: 40px;
  color: #f9f9f9;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;

}

.read-more::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: white;
  transition: width 0.3s ease;
}

.read-more:hover {
  color: orange;
  text-decoration-color: white;
}

.read-more:hover::after {
  width: 100%;
}

.produit_card {
  max-width: 900px;
  margin: 20px auto;
  padding: 20px;
  font-family: Arial, sans-serif;
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  max-height: 100vh;
  height: fit-content;
}

.produit_image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.produit_details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.titre_detail {
  margin: 0;
  font-size: 14px;
  color: #555;
}

.produit_details p {
  margin: 0 0 10px;
  font-weight: bold;
  color: #222;
}

.produit_title {
  grid-column: 1 / -1;
  font-size: 24px;
  margin-bottom: 10px;
}




@media (max-width : 1068px) {
  .overlay {
    position: fixed;
    top: 0;
    left: -10px;
    right: 10px;
    width: 100dvw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    padding: 10px;
    /* Ajouté pour éviter débordement sur petits écrans */
  }

  .overlay-content {
    position: relative;
    background-color: white;
    padding: 16px;
    border-radius: 12px;
    max-width: 450px;
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
  }

  .overlay-content::-webkit-scrollbar {
    display: none;
  }

  .close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    cursor: pointer;
  }


  .produit_card {
    flex-direction: column;
    padding: 16px;
    display: block;
    background-color: #5c85f600;
    box-shadow: none;

  }

  .produit_image {
    width: 100%;
    height: auto;
    margin-bottom: 16px;
  }

  .produit_title {
    font-size: 20px;
    text-align: center;
  }

  .titre_detail {
    font-size: 14px;
  }

  .produit_details p {
    font-size: 14px;
  }

  .produit_details {
    padding-bottom: 50px;
  }

}