/* ========== VARIABLES ========= */
:root {
  --main: #4361ee;
  --main-light: #4cc9f0;
  --main-dark: #3a0ca3;
  --accent: #f72585;
  --light: #f8f9fa;
  --dark: #212529;
  --success: #4ade80;
  --warning: #fbbf24;
  --danger: #f43f5e;
  --text: #374151;
  --text-light: #6b7280;
  --card-bg: #ffffff;
  --card-border: #e5e7eb;
  --section-bg: #f9fafb;
  --table-border: #e5e7eb;
  --table-header-bg: #f3f4f6;
  --table-hover: #f9fafb;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --header-height: 60px;
  --section-nav-height: 60px;
  --section-sticky-height: 55px;
  --sidebar-width: 280px;
  --sidebar-width-mobile: 260px;
  --sidebar-bg: linear-gradient(135deg, var(--main-dark), var(--main));
  --sidebar-text: white;
  --sidebar-link-hover: rgba(255, 255, 255, 0.1);
  --sidebar-border: rgba(255, 255, 255, 0.1);
}

/* ========== RESET & BASE ========= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background-color: var(--light);
  position: relative;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========== NAVIGATION ========= */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 0.6rem;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.sidebar-header {
  margin-bottom: 0.8rem;
  padding: 0.6rem 0 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin: 0 0 0.8rem 0;
  backdrop-filter: blur(10px);
}

.sidebar-header h2 {
  margin: 0 0 0.2rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
}

.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  margin-bottom: 0.02rem;
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,0.1);
  color: white;
}

.nav-link i {
  width: 20px;
  margin-right: 0.5rem;
  text-align: center;
  font-size: 0.9rem;
}

/* Catégories dans la sidebar */
.nav-category {
  display: block;
  margin: 0.2rem 0;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.nav-category span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  display: block;
  padding: 0.1rem 0.75rem;
}

