/****** Général ******/
/* Le css dans cette section est applicable partout dans Totem */

html * {
  font-family: var(--totem-font-text);
  font-size: 1.2rem;
}

:root {
  --filter-searchbar-width: 375px;

  --totem-color-primary: #5fba46;
  --totem-color-text: white;

  --totem-font-title: "Poppins";
  --totem-font-text: "Poppins";

  --totem-green-rgb: 95, 186, 70;
  --totem-green: #5fba46;
}

::selection {
  background-color: var(--totem-color-highlight-color);
  color: var(--totem-color-text-on-highlight);
}

.crx-webpage {
  height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
}

body {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  color: var(--totem-color-text-on-primary-1);
  background-color: var(--totem-color-page-bg);
}

.totem-color-primary-1-1 {
  color: var(--totem-color-text-on-primary-1);
  background-color: var(--totem-color-page-bg);
}

.totem-color-primary-2-1 {
  color: var(--totem-color-text-on-primary-2);
  background-color: var(--totem-color-page-bg);
}

.totem-color-secondary-1-1 {
  color: var(--totem-color-text-on-widget);
  background-color: var(--totem-color-widget-bg-1);
}

.totem-color-highlight {
  color: var(--totem-color-text-on-highlight);
  background-color: var(--totem-color-highlight-color);
}

h1,
h1 span {
  font-size: 2rem;
  font-family: var(--totem-font-title);
  font-weight: bold;
}

h2 {
  font-size: 2rem;
  font-family: var(--totem-font-title);
  font-weight: normal;
}

th {
  font-size: 1.2rem;
  font-family: var(--totem-font-title);
  font-weight: bold;
}

a {
  color: var(--totem-color-text-on-primary-2);
  font-weight: 400;
  text-decoration: underline dotted var(--totem-color-text-on-primary-1);

  &:hover {
    text-decoration: underline dotted;
  }
}

.hidden {
  display: none !important;
}

input,
select {
  padding: 10px 25px 10px 20px;
  line-height: 1.5;
  border: var(--bs-border-width) solid;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--totem-color-highlight-color) !important;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 4px var(--totem-color-highlight-color);
  outline: 0 none;
}

.loader {
  border: 16px solid white;
  border-top: 16px solid var(--totem-green);
  border-radius: 50%;
  width: 120px;
  height: 120px;
  animation: spin 2s linear infinite;
}

.disabled {
  pointer-events: none !important;
  opacity: 0.5 !important;
}

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

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



svg {
  width: auto;
  height: auto;

  &:not(.colored-svg) path {
    /* La classe colored-svg doit être ajoutée aux cas spéciaux dont les couleurs sont définies dans le SVG */
    /* couleur par défaut : l'inverse de la couleur de background de la page (blanc) */
    fill: var(--totem-color-text-on-primary-1);
  }
}

.totem-btn-primary {
  opacity: 0.8;
  font-weight: bold;
  text-decoration: none;
  color: var(--totem-color-text-on-highlight);
  background-color: var(--totem-color-highlight-color);
  border: 1px solid var(--totem-color-highlight-color);
  padding: 0.7rem 2rem;
  border-radius: 50px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  width: fit-content;

  & svg path {
    opacity: 0.8;
    fill: var(--totem-color-text-on-highlight);
  }
}

.totem-btn-primary:hover {
  opacity: 1.0;
  text-decoration: none;

  & svg path {
    opacity: 1.0;
  }
}

.totem-btn-secondary {
  font-weight: bold;
  text-decoration: none;
  color: var(--totem-color-text-on-widget);
  background-color: var(--totem-color-widget-bg-1);
  border: 1px solid var(--totem-color-widget-bg-1);
  padding: 10px 35px 10px 35px;
  border-radius: 50px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  width: fit-content;

  & svg path {
    fill: var(--totem-color-text-on-widget);
  }
}

.totem-btn-secondary:hover {
  background-color: var(--totem-color-widget-bg-2);
  border: 1px solid var(--totem-color-widget-bg-2);
  text-decoration: none;

  & svg path {
    fill: var(--totem-color-text-on-widget);
  }
}

.totem-btn-tertiary {
  text-decoration: none;
  color: var(--totem-color-text-on-primary-1);
  background-color: var(--totem-color-page-bg);
  border: 1px solid var(--totem-color-text-on-primary-1);
  padding: 10px 35px 10px 35px;
  border-radius: 50px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  width: fit-content;
}

.totem-btn-tertiary:hover {
  background-color: var(--totem-color-navbar-bg);
  text-decoration: none;
}

.totem-btn-cancel {
  font-weight: bold;
  text-decoration: none;
  color: white;
  background-color: #800000;
  border: 1px solid #800000;
  padding: 10px 35px 10px 35px;
  border-radius: 50px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  width: fit-content;
}

