/* Styles pour le thème sombre et les améliorations visuelles */

/* Variables CSS pour les thèmes */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --border-color: #e5e7eb;
  --border-hover: #d1d5db;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
  --accent-color: #3b82f6;
  --accent-hover: #2563eb;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
}

[data-theme="dark"] {
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-tertiary: #374151;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-tertiary: #9ca3af;
  --border-color: #374151;
  --border-hover: #4b5563;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.3);
  --accent-color: #60a5fa;
  --accent-hover: #3b82f6;
  --success-color: #34d399;
  --warning-color: #fbbf24;
  --error-color: #f87171;
}

/* Transitions globales */
* {
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Styles de base */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
}

/* Amélioration des éléments de contenu */
.container, .main-content, .cv-container, #root {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Styles pour les cartes et sections */
.card, .section, .panel {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.card:hover, .section:hover, .panel:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

/* Amélioration des titres */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.875rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

/* Amélioration des paragraphes */
p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Amélioration des liens */
a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Amélioration des listes */
ul, ol {
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.5rem;
}

/* Amélioration des boutons existants */
button, .btn {
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

button:hover, .btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

button:active, .btn:active {
  transform: translateY(0);
}

/* Styles pour les inputs et formulaires */
input, textarea, select {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  transition: all 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Amélioration des images */
img {
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

img:hover {
  box-shadow: var(--shadow-md);
  transform: scale(1.02);
}

/* Styles pour les badges et tags */
.badge, .tag, .skill {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-block;
  margin: 2px;
}

/* Amélioration des tableaux */
table {
  background-color: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

th, td {
  border-bottom: 1px solid var(--border-color);
  padding: 16px;
}

th {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
}

td {
  color: var(--text-secondary);
}

/* Styles pour les barres de progression */
.progress-bar {
  background-color: var(--bg-tertiary);
  border-radius: 10px;
  overflow: hidden;
  height: 8px;
}

.progress-fill {
  background-color: var(--accent-color);
  height: 100%;
  transition: width 0.3s ease;
}

/* Amélioration des modales et overlays */
.modal, .overlay {
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
}

/* Styles pour les notifications */
.notification {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-md);
}

.notification.success {
  border-left: 4px solid var(--success-color);
}

.notification.warning {
  border-left: 4px solid var(--warning-color);
}

.notification.error {
  border-left: 4px solid var(--error-color);
}

/* Amélioration des séparateurs */
hr, .divider {
  border: none;
  height: 1px;
  background-color: var(--border-color);
  margin: 2rem 0;
}

/* Styles pour les citations */
blockquote {
  border-left: 4px solid var(--accent-color);
  background-color: var(--bg-secondary);
  padding: 16px 24px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-secondary);
}

/* Amélioration du code */
code {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
}

pre {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid var(--border-color);
}

pre code {
  background: none;
  padding: 0;
}

/* Styles pour les animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-in {
  animation: slideIn 0.6s ease-out;
}

/* Responsive design */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .card, .section, .panel {
    border-radius: 8px;
  }
  
  button, .btn {
    padding: 10px 20px;
  }
}

/* Amélioration de l'accessibilité */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible pour l'accessibilité */
button:focus-visible, .btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Styles pour les états de chargement */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: loading 1.5s infinite;
}

[data-theme="dark"] .loading::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