/* Séparation pour le lien "À propos" */
.nav-links li:last-child {
  margin-top: 0.6rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links li:last-child .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* ========== CONTENU PRINCIPAL ========= */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 0;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* ========== HEADERS ========= */
.main-header {
  background: linear-gradient(135deg, var(--main), var(--main-light));
  color: white;
  padding: 3.5rem 2rem;
  position: relative;
  overflow: hidden;
}

.main-header::before {
  content: '';
  position: absolute;
  right: -5%;
  bottom: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.main-header::after {
  content: '';
  position: absolute;
  left: 45%;
  top: -15%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.main-header h1 {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
}

.main-header p {
  font-size: 1.125rem;
  max-width: 650px;
  position: relative;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.main-info {
  flex: 1;
}

/* ========== MINOR SPECIALTY SYSTEM - CLEAN REWRITE ========= */

/* Container for the whole system */
.minor-specialty-container {
  position: relative;
  margin-top: -30px;
  align-self: flex-start;
}

/* The visible bubble */
.minor-specialty-bubble {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  padding: 16px 20px;
  border-radius: 50px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 280px;
  z-index: 100;
}

.minor-specialty-bubble:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.bubble-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.bubble-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bubble-label {
  font-size: 12px;
  opacity: 0.9;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bubble-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

/* The tooltip that appears below */
.minor-specialty-tooltip {
  position: absolute;
  top: 100%;
  left: 3px;
  right: 3px;
  margin-top: -25px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 16px 16px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, box-shadow 0.4s ease-out;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  z-index: 50;
}

.minor-specialty-container:hover .minor-specialty-tooltip {
  max-height: 200px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.tooltip-content {
  padding: 30px 18px 18px 18px;
  color: #334155;
}

.tooltip-content p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.home-header {
  background: linear-gradient(135deg, var(--main-dark), var(--accent));
  color: white;
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.home-header::before {
  content: '';
  position: absolute;
  right: -15%;
  bottom: -50%;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.home-header::after {
  content: '';
  position: absolute;
  left: -15%;
  top: -50%;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.home-header h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  position: relative;
}

.home-header .lead {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

/* ========== CONTENU ========= */
.content {
  padding: 2.5rem;
}

/* Navigation des sections - AMÉLIORÉ */
.section-nav {
  display: flex;
  justify-content: center;
  overflow-x: auto;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  margin-bottom: 2.5rem;
  position: sticky;
  top: 10px;
  z-index: 100;
  padding: 0.5rem;
  scrollbar-width: none;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(229, 231, 235, 0.5);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.section-nav:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.section-nav::-webkit-scrollbar {
  display: none;
}

.section-nav-item {
  white-space: nowrap;
  padding: 0.85rem 1.35rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0.25rem;
  position: relative;
  overflow: hidden;
}

.section-nav-item::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--main);
  transform: translateX(-50%);
  transition: width 0.3s ease;
  border-radius: 4px;
}

.section-nav-item:hover {
  background-color: rgba(67, 97, 238, 0.08);
  color: var(--main-dark);
  transform: translateY(-2px);
}

.section-nav-item:hover::before {
  width: 40%;
}

.section-nav-item.active {
  background-color: var(--main);
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.25);
  z-index: 10;
}

.section-nav-item.active span {
  color: white;
}

.section-nav-item.active::before {
  width: 0;
}

.section-nav-item i {
  font-size: 1rem;
  transition: transform 0.3s ease;
  color: inherit;
}

.section-nav-item span {
  color: inherit;
}

.section-nav-item:hover i {
  transform: translateY(-2px);
}

.section-nav-item.active i {
  transform: scale(1.1);
  color: white;
}

.section-nav-item.clicked {
  animation: pulse 0.3s ease;
  background-color: var(--main);
  color: white;
}

.section-nav-item.clicked i,
.section-nav-item.clicked span {
  color: white;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* Grille des spécialités */
.specialite-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 3rem 0;
  justify-content: center;
  /* Ensure equal heights for cards in the same row */
  align-items: stretch;
  align-content: stretch;
}

.specialite-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--card-color, var(--main));
  flex: 0 1 300px;
  min-width: 350px;
  /* Ensure equal heights for cards in the same row */
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.specialite-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.specialite-card::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0) 50%, rgba(var(--card-color, var(--main)), 0.03) 100%);
  pointer-events: none;
}

.specialite-icon {
  width: 80px;
  height: 80px;
  min-width: 80px;
  flex-shrink: 0;
  margin: 0 auto 1.5rem;
  background: var(--card-color, var(--main));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.specialite-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--dark);
  flex-shrink: 0;
}

.specialite-card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  padding: 0 1rem;
  flex-grow: 1;
}

.btn-primary {
  display: inline-block;
  background: var(--card-color, var(--main));
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-top: auto;
}

.btn-primary:hover {
  background: var(--main-dark);
  transform: translateY(-2px);
}

/* GitHub explore button - subtle styling that fits the page */
.github-explore-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  color: #374151;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.github-explore-btn:hover {
  background: #f1f5f9;
  color: #1f2937;
  border-color: #d1d5db;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.github-explore-btn i {
  font-size: 1.1rem;
  color: #6b7280;
  transition: color 0.3s ease;
}

.github-explore-btn:hover i {
  color: #374151;
}

/* Section À propos */
.home-about {
  padding: 3rem 1.5rem;
}

.home-about h2 {
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 2rem;
  text-align: center;
}

.home-about-content {
  display: flex;
  gap: 2rem;
  align-items: center;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.home-about-text {
  flex: 3;
}

.home-about-text p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  padding: 0 1.5rem;
}

.home-about-image {
  flex: 2;
  text-align: center;
}

.home-about-image img {
  max-width: 100%;
  border-radius: 8px;
}

