/**
 * Catalogue public — page listing (filtres + grille), pas landing
 * Scope : .lf-courses-catalog
 */
.lf-courses-catalog {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #1c1d1f;
  background: #f7f8fa;
  padding: 20px 0 48px;
}
.lf-courses-catalog > .container {
  max-width: 1280px;
}

/* En-tête compact */
.lf-courses-catalog .lf-courses-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}
.lf-courses-catalog .lf-courses-breadcrumb {
  font-size: 13px;
  color: #6a6f73;
  margin-bottom: 10px;
}
.lf-courses-catalog .lf-courses-breadcrumb a {
  color: #6a6f73;
  text-decoration: none;
}
.lf-courses-catalog .lf-courses-breadcrumb a:hover {
  color: #a435f0;
  text-decoration: underline;
}
.lf-courses-catalog .lf-courses-breadcrumb span[aria-hidden] {
  margin: 0 6px;
  color: #d1d5db;
}
.lf-courses-catalog .lf-courses-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
}
.lf-courses-catalog .lf-courses-header-text h1 {
  font-size: 22px;
  font-weight: 800;
  color: #1c1d1f;
  margin: 0 0 4px;
  line-height: 1.3;
}
.lf-courses-catalog .lf-courses-count {
  font-size: 13px;
  color: #6a6f73;
  margin: 0;
}
.lf-courses-catalog .lf-courses-count strong {
  color: #1c1d1f;
  font-weight: 700;
}
.lf-courses-catalog .lf-courses-count-sep {
  margin: 0 4px;
  color: #d1d5db;
}
.lf-courses-catalog .lf-courses-search-inline {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 260px;
  max-width: 420px;
}
.lf-courses-catalog .lf-courses-search-field {
  position: relative;
  flex: 1;
}
.lf-courses-catalog .lf-courses-search-field > i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 14px;
  pointer-events: none;
}
.lf-courses-catalog .lf-courses-search-field input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 9px 12px 9px 36px;
  font-size: 14px;
  background: #fff;
  color: #1c1d1f;
}
.lf-courses-catalog .lf-courses-search-field input:focus {
  outline: none;
  border-color: #a435f0;
  box-shadow: 0 0 0 2px rgba(164, 53, 240, 0.2);
}
.lf-courses-catalog .lf-courses-search-btn {
  border: none;
  background: #a435f0;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 8px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s;
}
.lf-courses-catalog .lf-courses-search-btn:hover {
  background: #8710d8;
}
.lf-courses-catalog .lf-courses-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  background: #a435f0;
  color: #fff !important;
  border-radius: 8px;
  text-decoration: none !important;
}
.lf-courses-catalog .lf-courses-reset-btn:hover {
  background: #8710d8;
  color: #fff !important;
}
@media (max-width: 767px) {
  .lf-courses-catalog .lf-courses-search-inline {
    max-width: 100%;
    width: 100%;
  }
}

/* Grille principale : filtres + résultats */
.lf-courses-catalog .lf-courses-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 991px) {
  .lf-courses-catalog .lf-courses-layout {
    grid-template-columns: 1fr;
  }
}

