/* ================================================
   BLOG RESOURCES — Section Shine-inspired
   Prefix: res-
   Layout: rl-page-padding > container-large (same as /care)
   ================================================ */

/* ==================== PAR THÉMATIQUE ==================== */

.res-themes-section {
  padding: 40px 0 0;
  margin-bottom: 40px;
}

.res-themes-title {
  font-family: Ppmori, sans-serif;
  font-size: 38px;
  font-weight: 500;
  line-height: 43px;
  color: #171717;
  margin: 0 0 24px;
}

/* Horizontal scroll container */
.res-themes-scroll {
  display: flex;
  flex-direction: row;
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  gap: 16px;
  padding: 8px 0 16px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.res-themes-scroll::-webkit-scrollbar {
  display: none;
}

/* Theme card */
.res-theme-card {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 215px;
  padding: 24px;
  background: #F5F5F5;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  text-align: left;
  scroll-snap-align: start;
  scroll-margin: 16px;
  transition: all 300ms ease-out;
  cursor: pointer;
}

.res-theme-card__image {
  width: 100%;
  height: 168px;
  border-radius: 14px;
  margin-bottom: 24px;
  overflow: hidden;
}
.res-theme-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.res-theme-card__title {
  font-family: Ppmori, sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #171717;
  margin: 0 0 16px;
}

.res-theme-card__desc {
  font-family: Ppmori, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
  color: #171717;
  margin: 0;
}

.res-theme-card__count {
  font-family: Ppmori, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.375;
  color: #171717;
  margin-top: 24px;
  margin-bottom: 0;
}

/* Fade-in animation */
.res-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.res-fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== TOUTES LES RESSOURCES ==================== */

.res-all-section {
  padding: 40px 0 60px;
}

.res-all-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.res-all-header h2 {
  font-family: Ppmori, sans-serif;
  font-size: 38px;
  font-weight: 500;
  line-height: 43px;
  color: #171717;
  margin: 0;
}

/* Trier par (beside title on desktop) */
.res-sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.res-sort-label {
  font-family: Ppmori, sans-serif;
  font-size: 15px;
  color: #686868;
  white-space: nowrap;
}
.res-sort-select {
  font-family: Ppmori, sans-serif;
  font-size: 16px;
  height: auto;
  padding: 10px 36px 10px 16px;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  background: #FFFFFF;
  color: #171717;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23686868' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.res-sort-select:hover {
  border-color: #686868;
}
.res-sort-select:focus {
  border-color: #171717;
  outline: none;
}

/* Filter bar */
.res-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

/* Search input */
.res-search-wrap {
  position: relative;
}
.res-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #686868;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.res-search-icon svg {
  width: 20px;
  height: 20px;
}
.res-search-input {
  font-family: Ppmori, sans-serif;
  font-size: 15px;
  line-height: 1.8;
  width: 100%;
  height: 48px;
  padding: 0 24px 0 48px;
  border: 1px solid #E0E0E0;
  border-radius: 9999px;
  background: #FFFFFF;
  color: #171717;
  outline: none;
  transition: border-color 0.2s;
}
.res-search-input::placeholder {
  color: #888;
  font-size: 15px;
}
.res-search-input:hover {
  border-color: #686868;
}
.res-search-input:focus {
  border-color: #171717;
}

/* Category pills (mobile) */
.res-category-pills {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
}

.res-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: 9999px;
  border: 1px solid #E0E0E0;
  background: #FAFAFA;
  color: #686868;
  font-family: Ppmori, sans-serif;
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.res-pill:hover {
  border-color: #171717;
  color: #171717;
}
.res-pill.is-active {
  background: #171717;
  border-color: #171717;
  color: #FFFFFF;
  font-weight: 500;
}

/* Layout: stacked on mobile */
.res-all-layout {
  display: block;
}

/* Sidebar (hidden mobile) */
.res-sidebar {
  display: none;
}

/* Results info */
.res-results-info {
  margin-bottom: 16px;
  font-family: Ppmori, sans-serif;
  font-size: 15px;
  color: #686868;
}
.res-results-info strong {
  color: #171717;
}

/* Resource cards grid */
.res-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  grid-auto-rows: max-content;
}

/* Resource card */
.res-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px;
  border: 1px solid #E0E0E0;
  border-radius: 16px;
  background: #FFFFFF;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: border-color 300ms ease-out;
  gap: 14px;
}
.res-card:hover {
  text-decoration: none;
  color: inherit;
  border-color: #b0b0b0;
}