/* ========== SECTIONS ========= */
section {
  margin: 0 auto 2rem auto;
  padding: 1rem 2.5rem;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  animation: fadeIn 0.5s ease-out forwards;
  position: relative;
  /* Fixed width for section cards with responsive behavior */
  max-width: 1200px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

section:nth-child(odd) {
  background: var(--section-bg);
}

/* Correction pour les sections dans les pages de spécialité */
.specialite-content section {
  background-color: var(--card-bg) !important;
  backdrop-filter: none !important;
  padding-top: 0.5rem;
}

/* Assurer que les cartes à l'intérieur des sections ont un fond blanc */
.specialite-content .feature-card,
.specialite-content .project-card,
.specialite-content .timeline-content,
.specialite-content .accordion-content {
  background-color: var(--card-bg);
}

/* Titres de section avec effet sticky amélioré - REMOVED BLUE LINE */
section h2 {
  position: relative;
  padding: 1.5rem 0;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  border-radius: 12px;
  font-size: 2rem;
  font-weight: 700;
  color: var(--main);
  transition: var(--transition);
  display: flex;
  align-items: center;
  text-align: center;
  justify-content: center;
  /* Removed the blue line under section titles */
}

section h2 i {
  background: linear-gradient(135deg, var(--main), var(--main-light));
  color: white;
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
  flex-shrink: 0;
  text-align: center;
  line-height: 48px;
  font-style: normal;
  position: relative;
}

section h2 i::before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

section:first-of-type h2 {
  margin-top: 0;
  padding-top: 0.5rem;
}

section h3 {
  text-align: center;
  color: var(--main);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 1.5rem 0;
}

/* General section content centering */
section > p {
  text-align: center;
  max-width: 800px;
  margin: 1rem auto;
}

section .text-center {
  text-align: center;
}

/* Centered card wrapper for single cards that shouldn't take full width */
.centered-card {
  display: flex;
  justify-content: center;
  margin: 2rem auto;
}

.centered-card .feature-card {
  max-width: 800px;
  width: 100%;
}

section:nth-child(odd) h2 {
  background: transparent;
}

section:nth-child(even) h2 {
  background: transparent;
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

section h2.is-sticky::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--main), var(--main-light), transparent);
}

h2 i {
  margin-right: 0.75rem;
  color: var(--main);
}

h3 {
  color: var(--main);
  font-size: 1.4rem;
  margin: 1rem 0 0.7rem;
}

h4 {
  color: var(--text);
  font-size: 1.2rem;
  margin: 1.25rem 0 0.5rem;
}

p {
  margin-bottom: 0.75rem;
}

a {
  color: var(--main);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 500;
}

a:hover {
  color: var(--main-dark);
  text-decoration: underline;
}

/* ========== CARTES ET COMPOSANTS ========= */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 2rem auto;
  padding: 0 1rem;
  max-width: 1200px;
  justify-content: center;
  /* Ensure equal heights for cards in the same row */
  align-items: stretch;
  align-content: stretch;
}

.card-grid .feature-card {
  flex: 1 1 420px;
  min-width: 380px;
  display: flex;
  flex-direction: column;
  /* Force equal heights */
  align-self: stretch;
}

/* 3-column card grid for specific sections */
.card-grid-3col {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 2rem auto;
  padding: 0 1rem;
  max-width: 1200px;
  justify-content: center;
  /* Ensure equal heights for cards in the same row */
  align-items: stretch;
  align-content: stretch;
}

.card-grid-3col .feature-card {
  flex: 1 1 350px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  /* Force equal heights */
  align-self: stretch;
}

/* Flexbox handles responsive layout automatically */
/* Utility class to center orphan elements in 2-column layouts */
.center-orphan {
  justify-content: center;
}



/* Special handling for 3 items in 2-column grids */
/* Note: :has() selector may not be supported in all browsers */
/* Use .center-orphan class for manual centering when needed */

/* Ensure consistent spacing and alignment in flexbox layouts */
.card-grid,
.card-grid-3col,
.projects-grid,
.specialite-grid {
  align-items: stretch;
  align-content: stretch;
}

/* Force all cards in flexbox containers to have equal heights */
.card-grid > *,
.card-grid-3col > *,
.projects-grid > *,
.specialite-grid > * {
  display: flex;
  flex-direction: column;
  /* Ensure all cards stretch to match the tallest card in their row */
  align-self: stretch;
  /* Allow flexbox to determine height based on content */
  min-height: 0;
}

/* Responsive adjustments for flexbox layouts */
@media (max-width: 768px) {
  .card-grid,
  .card-grid-3col,
  .projects-grid {
    flex-direction: column;
  }
  
  .card-grid .feature-card,
  .card-grid-3col .feature-card,
  .projects-grid .feature-card {
    flex: 1 1 100%;
    min-width: 100%;
  }
}

/* Project cards flexbox - force 3 per row */
.projects-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem auto;
  padding: 0 1rem;
  max-width: 1400px;
  justify-content: center;
  /* Ensure equal heights for cards in the same row */
  align-items: stretch;
  align-content: stretch;
}

