/* ex-inline subjects/baccalaureat.html — externalisé pour la mise en cache */
/* ============================================================================
   VARIABLES
   ============================================================================ */
:root {
  --primary-color: #0066cc;
  --primary-dark: #0052a3;
  --primary-light: #5ba3e0;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --info-color: #06b6d4;
  --text-dark: #1c1d1f;
  --text-medium: #6a6f73;
  --text-light: #9fa5ad;
  --border-color: #d1d7dc;
  --bg-gray: #f7f9fa;
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */
.subjects-hero {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 40px 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  background: white;
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-color);
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero-stats .stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-stats .stat-item i {
  font-size: 2rem;
}

.hero-stats .stat-item strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1;
}

.hero-stats .stat-item span {
  display: block;
  font-size: 0.875rem;
  color: var(--text-medium);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* ============================================================================
   FEATURES BANNER
   ============================================================================ */
.features-banner {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-medium);
}

.feature-item i {
  font-size: 1.2rem;
}

/* ============================================================================
   FILTER CARD
   ============================================================================ */
.filter-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.filter-card .form-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
}

.filter-card .form-select {
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: white;
}

.filter-card .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
  outline: none;
}

/* ============================================================================
   SUBJECTS ACCORDION
   ============================================================================ */
.accordion-item-custom {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.accordion-item-custom:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.accordion-button-custom {
  width: 100%;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: none;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.3s ease;
}

.accordion-button-custom:not(.collapsed) {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
}

.accordion-button-custom .year-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.year-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-size: 1.25rem;
  font-weight: 700;
}

.accordion-button-custom:not(.collapsed) .year-badge {
  background: rgba(255,255,255,0.25);
}

.year-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.session-label {
  font-weight: 600;
  font-size: 1.1rem;
}

.subjects-count {
  font-size: 0.875rem;
  opacity: 0.9;
}

.toggle-icon {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.accordion-button-custom:not(.collapsed) .toggle-icon {
  transform: rotate(180deg);
}

.accordion-body-custom {
  padding: 2rem;
  background: var(--bg-gray);
}

/* ============================================================================
   SUBJECT CARDS
   ============================================================================ */
.subject-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.subject-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.subject-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.subject-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.subject-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.subject-info {
  flex: 1;
}

.subject-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.subject-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-gray);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-medium);
}

.meta-badge i {
  font-size: 0.875rem;
}

.subject-description {
  color: var(--text-medium);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.subject-stats {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.subject-stats .stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-medium);
}

.subject-stats .stat i {
  font-size: 1rem;
}

.subject-actions {
  display: flex;
  gap: 0.75rem;
}

.subject-actions .btn {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
}

/* ============================================================================
   STATS SECTION
   ============================================================================ */
.stat-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}

.stat-icon {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
  font-size: 2rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  color: var(--text-medium);
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}

/* ============================================================================
   EMPTY STATE
   ============================================================================ */
.empty-state {
  padding: 4rem 2rem;
}

.empty-state-icon {
  width: 120px;
  height: 120px;
  background: var(--bg-gray);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.empty-state-icon i {
  font-size: 4rem;
  color: var(--text-light);
}

.empty-state h3 {
  color: var(--text-dark);
  font-weight: 700;
}

/* ============================================================================
   CTA SECTION
   ============================================================================ */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-subtitle {
  font-size: 1.25rem;
  opacity: 0.95;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 991px) {
  .hero-stats {
    gap: 1.5rem;
  }
  
  .hero-stats .stat-item {
    flex-direction: column;
    text-align: center;
  }
  
  .filter-card {
    padding: 2rem 1.5rem;
  }
  
  .accordion-button-custom {
    padding: 1.25rem 1.5rem;
  }
  
  .year-info {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem !important;
  }
}

@media (max-width: 767px) {
  .section-padding {
    padding: 40px 0;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
  
  .filter-card {
    padding: 1.5rem 1rem;
  }
  
  .subject-stats {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .subject-actions {
    flex-direction: column;
  }
  
  .cta-title {
    font-size: 2rem;
  }
  
  .cta-subtitle {
    font-size: 1.1rem;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  .cta-buttons .btn {
    width: 100%;
  }
}

@media (max-width: 575px) {
  .accordion-body-custom {
    padding: 1.5rem 1rem;
  }
  
  .subject-card {
    padding: 1.25rem;
  }
  
  .subject-meta {
    flex-direction: column;
  }
}
