:root {
  --bg: #0b1220;
  --card: #111827;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #16a34a;
  --danger: #ef4444;
  --warning: #eab308;
  --neutral: #6b7280;
}

* {
  box-sizing: border-box;
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica Neue, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  margin: 0;
  background: linear-gradient(180deg, #0b1220, #0b1220 40%, #111827 100%);
  color: var(--text);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: #1f2937;
  color: var(--muted);
  font-size: 12px;
}

.card {
  background: var(--card);
  border: 1px solid #1f2937;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.price {
  font-size: 36px;
  font-weight: 700;
}

.change {
  font-weight: 600;
}

.change.up {
  color: var(--accent);
}

.change.down {
  color: var(--danger);
}

#chart {
  height: 420px;
}

.footer {
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.analysis {
  white-space: pre-wrap;
  line-height: 1.5;
}

/* Signal principal */
.signal {
  font-weight: 700;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 10px;
}

.signal.BUY {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.signal.SELL {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.signal.NEUTRAL {
  background: rgba(107, 114, 128, 0.15);
  color: var(--neutral);
}

/* Conteneur des signaux par UT (séparation SCALP / SWING) */
#signals-by-ut {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 1rem;
}

#signals-by-ut > div {
  flex: 1;
  min-width: 150px;
}

#signals-by-ut h4 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  border-bottom: 1px solid #444;
  padding-bottom: 2px;
  color: #cbd5e1;
}

/* Signal par UT (nouveau système .ut-signal) */
.ut-signal {
  display: block;
  padding: 6px 10px;
  margin-bottom: 4px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9em;
}

/* Couleurs IA par type de signal */
.buy, .scalp_buy {
  background-color: #22c55e;
  color: white;
}

.sell, .scalp_sell {
  background-color: #ef4444;
  color: white;
}

.swing_buy {
  background-color: #1e88e5;
  color: white;
}

.swing_sell {
  background-color: #c62828;
  color: white;
}

.neutral {
  background-color: #6b7280;
  color: white;
}

/* Score IA - barre de confiance */
#confidence-bar-container {
  margin-top: 1em;
  background-color: #1e1e2f;
  border-radius: 5px;
  padding: 6px;
}

#confidence-bar {
  height: 12px;
  background-color: #10b981;
  border-radius: 5px;
  width: 0%;
  transition: width 0.5s ease-in-out;
}

#confidence-text {
  font-size: 14px;
  margin-top: 5px;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }

  #chart {
    height: 300px;
  }

  #signals-by-ut {
    flex-direction: column;
  }

  #signals-by-ut > div {
    width: 100%;
  }
}
.qr-donation canvas {
  display: block;
  margin: 0 auto;
  background: white;
  border-radius: 8px;
  padding: 8px;
}

.qr-donation p {
  color: #cbd5e1;
}
