/* Style pour pc  */
@media only screen and (min-width: 768px) {
  /* **************************** */
  /* ******* Généralités ******** */
  /* **************************** */
  #shortcode-card > h3 {
    width: 100%;
    text-align: left;
    border-bottom: 2px solid #dedede;
    padding-bottom: 16px;
    margin-bottom: 42px !important;
  }

  #shortcode-card > .ajax-posts > h3 {
    width: 100%;
    text-align: left;
    border-bottom: 2px solid #dedede;
    padding-bottom: 16px;
    margin-bottom: 42px !important;
  }

  #shortcode-card article {
    display: flex;
    flex-direction: column;
    background-color: white;
    box-shadow: 2px 4px 32px 6px #0d2c3d12;
    margin-bottom: 25px;
  }

  /* On retire le style imposé par le thème Enfold */

  #top #wrap_all #shortcode-card .link-img .image-overlay {
    display: none !important;
  }

  #shortcode-card article .link-img {
    overflow: hidden;
    height: 264px;
    position: relative;
  }

  #shortcode-card article .link-img img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: all ease 300ms;
  }

  #shortcode-card article .link-img:hover img {
    scale: 1.1;
  }

  #shortcode-card article .link-img .price-event {
    position: absolute;
    background-color: white;
    padding: 14px 16px;
    top: 8px;
    left: 8px;
    z-index: 999;
    border-radius: 2px;
  }

  #shortcode-card article .event-div-content {
    position: relative;
    padding: 24px 16px;
    p.event-title {
      margin-bottom: 8px;
      font-size: 22px;
      font-weight: bold;
      text-align: center;
    }
    p.event-extrait {
      margin: 8px 0;
      text-align: center;
      font-size: 14px;
      opacity: 0.64;
    }
    .event-div-date {
      display: flex;
      justify-content: center;
      gap: 6px;
    }
    .article_categories {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .event-place-title {
      margin-top: 0;
      text-align: center;
    }
    .event-date {
      margin: 0;
      font-size: 18px;
      color: #000;
      text-transform: uppercase;
    }
    a {
      display: block;
      text-align: center;
      font-weight: bold;
      font-style: italic;
      text-decoration: underline;
    }
  }

  /* ******************************* */
  /* ******* Avec 1 colonne ******** */
  /* ******************************* */

  #shortcode-card.column-1 .month-div {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 24px;
  }

  /* Valeur de width a inserer en js en fonction du nombre présent dans le data attr */

  #shortcode-card.column-1 article {
    width: 100%;
  }

  /* ******************************* */
  /* ******* Avec 2 colonne ******** */
  /* ******************************* */

  #shortcode-card.column-2 .month-div {
    display: flex;
    justify-content: flex-start;
    gap: 18px;
    flex-wrap: wrap;
  }

  /* Valeur de width a inserer en js en fonction du nombre présent dans le data attr */

  #shortcode-card.column-2 article {
    width: 49%;
  }

  /* ******************************* */
  /* ******* Avec 3 colonne ******** */
  /* ******************************* */

  #shortcode-card.column-3 .month-div {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
  }

  /* Valeur de width a inserer en js en fonction du nombre présent dans le data attr */

  #shortcode-card.column-3 article {
    width: 32%;
  }
}

/* Style pour tablette */

@media only screen and (max-width: 989px) and (min-width: 768px) {
  /* On force à 2 colonnes pour faciliter la lisibilité  */

  #main #shortcode-card article {
    width: unset;
    flex: 1 1 268px;
  }

  #main #shortcode-card article .event-div-content .event-div-date {
    flex-direction: column;
    align-items: center;
  }
}

/* Style smartphone */