/* Badge */
.res-card__badge {
  display: flex;
  align-items: center;
  gap: 10px;
}
.res-card__badge-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.res-card__badge-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Modele badge: icon on grey background */
.res-card__badge-icon--modele {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F5F5F5;
  color: #505050;
}

.res-card__badge-label {
  font-family: Ppmori, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #686868;
  letter-spacing: 0.01em;
}

/* Card title */
.res-card__title {
  font-family: Ppmori, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.45;
  color: #171717;
  margin: 0;
}

/* Meta (tags + date) */
.res-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  transition: opacity 300ms ease-out, visibility 300ms ease-out;
  margin-top: auto;
  width: 100%;
}

.res-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.res-card__tag {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 8px;
  font-family: Ppmori, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #505050;
  background: #F5F5F5;
  border: none;
  white-space: nowrap;
  text-transform: capitalize;
}

.res-card__date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: Ppmori, sans-serif;
  font-size: 13px;
  color: #999;
  line-height: 1.375;
}

.res-card__date-icon {
  flex-shrink: 0;
  color: #999;
}

/* Arrow circle button */
.res-card__arrow {
  position: absolute;
  bottom: 28px;
  right: 28px;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #171717;
  transition: background 0.25s, transform 0.25s;
}
.res-card__arrow svg {
  width: 15px;
  height: 15px;
  transform: rotate(-45deg);
  transition: transform 0.25s;
}
.res-card:hover .res-card__arrow {
  background: #171717;
  color: #FFFFFF;
}
.res-card:hover .res-card__arrow svg {
  transform: rotate(0deg);
}

/* Empty state */
.res-empty {
  display: none;
  text-align: center;
  padding: 60px 20px;
  color: #686868;
  grid-column: 1 / -1;
  font-family: Ppmori, sans-serif;
  font-size: 16px;
}
.res-empty.is-visible {
  display: block;
}
.res-empty svg {
  width: 48px;
  height: 48px;
  color: #E0E0E0;
  margin-bottom: 16px;
}

/* Load more */
.res-load-more-wrap {
  text-align: center;
  margin-top: 32px;
  grid-column: 1 / -1;
}
.res-load-more-btn {
  padding: 12px 24px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  background: transparent;
  color: #171717;
  font-family: Ppmori, sans-serif;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.res-load-more-btn:hover {
  border-color: #171717;
}

/* ==================== TABLET (768-991px) ==================== */
@media (min-width: 768px) and (max-width: 991px) {
  .res-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .res-themes-scroll {
    gap: 20px;
  }
  .res-theme-card {
    width: 260px;
  }
}

/* ==================== DESKTOP (>991px) ==================== */
@media (min-width: 992px) {
  /* Themes section */
  .res-themes-scroll {
    gap: 32px;
  }
  .res-theme-card {
    width: 300px;
    padding: 32px;
  }
  .res-theme-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  }
  .res-theme-card__image {
    height: 233px;
    border-radius: 16px;
    margin-bottom: 40px;
  }
  .res-theme-card__title {
    font-size: 22px;
  }
  .res-theme-card__count {
    color: #686868;
    margin-top: 40px;
  }

  /* All resources section */
  .res-all-section {
    padding: 60px 0;
  }

  /* Hide mobile pills, show sidebar */
  .res-category-pills {
    display: none;
  }

  /* Sidebar + grid layout */
  .res-all-layout {
    display: grid;
    grid-template-columns: 158px 1fr;
    grid-column-gap: 120px;
    align-items: start;
  }

  /* Sidebar */
  .res-sidebar {
    display: block;
    position: sticky;
    top: 100px;
  }
  .res-sidebar__title {
    font-family: Ppmori, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #686868;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
  }
  .res-sidebar__list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .res-sidebar__btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 4px;
    border: none;
    border-bottom: 1px solid transparent;
    background: transparent;
    color: #686868;
    font-family: Ppmori, sans-serif;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 0;
    transition: all 0.2s;
  }
  .res-sidebar__btn:hover {
    color: #171717;
  }
  .res-sidebar__btn.is-active {
    background: transparent;
    color: #171717;
    border-bottom-color: #171717;
    font-weight: 500;
  }

  /* Grid 3 cols */
  .res-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Card desktop */
  .res-card {
    padding: 28px;
    min-height: 220px;
  }
  .res-card:hover {
    border-color: #b0b0b0;
  }
}