.totem-btn-cancel:hover {
  color: white;
  text-decoration: none;
}

.modal-content {
  border-color: var(--totem-color-text-on-widget);

  & svg:not(.colored-svg) path {
    fill: var(--totem-color-text-on-widget);
  }
}

/*********************************** Général *************************************/

.record-itemtype {
  font-style: italic;
}


/****** Totem select *****/

body .totem-select {
  position: relative;
  width: 100%;
  height: min-content;
  border: 1px solid;

  & .selected-option {
    box-sizing: content-box;
    min-height: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    padding: 10px 25px 10px 20px;
  }

  & .options {
    position: absolute;
    display: none;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow: auto;
    border: 1px solid;
    z-index: 10;

    & .option {
      display: block;
      cursor: pointer;
      padding: 10px 25px 10px 20px;

      text-decoration: none;
    }
  }
}

body .totem-select.open .options {
  display: block;
  z-index: 100;
}

body .totem-select {
  color: var(--totem-color-text-on-primary-1);
  background-color: var(--totem-color-page-bg);

  & .selected-option svg path {
    fill: var(--totem-color-text-on-primary-1);
  }

  & .options {
    background-color: var(--totem-color-page-bg);

    & .option:hover,
    & .option.selected {
      background-color: var(--totem-color-navbar-bg);
    }
  }
}

/****** Double sided slider *****/

.double-range-slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0.5em 0.5em 0.5em;

    & .dynamic-slider-value-container{
      display: flex;
      flex-direction: column;
      gap:1em;
      margin-top: 1rem;
      width: 100%;
      margin-left: 40px;

      & .dynamic-slider-text-fields{
        display: flex;
        gap: 0.4em;
        align-items: center;
        justify-content: flex-start;
        width: 100%;

        & input[type="text"].dynamic-value {
          padding: unset;
          height: fit-content;
          text-align: center;
          font-size: 15px;
          width: 3.3em;
        }
      }

      & .slider-btn {
        border: 1px solid white;
        width: 8.5em;
        align-self: baseline;
      }
    }



  .double-sided-slider-div {
    display: grid;
    grid-template-columns: min-content minmax(50%, 100%) min-content;
    justify-content: center;
    gap: 0.4em;
    align-items: center;
    width: 100%;

    & .range-label{
      height: 90%;
    }


    & .double-sided-slider-container {
      height: 2px;
      position: relative;
      background-color: white;
      border-radius: 30px;

      & .colored-slider {
        height: 9px;
        position: absolute;
        border-radius: 20px;
        background-color: var(--totem-color-highlight-color);
        transform: translateY(-38%);
      }

      & input[type="range"] {
        height: 0.8em;
        position: absolute;
        background: none;
        pointer-events: none;
        top: 50%;
        transform: translateY(-50%);
        -webkit-appearance: none;
        -moz-appearance: none;
        padding: unset;
        border: unset;
      }

      & input[type="range"]:focus {
        border-color: unset;
        box-shadow: unset;
        outline: unset;
        border: unset;
      }

      & input[type="range"]::-webkit-slider-thumb {
        height: 11px;
        width: 11px;
        border-radius: 50%;
        border: 2px solid white;
        background-color: var(--totem-color-highlight-color);
        pointer-events: auto;
        -webkit-appearance: none;
        cursor: col-resize;
        margin-bottom: 1px;
      }

      & input[type="range"]::-moz-range-thumb {
        height: 11px;
        width: 11px;
        border-radius: 50%;
        border: 2px solid white;
        background-color: var(--totem-color-highlight-color);
        pointer-events: auto;
        -moz-appearance: none;
        cursor: col-resize;
      }
    }
  }
}
/****** Double sided slider end *****/

/* Stackmap */
.SMButton.SMsearchbtn {
  background-color: var(--totem-color-highlight-color);
  border-radius: 20px;
  padding: 0.5em 1em;
  box-shadow: none;
  text-shadow: none;
}

.SMButton.SMsearchbtn:hover,
.SMButton.SMsearchbtn:active {
  background-color: var(--totem-color-highlight-color);
}

/* Stackmap */


/* SSO */
.sso-btn-container {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;

  & a {
    color: black;
    text-decoration: none;

    .social-btn {
      height: min-content;
      border: 1px solid black;
      border-radius: 6px;
      padding: 10px;
      background-color: transparent;
      display: flex;
      align-items: center;
      gap: 0.5rem;

      & .oidc-logo {
        width: 24px;
        height: 24px;
      }

      & .oidc-text {
        font-size: smaller;
      }
    }
  }
}
/* SSO */

