/* ================================
 * Bloc AFO – Ressources à la Une (ressources épinglées)
 * Design + responsive IDENTIQUES à la section "Actualités"
 ================================ */

.afo-ressources-epinglees {
  --ala-purple: var(--Violet, #33224D);
  --ala-pink: var(--global-palette2, #C01C7B);
  --cut: 58px;
}

/* GRID 3 colonnes + bordure haute + rythme vertical (clone de la query Actualités) */
.afo-ressources-epinglees .ala-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;                                          /* = gap Actualités */
  border-top: 1px solid var(--global-palette3, #1A202C); /* résout en #000 sur le site */
  padding-top: 48px;                                  /* = padding-top de la loop Actualités (3rem) */
}

/* 2 colonnes tablette (breakpoint Actualités) */
@media (max-width: 1024px) {
  .afo-ressources-epinglees .ala-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 1 colonne mobile (breakpoint Actualités) */
@media (max-width: 767px) {
  .afo-ressources-epinglees .ala-grid {
    grid-template-columns: 1fr;
  }
}

/* Carte = flex column pour coller le footer en bas */
.afo-ressources-epinglees .ala-card {
  position: relative;
  display: flex;
  flex-direction: column;
  color: #000;
}

/* ---------- Image coin coupé + effet hover AFO ---------- */

.afo-ressources-epinglees .ala-thumb {
  --cut: 40px;
}

.afo-ressources-epinglees .ala-thumb .kb-is-ratio-image {
  position: relative;
  overflow: hidden;
  clip-path: polygon(
    0 0, 100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%
  );
}

.afo-ressources-epinglees .ala-thumb img.kb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 4/3;
  transform-origin: center center;
  will-change: transform;
  transition: transform .8s ease-out, filter .8s ease-out;
  z-index: 1;
}

.afo-ressources-epinglees .ala-thumb .kb-is-ratio-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(77, 44, 122, 0.9);
  mix-blend-mode: color;
  opacity: 0;
  pointer-events: none;
  transition: opacity .8s ease-out;
  z-index: 2;
}

.afo-ressources-epinglees .ala-card:hover .ala-thumb img.kb-img {
  transform: scale(1.1);
  filter: grayscale(1);
}

.afo-ressources-epinglees .ala-card:hover .ala-thumb .kb-is-ratio-image::after {
  opacity: 1;
}

/* ---------- Corps de la carte ---------- */

.afo-ressources-epinglees .ala-body {
  padding-top: 26px;
}

.afo-ressources-epinglees .ala-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.afo-ressources-epinglees .ala-cat {
  color: var(--global-palette2);
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  text-transform: uppercase;
}

.afo-ressources-epinglees .ala-date {
  color: var(--global-palette2);
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.afo-ressources-epinglees .ala-title {
  margin: 0;
  color: var(--Violet, #33224D);
  font-family: "poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 24px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

.afo-ressources-epinglees .ala-title a {
  color: inherit;
  text-decoration: none;
}

.afo-ressources-epinglees .ala-card:hover .ala-title a {
  text-decoration: underline;
  color: var(--global-palette2) !important;
}

/* ---------- Thématiques dynamiques ---------- */

.afo-ressources-epinglees .ala-thematiques-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  line-height: 1.2;
  display: none;
}

.afo-ressources-epinglees .ala-thematiques-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--Violet, #33224D);
  flex: 0 0 auto;
}

.afo-ressources-epinglees .thematiques {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.afo-ressources-epinglees .thematiques .kb-dynamic-list-item {
  color: var(--Violet, #33224D);
  font-size: 15px;
  font-family: Poppins, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  font-style: normal;
  text-transform: none;
}

.afo-ressources-epinglees .thematiques .kb-dynamic-list-divider {
  opacity: .9;
}

/* ---------- Footer : Lire la ressource collé en bas ---------- */

.afo-ressources-epinglees .ala-footer {
  margin-top: auto;
}

.afo-ressources-epinglees .ala-read {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 32px;
  padding-bottom: 15px;
  border-bottom: 1px solid #000;
  text-decoration: none;
  color: #000;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.afo-ressources-epinglees .ala-read .kb-svg-icon-wrap svg {
  display: block;
}

@keyframes afo-arrow-nudge {
  0%   { transform: translateX(0); }
  40%  { transform: translateX(-10px); }
  100% { transform: translateX(0); }
}

.afo-ressources-epinglees .ala-card:hover .ala-read .kb-svg-icon-wrap svg,
.afo-ressources-epinglees .ala-read:hover .kb-svg-icon-wrap svg {
  animation: afo-arrow-nudge 0.45s ease-out 1;
}

.afo-ressources-epinglees .kb-section-link-overlay:focus-visible,
.afo-ressources-epinglees .ala-read:focus-visible {
  outline: 2px solid var(--global-palette2);
  outline-offset: 3px;
}

/* ---------- Titre de section "Ressources à la Une" (identique à "Actualités", desktop + responsive) ---------- */
.afo-ressources-epinglees .rae-title {
  margin: 0;
  color: var(--Violet, #33224D);
  font-family: "BBB Poppins TN Display", Helvetica, Arial, sans-serif;
  font-size: 48px;
  font-style: normal;
  font-weight: 600;
  line-height: 56px;
}