.projects-grid .feature-card {
  flex: 0 1 420px;
  min-width: 380px;
  display: flex;
  flex-direction: column;
  /* Force equal heights */
  align-self: stretch;
}

.feature-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  padding: 1.5rem;
  overflow: hidden;
  /* Ensure all cards stretch to match tallest in row */
  align-self: stretch;
  /* Minimum height but allow flex to control final height */
  min-height: 200px;
  /* Distribute content properly within card */
  justify-content: flex-start;
}

.feature-card h4 {
  display: flex;
  align-items: center;
  margin: 0 0 1rem 0;
  color: var(--main);
  /* Fixed spacing between title and content */
  margin-bottom: 1rem !important;
  /* Prevent title from growing */
  flex-shrink: 0;
}

.feature-card > p {
  margin: 0 0 1rem 0;
  /* Let main content take up available space */
  flex-grow: 1;
}

.feature-card > ul {
  margin: 0;
  padding-left: 1.5rem;
  /* Allow ul to take up available space but start immediately after title */
  flex-grow: 1;
  /* Ensure ul starts right after title with minimal margin */
  margin-top: 0 !important;
}

.feature-card > *:last-child {
  margin-bottom: 0;
  /* Only push to bottom if it's not the main content */
  margin-top: 0;
  /* Prevent flex shrink on last element */
  flex-shrink: 0;
}

/* Additional spacing consistency for feature cards */
.feature-card > *:not(h4):not(:last-child) {
  margin-bottom: 1rem;
}

/* Ensure all feature cards have consistent internal spacing */
.feature-card > h4 + * {
  margin-top: 0;
}

/* Ensure content is properly distributed in cards for equal heights */
.feature-card > *:last-child {
  margin-top: auto;
  flex-shrink: 0;
}

/* Ensure specialite cards have proper content distribution */
.specialite-card > *:last-child {
  margin-top: auto;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}


.feature-card h4 i {
  background: var(--main-light);
  color: white;
  width: 36px;
  height: 36px;
  min-width: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 1rem;
}

/* Style amélioré pour les pages About et autres sections */
.content .feature-card h4 i {
  width: 40px;
  height: 40px;
  min-width: 40px;
  font-size: 1.1rem;
}


.difficulty {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-left: 0.75rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.beginner, .debutant {
  background: linear-gradient(135deg, #10B981, #34D399);
  color: white;
}

.beginner::before, .debutant::before {
  content: '⭐';
  margin-right: 6px;
  font-size: 0.9em;
}

.intermediate, .intermediaire {
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
  color: white;
}

.intermediate::before, .intermediaire::before {
  content: '🚀';
  margin-right: 6px;
  font-size: 0.9em;
}

.advanced, .avance {
  background: linear-gradient(135deg, #EF4444, #F87171);
  color: white;
}

.advanced::before, .avance::before {
  content: '🔥';
  margin-right: 6px;
  font-size: 0.9em;
}

/* Project cards specific styling */
.project-card {
  border-left: 4px solid var(--main);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  border-left-color: var(--accent);
}

.project-card:hover::after {
  content: "👆 Cliquer pour voir les détails";
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: var(--main);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.75rem;
  opacity: 0.9;
  pointer-events: none;
}

.project-card h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-card .project-summary {
  margin-bottom: 1rem;
  flex-grow: 1;
}

.project-card .project-summary .mb-3 {
  margin-bottom: 0.75rem;
}

/* ========== PROJECT MODAL STYLES ========= */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  /* Ensure modal is above everything else and covers full screen */
  margin: 0;
  padding: 0;
}

.project-modal.active {
  display: flex;
  opacity: 1;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  cursor: pointer;
  z-index: 2001;
}

.modal-content {
  position: relative;
  background: var(--card-bg);
  border-radius: 12px;
  max-width: 1000px;
  max-height: 90vh;
  width: 95%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform: scale(0.9) translateY(30px);
  transition: transform 0.3s ease;
  z-index: 2002;
  margin: auto;
}

.project-modal.active .modal-content {
  transform: scale(1) translateY(0);
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
  height: 100vh;
}

.modal-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--main), var(--main-light));
  color: white;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  flex: 1;
  padding-right: 1rem;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  max-height: calc(90vh - 120px);
}