/*************** Réinitialisation du mot de passe ****************/

.reset-password-key-container {
  gap: 25px;
  border: #161616 1px solid;
  padding: 20px;
}

.reset-pwd-key-fieldset {
  display: flex;
  gap: 15px;
  margin: 5px 0;
  justify-content: space-between;
  align-items: center;
}

.forgot-pwd-button, .create-account-button {
  cursor: pointer;
  text-decoration: none;
  background-color: inherit;
  color: var(--totem-color-text-on-widget);
}

.forgot-pwd-button:hover, .create-account-button:hover {
  color: var(--totem-color-highlight-color);
}

.login-container .forgot-pwd-button,
.login-container .create-account-button {
  color: #0d6efd;
  text-decoration: none;
}

.login-container .forgot-pwd-button:hover,
.login-container .create-account-button:hover {
  color: var(--totem-color-text-on-primary-1);
}

.info-reset-pwd {
  word-wrap: break-word;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow-y: hidden;
  text-overflow: ellipsis;
}
/*************** Réinitialisation du mot de passe ****************/


/*************** Suggestion / autocomplete automatique des recherches ****************/
& #searchbar-container {
  position: relative;
  height: fit-content;
  padding: 2em;
  background-color: var(--totem-color-widget-bg-1);

  fieldset path {
    fill: var(--totem-color-text-on-primary-1);
  }

  path {
    fill: var(--totem-color-text-on-widget);
  }

  a {
    color: var(--totem-color-text-on-widget);
  }

  & .nav-search-links {
    width: max-content;
  }
}



#autocomplete-container {
  display: flex;
  padding: 20px;
  padding-bottom: 30px;
  background: rgba(0, 0, 0, 0.85);
  color: white;

  & .did-you-mean {
    cursor: pointer;
    display: flex;
    gap: 10px;

    & a {
      color: white;
      text-decoration: none;
    }

    & a:hover {
      color: var(--totem-color-highlight-color);
    }
  }

  & .autocompletes {
    width: 100%;
    display: flex;
    gap: 30px;
    flex-direction: row;

    & .sidebar {
      flex-basis: content;
      width: fit-content;

      & .nav {
        cursor: pointer;
      }

      & .selected {
        color: var(--totem-color-highlight-color);
        border-left: 4px solid var(--totem-color-highlight-color);
        box-sizing: border-box;
        margin-left: -16px;
        padding-left: 12px;
        font-weight: bold;
      }

      & .nav:hover {
        color: var(--totem-color-highlight-color);
      }
    }

    & .autocomplete {
      flex-grow: 1;
      display: flex;
      flex-direction: column;
      gap: 10px;
      max-height: 300px;
      overflow-y: scroll;

      & a {
        color: white;
        text-decoration: none;
      }

      & a:hover {
        color: var(--totem-color-highlight-color);
      }
    }

    & .book-autocomplete {
      & .record a {
        color: white;
        text-decoration: none;
        display: flex;
        gap: 10px;

        & img {
          width: 75px;
        }
      }

      & .record a:hover {
        color: var(--totem-color-highlight-color);
      }
    }
  }
}

#autocomplete-container.closed {
  display: none;
}
/***************** Suggestion automatique des recherches ***********************/


.record-title-responsability {
  font-size: 1.2rem;
  font-style: italic;
}

/* Element sur les records représentant l'ordre de priorité */
.priority-number {
  position: absolute;
  left: 0.60em;
  top: 0.80em;
  z-index: 1;
  color: black;
  font-size: 15px;
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.totem-btn-primary .priority-number {
  color: var(--totem-color-highlight-color);
}

.totem-btn-secondary .priority-number {
  color: white;
}

.popup-modal-container {
  --bs-modal-width: 38rem;
}

#change-password-modal {
  --bs-modal-width: 52rem;
}

#library-card-modal {
  --bs-modal-width: 50rem;
}

#show-source-modal {
  --bs-modal-width: fit-content;
}

.cancel-modal-btn,
.reset-modal-btn {
  color: var(--totem-color-text-on-widget);
  background-color: transparent;
  border: none;
}

.reset-modal-btn {
  display: flex;
  align-items: center;
  gap: 5px;
}

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

.popup {
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--totem-color-text-on-widget);
  background: var(--totem-color-widget-bg-1);
  border: 1px solid var(--totem-color-text-on-widget);
  z-index: 99;


  & .icon {
    cursor: pointer;
  }
}

.popup.closed {
  display: none;
}

