/* TRADE AI — page d'accueil (étape 0)
   Palette inspirée de la malachite du Katanga : un vert profond pour l'en-tête,
   un papier froid pour la lecture, et trois couleurs de verdict qui ont un sens. */

:root {
  --malachite: #0E4D3F;
  --malachite-band: #17634F;
  --malachite-light: #CFE6DD;
  --paper: #F4F6F5;
  --surface: #FFFFFF;
  --ink: #13201C;
  --muted: #55655F;
  --line: #D5DDD9;
  --wait: #F2B531;
  --wait-ink: #5A3D00;
  --stop: #C93C3C;
  --go: #2E9A68;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(2.2rem, 6.4vw, 4rem);

  --radius-card: 14px;
  --radius-control: 10px;
  --gutter: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.12; }
p { margin: 0; }
a { color: inherit; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: var(--radius-control);
  z-index: 10;
}
.skip:focus { left: 8px; }

:focus-visible {
  outline: 3px solid var(--wait);
  outline-offset: 2px;
}

/* ---------- En-tête ---------- */
.topbar {
  background: var(--malachite);
  color: #fff;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
}
.brand-mark {
  align-self: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--wait);
  box-shadow: 0 0 0 3px rgba(242, 181, 49, 0.25);
}
.brand-name {
  font-weight: 800;
  font-variation-settings: "wdth" 120;
  letter-spacing: 0.01em;
  font-size: 1.15rem;
}
.brand-name,
.brand-by,
.btn { white-space: nowrap; }
.brand-by {
  display: none;
  font-size: var(--step--1);
  color: var(--malachite-light);
}
@media (min-width: 480px) {
  .brand-by { display: inline; }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-control);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn-primary {
  background: var(--wait);
  color: var(--ink);
  padding: 14px 22px;
  font-size: var(--step-0);
}
.btn-primary:hover { background: #F7C552; }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.btn-small {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  padding: 8px 14px;
  font-size: var(--step--1);
}
.btn-small:hover { background: rgba(255, 255, 255, 0.1); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--malachite);
  /* bandes concentriques discrètes, comme une coupe de 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: 40px 0 56px;
}
.hero-grid {
  display: grid;
  gap: 36px;
}
.hero h1 {
  font-size: var(--step-3);
  font-weight: 800;
  font-variation-settings: "wdth" 118;
  letter-spacing: -0.01em;
  max-width: 15ch;
  text-wrap: balance;
}
.hero-sub {
  margin-top: 20px;
  max-width: 52ch;
  color: var(--malachite-light);
  font-size: var(--step-1);
  line-height: 1.5;
}
.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.hero-note {
  font-size: var(--step--1);
  color: var(--malachite-light);
}

/* Carte d'analyse (illustration produit) */
.card {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: 0 24px 48px -24px rgba(4, 30, 23, 0.6);
  max-width: 460px;
  width: 100%;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.card-asset {
  font-weight: 800;
  font-variation-settings: "wdth" 115;
  font-size: var(--step-1);
}
.card-tag {
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--paper);
  border-radius: 999px;
  padding: 3px 10px;
}
.card-rows { margin: 0; }
.row {
  display: grid;
  grid-template-columns: 7.25rem 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
}
.row dt { color: var(--muted); }
.row dd { margin: 0; font-weight: 600; }
.impact {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: 0.1em;
}
.impact-high { background: var(--stop); }

.verdict {
  display: grid;
  gap: 10px;
  padding-top: 16px;
}
.verdict p { font-size: 0.94rem; color: var(--ink); }
.pill {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 14px;
  font-weight: 800;
  font-size: 0.95rem;
}
.pill-wait { background: var(--wait); color: var(--wait-ink); }
.card-caption {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Un seul moment animé : le verdict apparaît après la lecture des lignes */
@media (prefers-reduced-motion: no-preference) {
  .verdict { animation: verdict-in 0.5s ease-out 0.9s both; }
  @keyframes verdict-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section h2 {
  font-size: var(--step-2);
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  max-width: 24ch;
}

.features {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 2px solid var(--ink);
}
.features li {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.features h3 {
  font-size: var(--step-1);
  font-weight: 700;
}
.features p { color: var(--muted); max-width: 62ch; }

.section-honest {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.honest-grid { display: grid; gap: 24px; }
.nevers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.nevers li {
  position: relative;
  padding-left: 30px;
  max-width: 60ch;
}
.nevers li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--stop);
  background:
    linear-gradient(45deg, transparent 45%, var(--stop) 45%, var(--stop) 55%, transparent 55%);
}

/* ---------- Formulaire ---------- */
.form-grid { display: grid; gap: 28px; }
.form-intro p {
  margin-top: 14px;
  color: var(--muted);
  max-width: 48ch;
}
.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 20px;
  display: grid;
  gap: 18px;
}
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-pair { display: grid; gap: 18px; }
label, legend { font-weight: 600; font-size: 0.95rem; }
legend { padding: 0; margin-bottom: 8px; }
.req { font-weight: 400; color: var(--muted); }
.hint { font-size: var(--step--1); color: var(--muted); }

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  font: inherit;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
}
textarea { resize: vertical; line-height: 1.45; }
textarea::placeholder { color: #8A9792; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--malachite); }
[aria-invalid="true"] { border-color: var(--stop) !important; }

.checks, .prices { display: grid; gap: 8px; }
.check, .price {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  cursor: pointer;
}
.check input, .price input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--malachite);
  flex: none;
}
.price {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-control);
  padding: 11px 12px;
}
.price:has(input:checked) {
  border-color: var(--malachite);
  background: #EEF6F2;
}
.consent span { font-size: 0.92rem; color: var(--muted); }

.error {
  color: var(--stop);
  font-size: var(--step--1);
  font-weight: 600;
}
.status { font-size: 0.95rem; min-height: 1.5em; }
.status.ok { color: var(--go); font-weight: 600; }
.status.ko { color: var(--stop); font-weight: 600; }
.status.demo { color: var(--wait-ink); }

/* ---------- Pied de page ---------- */
.footer {
  background: var(--ink);
  color: #C9D3CF;
  padding: 36px 0 44px;
  font-size: var(--step--1);
}
.footer .risk { max-width: 80ch; }
.footer-meta { margin-top: 14px; color: #93A39D; }
.footer a { color: #fff; }

/* ---------- Écrans larges ---------- */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .field-pair { grid-template-columns: 1fr 1fr; }
  .card { padding: 24px; }
  .row { grid-template-columns: 8.5rem 1fr; }
  .form { padding: 28px; }
}

@media (min-width: 960px) {
  body { font-size: 1.125rem; }
  .hero { padding: 72px 0 88px; }
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 56px;
  }
  .card { justify-self: end; }
  .section { padding: 88px 0; }
  .features {
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
  }
  .honest-grid {
    grid-template-columns: 0.8fr 1.2fr;
    align-items: start;
  }
  .form-grid {
    grid-template-columns: 0.8fr 1.2fr;
    align-items: start;
    gap: 56px;
  }
  .form-intro { position: sticky; top: 24px; }
}
