/* ===================================================== */
/* PAGE CATALOGUE DES FORMATIONS (préfixe fp-)            */
/* ===================================================== */

.fp-catalogue [hidden] {
  display: none !important;
}

.fp-catalogue {
  background: var(--fond-clair);
  padding: 70px 7% 90px;
}

.fp-catalogue > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.fp-catalogue .section-title {
  margin-bottom: 35px;
}

/* ---------- Recherche + liste déroulante ---------- */

.fp-toolbar {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  max-width: 800px;
}

.fp-field {
  position: relative;
}

.fp-field i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gris);
  pointer-events: none;
}

.fp-field input,
.fp-field select {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 44px;
  font-size: 15px;
  font-family: inherit;
  color: var(--noir);
  background-color: var(--blanc);
  border: 1px solid rgba(30, 70, 32, 0.25);
  border-radius: 10px;
}

.fp-field select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231e4620' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.fp-field input:focus,
.fp-field select:focus {
  outline: none;
  border-color: var(--vert-lime);
  box-shadow: 0 0 0 3px rgba(151, 215, 58, 0.2);
}

.fp-result-count {
  max-width: 800px;
  min-height: 20px;
  margin-top: 10px;
  margin-bottom: 25px;
  color: var(--gris);
  font-size: 14px;
}

/* ---------- Catégorie ---------- */

.fp-category {
  margin-bottom: 50px;
}

.fp-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--vert-lime);
}

.fp-category-head h2 {
  color: var(--vert-fonce);
  font-size: 24px;
}

.fp-category-count {
  flex-shrink: 0;
  color: var(--gris);
  font-size: 14px;
  font-weight: 600;
}

.fp-category-desc {
  color: var(--gris);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ---------- Cartes ---------- */

.fp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

.fp-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  background: var(--blanc);
  border: 1px solid rgba(30, 70, 32, 0.12);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(30, 70, 32, 0.06);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.fp-card:hover {
  border-color: var(--vert-lime);
  box-shadow: 0 8px 22px rgba(30, 70, 32, 0.12);
}

.fp-card h3 {
  color: var(--vert-fonce);
  font-size: 18px;
  line-height: 1.4;
}

.fp-card-desc {
  color: var(--gris);
  font-size: 15px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fp-card-btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--vert-fonce);
  color: var(--blanc);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.fp-card-btn:hover {
  background: var(--vert-lime);
  color: var(--vert-noir);
}

/* ---------- Aucun résultat ---------- */

.fp-empty {
  text-align: center;
  padding: 50px 20px;
  background: var(--blanc);
  border: 1px dashed rgba(30, 70, 32, 0.25);
  border-radius: 14px;
}

.fp-empty h3 {
  color: var(--vert-fonce);
  margin-bottom: 8px;
}

.fp-empty p {
  color: var(--gris);
  margin-bottom: 18px;
}

.fp-empty button {
  padding: 11px 22px;
  border: none;
  border-radius: 10px;
  background: var(--vert-fonce);
  color: var(--blanc);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.fp-empty button:hover {
  background: var(--vert-lime);
  color: var(--vert-noir);
}

/* ---------- Responsive ---------- */

@media (max-width: 700px) {
  .fp-catalogue {
    padding: 45px 16px 60px;
  }

  .fp-toolbar {
    grid-template-columns: 1fr;
  }

  .fp-category-head h2 {
    font-size: 20px;
  }

  .fp-grid {
    grid-template-columns: 1fr;
  }
}