.project-meta {
  margin-bottom: 1.5rem;
  text-align: center;
}

.project-meta .difficulty {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.project-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-item {
  padding: 1.5rem;
  background: var(--section-bg);
  border-radius: 8px;
  border-left: 4px solid var(--main);
  text-align: left;
}

.info-item strong {
  display: block;
  color: var(--main);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.info-item p {
  margin: 0;
  line-height: 1.6;
  color: var(--text);
}

.description-content {
  margin-top: 0.75rem;
  text-align: left !important;
}

.description-content p {
  margin: 0 0 1rem 0;
  line-height: 1.6;
  color: var(--text);
  text-align: left !important;
}

.description-content p:last-child {
  margin-bottom: 0;
}

.description-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
  list-style-type: disc;
  text-align: left !important;
}

.description-content li {
  margin: 0.5rem 0;
  line-height: 1.6;
  color: var(--text);
  text-align: left !important;
}

.description-content li strong {
  color: var(--main);
  font-weight: 600;
}

.tech-list, .resources-list {
  margin: 0.75rem 0 0 0;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.tech-list li, .resources-list li {
  margin: 0.5rem 0;
  line-height: 1.5;
  color: var(--text);
}

.resources-list a {
  color: var(--main);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.resources-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.tech-list, .resources-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.tech-list li, .resources-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(67, 97, 238, 0.1);
  color: var(--text);
}

.tech-list li:last-child, .resources-list li:last-child {
  border-bottom: none;
}

.resources-list li a {
  color: var(--main);
  text-decoration: none;
  font-weight: 500;
}

.resources-list li a:hover {
  color: var(--main-dark);
  text-decoration: underline;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Mobile responsiveness for modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 95vh;
  }
  
  .modal-header {
    padding: 1.5rem 1.5rem 1rem;
  }
  
  .modal-header h3 {
    font-size: 1.25rem;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  .info-item {
    padding: 1rem;
  }
  
  /* Mobile touch indicators */
  .project-card:hover::after {
    content: "👆 Toucher pour voir les détails";
  }
}

.project-card .mb-3 {
  margin-bottom: 1rem;
}



/* Accordéon */
.accordion {
  margin: 2rem auto;
  max-width: 900px;
}

.accordion-item {
  margin-bottom: 0.75rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  overflow: hidden;
}

.accordion-header {
  padding: 1rem 1.25rem;
  background: var(--section-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: var(--main-dark);
}

.accordion-header:hover {
  background: #eef2ff;
}

.accordion-header i {
  transition: transform 0.2s;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: white;
}

.accordion-content-inner {
  padding: 1.25rem;
}

.accordion-item.active .accordion-header i {
  transform: rotate(180deg);
}

.accordion-item.active .accordion-content {
  max-height: 1000px;
}

/* Citation et blocs spéciaux */
blockquote {
  background-color: var(--section-bg);
  border-left: 4px solid var(--main);
  padding: 1.25rem;
  margin: 2rem auto;
  border-radius: 0 8px 8px 0;
  max-width: 800px;
  text-align: center;
  position: relative;
}

blockquote::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 3rem;
  color: rgba(67, 97, 238, 0.1);
  line-height: 1;
}

blockquote p {
  margin: 0;
  padding-left: 1.5rem;
  font-style: italic;
}

aside {
  background: linear-gradient(135deg, var(--main-light), var(--main));
  color: white;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

aside::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  opacity: 0.2;
}

aside h3 {
  color: white;
  margin-top: 0;
  position: relative;
}

aside p {
  position: relative;
}

/* Clean flexbox roadmap styling - keep stretched behavior for learning path */
.linear-roadmap {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin: 2rem auto;
  max-width: 1200px;
  padding: 0 1rem;
  align-items: stretch;
}

.roadmap-item {
  flex: 1 1 350px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  position: relative;
  height: 100%;
}

.roadmap-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
  border-color: var(--main);
}

@media (max-width: 1024px) {
  .roadmap-item {
    flex: 0 1 calc(50% - 0.75rem);
  }
}

@media (max-width: 768px) {
  .roadmap-item {
    flex: 0 1 100%;
  }
}

.step-number {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--main), var(--main-light));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 3px 10px rgba(67, 97, 238, 0.4);
  margin-bottom: 0.75rem;
}

