@import "/src/assets/scss/modern-variables.scss";
@import "/src/assets/scss/fonts.scss";

.dashboard-general-container {
  padding: 1.5rem;
  background: #FAFBFC;
  min-height: 100%;
  font-family: 'Nominee-regular', sans-serif;
}

// En-tête Dashboard
.dashboard-header {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  
  .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    
    .dashboard-icon {
      font-size: 2.5rem;
      color: #4AA8DC;
    }
    
    .title-text h1 {
      margin: 0;
      font-size: 1.75rem;
      font-weight: 600;
      color: #111827;
      font-family: 'Nominee-Medium', sans-serif;
    }
    
    .subtitle {
      margin: 0.25rem 0 0 0;
      color: #6B7280;
      font-size: 0.9rem;
    }
  }
  
  .header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    
    .active {
      background: rgba(74, 168, 220, 0.1);
      color: #4AA8DC;
    }
  }
}

// Contrôles Vue
.view-controls {
  background: white;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  
  .view-toggle {
    display: flex;
    gap: 0.5rem;
    
    button {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.75rem 1.5rem;
      color: #6B7280;
      
      &.active {
        background: rgba(74, 168, 220, 0.1);
        color: #4AA8DC;
      }
    }
  }
}

// Section Headers
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  
  h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    font-family: 'Nominee-Medium', sans-serif;
  }
}

// KPIs Section
.kpis-section {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.kpi-card {
  background: #FAFBFC;
  border-radius: 6px;
  padding: 1.5rem;
  border-left: 4px solid transparent;
  transition: all 0.2s ease;
  
  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  .kpi-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    
    .kpi-icon {
      font-size: 1.5rem;
    }
    
    .kpi-title {
      font-weight: 500;
      color: #6B7280;
      font-size: 0.9rem;
    }
  }
  
  .kpi-content {
    display: flex;
    justify-content: space-between;
    align-items: end;
    
    .kpi-value {
      font-size: 2rem;
      font-weight: 700;
      color: #111827;
      font-family: 'Nominee-Bold', sans-serif;
    }
    
    .kpi-variation {
      display: flex;
      align-items: center;
      gap: 0.25rem;
      font-size: 0.85rem;
      font-weight: 600;
      
      &.trend-positive {
        color: #10b981;
      }
      
      &.trend-negative {
        color: #ef4444;
      }
      
      mat-icon {
        font-size: 1rem;
      }
    }
  }
}

// Aperçu Projets
.projects-overview {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.projects-summary {
  .project-stats {
    display: flex;
    gap: 2rem;
    
    .stat-item {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 1rem 1.5rem;
      background: #FAFBFC;
      border-radius: 6px;
      flex: 1;
      
      mat-icon {
        color: #4AA8DC;
        font-size: 1.5rem;
      }
      
      .stat-label {
        color: #6B7280;
        font-size: 0.9rem;
      }
      
      .stat-value {
        font-size: 1.5rem;
        font-weight: 700;
        color: #111827;
        margin-left: auto;
        font-family: 'Nominee-Bold', sans-serif;
      }
    }
  }
}

// Activité Récente
.recent-activity {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.activity-list {
  .activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #E5E7EB;
    
    &:last-child {
      border-bottom: none;
    }
    
    .activity-icon {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: #FAFBFC;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      
      mat-icon {
        font-size: 1.25rem;
      }
    }
    
    .activity-content {
      flex: 1;
      
      .activity-title {
        font-weight: 600;
        color: #111827;
        margin-bottom: 0.25rem;
      }
      
      .activity-description {
        color: #6B7280;
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
      }
      
      .activity-timestamp {
        color: #9CA3AF;
        font-size: 0.8rem;
      }
    }
  }
}

// Analytics Section
.analytics-section {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.chart-card {
  background: #FAFBFC;
  border-radius: 6px;
  padding: 1.5rem;
  
  h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
  }
  
  .chart-placeholder {
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    
    mat-icon {
      font-size: 3rem;
      margin-bottom: 0.5rem;
      opacity: 0.5;
    }
    
    p {
      margin: 0;
      font-size: 0.9rem;
    }
  }
}

// Responsive
@media (max-width: 768px) {
  .dashboard-general-container {
    padding: 1rem;
  }
  
  .dashboard-header {
    padding: 1.5rem;
    
    .header-content {
      flex-direction: column;
      gap: 1rem;
      align-items: flex-start;
    }
    
    .title-section .dashboard-icon {
      font-size: 2rem;
    }
  }
  
  .kpis-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .projects-summary .project-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .charts-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .view-controls .view-toggle {
    flex-direction: column;
    gap: 0.5rem;
    
    button {
      justify-content: center;
    }
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}