/* Sidebar filtres */
.lf-courses-catalog .lf-courses-filters {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 80px;
}
.lf-courses-catalog .lf-courses-filters h3 {
  font-size: 11px;
  font-weight: 700;
  color: #1c1d1f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e7eb;
}
.lf-courses-catalog .lf-courses-filters h3:not(:first-child) {
  margin-top: 20px;
}
.lf-courses-catalog .lf-courses-filters .form-check {
  margin-bottom: 8px;
  padding-left: 1.6em;
}
.lf-courses-catalog .lf-courses-filters .form-check-input {
  border-color: #d8b4fe;
  cursor: pointer;
}
.lf-courses-catalog .lf-courses-filters .form-check-input:checked {
  background-color: #a435f0;
  border-color: #a435f0;
}
.lf-courses-catalog .lf-courses-filters .form-check-label {
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.lf-courses-catalog .lf-courses-filters .form-check-label span:last-child {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 600;
}
.lf-courses-catalog .lf-courses-filters ul {
  list-style: none;
  padding-left: 12px;
  margin: 0 0 4px;
}
.lf-courses-catalog .lf-courses-filters .show-more a {
  font-size: 12px;
  font-weight: 700;
  color: #a435f0;
  text-decoration: none;
}

/* Toolbar résultats */
.lf-courses-catalog .lf-courses-toolbar {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.lf-courses-catalog .lf-courses-toolbar .list-card-control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}
.lf-courses-catalog .lf-courses-toolbar .list-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1.5px solid #e9d5ff;
  background: #faf5ff;
  color: #7c3aed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.lf-courses-catalog .lf-courses-toolbar .list-btn:hover,
.lf-courses-catalog .lf-courses-toolbar .list-btn.active {
  background: linear-gradient(135deg, #a435f0, #7c3aed);
  color: #fff;
  border-color: transparent;
}
.lf-courses-catalog .lf-courses-toolbar .text-14px {
  font-size: 13px;
  color: #6a6f73;
  margin: 0;
}
.lf-courses-catalog .lf-courses-toolbar .select-control {
  border: 1.5px solid #e9d5ff;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  min-width: 180px;
}
.lf-courses-catalog .lf-courses-banner {
  font-size: 13px;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  color: #4c1d95;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.lf-courses-catalog .lf-courses-banner--inline {
  margin-bottom: 12px;
}
.lf-courses-catalog .lf-courses-banner a {
  color: #7c3aed;
  font-weight: 600;
}

/* Grille catalogue — 3 formations par ligne (lg), 2 (md), 1 (mobile) */
.lf-courses-catalog .lf-courses-row,
.lf-courses-catalog .courses-card .row {
  --bs-gutter-x: 1.25rem;
  --bs-gutter-y: 1.25rem;
}
.lf-courses-catalog .lf-course-col {
  display: flex;
}
.lf-courses-catalog .lf-course-col > .courses-card-body {
  width: 100%;
}
.lf-courses-catalog .grid-view-body .courses-card-body,
.lf-courses-catalog .courses-list-view-body .courses-card-body {
  display: block;
  height: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none !important;
  color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.lf-courses-catalog .grid-view-body .courses-card-body:hover,
.lf-courses-catalog .courses-list-view-body .courses-card-body:hover {
  border-color: #c4b5fd;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.lf-courses-catalog .grid-view-body .courses-card-image,
.lf-courses-catalog .courses-list-view-body .courses-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-height: 150px;
  background: linear-gradient(135deg, #faf5ff, #f3e8ff);
}
.lf-courses-catalog .grid-view-body .courses-card-image img,
.lf-courses-catalog .courses-list-view-body .courses-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Annule l’ancien style liste pleine largeur du thème */
.lf-courses-catalog .courses-list-view-card {
  display: block;
}
.lf-courses-catalog .courses-list-view-card .courses-list-view-card-body {
  display: block;
  width: auto;
}
.lf-courses-catalog .courses-card-image-text h3 {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: rgba(30, 10, 60, 0.75);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
}
.lf-courses-catalog .courses-icon {
  top: 10px;
  right: 10px;
}
.lf-courses-catalog .courses-text {
  padding: 14px 16px 16px;
}
.lf-courses-catalog .courses-text h5 {
  font-size: 14px;
  font-weight: 800;
  color: #1c1d1f;
  line-height: 1.35;
  margin-bottom: 8px;
}
.lf-courses-catalog .courses-text .ellipsis-line-2 {
  font-size: 12px;
  color: #6a6f73;
  line-height: 1.5;
  margin-bottom: 10px;
}
.lf-courses-catalog .review-icon {
  margin-bottom: 8px;
}
.lf-courses-catalog .review-icon-star p {
  font-size: 11px;
  color: #6a6f73;
  margin: 0;
}
.lf-courses-catalog .review-icon-star .fa-star.filled {
  color: #f59e0b;
}
.lf-courses-catalog .courses-price-border,
.lf-courses-catalog .lf-course-card-footer-wrap {
  border-top: 1px solid #f3f4f6;
  padding-top: 12px;
  margin-top: 6px;
}
.lf-courses-catalog .lf-course-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 8px;
  margin-top: 0 !important;
}
.lf-courses-catalog .lf-course-card-footer .courses-price-left,
.lf-courses-catalog .lf-course-card-footer .lf-course-credits {
  flex: 0 0 auto;
}
.lf-courses-catalog .courses-price h5,
.lf-courses-catalog .courses-price .price-free {
  font-size: 16px;
  font-weight: 900;
  color: #a435f0;
  margin: 0;
}
/* Durée & leçons — pastilles */
.lf-courses-catalog .lf-course-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}
.lf-courses-catalog .lf-course-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
}
.lf-courses-catalog .lf-course-meta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  flex-shrink: 0;
  font-size: 10px;
}
.lf-courses-catalog .lf-course-meta-label {
  letter-spacing: 0.01em;
}
.lf-courses-catalog .lf-course-meta-pill--duration {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}
.lf-courses-catalog .lf-course-meta-pill--duration .lf-course-meta-icon {
  background: #dbeafe;
  color: #2563eb;
}
.lf-courses-catalog .lf-course-meta-pill--lessons {
  background: #faf5ff;
  color: #6d28d9;
  border-color: #e9d5ff;
}
.lf-courses-catalog .lf-course-meta-pill--lessons .lf-course-meta-icon {
  background: #f3e8ff;
  color: #7c3aed;
}
@media (max-width: 575px) {
  .lf-courses-catalog .lf-course-meta {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }
}
.lf-courses-catalog .lf-course-credits-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 800;
  color: #7c3aed;
  margin: 0;
}
.lf-courses-catalog .lf-course-credits-value .fa-coins {
  color: #d97706;
  font-size: 14px;
}
.lf-courses-catalog .lf-course-credits-unit {
  font-weight: 700;
  font-size: 13px;
}
.lf-courses-catalog .lf-course-credits-free {
  color: #16a34a;
}
.lf-courses-catalog .courses-price-right {
  display: none;
}
.lf-courses-catalog .compare-img {
  display: none;
}