.record-items-popup {
  & .items-container {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: scroll;
    max-height: 50vh;

    & .record-item {
      display: flex;
      justify-content: space-between;
      gap: 1rem;
      border-bottom: 1px solid var(--totem-color-text-on-primary-2);
      text-wrap: nowrap;

      & .record-copy-radio {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        flex-shrink: 0;
      }

      & .record-item-info {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      & .record-itemlocal_classification {
        display: block;
        margin-right: 1rem;
      }

      & .record-itemavailability {
        margin-top: 0.5rem;
        font-weight: bold;

        &.available {
          color: var(--totem-green);
        }
        &.unavailable {
          color: red;
        }
      }
    }
  }
}

.record-copy-radio > .record-copy-radio-input {
  width: 30px;
  height: 30px;
}

.btn-actions-hold {
  display: flex;
  gap: 10px;
}


.place-hold-popup {
  & .items-container {
    margin: 2rem 0 2rem 0;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-color: white;
    color: var(--totem-color-text-on-primary-1);
    max-height: 400px;
    overflow-y: auto;

    & .record-item {
      display: flex;
      justify-content: space-between;
      gap: 1rem;
      border-bottom: 1px solid black;

      & .record-copy-radio {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        flex-shrink: 0;
      }

      & .record-item-info {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      & .record-itemlocal_classification {
        display: block;
        margin-right: 1rem;
      }

      & .record-itemavailability {
        margin-top: 0.5rem;
        font-weight: bold;
        width: 80px;
        flex-shrink: 0;

        &.available {
          color: var(--totem-green);
        }
        &.unavailable {
          color: red;
        }
      }
    }
  }
}
/* Popup pour la réservation */

.add-to-list-popup {
  & .list-button {
    background-color: transparent;
    color: var(--totem-color-text-on-widget);
    display: flex;
    border-width: 0 0 1px 0;
    border-style: solid;
    border-color: var(--bs-gray-500);
    font-family: var(--totem-font-title);
    font-weight: bold;
    justify-content: space-between;
    padding: 10px;
    align-items: center;
    width: 100%;

    & .label-list {
      display: flex;
      text-align: start;
      column-gap: 10px;
      max-width: 85%;

      & .icon {
        width: 1.875rem;
      }

      & .plus-icon {
        padding: 7px;
      }
    }

    & .list-record-active {
      display: none;
    }

    & .icon-list-record-active {
      & svg {
        width: 20px;
      }
    }

    &.list-with-record {
      color: var(--totem-color-text-on-widget);

      & path {
        fill: var(--totem-color-text-on-widget);
      }
    }

    &:hover, &:focus {
      color: var(--totem-color-primary);

      & path {
        fill: var(--totem-color-primary);
      }
    }
  }

  & .favorite-list-button path {
    fill: var(--totem-color-text-on-widget);
  }
}


.record-title {
  font-family: var(--totem-font-title);
  font-weight: bold;
}

.list-name-label {
  color: var(--totem-color-text-on-widget);
  font-family: var(--totem-font-title);
  font-weight: bold;
}

.truncate-text-3-lines {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
}

/*** Popup d'avis des usagers ***/
.critique-popup {

  & svg {
    cursor: pointer;

    & path.active {
      fill: var(--totem-color-highlight-color);
    }
  }

  & textarea {
    resize: none;
    border: 1px solid var(--totem-color-text-on-primary-2);
  }

}

& .critique-button.active {
  & .inactive {
    display: none;
  }

  & path {
    fill: var(--totem-color-highlight-color);
  }
}

& .critique-button:not(.active) .active {
  display: none;
}

.write-critique[disabled] {
  pointer-events: none;
  opacity: 0.6;
}


/* Popup pour le changement de mdp */
.change-password-popup {
  & .password-input {
    display: flex;
    align-items: center;
    justify-content: end;

    & input {
      color: var(--totem-color-text-on-primary-1);
      background-color: var(--totem-color-page-bg);
      border: 1px solid var(--totem-color-text-on-primary-1);
      position: relative;
      width: 100%;
    }

    & button {
      position: absolute;
      margin-right: 15px;

      & svg path {
        fill: var(--totem-color-text-on-primary-1);
      }
    }
  }

  & .label {
    white-space: nowrap;
  }

  & .confirm-password-section {
    & .confirm-password-warning {
      color: red;
      font-size: 0.8rem;
    }

    & .new-password-warning {
      font-size: 0.8rem;
    }
  }
}

/* Adds a bit of spacing to "Responsive Grid Row" blocks. */
.crx-grid {
  padding-top: 40px;
  padding-bottom: 40px;
}

.crx-grid .crx-grid {
  padding-top: 0;
  padding-bottom: 0;
}

.add-remove-buttons {
  width: 1em;
  height: 1em;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin: auto 0.1em;
  background: transparent;
  border: 1px solid;
  border-radius: 0.2em;
}

.btn-problemreport {
  position: fixed;
  bottom: 10px;
  left: 10px;
  z-index: 90;
  opacity: 0.5;
  background-color: var(--totem-color-highlight-color);
  border: var(--totem-color-highlight-color);
  border-radius: 25px;
  padding: 10px 20px;
  color: var(--totem-color-text-on-highlight)
}

.btn-problemreport svg {
  width: 2rem;
  height: 2rem;
}

.btn-problemreport:hover {
  background-color: var(--totem-color-highlight-color);
  color: var(--totem-color-text-on-highlight);
  opacity: 0.9;
  text-decoration: none;
}

/* User card pop up in user account */

.library-card-popup {

  & .previous-button {
    position: absolute;
    left: 0;

    & svg path {
      fill: black;
    }
  }

  & .next-button {
    position: absolute;
    right: 0;

    & svg path {
      fill: black;
    }
  }

  & .library-card-header {
    background-color: white;
    padding-bottom: 0;

    button {
      align-self: center;
    }
  }

  & .library-card-body {
    .info-space {
      height: 100%;
    }
    padding: 0;
  }

  & .logo-space {
    max-height: 4em;
    & img {
      max-width: 10em;
      max-height: 4em;
      float: left;
    }
  }

  & .library-card {
    color: black;
    background-color: white;

    & .inner-card {
      & .top-info {
        & img {
          max-width: 300px;
          max-height: 300px;
          object-fit: contain;
        }
      }
    }
  }

  & .library-card:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    border-bottom: 30px solid var(--totem-color-highlight-color);
    border-left: 30px solid var(--totem-color-highlight-color);
    border-right: 30px solid var(--totem-color-highlight-color);
    height: 15%;
    width: 100%;
  }

}

/* Record info popup */

.record-info-popup {
  display: flex;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  width: min-content;
  padding: 7px;
  background-color: var(--totem-color-page-bg);

  & .img-container {
    position: relative;
    width: fit-content;
  }

  & .img-wrapper {
    position: relative;
  }

  & .record-cover {
    height: 360px;
  }

  & .record-title {
    font-family: var(--totem-font-title);
    font-weight: bold;
  }

  & .record-itemtype {
    font-style: italic;
    color: var(--totem-color-text-on-primary-2);
  }

  & .record-link {
    text-decoration: none;
  }

  & .record-author {
    color: var(--totem-color-text-on-primary-2);
  }

  & .available-banner {
    position: absolute;
    width: 100%;
    height: 60px;
    padding: 15px 20px 15px 20px;
    background-color: var(--totem-color-highlight-color);
    opacity: 0.9;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--totem-color-text-on-highlight);
    display: flex;
    justify-content: space-between;
    bottom: 0;
    user-select: none;

    & .favorite-button {
      cursor: pointer;
      text-decoration: none;
      color: var(--totem-color-text-on-highlight);

      & .favorite-icon {
        pointer-events: none;
        height: 30px;
      }
    }

  }

  & .hold-banner {
    position: absolute;
    width: 100%;
    height: 60px;
    padding: 15px 20px 15px 20px;
    background: rgba(0, 0, 0, 0.9);
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    display: flex;
    justify-content: flex-end;
    bottom: 0;
    user-select: none;

    & .place-hold-button {
      white-space: nowrap;
      margin-right: auto;
    }
  }

  & .favorite-button {
    cursor: pointer;
    text-decoration: none;
    color: white;

    & .favorite-icon {
      pointer-events: none;
      height: 30px;
    }
  }

  & .place-hold-button {
    cursor: pointer;
    text-decoration: none;
    color: white;

    & .place-hold-icon {
      pointer-events: none;
      height: 30px;
    }
  }
}

