/* MYIAS vitrine — palette or / nuit / verre */
:root {
  --bg0: #070a12;
  --bg1: #0d1324;
  --card: rgba(18, 26, 48, 0.72);
  --stroke: rgba(212, 175, 55, 0.22);
  --gold: #e8c547;
  --gold-dim: #b8942f;
  --cyan: #5eead4;
  --text: #e8ecf4;
  --muted: #8b95a8;
  --danger: #f87171;
  --ok: #4ade80;
  --buy: #22c55e;
  --sell: #ef4444;
  --wait: #94a3b8;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Outfit", var(--font);
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(232, 197, 71, 0.12), transparent),
    radial-gradient(900px 500px at 90% 20%, rgba(94, 234, 212, 0.08), transparent), var(--bg0);
  line-height: 1.6;
}

a {
  color: var(--cyan);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Noise overlay subtle */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  text-decoration: none;
}
.logo span {
  color: var(--text);
  font-weight: 500;
  opacity: 0.85;
}

.nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav a {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: 0.2s;
}
.nav a:hover {
  color: var(--text);
  border-color: var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}
.nav a.cta {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #1a1406;
  border: none;
}
.nav a.cta:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

/* Hero */
.hero {
  padding: 3rem 0 4rem;
  text-align: center;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1rem;
  background: linear-gradient(120deg, #fff 0%, var(--gold) 45%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 2rem;
}

.hero-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

/* Cards grid */
.grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.card h2,
.card h3 {
  font-family: var(--display);
  margin-top: 0;
  color: #fff;
}

.card h3 {
  font-size: 1.1rem;
  color: var(--gold);
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.section-title {
  font-family: var(--display);
  font-size: 1.75rem;
  margin: 3rem 0 1.25rem;
  color: #fff;
}

.pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.35rem;
  font-size: 0.9rem;
  margin-top: 1rem;
}
.pipeline span {
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.1);
  border: 1px solid rgba(94, 234, 212, 0.25);
}
.pipeline .arrow {
  color: var(--muted);
  border: none;
  background: none;
}

/* Playground */
.pg-layout {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 900px) {
  .pg-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.field {
  margin-bottom: 1rem;
}
.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

input[type="url"],
input[type="text"],
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.85rem;
}

textarea {
  min-height: 220px;
  resize: vertical;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

button,
.btn {
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  padding: 0.65rem 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  transition: 0.15s;
}
button:hover,
.btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
button.primary,
.btn.primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #1a1406;
  border: none;
}
button.primary:hover {
  filter: brightness(1.06);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-pill.buy {
  background: rgba(34, 197, 94, 0.2);
  color: var(--buy);
}
.status-pill.sell {
  background: rgba(239, 68, 68, 0.2);
  color: var(--sell);
}
.status-pill.wait {
  background: rgba(148, 163, 184, 0.2);
  color: var(--wait);
}

.json-out {
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 420px;
  overflow: auto;
  font-size: 0.78rem;
  line-height: 1.45;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}
.alert.err {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
}
.alert.ok {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #bbf7d0;
}

footer.site-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--stroke);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

code {
  background: rgba(0, 0, 0, 0.35);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  font-size: 0.88em;
}

/* —— Page live XAU —— */
.hero-actions {
  margin-top: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.live-hero {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 320px);
  gap: 1.75rem;
  align-items: start;
  padding-top: 0.5rem;
  padding-bottom: 2rem;
}
@media (max-width: 900px) {
  .live-hero {
    grid-template-columns: 1fr;
  }
}
.live-hero-text h1 {
  font-size: clamp(1.5rem, 4vw, 2.35rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.live-tag {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.55em;
  font-weight: 600;
  color: var(--cyan);
  vertical-align: middle;
}
.live-lead {
  max-width: 52rem;
}
.live-quote-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.live-quote-price {
  font-family: var(--display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1.1;
}
.live-quote-meta {
  font-size: 0.82rem;
  margin-top: 0.65rem;
  line-height: 1.45;
}
.live-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.live-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 1024px) {
  .live-grid {
    grid-template-columns: 1fr;
  }
}
.live-chart-card .live-chart-mount {
  width: 100%;
  min-height: 380px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.12);
  background: #0a0f1a;
}
.live-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.live-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
}
.small {
  font-size: 0.82rem;
}
.small-btn {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

.live-signal-zone {
  margin-bottom: 1.25rem;
}
.live-signal-main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
}
.live-signal-details p {
  margin: 0.2rem 0;
}

.live-models {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}
@media (max-width: 520px) {
  .live-models {
    grid-template-columns: 1fr;
  }
}
.live-model-tile {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.live-model-v {
  font-size: 1rem;
  color: var(--text);
}

.live-footnote {
  margin-top: 1rem;
  margin-bottom: 0;
}

.live-disclaimer {
  margin-top: 2rem;
  border-left: 3px solid var(--gold-dim);
  font-size: 0.88rem;
  line-height: 1.55;
}