@media only screen and (max-width: 767px) {
  /* Sur smartphone, on va forcer le style en 1 à 2 colonnes maximum  */

  #shortcode-card > h3 {
    width: 100%;
    text-align: left;
    border-bottom: 2px solid #dedede;
    padding-bottom: 12px;
    margin-bottom: 32px !important;
  }

  #shortcode-card > .ajax-posts > h3 {
    width: 100%;
    text-align: left;
    border-bottom: 2px solid #dedede;
    padding-bottom: 12px;
    margin-bottom: 24px;
  }

  /* On retire le style imposé par le thème Enfold */

  #top #wrap_all #shortcode-card .link-img .image-overlay {
    display: none !important;
  }

  #shortcode-card .month-div {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
  }

  #shortcode-card article {
    display: flex;
    flex-direction: column;
    background-color: white;
    box-shadow: 2px 4px 32px 6px #0d2c3d12;
    flex: 1 1 264px;
    .link-img {
      overflow: hidden;
      height: 200px;
      position: relative;
      img {
        object-fit: cover;
        height: 100%;
        width: 100%;
        transition: all ease 300ms;
      }
      .price-event {
        position: absolute;
        background-color: white;
        padding: 10px 12px;
        top: 8px;
        left: 8px;
        z-index: 999;
        border-radius: 2px;
      }
    }

    .article_categories {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      flex-wrap: wrap;
    }
  }

  #shortcode-card article .event-div-content {
    position: relative;
    padding: 18px 12px;
  }

  #main #shortcode-card article .event-div-content p.event-extrait {
    margin: 8px 0;
    text-align: center;
    font-size: 12px;
    line-height: 16px;
    opacity: 0.64;
  }

  #main #shortcode-card article .event-div-content p.event-title {
    margin-bottom: 6px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
  }

  #shortcode-card article .event-div-content .event-div-date {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }

  #shortcode-card article .event-div-content .event-place-title {
    margin-top: 0;
    text-align: center;
  }

  #main #shortcode-card article .event-div-content .event-date {
    margin: 0;
    font-size: 14px;
    color: #000000;
    text-transform: uppercase;
    text-align: center;
  }

  #shortcode-card article .event-div-content a {
    display: block;
    text-align: center;
    font-weight: bold;
    font-style: italic;
    text-decoration: underline;
  }
}

/* Enfold... */

#footer-page :is(#shortcode-card, #search-div-event, .no-result) {
  display: none;
}

/* AJAX Loader */

#shortcode-card .loader-ajax {
  display: block;
  position: relative;
  width: 1em;
  height: 1em;
  margin: 72px auto;
  font-size: 28px;
  color: black;
  border-radius: 50%;
  animation: load 1.7s infinite ease, round 1.7s infinite ease;
  transform: translateZ(0);
  overflow: hidden;
}

@keyframes load {
  0% {
    box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em,
      0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;
  }
  5%,
  95% {
    box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em,
      0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;
  }
  10%,
  59% {
    box-shadow: 0 -0.83em 0 -0.4em, -0.087em -0.825em 0 -0.42em,
      -0.173em -0.812em 0 -0.44em, -0.256em -0.789em 0 -0.46em,
      -0.297em -0.775em 0 -0.477em;
  }
  20% {
    box-shadow: 0 -0.83em 0 -0.4em, -0.338em -0.758em 0 -0.42em,
      -0.555em -0.617em 0 -0.44em, -0.671em -0.488em 0 -0.46em,
      -0.749em -0.34em 0 -0.477em;
  }
  38% {
    box-shadow: 0 -0.83em 0 -0.4em, -0.377em -0.74em 0 -0.42em,
      -0.645em -0.522em 0 -0.44em, -0.775em -0.297em 0 -0.46em,
      -0.82em -0.09em 0 -0.477em;
  }
  100% {
    box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em,
      0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;
  }
}

@keyframes round {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

/* Boutton ajax */

#shortcode-card #load-more-ajax {
  margin: 42px auto 0 auto;
  display: block;
  border: none;
  background-color: rgba(13, 44, 61, 0.5);
  padding: 18px 12px;
  border-radius: 24px;
  transition: 300ms;
  cursor: pointer;
  color: white;

  &:hover {
    scale: 1.1;
  }
}

#shortcode-card > p {
  text-align: center;
}