.popup-anim {
  animation: fade-out 0.2s linear;
}

.nav-search-link {
  font-size: 1rem;
  text-decoration: none;
}

/* Record info popup */

/* Cantook */
.cantook-info-section-img {
  max-width: 100%;
}

.cantook-info-section {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-left: 5rem;

  & .available-number {
    font-size: xxx-large;
  }

  & .loan-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;

    & .loan-subtext2 {
      display: flex;
      align-items: center;
      line-height: 1;
    }
  }
}

a.cantook-link {
  color: white;
  text-decoration: none;
}
a.cantook-link:hover {
  text-decoration: underline;
}
/* Cantook */

/* Affichage mobile */
@media only screen and (max-width: 1000px) {
  #autocomplete-container {
    & .autocompletes {
      flex-direction: column;
    }
  }

  #records-by-author {
    margin-top: 35px;

    & h2 {
      font-size: 1.2rem;
    }
  }

  .filters-icon {
    padding-left: 2rem;
    padding-right: 15px;
  }
}

.img-container:hover .external-link-banner {
  opacity: 1;
}

.img-wrapper:hover .external-link-banner {
  opacity: 1;
}

/* checkboxes & radio buttons */

.totem-checkbox,
.totem-radio {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.3em;
  cursor: pointer;

  min-width: 1.8em;
  min-height: 1.8em;

  input[type="checkbox"],
  input[type="radio"] {
    /* cacher l'input de manière accessible */
    position: absolute;
    opacity: 0;
    width: 1.8em;
    height: 1.8em;

    ~ svg {
      width: 100%;
      height: 100%;
      max-width: 1.8em;
      max-height: 1.8em;
      min-width: 1.8em;
      min-height: 1.8em;
    }

    &:focus ~ .checkbox path,
    &:focus ~ .radio path {
      fill: var(--totem-color-highlight-color);
    }
  }

  & .d-checked {
    display: none;
  }

  &.checked {
    & .d-none-checked {
      display: none;
    }

    & .d-checked {
      display: inline-block;
    }
  }

  & span strong {
    font-weight: bold;
  }
}

