/* Variables CSS */
:root {
  --primary-color: #3a86ff; /* Bleu vif pour les actions principales */
  --secondary-color: #8338ec; /* Violet pour les éléments secondaires */
  --success-color: #28a745; /* Vert pour les succès */
  --danger-color: #dc3545; /* Rouge pour les alertes */
  --warning-color: #ffc107; /* Jaune pour les avertissements */
  --dark-color: #2b2d42; /* Noir bleuté pour le texte */
  --light-color: #f8f9fa; /* Fond clair */
  --gray-color: #6c757d; /* Gris pour texte secondaire */
  --premium-color: #ff9f1c; /* Couleur or pour premium */

  --sidebar-width: 280px;
  --border-radius: 10px;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
}

/* Reset et styles de base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #f5f7fa;
  color: var(--dark-color);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Layout principal */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}



.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem;
}

/* Profil utilisateur */


.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-summary h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.profile-summary p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge.premium {
  background-color: var(--premium-color);
  color: #000;
}

.badge.free {
  background-color: var(--dark-color);
  color: white;
}

/* Navigation */
.dashboard-nav ul {
  list-style: none;
}

.dashboard-nav li {
  margin-bottom: 0.5rem;
}

.dashboard-nav a {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: var(--border-radius);
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.dashboard-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateX(5px);
}

.dashboard-nav a i {
  margin-right: 0.8rem;
  width: 20px;
  text-align: center;
}

.dashboard-nav .active a {
  background: var(--primary-color);
  color: white;
  font-weight: 500;
}

.btn-logout {
  color: #ff6b6b !important;
}

/* Contenu principal */
.main-content h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.welcome-message {
  color: var(--gray-color);
  margin-bottom: 2rem;
}

/* Cartes de statistiques */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stats-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stats-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.2rem;
}

.stats-info h3 {
  font-size: 1.8rem;
  margin-bottom: 0.2rem;
  color: var(--dark-color);
}

.stats-info p {
  color: var(--gray-color);
  font-size: 0.9rem;
}

/* Sections */
.dashboard-section {
  background: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--box-shadow);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: 1.4rem;
  color: var(--dark-color);
}

/* Cartes de formation */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.course-card {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.course-thumbnail {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.course-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.course-card:hover .course-thumbnail img {
  transform: scale(1.05);
}

.course-category {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary-color);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}

.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: rgba(0, 0, 0, 0.1);
}

.progress {
  height: 100%;
  background: var(--success-color);
  border-radius: 0 0 0 var(--border-radius);
}

.course-content {
  padding: 1.2rem;
}

.course-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  color: var(--dark-color);
}

.course-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--gray-color);
  margin-bottom: 1rem;
}

.course-meta span {
  display: flex;
  align-items: center;
}

.course-meta i {
  margin-right: 0.3rem;
}

/* Tableau des signaux */
.signals-table {
  overflow-x: auto;
}

.signals-table table {
  width: 100%;
  border-collapse: collapse;
}

.signals-table th,
.signals-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.signals-table th {
  background: #f8f9fa;
  color: var(--gray-color);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.direction {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8rem;
}

.direction.buy {
  background-color: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
}

.direction.sell {
  background-color: rgba(220, 53, 69, 0.1);
  color: var(--danger-color);
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f8f9fa;
  color: var(--gray-color);
  margin: 0 0.2rem;
  transition: var(--transition);
}

.btn-action:hover {
  background: var(--primary-color);
  color: white;
}

/* Bannière upgrade */


.upgrade-content {
  flex: 1;
}

.upgrade-content h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.upgrade-content p {
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.upgrade-image {
  width: 150px;
  margin-left: 2rem;
}

.upgrade-image img {
  width: 100%;
  height: auto;
}

/* Boutons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: #2a75f5;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

/* Etat vide */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state i {
  font-size: 3rem;
  color: var(--gray-color);
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
}

.empty-state p {
  color: var(--gray-color);
  margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 992px) {
  /* .sidebar {
    transform: translateX(-100%);
  }

  .main-content {
    margin-left: 0;
  } */

  .dashboard-container.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .dashboard-container.sidebar-open .main-content {
    margin-left: var(--sidebar-width);
  }
}

@media (max-width: 768px) {
  .upgrade-banner {
    flex-direction: column;
    text-align: center;
  }

  .upgrade-image {
    margin: 1rem 0 0;
  }

  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-header .btn {
    margin-top: 1rem;
  }
}


/* Sidebar mobile */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        box-shadow: 2px 0 15px rgba(0,0,0,0.1);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .profile-summary {
        padding-top: 20px;
    }
}