/* Styles globaux communs à toutes les pages */
/* ========================================= */

/* Backgrounds radiaux pour toutes les pages */
body {
  background: radial-gradient(ellipse at 60% 40%, #f8fafc 60%, #e5e7eb 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.dark body {
  background: radial-gradient(ellipse at 60% 40%, #232946 60%, #1a1a2e 100%);
}

/* Loading spinners */
.loading-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Transitions des cartes */
.project-card,
.skill-card,
.card {
  transition: all 0.3s ease;
}

.project-card:hover,
.skill-card:hover,
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Filtres de catégorie */
.category-filter {
  transition: all 0.3s ease;
}

.category-filter.active {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: white;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.category-item {
  transition: all 0.2s ease;
}

.category-item:hover {
  background-color: #f3f4f6;
}

.dark .category-item:hover {
  background-color: #374151;
}

.category-item.active {
  background-color: #dbeafe;
  border-color: #3b82f6;
}

.dark .category-item.active {
  background-color: #1e3a8a;
  border-color: #3b82f6;
}

/* Niveaux de compétence */
.skill-level {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.dark .skill-level {
  background: #374151;
}

.skill-level-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease;
}

.level-90 { background: linear-gradient(90deg, #10b981, #059669); }
.level-80 { background: linear-gradient(90deg, #3b82f6, #1d4ed8); }
.level-70 { background: linear-gradient(90deg, #f59e0b, #d97706); }
.level-60 { background: linear-gradient(90deg, #ef4444, #dc2626); }
.level-50 { background: linear-gradient(90deg, #8b5cf6, #7c3aed); }
.level-40 { background: linear-gradient(90deg, #6b7280, #4b5563); }
.level-30 { background: linear-gradient(90deg, #9ca3af, #6b7280); }

/* Badges */
.badge {
  background: rgba(147, 197, 253, 0.15);
  color: #2563eb;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.dark .badge {
  background: rgba(167, 139, 250, 0.12);
  color: #a78bfa;
}

/* Styles pour le Mind Map */
.mind-map-branch {
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 8px;
}

.mind-map-branch:hover {
  background: rgba(59, 130, 246, 0.05);
  transform: translateX(5px);
}

.mind-map-branch.active {
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.skill-item {
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 4px 8px;
  border-radius: 6px;
}

.skill-item:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: translateX(5px);
}

.mind-map-container {
  transition: all 0.8s ease;
}

.dark .mind-map-branch:hover {
  background: rgba(167, 139, 250, 0.1);
}

.dark .mind-map-branch.active {
  background: rgba(167, 139, 250, 0.15);
  box-shadow: 0 4px 12px rgba(167, 139, 250, 0.2);
}

.dark .skill-item:hover {
  background: rgba(167, 139, 250, 0.1);
}

/* Styles pour l'image en parallélogramme */
.parallelogram-container {
  position: relative;
  transform: skew(-15deg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.parallelogram-container:hover {
  transform: skew(-15deg) scale(1.05);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.parallelogram-image {
  transform: skew(15deg) scale(1.2);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.parallelogram-container:hover .parallelogram-image {
  transform: skew(15deg) scale(1.25);
}

.parallelogram-background {
  position: absolute;
  transform: skew(-15deg) translate(8px, 8px);
  border-radius: 20px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  opacity: 0.3;
  transition: all 0.3s ease;
  z-index: 1;
}

.dark .parallelogram-background {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  opacity: 0.4;
}

.parallelogram-container:hover + .parallelogram-background,
.parallelogram-container:hover ~ .parallelogram-background {
  transform: skew(-15deg) translate(12px, 12px) scale(1.05);
  opacity: 0.5;
}

/* Timeline styles */
.timeline-item {
  transition: all 0.3s ease;
  position: relative;
}

.timeline-item:hover {
  transform: translateY(-2px);
}

.timeline-icon {
  transition: all 0.3s ease;
  position: absolute;
  left: -1rem;
  z-index: 10;
  top: 0;
  transform: translateY(0);
}

.timeline-item:hover .timeline-icon {
  transform: scale(1.1) translateY(0);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.timeline-content {
  margin-left: 2rem;
  position: relative;
  z-index: 1;
}

.timeline-item {
  margin-bottom: 3rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

/* CV preview */
.cv-preview {
  transition: all 0.3s ease;
}

.cv-preview:hover {
  transform: scale(1.02);
}

/* Social icons */
.social-icon {
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.1);
}

/* Hero illustration */
.hero-illu {
  filter: drop-shadow(0 0 32px #7f5af0aa);
  max-width: 340px;
  width: 100%;
}

@media (max-width: 900px) {
  .hero-flex {
    flex-direction: column;
    gap: 2rem;
  }
  .hero-illu {
    max-width: 220px;
    margin: 0 auto;
  }
}

/* Profile image */
.profile-image {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 0 50px rgba(102, 126, 234, 0.3);
}

/* Responsive utilities */
@media (max-width: 768px) {
  .timeline-content {
    margin-left: 1rem;
  }
  .timeline-icon {
    left: -0.5rem;
    width: 12px;
    height: 12px;
  }
}