/***** Barre de navigation *****/

.navbar {
  flex-direction: column;
  padding: 0;
  container-type: inline-size;

  .navbar-brand img {
    height: 70px;
    width: auto;
  }

  .offcanvas {
    --bs-offcanvas-bg: var(--totem-color-page-bg);
    color: var(--totem-color-text-on-primary-1);
  }

  .offcanvas-header {
    border-bottom: var(--bs-border-width) var(--bs-border-style) var(--totem-color-text-on-primary-2) !important;
  }

  & .navbar-offcanvas {

    & a {
      --ripple-background: black;
      --ripple-opacity: 0.1;
      --ripple-duration: 600ms;
    }

    & .border-top {
      border-color: var(--totem-color-text-on-primary-1) !important;
    }
  }

  & .icon-account-navigation {
    width: 1.5rem;
    max-width: 1.5rem;
    height: 1.7rem;
    max-height: 1.7rem;

    circle {
      stroke: var(--totem-color-text-on-primary-1);
    }
  }

  & .nav-link {
    font-family: var(--totem-font-title);
    color: var(--totem-color-text-on-primary-1);
  }

  & .nav-link.active {
    color: var(--totem-color-highlight-color);
  }

  & .container {
    height: 236px;
    align-items: flex-end;
    padding-bottom: 50px;
  }

  & .icon.accessibility-icon {
    height: 1.875rem;
    width: 1.875rem;

    circle {
      stroke: var(--totem-color-text-on-primary-1);
    }
  }

  & #navbar {
    justify-content: flex-end;

    & #bottom-navbar {
      display: flex;
      align-items: flex-end;
      gap: 3em;
    }
  }

  & .navbar-actions {
    padding: 8px;

    & #set-lang {
      display: flex;
      justify-content: flex-end;

      & a {
        text-decoration: none;
      }
    }

    & #ils-actions {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      gap: 1.5rem;

      & .icon {
        cursor: pointer;
        height: 1.875rem;
      }

      & #show-account, & #show-custom {
        position: relative;

        & #account-dropdown, & #lists-dropdown {
          position: absolute;
          top: 100%;
          right: 0;
          display: none;
          flex-direction: column;
          border: 1px solid #A9A9A9;
          min-width: 22.5rem;
          z-index: 999;
          line-height: 3rem;

          & a {
            text-decoration: none;
          }

          & #logout-form {
            margin: 0 1.5rem;
            border-top: 1px solid #A9A9A9;
            padding: 1rem 0 1rem 0;
          }

          & .logout-icon {
            max-width: 25px;
            margin-right: 15px;
          }

          & .account-navigation, .lists-navigation {
            padding: 1rem 2rem 1rem 2rem;

            & .list-link {
              max-width: 75%;
            }

            & .nav-option {
              white-space: nowrap;
              cursor: pointer;
            }

            & .user-list-container {
              & .inactive {
                opacity: 1;
                & .user-list-name {
                  opacity: 0.5;
                }
              }
              & .delete-icon {
                display: none;
                scale: 0.5;
                cursor: pointer;
                pointer-events: initial;
                & path {
                  fill: #800000;
                }
              }

              &:hover {
                & .delete-icon {
                  display: block;
                }
              }
            }
          }
        }

        & .expired-warning {
          position: absolute;
          right: 0;
          bottom: 0;
          width: 20px;
          height: 20px;
        }
      }

      & #show-account:hover #account-dropdown, #show-custom:hover #lists-dropdown {
        display: flex;
      }

      & #show-list {
        width: 2.8rem;
        display: flex;
        position: relative;
        height: 100%;
        cursor: pointer;

        & label #favorite-submit {
          display: none;
        }
      }

      & #show-custom {
        & #lists-dropdown {
          width: 22.5rem;
        }

        & .lists-navigation {

          & .inactive {
            opacity: 0.4;
            cursor: default;
            pointer-events: none;

            & icon {
              cursor: default;
            }
          }

          & .icon {
            width: 1.5rem;
            margin-right: 5%;
          }
        }
      }
    }
  }

  & .absolute-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;

    & form {
      height: 40%;
      display: flex;
      gap: 10px;
      align-items: baseline;

      & input[type=text],
      & input[type=password] {
        height: min-content;
        flex-grow: 1;
        flex-shrink: 0;
        padding-left: 20px;
        font-size: 1.5rem;
      }

      & .icon {
        cursor: pointer;
        height: 2.5rem;
      }

      & #password_container, #account-creation-container{
        display: flex;
        flex-direction: column;
      }

      & #login-submit {
        display: flex;
        align-items: center;

        & #login-btn {
          background: none;
          border: none;
          color: var(--totem-color-text-on-widget);
          font-size: 1.5rem;
          font-weight: bold;
          margin: 5px;
        }

        & #login-btn:focus {
          outline: none;
          border-color: none;
          box-shadow: none;
        }

        & #login-btn:hover {
          text-decoration: underline;
        }

        & svg path {
          fill: var(--totem-color-text-on-widget);
        }
      }
    }

    & #searchbar {
      align-items: center;

      & #search-submit {
        display: none;
      }

      & .search-fieldset {
        display: grid;
        gap: 5px;
        grid-template-columns: 0.4fr 1fr;

        & .selected-option {
          & span {
            height: min-content;
            flex-grow: 1;
            flex-shrink: 0;
            font-size: 1.5rem;
          }
        }

        & svg {
          width: fit-content;
          height: fit-content;
        }
      }
    }

    & .login-wrapper {
      display: flex;
      flex-direction: column;
      gap: 0.8rem;
      padding: 0.8rem 0 0.8rem 0;

      & .social-btn {
        border-color: white;
        color: white;
      }
    }
  }

  & .absolute-bar.closed {
    display: none;
  }

  .user-icon {
    border-radius: 50%;
    width: 4rem;
    height: 4rem;
  }

  .banner {
    & .place-hold-button:hover,
    .favorite-button:hover {
      opacity: 0.8;
    }
  }
}