.step-content {
  flex: 1;
}

.step-content h4 {
  color: var(--main);
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 700;
}

.step-content p {
  margin: 0 0 0.75rem 0;
  color: var(--text);
  line-height: 1.4;
  font-size: 0.85rem;
}

.step-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(76, 201, 240, 0.1));
  color: var(--main);
  text-decoration: none;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(67, 97, 238, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.resource-link::before {
  content: '📚';
  font-size: 0.8rem;
}

.resource-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--main), var(--main-light));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.resource-link:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.resource-link:hover::after {
  opacity: 1;
}

.resource-link:hover::before {
  position: relative;
  z-index: 1;
}

.resource-link > span {
  position: relative;
  z-index: 1;
}

.resources-list {
  margin-top: 0.75rem;
  padding-left: 1rem;
}

.resources-list li {
  margin: 0.5rem 0;
}

/* Liste d'étapes et timeline */
.step-list {
  list-style: none;
  counter-reset: step;
  margin: 1.5rem 0;
}

.step-list li {
  position: relative;
  padding: 0 0 1.5rem 3rem;
  counter-increment: step;
}

.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--main);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.step-list li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 16px;
  top: 32px;
  height: calc(100% - 32px);
  width: 2px;
  background: rgba(67, 97, 238, 0.2);
}

.step-list h4 {
  margin: 0 0 0.5rem;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 1200px;
  margin: 2rem auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 6px;
  background-color: rgba(67, 97, 238, 0.15);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  right: -12px;
  top: 15px;
  border-radius: 50%;
  background-color: white;
  border: 4px solid var(--main);
  z-index: 1;
}

.timeline-item.left {
  left: 0;
}

.timeline-item.right {
  left: 50%;
}

.timeline-item.right::after {
  left: -12px;
}

.timeline-content {
  padding: 20px;
  background-color: var(--card-bg);
  position: relative;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.timeline-content h4 {
  margin-top: 0;
}

/* ========== MEDIA CARDS ========= */
.media-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  padding: 1.5rem;
  overflow: hidden;
  /* Ensure media cards also stretch to equal heights */
  align-self: stretch;
}

.media-card .video-embed-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin-bottom: 1rem;
  border-radius: 6px;
  background-color: #000;
}

.media-card .video-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.media-card .video-title {
  font-size: 1.1rem;
  color: var(--dark);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.media-card .video-description {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0;
  line-height: 1.5;
}

/* Utilities */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.text-center { text-align: center; }
.text-right { text-align: right; }

.badge {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 20px;
  margin: 0.25rem 0;
}

.badge-primary { background-color: var(--main); }
.badge-success { background-color: var(--success); }
.badge-warning { background-color: var(--warning); }
.badge-danger { background-color: var(--danger); }

/* Footer */
.site-footer {
  background: var(--section-bg);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-light);
  border-top: 1px solid var(--card-border);
  margin-top: 3rem;
}

.developer-link {
  color: var(--main);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.developer-link:hover {
  color: var(--main-dark);
  text-decoration: underline;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  font-size: 1.5rem;
  color: var(--text-color);
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: var(--primary-color);
}

@media (max-width: 600px) {
  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Bouton "back to top" */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--main);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--accent);
  transform: translateY(-3px);
}

/* Menu toggle pour mobile */
.menu-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 101;
  background: var(--main);
  color: white;
  border: none;
  padding: 0.5rem 0.8rem;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.menu-toggle:hover {
   background: var(--main-dark);
}

/* Overlay for when sidebar is open on mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

section {
  animation: fadeIn 0.5s ease-out forwards;
}

section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }
section:nth-child(5) { animation-delay: 0.4s; }
section:nth-child(6) { animation-delay: 0.5s; }
section:nth-child(7) { animation-delay: 0.6s; }

/* Responsivité */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 100;
    box-shadow: 0 0 25px rgba(0,0,0,0.2);
    width: var(--sidebar-width-mobile);
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .menu-toggle {
    display: block;
  }
  
  body.sidebar-open {
     overflow: hidden;
  }
  
  .card-grid,
  .card-grid-3col,
  .projects-grid {
    flex-direction: column;
  }
  
  .home-about-content {
    flex-direction: column;
  }
  
  .home-about-text,
  .home-about-image {
    flex: 1;
  }
  
  .home-about-image {
    margin-top: 2rem;
    order: -1;
  }
  
  .section-nav {
    overflow-x: auto;
    white-space: nowrap;
    padding: 0.5rem;
    top: 10px;
    margin-bottom: 1.5rem;
    z-index: 95;
  }
  
  .section-nav-item {
    padding: 0.7rem 1.1rem;
    font-size: 0.9rem;
    gap: 0.4rem;
  }
  
  .section-nav-item i {
    font-size: 1rem;
  }
}

