/* Grille principale */
.featured-ress__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
  list-style: none;
}
@media (min-width:768px) {
  .featured-ress__list {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
  }
}
@media (min-width:940px) {
  .featured-ress__list {
    grid-template-columns: repeat(auto-fit, minmax(399px, 1fr));
    gap: 2rem;
  }
}
@media (min-width:1024px) {
  .featured-ress__list {
    gap: 3.75rem;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  }
}

/* Card */
.featured-featured-ress__card {
  background: #fff;
  border: 1px solid #612dfa;
  border-radius: 150px 0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.featured-ress__top-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* Lien overlay */
.card-link-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: transparent;
  text-indent: -9999px;
}
.card-link-overlay:focus-visible {
  outline: 3px solid var(--wp--preset--color--accent-1, #612dfa);
  outline-offset: -3px;
  border-radius: 12px;
}

/* Empilement contenu */
.featured-ress__top-row,
.featured-ress__bottom-row {
  position: relative;
  z-index: 3;
}

/* Image (teinte uniquement sur l'image) */
.featured-ress__image__container {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 150px 0; /* même rayon que l'image */
}
.featured-ress__image__container img {
  display: block;
  width: 100%;
  height: auto;
}

/* Teinte violette confinée à l'image */
.featured-ress__image__container::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #5f4cea;
  mix-blend-mode: hue;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
  z-index: 1;
}
.featured-featured-ress__card:hover .featured-ress__image__container::after,
.featured-featured-ress__card:focus-within .featured-ress__image__container::after {
  opacity: 1;
}

/* Titre */
.featured-ress__title {
  margin: 0.5rem 0 0;
}
.featured-ress__title a {
  font-family: var(--wp--preset--font-family--noka);
  font-size: var(--wp--preset--font-size--large);
  font-weight: 600;
  color: var(--wp--preset--color--accent-3);
  text-decoration: none;
}
.featured-ress__title a:hover {
  color: var(--wp--preset--color--accent-1);
  text-decoration: underline;
}
.featured-featured-ress__card:hover .featured-ress__title {
  color: var(--wp--preset--color--accent-1) !important;
  transition: color .25s ease;
}

/* Colonnes */
.featured-ress__image-col {
  flex-basis: 100%;
  max-width: 100%;
}
.featured-ress__meta-col {
  flex-basis: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  padding-top: 0.5rem;
  gap: 1.5rem;
}
@media (min-width:1280px) {
  .featured-ress__image-col {
    flex-basis: 46%;
    max-width: 46%;
  }
  .featured-ress__meta-col {
    flex-basis: 49%;
    max-width: 49%;
    display: flex;
    flex-direction: column;
    padding-top: 0.5rem;
    gap: 1.5rem;
  }
}
.featured-ress__image-col img {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 150px 0;
}

/* Types de ressource */
ul.categorie-parente {
  list-style-type: none;
  display: flex;
  gap: 0.5rem;
  padding-left: 0;
}
.categorie-parente > li.featured-ress__type__item {
  font-family: var(--wp--preset--font-family--noka);
  font-weight: 400;
  font-style: normal;
  font-variant: small-caps;
  color: var(--wp--preset--color--accent-3);
  text-transform: uppercase;
  border: 10px solid transparent;
  border-image: url('../assets/svg/border-type.svg');
  line-height: 1;
  border-image-repeat: stretch;
  border-image-width: 100%;
  border-image-outset: 2px;
  border-image-slice: 50%;
  padding: 2px 10px;
  font-size: 1rem;
}

/* Excerpt + catégories */
.featured-ress__bottom-row {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}
.featured-ress__excerpt {
  font-size: 18px;
  line-height: 24px;
  margin-bottom: 1rem;
  flex-grow: 1;
  color: var(--wp--preset--color--accent-3);
}

/* Catégories thématiques */
.featured-ress__status__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 30px 0 0;
  list-style: none;
}
.featured-ress__status__item {
  position: relative;
  font-size: 1rem;
  font-weight: 500;
  color: #612dfa;
}
.featured-ress__status__list::before {
  content: '';
  background: url(../assets/svg/ETIQUETTE-RESSOURCE.svg) no-repeat;
  display: inline-block;
  width: 25px;
  height: 25px;
  margin-right: 10px;
}