/* Svp ne pas retirer les !important. Ceux-ci sont utilisés dans le cas spécial où nous devons override les classes bootstraps*/
@container (max-width: 60rem) {
  #bottom-navbar ul {
    flex-direction: column !important;
    gap: 0 !important;
  }

  #show-account, #account-navigation-profile-link, #navbar, #navbar-actions-desktop {
    display: none !important;
  }

  #account-navigation-offcanvas-profile {
    display: flex !important;
  }

  #bd-theme-text, #navbar-burger {
    display: block !important;
  }

  #account-navigation-options {
    margin-left: 1rem !important;
  }

  #navbar-burger svg {
    height: 1.4rem !important;
  }

  .icon-account-navigation {
    display: unset !important;
  }
}

@media only screen and (max-width: 1000px) {
  .navbar {
    & .navbar-actions {
      padding: 0;
      gap: 13px;
      flex-direction: row;

      & #ils-actions {
        gap: 1.2rem;

        & .icon {
          width: 1.4rem;
        }

        & #show-custom {
          position: relative;

          & #lists-dropdown {
            width: 50vw;
          }
        }
      }

      & #set-lang {
        color: var(--totem-color-highlight-color);
        font-weight: bold;
        padding-top: 4px;
      }
    }

    & input[type="text"] {
      width: 80%;
    }

    & .absolute-bar {
      height: auto;
      gap: 16px;
      padding: 16px;
    }

    & .absolute-bar {
      & #searchbar {
        gap: 16px;

        & .search-fieldset {
          grid-template-columns: 100%;
        }

        & .nav-search-form {
          width: inherit;
        }
      }
    }

    & #logout-form {
      border-top: 1px solid grey;
      padding: 16px 0;

      & a {
        text-decoration: none;
        color: black;
        display: flex;
        gap: 15px;
      }
    }

    & #accountbar {
      gap: 16px;
      flex-direction: column;
    }

    & #id_login,
    & #id_password {
      width: 100%;
    }

    & .navbar-toggler {
      border: none;
      padding: inherit;
      line-height: inherit;
    }

    & .navbar-brand img {
      height: 43px;
    }

    & .container-fluid {
      flex-wrap: nowrap;
      padding: 16px;
    }
  }
}

/******************* Barre de navigation **********************************/


