#documents-library {
  padding-top: 25px;
  background-color: white;
}

#documents-library article.inner {
  display: flex;
  position: relative;
}

#documents-library article.contents {
  display: flex;
  position: relative;
}

#documents-library .bg {
  position: absolute;
  top: 10%;
  left: 0%;
  width: 100%;
  pointer-events: none;
  z-index: 0;
  padding-top: 100%;
}

#documents-library .bg svg {
  position: absolute;
  top: 0%;
  left: 0%;
  width: 100% !important;
  height: 100% !important;
}

#documents-library .bg svg path {
  stroke: var(--light-blue) !important;
  fill: var(--light-blue) !important;
  stroke-width: 3px !important;
  transition: all 500ms;
}

#documents-library-form .d-flex {
  gap: 30px;
}

/*
#documents-library-form .form-select-wrapper {
  width: 300px;
  max-width: 90%;
}


#documents-library-form .form-select {
  border-top: none;
  border-left: none;
  border-right: none;
  border-radius: 0 !important;
  border-bottom: 2px solid var(--purple) !important;
  font-size: 1.2rem;
}
*/

#documents-library-loading {
  transition: all 500ms;
  max-width: 70%;
  width: 400px;
  margin: auto;
  display: none;
  opacity: 0.5;
}

#documents-library-loading .progress {
  filter: grayscale(1);
}

#documents-library-categories-small,
.selected-category-mobile {
  display: none !important;
  /* 23/06/2025 */
}

#documents-library-form label.filter {}


#documents-library-filters label.filter-category {
  display: none;
}

#documents-library-filters {
  min-height: 15px;
}

@media screen and (min-width: 768px) {
  #documents-library-categories-small {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    justify-content: center;
    padding-top: 25px;
  }

  #documents-library-categories-small .category {
    display: flex;
    flex-direction: column;
    position: relative;
    aspect-ratio: 1;
    margin-bottom: 40px;
    font-size: 0.9rem;
  }

  #documents-library-categories-small .category.all {
    display: none !important
  }

  #documents-library-categories-small .selected {
    transform: scale(1.1);
    z-index: 100;
  }

  #documents-library-categories-small .selected svg path {
    stroke: var(--pink) !important;
    fill: var(--pink) !important;
  }

  #documents-library-categories-small .category .picture {
    position: relative;
    aspect-ratio: 1;
    margin-top: -40%;
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: center;
  }

  #documents-library-categories-small .category .picture img {
    max-width: 90%;
  }

  #documents-library-categories-small .category .title {
    position: relative;
    text-align: center;
    padding: 0 5px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-top: -5px;
    color: var(--blue);
  }
}

@media screen and (min-width: 768px) and (min-width: 1200px) {
  #documents-library-categories-small .category {
    flex: 0 0 calc(11% - 15px)
  }

  #documents-library-categories-small .category .title {
    font-size: 0.8rem;
    padding: 0 10px;
    line-height: 1.2;
    margin-top: 0;
  }
}

@media screen and (min-width: 768px) and (max-width: 1199px) {
  #documents-library-categories-small .category {
    flex: 0 0 calc(20% - 20px);
    max-width: 220px;
    margin-top: 5px;
  }
}

@media screen and (min-width: 768px) and (max-width: 991px) {
  #documents-library-categories-small {
    gap: 10px;
  }

  #documents-library-categories-small .category {
    flex: 0 0 calc(20% - 10px);
  }

  #documents-library-categories-small .selected {
    transform: scale(1.1);
  }
}

@media screen and (max-width: 767px) {


  .selected-category-mobile {
    border-bottom: 2px solid var(--purple);
    padding-bottom: 7px;
  }


  .selected-category-mobile .fa-xmark {
    display: none;
  }

  .show .selected-category-mobile .fa-xmark {
    display: inline-block;
  }

  .show .selected-category-mobile .fa-chevron-down {
    display: none;
  }

  .selected-category-mobile .title {
    font-size: 1.4rem;
    color: var(--purple);
    font-weight: bold;
  }


  #documents-library-categories-small {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    max-height: 0;
    display: block;
    transition: all 300ms;
    overflow: hidden;
    background-color: #fafafa;
    z-index: 1000;
    user-select: none;
    padding: 0 5px;
  }

  .show #documents-library-categories-small {
    overflow-y: scroll;
    max-height: 400px;
    padding: 5px 5px 25px;
  }

  #documents-library-categories-small li:first-child {
    margin-top: 10px;
  }

  #documents-library-categories-small li {
    border-bottom: 1px dotted #eee;
    background-color: #fafafa;
  }

  #documents-library-categories-small li:hover {
    background-color: #ffffff;
  }

  #documents-library-categories-small li,
  .selected-category-mobile .category {
    position: relative;
    display: flex;
    justify-content: start;
    align-items: center;
    gap: 15px;
    padding: 2px 0;
  }

  #documents-library-categories-small li.selected {}

  #documents-library-categories-small .bg,
  #documents-library .selected-category-mobile .category .bg {
    top: 0;
    width: 70px;
    height: 70px;
    padding-top: 0;
  }

  #documents-library-categories-small .picture,
  .selected-category-mobile .picture {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    position: relative;
    /*
    background-color: var(--light-blue);
    
    border-radius: 50%;
    */
    aspect-ratio: 1;
  }

  #documents-library-categories-small li.selected .bg,
  .selected-category-mobile .category .bg {
    filter: var(--pink-filter);
  }

  #documents-library-categories-small .picture img,
  .selected-category-mobile .picture img {
    max-width: 50px;
    max-height: 60px;
  }

  #documents-library-categories-small .title {
    font-size: 1.3rem;
    color: var(--blue);
  }

  #documents-library-categories-small .title a {
    color: inherit
  }

}

