/*
 * Idasso CSS preparation.
 * Module de theme charge pendant la recette IdAsso.
 */

/* Resource library listing and resource blog presentation. */

.idasso {
  /* FLAG: Médiathèque */
  .template-mediatheque-list {
    padding: 0 1rem;
  }

  .template-mediatheque-list .row {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 3.25rem;
  }
  .template-mediatheque-list .config-mediatheque {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 1rem;
  }
  .template-mediatheque-list .config-mediatheque #TO_CATEGORY,
  .template-mediatheque-list .config-mediatheque .col-sm-6 {
    flex: 1 1 45%;
  }
  .template-mediatheque-list .config-mediatheque .col-sm-6 {
    position: relative;
  }
  .template-mediatheque-list .config-mediatheque .input-group {
    margin-bottom: 0;
    height: 100%;
  }
  .template-mediatheque-list .config-mediatheque .input-group .fa-search {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
    -webkit-mask: url("../../icons/icon-rechercher.svg") center / contain
      no-repeat;
    mask: url("../../icons/icon-rechercher.svg") center / contain no-repeat;
    background-color: var(--idasso-paragraph-color);
    transition: background-color 0.3s ease-in-out;
  }
  .template-mediatheque-list .config-mediatheque #button-searching-search:is(:hover, :focus, :focus-visible) {
    background: transparent !important;
    background-color: transparent !important;
  }
  .template-mediatheque-list .config-mediatheque #button-searching-search:is(:hover, :focus, :focus-visible) .fa-search {
    background-color: var(--color-hover);
  }
  .template-mediatheque-list
    .config-mediatheque
    .input-group
    .fa-search::before {
    content: "";
  }
  .template-mediatheque-list .config-mediatheque #button-searching-close {
    right: 16px;
    color: var(--color-lien);
  }
  .template-mediatheque-list .config-mediatheque #button-searching-close:hover {
    color: var(--color-error);
    background-color: unset;
  }

  .template-mediatheque-list .config-mediatheque .input-group .button {
    right: 16px;
  }
  .template-mediatheque-list .config-mediatheque a {
    order: 3;
    flex-basis: 100%;
    color: var(--color-lien);
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
  }
  .template-mediatheque-list .config-mediatheque a::before {
    content: "";
    display: inline-block;
    width: 2rem;
    height: 2.125rem;
    flex-shrink: 0;
    -webkit-mask: url("../../icons/icon-trier-light.svg") center / contain
      no-repeat;
    mask: url("../../icons/icon-trier-light.svg") center / contain no-repeat;
    background-color: var(--color-lien);
    transition: background-color 0.3s ease-in-out;
  }
  .template-mediatheque-list .table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .template-mediatheque-list .table-striped {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
  }
  .template-mediatheque-list .table-striped a {
    color: var(--idasso-paragraph-color, var(--idasso-paragraph-color, #000));
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 900;
    transition: all 300ms ease 0ms;
  }
  .template-mediatheque-list .table-striped a:hover {
    color: var(--color-hover);
  }
  .template-mediatheque-list .table-striped thead {
    text-align: left;
    font-weight: 900;
  }
  .template-mediatheque-list .table-striped thead th {
    padding: 12px;
    color: var(--idasso-paragraph-color, var(--idasso-paragraph-color, #000));
    font-weight: 900;
    border-bottom: 1px solid var(--color-border);
    position: relative;
  }
  .template-mediatheque-list .table-striped thead th:first-of-type {
    width: 30%;
  }
  .template-mediatheque-list .table-striped thead th:nth-of-type(2) {
    width: 30%;
  }
  .template-mediatheque-list .table-striped thead th:nth-of-type(3) {
    width: 20%;
  }
  .template-mediatheque-list .table-striped thead th:nth-last-of-type() {
    width: 20%;
  }
  .template-mediatheque-list .table-striped thead th #ORDER_DATE {
    position: relative;
    padding-right: 20px;
  }
  .template-mediatheque-list .table-striped thead th #ORDER_TITLE {
    display: flex;
    gap: 1rem;
  }

  .template-mediatheque-list .table-striped thead th #ORDER_DATE::after,
  .template-mediatheque-list .table-striped thead th #ORDER_TITLE::after {
    content: "";
    display: inline-block;
    width: 0.8125rem;
    height: 0.4375rem;
    -webkit-mask: url("../../icons/icon-fleche-bas.svg") center / contain
      no-repeat;
    mask: url("../../icons/icon-fleche-bas.svg") center / contain no-repeat;
    background-color: var(--idasso-paragraph-color);
    transition: background-color 0.3s ease-in-out;
  }
  .template-mediatheque-list .table-striped thead th #ORDER_DATE::after {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }
  .template-mediatheque-list .table-striped tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--color-border);
    color: var(--idasso-paragraph-color, var(--idasso-paragraph-color, #000));
    text-align: left;
  }
  .template-mediatheque-list .table-striped tbody a {
    position: relative;
    display: block;
    padding-left: 1.5rem;
    font-weight: 700;
    line-height: 1.4em;
  }
  .template-mediatheque-list .table-striped tbody a::before {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1.125rem;
    position: absolute;
    top: 4px;
    left: 0;
    -webkit-mask: url("../../icons/icon-fichier.svg") center / contain no-repeat;
    mask: url("../../icons/icon-fichier.svg") center / contain no-repeat;
    background-color: var(--idasso-paragraph-color);
    transition: background-color 0.3s ease-in-out;
  }
  .template-mediatheque-list .table-striped tbody a:hover::before {
    background-color: var(--color-hover);
  }

  @media (min-width: 980px) {
    .template-mediatheque-list .row {
      flex-direction: row;
    }
    .template-mediatheque-list .config-mediatheque {
      flex-direction: row;
      width: 55%;
    }
    .template-mediatheque-list .row .config-mediatheque #SEARCH {
      width: 100%;
      border: var(--idasso-input-border-width, 1px)
        var(--idasso-input-border-style, solid)
        var(--idasso-input-border-color, var(--idasso-component-input-border));
      border-radius: var(
        --idasso-input-border-radius,
        var(--idasso-component-radius)
      );
      background-color: var(
        --idasso-input-background,
        var(--idasso-component-input-background)
      );
      padding: 1.625rem 1.25rem;
      height: 100%;
      font-size: var(--idasso-paragraph-font-size, 1rem);
      color: var(--idasso-paragraph-color, var(--idasso-paragraph-color, #000000));
      line-height: var(--idasso-paragraph-line-height, 1.5);
      font-weight: var(--idasso-paragraph-font-weight, 400);
      letter-spacing: var(--idasso-paragraph-letter-spacing, normal);
      line-height: var(--idasso-paragraph-line-height, 1.5);
    }
  }

  .template-mediatheque-list
    .row
    .config-mediatheque
    input[type="search" i]::-webkit-search-cancel-button {
    display: none;
  }

  /* FLAG: Blog Médiathèque */
  .template-mediatheque.et_pb_row {
    width: 100%;
    padding: 2em;
  }

  .template-mediatheque .row:nth-of-type(3) {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  .template-mediatheque .categorie {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .template-mediatheque .categorie::before {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    -webkit-mask: url("../../icons/icon-categorie.svg") center / contain
      no-repeat;
    mask: url("../../icons/icon-categorie.svg") center / contain no-repeat;
    background-color: var(--idasso-paragraph-color);
    transition: background-color 0.3s ease-in-out;
  }
  .template-mediatheque .date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .template-mediatheque .date::before {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    -webkit-mask: url("../../icons/icon-date.svg") center / contain no-repeat;
    mask: url("../../icons/icon-date.svg") center / contain no-repeat;
    background-color: var(--idasso-paragraph-color);
    transition: background-color 0.3s ease-in-out;
  }
  .template-mediatheque .row:last-of-type {
    flex-direction: column;
  }

  .template-mediatheque .row:last-of-type .col-left ul {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-bottom: 2rem;
  }
  .template-mediatheque .row:last-of-type .col-left ul:last-of-type li {
    font-weight: 400;
  }
  .template-mediatheque .row:last-of-type .col-left li {
    list-style: none;
  }
  .template-mediatheque .col-left .file {
    position: relative;
    padding-left: 1.25rem;
  }
  .template-mediatheque .col-left .file::before {
    content: "";
    width: 1rem;
    height: 1rem;
    position: absolute;
    top: 4px;
    left: 0;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
  }
  .template-mediatheque .col-left .file-link::before {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    -webkit-mask: url("../../icons/icon-lien.svg") center / contain no-repeat;
    mask: url("../../icons/icon-lien.svg") center / contain no-repeat;
    background-color: var(--color-lien);
    transition: background-color 0.3s ease-in-out;
  }
  .template-mediatheque .col-left .file-file::before {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    -webkit-mask: url("../../icons/icon-telechargement.svg") center / contain
      no-repeat;
    mask: url("../../icons/icon-telechargement.svg") center / contain no-repeat;
    background-color: var(--color-lien);
    transition: background-color 0.3s ease-in-out;
  }
  .template-mediatheque .row:last-of-type .col-left ul a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    font-weight: 700;
    color: var(--color-lien);
  }
  .template-mediatheque .col-left ul a:hover, .template-mediatheque .row:last-of-type .col-left ul a:hover {
    color: var(--color-hover);
  }
  .template-mediatheque .row:last-of-type .col-left ul a.file-file:hover::before,
  .template-mediatheque .row:last-of-type .col-left ul:has(a:hover) .file-file::before {
    background-color: var(--color-hover);
  }
  .template-mediatheque .col-right ul {
    margin-left: 1rem;
  }
  .template-mediatheque .col-right ul li {
    list-style: disc;
  }
  .template-mediatheque .col-right ol {
    margin-left: 1rem;
  }
  .template-mediatheque .col-right ol li {
    list-style: decimal;
  }
  .template-mediatheque .border-right {
    border-right: 0px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
  }
  .template-mediatheque .col-33 {
    width: 100%;
  }
  .template-mediatheque .col-66 {
    width: 100%;
    margin-top: 2rem;
  }

  @media (min-width: 980px) {
    .template-mediatheque {
      padding: 0;
    }
    .template-mediatheque .row:last-of-type {
      flex-direction: row;
      display: flex;
    }
    .template-mediatheque .col-left {
      padding-right: 1.5rem;
    }
    .template-mediatheque .col-right {
      padding-left: 1.5rem;
    }
    .template-mediatheque .border-right {
      border-right: 1px solid var(--color-border);
      border-bottom: 0px solid var(--color-border);
    }
    .template-mediatheque .col-33 {
      width: 35%;
    }
    .template-mediatheque .col-66 {
      width: 65%;
      margin-top: 0;
    }
  }
  .template-mediatheque-list h1 {
    display: none;
  }

  @media (min-width: 980px) {
    .template-mediatheque-list .config-mediatheque {
      flex-direction: row;
      width: 100%;
    }
  }
  .template-mediatheque-list .config-mediatheque #TO_CATEGORY {
    flex: 1 1 25%;
  }

  .template-mediatheque-list .config-mediatheque .col-sm-6 {
    flex: 1 1 65%;
  }
}
