:root {
    /* Couleurs du thème clair */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --accent: #1e3a8a;
    --accent-dark: #1e40af;
    --bg-dark: #121212;
    --bg-card: #1f1f1f;
    --bg-button: #2a2a2a;
    --text-light: #fff;
    --text-muted: #aaa;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --gradient-bg: linear-gradient(145deg, rgba(30, 30, 30, 0.4), rgba(15, 15, 15, 0.4));
    --card-hover: #272727;
  }
  
  [data-theme="light"] {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --accent: #1e40af;
    --accent-dark: #1e3a8a;
    --bg-dark: #f5f5f5;
    --bg-card: #ffffff;
    --bg-button: #e8e8e8;
    --text-light: #333333;
    --text-muted: #666666;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-bg: linear-gradient(145deg, rgba(245, 245, 245, 0.4), rgba(235, 235, 235, 0.4));
    --card-hover: #f9f9f9;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease;
  }
  
  body {
    display: flex;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
  }
  
  aside {
    width: 280px;
    background-color: var(--bg-card);
    height: 100vh;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 4px 0 15px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 10;
  }
  
  .logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
  }
  
  .logo h1 {
    font-size: 2rem;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
    position: relative;
    transition: all 0.3s ease;
  }
  
  .logo h1:hover {
    transform: scale(1.05);
    letter-spacing: 2px;
  }
  
  .logo h1::before {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    top: 50%;
    left: -12px;
    transform: translateY(-50%);
  }
  
  .logo h1::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    top: 50%;
    right: -12px;
    transform: translateY(-50%);
  }
  
  .nav-section {
    margin-bottom: 15px;
  }
  
  .nav-title {
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-left: 10px;
  }
  
  .nav-btn {
    background-color: var(--bg-button);
    color: var(--text-muted);
    text-decoration: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
  }
  
  .nav-btn:hover {
    background-color: var(--primary);
    color: var(--text-light);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  }
  
  .nav-btn i {
    font-size: 1.2rem;
    margin-right: 12px;
    transition: transform 0.3s ease;
  }
  
  .nav-btn:hover i {
    transform: scale(1.2);
  }
  
  .sidebar-footer {
    margin-top: auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  main {
    flex: 1;
    padding: 40px 50px;
    background: var(--gradient-bg);
    position: relative;
  }
  
  .theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--bg-card);
    border: none;
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--shadow-color);
  }
  
  .theme-toggle:hover {
    transform: rotate(30deg);
    color: var(--accent);
  }
  
  h2 {
    font-size: 2.4rem;
    color: var(--text-light);
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
  }
  
  h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--text-light);
    border-radius: 2px;
    transition: width 0.3s ease;
  }
  
  h2:hover::after {
    width: 100%;
  }
  
  p {
    margin-top: 20px;
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 650px;
    line-height: 1.6;
  }
  
  .highlight {
    color: var(--text-light);
    font-weight: 600;
  }
  
  .actions {
    margin-top: 40px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
  }
  
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
  }
  
  .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.8s ease;
  }
  
  .btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  }
  
  .btn:hover::before {
    left: 100%;
  }
  
  .btn i {
    margin-right: 10px;
    font-size: 1.1rem;
  }
  
  .btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
  }
  
  .btn-outline:hover {
    background-color: var(--primary);
    color: white;
  }
  
  .username-banner {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    font-size: 1.1rem;
    color: var(--primary);
    background-color: rgba(42, 42, 42, 0.7);
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0px 6px 15px var(--shadow-color);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
    backdrop-filter: blur(10px);
  }
  
  .username-banner:hover {
    transform: translateX(5px);
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.4);
  }
  
  .username-banner .icon {
    margin-right: 12px;
    font-size: 1.5rem;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.2);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.3s ease;
  }
  
  .username-banner:hover .icon {
    transform: rotate(360deg);
  }
  
  .username-banner .text {
    font-weight: bold;
  }
  
  .badge {
    background-color: var(--accent);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  
  .dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
  }
  
  .dashboard-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    padding: 25px;
    box-shadow: 0 8px 20px var(--shadow-color);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 200px;
  }
  
  .dashboard-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    background-color: var(--card-hover);
  }
  
  .dashboard-card h3 {
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
  }
  
  .dashboard-card h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 3px;
    background-color: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
  }
  
  .dashboard-card:hover h3::after {
    width: 100%;
  }
  
  .dashboard-card p {
    font-size: 1rem;
    margin-top: 0;
    flex-grow: 1;
  }
  
  .dashboard-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
  }
  
  .dashboard-card .card-btn {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
  }
  
  .dashboard-card .card-btn:hover {
    color: var(--accent);
    transform: translateX(5px);
  }
  
  .dashboard-card .status {
    font-size: 0.8rem;
    color: #4cd964;
    display: flex;
    align-items: center;
    gap: 5px;
  }
  
  .dashboard-card .status i {
    font-size: 0.7rem;
  }
  
  .card-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.8rem;
    color: rgba(37, 99, 235, 0.2);
    transition: all 0.3s ease;
  }
  
  .dashboard-card:hover .card-icon {
    transform: scale(1.2) rotate(15deg);
    color: rgba(37, 99, 235, 0.4);
  }
  
  .stats-row {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
  }
  
  .stat-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    flex: 1;
    min-width: 200px;
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: all 0.3s ease;
  }
  
  .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
  }
  
  .stat-card .number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
  }
  
  .stat-card .label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  
  .mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    background-color: var(--primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }
  
  @media (max-width: 992px) {
    body {
      flex-direction: column;
    }
    
    aside {
      width: 100%;
      height: auto;
      max-height: 80px;
      overflow: hidden;
      padding: 20px;
      position: fixed;
      top: 0;
      z-index: 100;
      transition: max-height 0.5s ease;
    }
    
    aside.expanded {
      max-height: 100vh;
      overflow-y: auto;
    }
    
    .logo {
      margin-bottom: 20px;
    }
    
    .mobile-menu-toggle {
      display: flex;
      justify-content: center;
      align-items: center;
    }
    
    main {
      padding-top: 100px;
    }
    
    .actions {
      flex-direction: column;
    }
    
    .dashboard-cards {
      grid-template-columns: 1fr;
    }
    
    .stats-row {
      flex-direction: column;
    }
  }
  .nav-btn.active {
    background-color: var(--primary);
    color: var(--text-light);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  }
  
  @media (max-width: 576px) {
    main {
      padding: 100px 20px 40px;
    }
    
    h2 {
      font-size: 1.8rem;
    }
    
    p {
      font-size: 1rem;
    }
    
    .username-banner {
      font-size: 0.9rem;
      padding: 12px 16px;
    }
    
    .username-banner .icon {
      width: 30px;
      height: 30px;
      font-size: 1.2rem;
    }
  }
  
  /* Animations supplémentaires */
  @keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
  }
  
  .pulse {
    animation: pulse 2s infinite;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .dashboard-card {
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
  }
  
  /* Style pour les messages d'erreur */
  .error-message {
    background-color: rgba(255, 75, 75, 0.1);
    border-left: 4px solid #ff4b4b;
    color: #ff4b4b;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: none;
  }
  
  /* Style pour le loader */
  .loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    display: none;
  }
  
  .loader {
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top: 5px solid var(--primary);
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  