@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap");

/* Variables */
:root {
  --title: "Lato", sans-serif;
}

/* Diagramme page d'accueil */
#diagram {
  width: 300px;
  height: auto;
  transform: scale(0) rotate(-240deg);
  opacity: 0;
  transition:
    transform 1.2s ease-out,
    opacity 0.5s ease-out;
}
#diagram.animation {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}
svg {
  width: 100%;
  height: 100%;
}
.element {
  transition: transform 0.2s linear;
  transform-origin: center;
}
.element:hover {
  transform: scale(1.1);
  cursor: pointer;
}
.elementor a {
  -webkit-tap-highlight-color: transparent;
  color: #3d2f88;
  &:hover {
    color: #30256b;
  }
}

/* Spécification des typographies (les réglages du site ne sont pas appliquées à tous les éléments) */
h1,
h2,
h3,
h4,
h5,
h6,
.elementor-heading-title,
.rp-heading,
.ele-entry-title,
.the7-simple-widget-posts h3.heading a.post-title {
  font-family: var(--title) !important;
}

h1.elementor-heading-title.elementor-size-default {
  font-size: 44px;
}

h2.elementor-heading-title.elementor-size-default,
h2.rp-heading {
  font-size: 36px !important;
}
h3.elementor-heading-title.elementor-size-default {
  font-size: 28px !important;
}

h3.heading .post-title,
h3.ele-entry-title {
  font-weight: 500;
}

/* Modèle d'archive - Actualités */
/* Categories list widget */
.the7-categories-list-wrap {
  & .the7-vertical-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    & .cat-item {
      width: auto;
    }
  }
}
/* A la une - Simple Posts widget */
.featured-post {
  & .post {
    height: 280px;
  }
  & .the7-simple-post-thumb {
    height: 100%;
  }
  & .the7-simple-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  & .post-entry-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  & .post-title {
    font-size: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  & .short-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Recent posts widget */
.recent-posts {
  & .post {
    height: 400px;
  }
  & .the7-simple-post-thumb {
    height: 120px;
  }
  & .the7-simple-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  & .post-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  & .post-entry-content .heading {
    height: 100px;
    & .post-title {
      font-size: 20px;
      line-height: 1.3;
      display: -webkit-box;
      -webkit-line-clamp: 4;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }
  & .post-entry-content .short-description {
    height: 135px;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/*  Placement des encadrés de catégorie sur les cards d'article */
.post-content-wrapper {
  position: relative;
  & .featured-post .post-content-wrapper {
    position: relative;
  }
  & .entry-meta {
    position: absolute;
    top: 8px;
    left: 8px;
  }
}
/* Style des onglets de catégorie */
.color-applied {
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  margin-right: 4px;
  margin-bottom: 4px;
  display: inline-block;
}

/* Carousel d'articles modèle article unique */
.carousel-recent-posts {
  & .post-thumbnail-wrap {
    /* Variable présente dans le widget Carousel d'articles */
    --dynamic-img-height: 140px;
    height: var(--dynamic-img-height);
    overflow: hidden;
  }

  & .post-thumbnail-wrap img {
    width: 100%;
    height: var(--dynamic-img-height);
    object-fit: cover;
  }
  & .ele-entry-title {
    height: 80px;
    & a {
      font-size: 20px;
      line-height: 1.3;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }
  & .entry-excerpt p {
    height: calc(7 * 1.2 * 16px);
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* PARTIE TABLETTE */
@media screen and (min-width: 768px) and (max-width: 1023px) {
  h1.elementor-heading-title.elementor-size-default {
    font-size: 36px !important;
  }
  h2.elementor-heading-title.elementor-size-default,
  h2.rp-heading {
    font-size: 32px !important;
  }
  h3.elementor-heading-title.elementor-size-default {
    font-size: 28px !important;
  }
  h3.heading .post-title,
  h3.ele-entry-title {
    font-size: 20px;
  }
  h3.heading .post-title {
    line-height: 1.5;
  }
}


/* PARTIE MOBILE */
@media screen and (max-width: 767px) {
  h1.elementor-heading-title.elementor-size-default {
    font-size: 28px !important;
  }
  h2.elementor-heading-title.elementor-size-default,
  h2.rp-heading {
    font-size: 24px !important;
  }
  h3.elementor-heading-title.elementor-size-default {
    font-size: 22px !important;
  }
  h3.heading .post-title,
  h3.ele-entry-title {
    font-size: 18px;
  }
  .featured-post {
    & .post {
      display: flex;
      flex-direction: column;
      height: fit-content;
    }
    & .post-entry-content {
      height: fit-content;
    }
    & .post-title {
      -webkit-line-clamp: 4;
    }
    & .the7-simple-post-thumb {
      height: 100px;
    }
    & .heading {
      height: fit-content !important;
      & .post-title {
        font-size: 18px;
        line-height: 1.3;
      }
    }
    & .short-description {
      display: none;
    }
    & .box-button {
      display: none;
    }
  }

  .recent-posts {
    & .post {
      display: flex;
      flex-direction: column;
      height: fit-content !important;
    }
    & .post-entry-content {
      flex: 1;
    }
    & .post-title {
      -webkit-line-clamp: 4;
    }
    & .the7-simple-post-thumb {
      height: 100px;
    }
    & .heading {
      height: fit-content !important;
      & .post-title {
        font-size: 18px;
        line-height: 1.3;
      }
    }

    & .short-description {
      display: none;
    }
    & .box-button {
      display: none;
    }
  }
  .carousel-recent-posts {
    & .post {
      height: fit-content;
    }
    & .post-thumbnail-wrap {
      /* Variable présente dans le widget Carousel d'articles */
      --dynamic-img-height: 120px;
      height: var(--dynamic-img-height);
      overflow: hidden;
    }

    & .post-thumbnail-wrap img {
      width: 100%;
      height: var(--dynamic-img-height);
      object-fit: cover;
    }
    & .ele-entry-title {
      height: 70px;
      & a {
        font-size: 18px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }
    & .entry-excerpt {
      height: fit-content;
      & p {
        -webkit-line-clamp: 4;
      }
    }
    & a.box-button {
      display: none;
    }
  }
}