:root {
  --primary: #667eea;
  --secondary: #764ba2;
  --success: #10b981;
  --danger: #ef4444;
}

.planova-section {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.planova-section h2 {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 20px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 14px 32px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 20px;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input[type="file"] {
  display: block;
  width: 100%;
  max-width: 600px;
  padding: 20px;
  border: 3px dashed #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  cursor: pointer;
  transition: all 0.3s;
  margin: 20px 0;
}

input[type="file"]:hover {
  border-color: var(--primary);
  background: white;
}

.forecast-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.forecast-inputs label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
}

.forecast-inputs input {
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
}

.loading-container {
  text-align: center;
  padding: 40px;
  margin-top: 20px;
}

.loading-container.show {
  display: block;
}

.spinner {
  border: 5px solid rgba(102, 126, 234, 0.2);
  border-top: 5px solid var(--primary);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ai-analysis-card, .ai-forecast-card {
  background: white;
  border-radius: 16px;
  padding: 40px;
  margin-top: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 20px;
}

.health-score {
  padding: 20px;
  border-radius: 12px;
  color: white;
  text-align: center;
  min-width: 120px;
}

.health-score-value {
  font-size: 32px;
  font-weight: 800;
}

.analysis-section {
  margin: 24px 0;
  padding: 20px;
  background: #f9fafb;
  border-radius: 8px;
}

.analysis-section h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.scenario {
  padding: 24px;
  border-radius: 12px;
  border: 3px solid;
}

.scenario.pessimistic {
  border-color: var(--danger);
  background: #fef2f2;
}

.scenario.base {
  border-color: var(--primary);
  background: #eff6ff;
}

.scenario.optimistic {
  border-color: var(--success);
  background: #f0fdf4;
}

.scenario h4 {
  font-size: 20px;
  margin-bottom: 16px;
}

.planova-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 10000;
  color: white;
  font-weight: 600;
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.3s;
}

.planova-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.planova-notification.success { background: var(--success); }
.planova-notification.error { background: var(--danger); }
.planova-notification.info { background: var(--primary); }

/* Mobile : marges réduites pour laisser la place aux tableaux de l'analyse */
@media (max-width: 640px) {
  body { padding: 8px !important; }
  .planova-section { padding: 20px 12px; }
}
