/* =============================================
   FORMATION AUTO-ÉCOLE - PROGRAMME REMC
   ============================================= */

/* Page wrapper */
.formation-page {
  padding-top: 80px;
}

/* =============================================
   HERO SECTION
   ============================================= */
.formation-hero {
  background: var(--gradient-hero);
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.formation-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 30% 20%,
      rgba(235, 172, 162, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 70% 80%,
      rgba(175, 164, 206, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.formation-hero .container {
  position: relative;
  z-index: 1;
}

.formation-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--glass-bg-subtle);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  color: var(--color-sage-light);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.formation-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.formation-hero .text-gradient {
  background: linear-gradient(
    135deg,
    var(--color-pink) 0%,
    var(--color-sage) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.formation-hero .hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.hero-stats-mini {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--glass-bg-subtle);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--glass-radius-sm);
}

.stat-number-mini {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
}

.stat-label-mini {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

/* =============================================
   ONGLETS DE NAVIGATION (COMPÉTENCES)
   ============================================= */
.competence-tabs {
  position: sticky;
  top: 70px;
  z-index: 100;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  padding: 0.75rem 0;
}

.competence-tabs .container {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.competence-tabs .container::-webkit-scrollbar {
  display: none;
}

.competence-tab {
  flex: 1;
  min-width: max-content;
  padding: 0.7rem 1.25rem;
  border: 2px solid transparent;
  border-radius: var(--glass-radius-sm);
  background: var(--color-sage-light);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  white-space: nowrap;
}

.competence-tab:hover {
  background: var(--color-pink-light);
  color: var(--color-navy);
  transform: translateY(-2px);
}

.competence-tab.active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(33, 46, 83, 0.3);
}

/* =============================================
   SECTION COMPÉTENCES
   ============================================= */
.competences-section {
  padding: 3rem 0 4rem;
}

/* =============================================
   CARTE COMPÉTENCE (COLLAPSIBLE)
   ============================================= */
.competence-card {
  background: white;
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  transition: all var(--transition-base);
  margin-bottom: 1.5rem;
}

.competence-card:hover {
  box-shadow: var(--glass-shadow-lg);
}

.competence-header {
  background: var(--gradient-primary);
  border: none;
  padding: 1.25rem 1.5rem;
  font-weight: 700;
  font-size: 1.15rem;
  position: relative;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  user-select: none;
  transition: all var(--transition-base);
}

.competence-header:hover {
  filter: brightness(1.1);
}

.competence-header .competence-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: var(--glass-bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.competence-header .competence-title {
  flex: 1;
}

.competence-header .competence-count {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  background: var(--glass-bg-subtle);
  border-radius: 50px;
  white-space: nowrap;
}

.competence-header .chevron {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.competence-header.collapsed .chevron {
  transform: rotate(-90deg);
}

.competence-body {
  padding: 1.5rem;
  transition: all var(--transition-base);
}

.competence-body.collapsed {
  display: none;
}

/* =============================================
   OBJECTIF ITEM
   ============================================= */
.objectif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--glass-radius-sm);
  transition: background var(--transition-fast);
}

.objectif-item:hover {
  background: rgba(190, 211, 195, 0.15);
}

.objectif-item + .objectif-item {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.objectif-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: var(--color-sage-light);
  color: #2d6a4f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  margin-top: 2px;
}

.objectif-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.objectif-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* =============================================
   CTA SECTION
   ============================================= */
.formation-cta {
  background: var(--gradient-primary);
  padding: 4rem 0;
  text-align: center;
}

.formation-cta h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.formation-cta p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .formation-page {
    padding-top: 70px;
  }

  .formation-hero {
    padding: 3rem 0 2rem;
  }

  .formation-hero h1 {
    font-size: 1.75rem;
  }

  .hero-stats-mini {
    gap: 0.75rem;
  }

  .stat-mini {
    padding: 0.75rem 1rem;
    flex: 1;
    min-width: 120px;
  }

  .stat-number-mini {
    font-size: 1.35rem;
  }

  .competence-tabs {
    top: 60px;
    padding: 0.5rem 0;
  }

  .competence-tabs .container {
    gap: 0.5rem;
    padding: 0 1rem;
  }

  .competence-tab {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }

  .competences-section {
    padding: 2rem 0 3rem;
  }

  .competence-header {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }

  .competence-header .competence-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    font-size: 1rem;
  }

  .competence-header .competence-count {
    display: none;
  }

  .competence-body {
    padding: 1rem;
  }

  .objectif-item {
    padding: 0.7rem 0.5rem;
  }

  .formation-cta {
    padding: 3rem 0;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .competence-tab {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
  }

  .formation-hero .hero-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
  }
}

/* =============================================
   PRINT
   ============================================= */
@media print {
  .competence-tabs,
  .formation-cta,
  header,
  footer {
    display: none !important;
  }

  .formation-page {
    padding-top: 0;
  }

  .formation-hero {
    background: none !important;
    color: black !important;
    padding: 1rem 0;
  }

  .formation-hero h1,
  .formation-hero .text-gradient {
    color: black !important;
    -webkit-text-fill-color: black !important;
  }

  .formation-hero .hero-badge,
  .hero-stats-mini {
    display: none;
  }

  .competence-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .competence-header {
    background: #f5f5f5 !important;
    color: black !important;
  }

  .competence-body.collapsed {
    display: block !important;
  }
}
