/* TRADE AI — page démo. S'appuie sur les variables et composants de ../styles.css */

/* ---------- En-tête de la démo ---------- */
.dhero {
  background-color: var(--malachite);
  background-image: repeating-radial-gradient(
    circle at 110% -10%,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0) 22px,
    rgba(255, 255, 255, 0.045) 23px,
    rgba(255, 255, 255, 0) 30px
  );
  color: #fff;
  padding: 32px 0 36px;
}
.dhero h1 {
  font-size: clamp(2rem, 5.6vw, 3.2rem);
  font-weight: 800;
  font-variation-settings: "wdth" 118;
  letter-spacing: -0.01em;
}
.dhero-sub {
  margin-top: 14px;
  max-width: 62ch;
  color: var(--malachite-light);
}
.dstatus {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}
.dstatus-item { font-size: var(--step--1); color: #E4F1EC; }
.dstatus .btn-small:disabled { opacity: 0.55; cursor: progress; }
.next-strong {
  margin-top: 18px;
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--wait);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  padding: 10px 14px;
  font-size: 0.95rem;
  max-width: 70ch;
}
.next-strong strong { color: #fff; }
.next-strong[hidden], .dstatus-item[hidden], .dstatus .btn[hidden] { display: none; }

/* ---------- Sections ---------- */
.dsection { padding: 40px 0; }
.dsection h2 { margin-bottom: 20px; }
.dsection-cal {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.loading, .load-error, .cal-empty {
  color: var(--muted);
  padding: 18px 0;
}
.load-error { color: var(--stop); font-weight: 600; }
.method-note {
  margin-top: 20px;
  font-size: var(--step--1);
  color: var(--muted);
  max-width: 90ch;
}

/* ---------- Fiches d'analyse ---------- */
.acards {
  display: grid;
  gap: 18px;
}
.acard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--line);
  border-radius: var(--radius-card);
  padding: 18px;
  min-width: 0;
}
.acard-wait { border-top-color: var(--wait); }
.acard-stop { border-top-color: var(--stop); }
.acard-closed { border-top-color: #B9C3BF; }
.acard-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 2px 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.acard-head h3 {
  font-size: var(--step-1);
  font-weight: 800;
  font-variation-settings: "wdth" 115;
}
.acard-quote {
  text-align: right;
  font-weight: 800;
  font-size: var(--step-1);
  font-variant-numeric: tabular-nums;
}
.acard-meta {
  grid-column: 1 / -1;
  font-size: var(--step--1);
  color: var(--muted);
}
.acard .row { grid-template-columns: 6.6rem 1fr; font-size: 0.92rem; }
.acard .row dd { font-weight: 500; overflow-wrap: anywhere; }
.liq-line { display: block; }
.acard abbr { text-decoration: none; font-weight: 700; color: var(--malachite); }
.acard-err { padding-top: 12px; color: var(--muted); }

/* Verdict : pas d'animation à chaque actualisation */
.acard .verdict { animation: none; }
.pill-stop { background: var(--stop); color: #fff; }
.pill-closed { background: #E3E8E6; color: var(--muted); }
.wait-title {
  margin-top: 4px;
  font-weight: 700;
  font-size: 0.92rem;
}
.waitfor {
  margin: 0;
  padding-left: 1.35em;
  display: grid;
  gap: 4px;
  font-size: 0.92rem;
}
.waitfor li::marker { font-weight: 700; color: var(--malachite); }
.vnote {
  font-size: 0.88rem;
  background: #FFF7E3;
  border-left: 3px solid var(--wait);
  padding: 8px 10px;
  border-radius: 0 6px 6px 0;
}
.vinvalid { font-size: 0.88rem; color: var(--muted); }

/* ---------- Calendrier ---------- */
.cal-lead { color: var(--muted); max-width: 70ch; margin: -6px 0 18px; }
.cal-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.cal-day h3 {
  font-size: 1rem;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
}
.cal-events { list-style: none; margin: 0; padding: 0; }
.ev {
  display: grid;
  grid-template-columns: 3.4rem 1fr auto;
  grid-template-areas:
    "time body when"
    "impact body when";
  gap: 2px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
}
.ev-time { grid-area: time; font-weight: 700; font-variant-numeric: tabular-nums; }
.ev-impact { grid-area: impact; font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.ev-body { grid-area: body; min-width: 0; }
.ev-title { display: block; font-weight: 600; }
.ev-assets { display: block; font-size: 0.82rem; color: var(--muted); }
.ev-when { grid-area: when; font-size: 0.82rem; color: var(--muted); text-align: right; white-space: nowrap; }
.ev-high .ev-title { font-weight: 700; }
.ev.is-past { opacity: 0.55; }
.impact-medium { background: var(--wait); }
.source { margin-top: 16px; font-size: var(--step--1); color: var(--muted); }

/* ---------- Appel à l'inscription ---------- */
.dcta-inner { display: grid; gap: 14px; justify-items: start; }
.dcta p { color: var(--muted); max-width: 60ch; }

/* ---------- Écrans larges ---------- */
@media (min-width: 640px) {
  .acard { padding: 22px; }
  .acard .row { grid-template-columns: 7.5rem 1fr; }
  .ev { grid-template-columns: 4rem 4.6rem 1fr auto; grid-template-areas: "time impact body when"; align-items: baseline; }
}
@media (min-width: 1000px) {
  .dhero { padding: 48px 0 52px; }
  .dsection { padding: 64px 0; }
  .acards { grid-template-columns: 1fr 1fr; }
}