/**** Suggestions / Autocompletes *****/
& #autocomplete-container {
  padding: 0 16px 16px 16px;
  z-index: 99;

  & .autocompletes {
    display: flex;
    flex-direction: row;

    & .autocomplete-type {
      padding-bottom: 16px;

      & .selected-option {
        height: 42px;

        & span {
          font-size: 1.5rem;
        }
      }

      & .option {
        height: 42px;
      }
    }

    & .autocomplete {
      max-height: inherit;
      height: calc(100vh - 248px);
      /*248px = hauteur navbar + hauteur barre de recherche + hauteur autocomplete type bar + 16px de padding*/
    }
  }
}
/**** Suggestions / Autocompletes *****/


/* Affichage pour imprimer */
/* Doit être placé en bas du fichier css pour ne pas se faire overwrite */
@media print {

  @page {
    body:not(.navbar) {
      margin: 150mm 17mm 17mm 17mm;
    }

  }

  .totem-color-primary-2-1 {
    background-color: white !important;
    color: black !important;
  }

  .totem-color-primary-1-1 {
    background-color: white !important;
    color: black !important;
  }

  body {
    margin: 0;
    padding: 0;
    color: black !important;
  }

  a, p, h1, h2, h3, h4, h5, h6 {
    color: black !important;
  }

  .cover-skeleton {
    background: #ddd !important;
  }

  html, body, #content {
    height: auto;
    min-height: auto;
    max-height: auto;
  }

  html * {
    font-size: 10pt;
  }

  .no-print {
    display: none;
    visibility: hidden;
  }

  .no-link a {
    text-decoration: none;
    color: black;
  }

  wagtail-userbar {
    display: none;
  }

  .navbar {
    display: flex;
    top: 0;
    width: 100%;
    text-align: center;
    padding: 10px 0;

    & .container {
      height: auto;

      & .navbar-toggler,
      & #navbar {
        display: none;
      }
    }
  }

  .bg-light {
    --bs-bg-opacity: 0
  }

  .navbar-brand img {
    height: 50px;

  }

  #content {
    margin-top: 1em;
  }

  .SMButton.SMsearchbtn {
    display: none;
  }

  footer {
    display: none;
  }

  /* Quand le code est dans le fichier Records.vue le css n'est pas appliqué */
  .vue-recycle-scroller,
  .dynamic-scroller {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
  }

  .vue-recycle-scroller__item-wrapper {
    min-height: auto !important;
    height: auto !important;
  }

  .vue-recycle-scroller__item-view {
    position: static !important;
    transform: none !important;
  }
}

html {
  height: 100dvh;
}

html, body {
  width: 100dvw;
  max-width: 100dvw;
  overflow: hidden;
}

#content {
  min-height: 100vh;
}

.records {
  position: relative;
  scroll-behavior: smooth;
}


[anim="ripple"] {
  position: relative;
  overflow: hidden;

  &:before {
      content: '';
      position:absolute;
      display: block;
      background: var(--ripple-background, transparent);
      border-radius: 50%;
      pointer-events: none;

      top: calc(var(--y) * 1px);
      left: calc(var(--x) * 1px);
      width:  calc(var(--d) * 1px);
      height: calc(var(--d) * 1px);

      opacity: calc(var(--o, 1) * var(--ripple-opacity, 0.3));
      transition: calc(var(--t, 0) * var(--ripple-duration, 600ms)) var(--ripple-easing,linear);
      transform: translate(-50%, -50%) scale(var(--s, 1));
      transform-origin: center;
  }
}

/* Merci d’utiliser ces breakpoints pour les prochains développements. Ils sont conformes à ceux de Bootstrap. */
/* Prioriser bootstrap cependant, ceci est pour les classes comme background color qui ne sont pas responsive */

/* bootstrap small breakpoint */
@media only screen and (min-width: 576px) {

}

/* bootstrap medium breakpoint */
@media only screen and (min-width: 768px) {
  .library-card-popup {
    & .library-card-header {
      background-color: transparent;
    }

    & .library-card-body{
      padding: inherit;
    }

    & .library-card {
      height: 30rem;

      & .info-space {
        height: 80%
      }

      & .inner-card {
        & .top-info {
          & img {
            max-width: 12.5rem;
            max-height: 12.5rem;
          }
        }
      }
    }
  }
}

/* bootstrap large breakpoint */
@media only screen and (min-width: 992px) {
  .navbar {
    .user-icon {
      width: 2.5rem;
      height: 2.5rem;
    }
  }

}

/* bootstrap extra large breakpoint */
@media only screen and (min-width: 1200px) {

}

.show-source-modal .modal-body *{
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
}

.show-source-modal .modal-body span{
  text-wrap: wrap;
  display: inline-flex;
  width: fit-content;
  max-width: 80%;
}