#documents-library .selected-category-description {
  padding: 0 0 35px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  max-width: 900px;
  margin: 0 auto;
}

#documents-library-categories {
  /* padding: 5rem 0rem 0; */
}

#documents-library-categories ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5%;
  justify-content: center;
}

#documents-library-categories li {
  padding: 0 0 0 0;
  margin: 0 0 0 0;
  width: calc(20%);
  aspect-ratio: 1;
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all 500ms;
}

#documents-library-categories li img {
  display: block;
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translate(-50%, -35%);
  z-index: 1;
  height: 70% !important;
  width: auto !important;
  transition: all 500ms;
}

#documents-library-categories li:hover img {
  /*
  top: 00px;
  height: 180px !important;
  */
}

#documents-library-categories li .content {
  z-index: 1;
  position: relative;
  padding: 0 10%;
  font-size: 1.3rem;
  display: block;
  position: absolute;
  top: 50%;
  left: 0%;
  width: 100%;
  height: 50%;
  z-index: 1;
  border: 0px solid black;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: 500ms;
}

#documents-library-categories li .title {
  opacity: 1;
  padding-bottom: 10px;
}

#documents-library-categories li h3 {
  font-size: 1.2rem;
  padding: 0;
  margin: 0;
  color: var(--blue);
}

#documents-library-categories li .text {
  font-size: 0.85rem;
  padding: 0% 5% 0%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 1;
  max-height: 0;
  overflow: hidden;
}

#documents-library-categories li a {}

#documents-library-categories li:hover {
  z-index: 100;
  transform: scale(1.05);
}

#documents-library-categories li:hover .title h3 {}

#documents-library-categories li:hover .title .plus {
  /* display: none; */
}

#documents-library-categories li:hover .text {
  display: none;
  max-height: 1000px;
  color: #000;
}

#documents-library-categories li:hover .bg svg path {}

#documents-library-no-results {
  max-width: 600px;
  width: 90%;
  background-color: #fdfdfd;
  color: var(--purple);
  border-radius: 35px;
  border: 0px solid var(--blue);
  margin-left: auto;
  margin-right: auto;
}

#documents-library-no-results i {
  opacity: 0.9;
}

@media screen and (max-width: 1199px) {
  #documents-library-categories ul {
    gap: 2%
  }

  #documents-library-categories li {
    width: calc(23%);
  }

  #documents-library-categories li .content {
    padding: 0 10%;
    font-size: 1.2rem;
    top: 60%;
    left: 0%;
    width: 100%;
    height: 35%;
  }

  #documents-library-categories li .btn {
    padding: .275rem .75rem;
  }

  #documents-library-categories li h3 {
    font-size: 1.1rem;
  }
}

@media screen and (max-width: 991px) {
  #documents-library-categories ul {
    gap: 2%
  }

  #documents-library-categories li {
    width: calc(31%);
  }

  #documents-library-categories li .content {
    font-size: 1.1rem;
    top: 55%;
    left: 0%;
    width: 100%;
    height: 35%;
  }

  #documents-library-categories li .btn {
    padding: .2rem .75rem;
  }

  #documents-library-categories li h3 {
    font-size: 1.1rem;
  }
}

@media screen and (max-width: 767px) {
  #documents-library-categories ul {
    gap: 2%
  }

  #documents-library-categories li {
    width: calc(31%);
  }

  #documents-library-categories li .content {
    font-size: 0.95rem;
    top: 55%;
    left: 0%;
    width: 100%;
    height: 35%;
  }

  #documents-library-categories li .btn {
    padding: .2rem .75rem;
  }

  #documents-library-categories li h3 {
    font-size: 1.1rem;
  }
}

/*
@media screen and (min-width: 576px) {
  #documents-library-form .d-flex>div {
    flex: 0 0 300px;
    max-width: calc(48%);
  }
}
*/
@media screen and (max-width:575px) {
  #documents-library-categories ul {
    gap: 2%
  }

  #documents-library-categories li {
    width: calc(48%);
  }

  #documents-library-categories li .content {
    font-size: 0.95rem;
    top: 55%;
    left: 0%;
    width: 100%;
    height: 35%;
  }

  #documents-library-categories li .btn {
    padding: .2rem .75rem;
  }

  #documents-library-categories li h3 {
    font-size: 1.1rem;
  }
}

@media screen and (max-width:400px) {
  #documents-library-categories ul {
    gap: 2%
  }

  #documents-library-categories li {
    width: calc(98%);
  }

  #documents-library-categories li .content {
    font-size: 0.95rem;
    top: 40%;
    left: 0%;
    width: 100%;
    height: 55%;
  }

  #documents-library-categories li .btn {
    padding: .375rem .75rem;
  }

  #documents-library-categories li h3 {
    font-size: 1rem;
    margin-bottom: 15px;
  }

  #documents-library-filters label.filter {
    font-size: 1.1rem;
  }

}

#documents-library-controls {
  opacity: 0
}

/* etat de #documents-library */
#documents-library-loading,
#documents-library-no-results,
#documents-library-results,
#documents-library-documents {
  display: none;
}

#documents-library-categories {
  display: block;
}

.search-performing #documents-library-loading {
  display: none;
}

.search-performing #documents-library-categories,
.search-successfull #documents-library-categories,
.search-no-results #documents-library-categories {
  display: none;
  ;
}

.search-successfull #documents-library-form,
.search-successfull #documents-library-filters-bloc,
.search-successfull #documents-library-results,
.search-successfull #documents-library-documents {
  display: block;
  ;
}

.search-no-results #documents-library-filters-bloc {
  display: block;
}

.search-no-results #documents-library-form,
.search-no-results #documents-library-no-results {
  display: block;
  ;
}

#documents-library.step-2 {}