@media screen and (max-width: 768px) {
  .timeline::after {
    left: 31px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  
  .timeline-item.right {
    left: 0;
  }
  
  .timeline-item::after {
    left: 19px;
    top: 15px;
  }
  
  .timeline-item.right::after {
    left: 19px;
  }
  
  .main-header h1, .home-header h1 {
    font-size: 2rem;
  }
  
  /* Mobile responsive for header with minor specialty bubble */
  .header-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  
  .minor-specialty-container {
    margin-top: -20px;
  }
  
  .minor-specialty-bubble {
    min-width: auto;
    max-width: 100%;
    padding: 14px 18px;
    gap: 10px;
  }
  
  .bubble-icon {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }
  
  .bubble-title {
    font-size: 13px;
  }
  
  .minor-specialty-container:hover .minor-specialty-tooltip {
    max-height: 180px;
  }
  
  .tooltip-content {
    padding: 16px;
    font-size: 12px;
  }
  
  .content {
    padding: 1rem;
  }
  
  section {
    padding: 1.5rem 0;
  }
  
  .section-nav,
  .section-nav.is-sticky {
    top: 0 !important;
    z-index: 95 !important;
    padding: 0.4rem 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    border-radius: 0 0 8px 8px;
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    overflow-x: auto;
    white-space: nowrap;
    position: sticky;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    border-radius: 0 0 8px 8px;
    border: none;
    transform: none;
  }
  
  .section-nav-item {
    padding: 0.6rem 0.7rem;
    font-size: 0.85rem;
    gap: 0;
    min-width: 45px;
    justify-content: center;
    margin: 0 2px;
    overflow: visible;
    border-radius: 6px;
  }
  
  .section-nav-item span {
    display: none;
  }
  
  .section-nav-item i {
    font-size: 1.1rem;
    margin: 0;
    width: auto;
    line-height: 1;
    vertical-align: middle;
  }
  
  section h2.is-sticky {
    top: 50px;
    z-index: 90;
    padding: 0.8rem 1rem;
    font-size: 1.1rem;
  }
  
  :root {
    --section-sticky-height: 45px;
  }
  
  .back-to-top {
    width: 36px;
    height: 36px;
    bottom: 15px;
    right: 15px;
  }
  
  .specialite-content section {
    padding-top: 0.4rem;
  }
  
  h2.is-sticky,
  .section-nav.is-sticky {
    z-index: 90;
  }
}

/* Amélioration pour les tableaux */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border: 1px solid var(--table-border);
  border-radius: 8px;
  overflow: hidden;
}

th {
  background-color: var(--table-header-bg);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--main-dark);
  border-bottom: 2px solid var(--table-border);
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--table-border);
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background-color: var(--table-hover);
}

/* Amélioration des marges dans les cartes et sections */
.feature-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border: 1px solid var(--card-border);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 0.75rem;
}

.specialite-card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  padding: 0 1rem;
}

.section-nav-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  color: var(--main);
  text-decoration: none;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
  margin: 0.25rem 0.5rem;
}

/* Amélioration des listes */
ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Amélioration des badges */
.badge {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 20px;
  margin: 0.25rem 0;
}

/* Amélioration du menu latéral */
.nav-item {
  margin-bottom: 0.25rem;
  list-style: none;
}

.nav-link {
  display: block;
  padding: 0.4rem 0.75rem;
  color: var(--light);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Amélioration des titres */
h2 {
  color: var(--main-dark);
  font-size: 1.875rem;
  margin: 0.75rem 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--main-light);
  position: relative;
}

/* Amélioration des marges de contenu */
.content {
  padding: 2.5rem;
}

