/* Nablarise Design System + Refactoring UI principles */

/* Nablarise Color Palette & Variables */
:root {
  /* Couleurs principales */
  --primary: #0052CC;
  --secondary: #2AB1AC; 
  --accent: #4F46E5;
  
  /* Tons de texte */
  --text-dark: #1E293B;
  --text-medium: #475569;
  --text-light: #64748B;
  
  /* États */
  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;
  
  /* Fonds */
  --bg-card: #FFFFFF;
  --bg-subtle: #F8FAFC;
  --bg-muted: #F1F5F9;
  
  /* Bordures et ombrages */
  --border-color: #E2E8F0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Typography */
body {
  font-family: var(--font-family);
  color: var(--text-medium);
}

/* Station Cards - Nablarise Style Compact */
.station-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

/* Small units styling */
.unit-small {
  font-size: 0.75rem;
  font-weight: 400;
}

.station-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Status Indicator */
.status-indicator {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: var(--transition);
}

.status-indicator.active {
  background-color: var(--success);
}

.status-indicator.inactive {
  background-color: var(--error);
}

/* Station ID */
.station-id {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

/* Pressure Section - Main emphasis */
.pressure-section {
  margin-bottom: 10px;
}

.pressure-main {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  margin-top: 4px;
}

/* Dual Pressure Layout for PDD */
.pressure-dual-section {
  margin-bottom: 10px;
}

.pressure-dual {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.pressure-col {
  flex: 1;
  text-align: center;
}

.pressure-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.pressure-col .pressure-main {
  font-size: 1.1rem;
}

/* Footer Metrics */
.footer-metrics {
  padding-top: 8px;
  border-top: 1px solid var(--bg-muted);
  margin-top: 6px;
}

.metric-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: block;
}

.metric-label-small {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  display: block;
}

.metric-compact {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

/* Progress Bar Inline */
.progress-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-bar-mini {
  flex: 1;
  height: 6px;
  background-color: var(--bg-muted);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-bar-mini-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.capacity-inline {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  min-width: 45px;
  text-align: right;
}


/* Distribution Cards - Compact Style */
.distrib-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  margin-bottom: 8px;
}

.distrib-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Network Container */
.network-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.network-container:hover {
  box-shadow: var(--shadow-md);
}

/* Scenario Headers - Nablarise Style */
.scenario-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

/* Equipment Based Layout */
.equipment-based-layout {
  padding: 16px;
}

/* Equipment Sections */
.equipment-section {
  margin-bottom: 20px;
}

.equipment-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  text-align: left;
  padding-left: 16px;
}

.scenarios-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.scenario-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scenario-header-small {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-medium);
  text-align: center;
  background: var(--bg-subtle);
  padding: 6px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}

/* File Upload Styles */
.file-upload-section {
  transition: var(--transition);
}

.file-upload-section:hover {
  border-color: var(--primary);
  background-color: var(--bg-subtle);
}

.file-upload-section.drag-over {
  border-color: var(--primary);
  background-color: var(--bg-subtle);
  border-style: solid;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive grid adjustments */
@media (max-width: 1536px) {
    .scenarios-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .scenarios-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .scenario-card {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .network-header {
        padding: 1rem 1.5rem;
    }
    
    .scenarios-container {
        padding: 1.5rem;
    }
}

/* Legend styling */
.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #374151; /* gray-700 */
}

.legend-indicator {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Fade-in animation for stations */
.station-box {
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation delays */
.station-box:nth-child(1) { animation-delay: 0.1s; }
.station-box:nth-child(2) { animation-delay: 0.2s; }
.station-box:nth-child(3) { animation-delay: 0.3s; }
.station-box:nth-child(4) { animation-delay: 0.4s; }
.station-box:nth-child(5) { animation-delay: 0.5s; }

/* Statistics Section Styles */
.statistics-section {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
}

.stats-inline-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-inline-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
}

.stat-equipment-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  min-width: 80px;
  flex-shrink: 0;
}

.progress-bar-inline {
  flex: 1;
  height: 8px;
  background-color: var(--bg-muted);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  min-width: 100px;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-ratio {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-medium);
  min-width: 50px;
  text-align: right;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .stat-inline-item {
    gap: 12px;
  }

  .stat-equipment-name {
    min-width: 70px;
    font-size: 0.8rem;
  }

  .stat-ratio {
    min-width: 45px;
    font-size: 0.8rem;
  }
}