/* ─── FORMATIONS PAGE ────────────────────────── */

/* Header */
.fm-header {
  background: #000000;
  padding: 70px 48px 50px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.fm-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.fm-header h1 {
  font-size: clamp(24px, 3.5vw, 46px);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.25;
  margin-bottom: 16px;
}

.fm-header p {
  font-size: 15px;
  color: rgba(255,255,255,0.5);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.fm-header-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}

.fm-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fm-stat-num {
  font-size: 22px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1;
}

.fm-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.5px;
}

.fm-stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.12);
}

/* Section principale */
.fm-section {
  background: #000000;
  padding: 50px 48px 90px;
}

.fm-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* ─── FILTRE ──────────────────────────────────── */
.fm-filter-bar {
  display: flex;
  gap: 0;
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 50px;
  overflow: hidden;
  width: fit-content;
  margin: 0 auto 50px;
  background: rgba(0,0,0,0.4);
  flex-wrap: wrap;
}

.fm-filter-btn {
  background: transparent;
  color: rgba(255,255,255,0.6);
  border: none;
  border-right: 1px solid rgba(255,255,255,0.12);
  padding: 11px 22px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.fm-filter-btn:last-child { border-right: none; }
.fm-filter-btn:hover { background: rgba(255,255,255,0.08); color: #FFFFFF; }
.fm-filter-btn.active {
  background: #FFFFFF;
  color: #000000;
  font-weight: 700;
}

/* ─── GRILLE FORMATIONS ───────────────────────── */
.fm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Carte */
.fm-card {
  background: #000000;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}

.fm-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,0.22);
}

.fm-card.hidden { display: none; }

/* Thumbnail */
.fm-thumbnail {
  position: relative;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fm-thumb-1 { background: linear-gradient(135deg, #000000 0%, rgba(255,255,255,0.05) 100%); }
.fm-thumb-2 { background: linear-gradient(135deg, #000000 0%, rgba(255,255,255,0.06) 100%); }
.fm-thumb-3 { background: linear-gradient(135deg, #000000 0%, rgba(255,255,255,0.04) 100%); }
.fm-thumb-4 { background: linear-gradient(135deg, #000000 0%, rgba(255,255,255,0.06) 100%); }
.fm-thumb-5 { background: linear-gradient(135deg, #000000 0%, rgba(255,255,255,0.05) 100%); }
.fm-thumb-6 { background: linear-gradient(135deg, #000000 0%, rgba(255,255,255,0.07) 100%); }

.fm-thumb-icon {
  color: rgba(255,255,255,0.15);
}

.fm-thumb-icon svg {
  width: 64px;
  height: 64px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fm-level {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  padding: 4px 10px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.15);
}

.fm-level-avance {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
}

/* Corps de la carte */
.fm-card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.fm-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.fm-cat-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

.fm-duration {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}

.fm-duration svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.fm-card-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.4;
  margin-bottom: 10px;
}

.fm-card-body p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  margin-bottom: 16px;
  flex: 1;
}

/* Formateur */
.fm-instructor {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  margin-bottom: 16px;
}

.fm-instructor-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.fm-instructor-avatar svg {
  width: 18px;
  height: 18px;
  stroke: rgba(255,255,255,0.35);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fm-instructor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.fm-instructor-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fm-instructor-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
}

.fm-instructor-name {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
}

/* Inclus */
.fm-includes {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.fm-includes li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}

.fm-includes li svg {
  width: 13px;
  height: 13px;
  stroke: rgba(255,255,255,0.4);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Footer carte */
.fm-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.fm-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fm-price-amount {
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
}

.fm-price-old {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  text-decoration: line-through;
}

/* Bouton acheter */
.fm-btn-buy {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #FFFFFF;
  color: #000000;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 50px;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

.fm-btn-buy:hover {
  background: rgba(255,255,255,0.88);
  transform: translateY(-1px);
}

.fm-btn-buy svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 1024px) {
  .fm-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .fm-header  { padding: 50px 20px 36px; }
  .fm-section { padding: 36px 20px 70px; }
  .fm-grid    { grid-template-columns: 1fr; }
  .fm-filter-bar {
    border-radius: 14px;
    width: 100%;
  }
  .fm-filter-btn {
    flex: 1;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
  }
  .fm-filter-btn:last-child { border-bottom: none; }
}