/* Pagination */
.lf-courses-catalog .pagenation-items .pagination {
  gap: 6px;
  flex-wrap: wrap;
}
.lf-courses-catalog .pagenation-items .page-item {
  margin: 0;
}
.lf-courses-catalog .pagenation-items .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1.5px solid #e9d5ff;
  color: #5b21b6 !important;
  background: #fff;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  opacity: 1 !important;
  box-shadow: none;
}
.lf-courses-catalog .pagenation-items .page-item:not(.active) .page-link:hover {
  background: #faf5ff;
  border-color: #c4b5fd;
  color: #6d28d9 !important;
}
.lf-courses-catalog .pagenation-items .page-item.active .page-link,
.lf-courses-catalog .pagenation-items .page-item.active.disabled .page-link,
.lf-courses-catalog .pagenation-items .page-item.active.disabled > span {
  background: linear-gradient(135deg, #a435f0, #7c3aed) !important;
  border-color: #7c3aed !important;
  color: #fff !important;
  opacity: 1 !important;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35);
}
/* Cas où le numéro est rendu directement dans le <li> (sans .page-link) */
.lf-courses-catalog .pagenation-items .page-item.active.disabled:not(:has(.page-link)) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #a435f0, #7c3aed) !important;
  border: 1.5px solid #7c3aed !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
  opacity: 1 !important;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35);
}
.lf-courses-catalog .pagenation-items .page-item.disabled:not(.active) .page-link {
  color: #9ca3af !important;
  background: #f3f4f6;
  border-color: #e5e7eb;
}

/* Vide */
.lf-courses-catalog .not-found {
  background: #fff;
  border: 1.5px dashed #e9d5ff;
  border-radius: 16px;
  padding: 48px 24px;
}
.lf-courses-catalog .not-found h5 {
  font-weight: 800;
  color: #1c1d1f;
}
.lf-courses-catalog .not-found p {
  color: #6a6f73;
}

/* Masquer ancien breadcrumb si présent */
.lf-courses-catalog ~ .learnify-header-banner,
section:has(.learnify-header-banner) {
  display: none;
}