section {
  margin: 0 0 2rem;
  padding: 1rem 2.5rem;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  animation: fadeIn 0.5s ease-out forwards;
}

section:nth-child(odd) {
  background: var(--section-bg);
}

h2 i {
  margin-right: 0.75rem;
  color: var(--main);
}

h3 {
  color: var(--main);
  font-size: 1.4rem;
  margin: 1rem 0 0.7rem;
}

h4 {
  color: var(--text);
  font-size: 1.2rem;
  margin: 1.25rem 0 0.5rem;
}

p {
  margin-bottom: 0.75rem;
}

a {
  color: var(--main);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 500;
}

a:hover {
  color: var(--main-dark);
  text-decoration: underline;
}

.section-navigation {
  display: flex;
  justify-content: center;
  padding: 20px 0;
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 2;
  margin-bottom: 30px;
}

.section-nav-item:hover {
  background-color: rgba(67, 97, 238, 0.08);
  color: var(--main-dark);
  text-decoration: none;
}

/* Spécialité content */
.specialite-content {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Responsive section width adjustments */
@media (max-width: 1200px) {
  section {
    max-width: 95%;
  }
}

@media (max-width: 768px) {
  section {
    max-width: 98%;
    padding: 1rem 1.5rem;
  }
}

@media (max-width: 480px) {
  section {
    max-width: 100%;
    padding: 1rem 1rem;
  }
}

.specialite-content section {
  background-color: var(--card-bg);
}

/* Timeline */
.timeline-content {
  background-color: var(--card-bg);
}

/* Ajuster la marge supérieure pour les titres après un titre sticky */
section h2.is-sticky + * {
  margin-top: 0.75rem;
}

/* Ajustement spécifique pour la page de spécialité */
.specialite-content section {
  background-color: var(--card-bg) !important;
  backdrop-filter: none !important;
  padding-top: 0.5rem;
}

/* Ajustement pour l'espacement entre paragraphes */
section p:first-of-type {
  margin-top: 0;
}

/* Améliorer la densité d'information dans les sections de spécialité */
.specialite-content p + h2,
.specialite-content ul + h2,
.specialite-content ol + h2,
.specialite-content div + h2 {
  margin-top: 1.5rem;
}

/* Contact page */
.contact-info {
  margin-top: 1rem;
}

.contact-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #f5f5f5;
  border-radius: 8px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-link:hover {
  background-color: var(--main);
  color: white;
  transform: translateY(-2px);
}

.social-link:hover i {
  color: white;
}

.social-link i {
  font-size: 1.25rem;
}

/* Amélioration des cartes de la page À propos */
.content .feature-card {
  background-color: #ffffff !important;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.content .feature-card:hover {
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Specialty Bot Styles */
.specialty-bot-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  width: 300px;
}

.bot-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #6200ee;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.bot-avatar:hover {
  transform: scale(1.1);
}

.bot-avatar i {
  color: white;
  font-size: 24px;
}

.bot-chat-container {
  position: absolute;
  bottom: 70px;
  left: 0;
  width: 300px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  padding: 15px;
  display: none;
  max-height: 400px;
  overflow-y: auto;
}

.bot-chat-container.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.bot-message {
  background-color: #f0f0f0;
  border-radius: 18px 18px 18px 0;
  padding: 10px 15px;
  margin-bottom: 10px;
  max-width: 80%;
  word-wrap: break-word;
}

.bot-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
}

.bot-option-btn {
  background-color: #6200ee;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 15px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s ease;
}

.bot-option-btn:hover {
  background-color: #3700b3;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* For mobile devices, we need to adjust the bot position */
@media (max-width: 768px) {
  .specialty-bot-container {
    left: auto;
    right: 20px;
  }
  
  .bot-chat-container {
    right: 0;
    left: auto;
  }
}

/* Sections de spécialités sur la page d'accueil */
.specialities-section {
  padding: 4rem 0;
}

.specialities-section.alt-bg {
  background-color: #f8f9fa;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

.section-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2.5rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #6c757d;
}

.specialite-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2rem;
  justify-content: center;
}

/* Ajustements supplémentaires pour la sidebar */
.sidebar-header p {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Style pour quand la sidebar est active (sur mobile) */
.sidebar.active {
  transform: translateX(0);
} 