/* ==========================================================================
   RESOURCES COMPONENTS (BEM Blocks)
   ========================================================================== */

.resource-list {
  padding-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.resource-list:has(.resource-list__empty) {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resource-list__empty {
  text-align: center;
  align-self: center;
}

.resource-list__empty-message {
  color: var(--text-muted);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Resource Group (Titre et liste)
   -------------------------------------------------------------------------- */

.resource-group__title {
  margin-top: 1rem;
  padding-left: 1rem;
  color: var(--accent-primary);
  font-variant-ligatures: normal;
  font-size: var(--text-base);
}

.resource-group__title::before {
  content: "❯❯❯ ";
  flex-shrink: 0;
}

.resource-group__title::after {
  content: " ❮❮❮";
  flex-shrink: 0;
}

.resource-group__actions {
  margin-top: 0.5rem;
  margin-left: 1rem;
}

.resource-group__more-link {
  color: var(--accent-primary);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--accent-primary);
  text-underline-offset: 6px;
  transition: var(--transition-interactive);
  font-size: var(--text-sm);
}

.resource-group__more-link:hover {
  color: var(--text-main);
  text-decoration-style: solid;
  text-decoration-color: var(--text-main);
}

/* --------------------------------------------------------------------------
   Resource Item (La Ligne)
   -------------------------------------------------------------------------- */

.resource-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  -webkit-tap-highlight-color: transparent;
  padding: 0.5rem 1rem;
}

.resource-item__title {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 500;
}

.resource-item__link {
  color: inherit;
  text-decoration: none;
}

.resource-item__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.resource-item__lang {
  color: var(--text-muted);
  font-size: var(--text-sm);
  vertical-align: middle;
}

.resource-item__icon {
  color: var(--text-muted);
  transition: transform var(--transition-interactive), color var(--transition-interactive);
}

.resource-item__tags {
  line-height: 1;
  color: var(--text-muted);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* --------------------------------------------------------------------------
   Interactions (Hover)
   -------------------------------------------------------------------------- */

@media (hover: hover) and (pointer: fine) {

  .resource-item {
    transition: background-color var(--transition-interactive);
  }

  .resource-item:hover {
    background-color: var(--row-hover);
  }

  /* Le lien et l'icône s'allument au survol de la ligne entière */
  .resource-item:hover .resource-item__link {
    color: var(--accent-primary);
  }

  .resource-item:hover .resource-item__icon {
    color: var(--accent-primary);
    transform: translate(2px, -2px);
    /* L'icône se soulève légèrement */
  }
}