/* Clic&Vente : sarcelle (confiance) + corail (énergie de la vente), fond légèrement teinté */
:root {
  --brand: #0e9f8f;
  --brand-dark: #0a7d71;
  --brand-soft: #e3f5f2;
  --accent: #ff7a59;
  --accent-soft: #fff0eb;
  --ink: #18232b;
  --muted: #5d6b73;
  --bg: #f5f8f7;
  --card: #ffffff;
  --line: #dfe7e5;
  --error-bg: #fdecec;
  --error: #b42318;
  --ok-bg: #e3f5f2;
  --shadow: 0 1px 2px rgba(16, 40, 36, .05), 0 8px 24px rgba(16, 40, 36, .06);
  --radius: 16px;
  --ebay: #3b82f6;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #35c2b0; --brand-dark: #5fd6c6; --brand-soft: #143532; --accent: #ff9070; --accent-soft: #3a231c;
    --ink: #e7efed; --muted: #9db0b2; --bg: #0e1517; --card: #162125; --line: #27373b;
    --error-bg: #3a1615; --error: #ffb4ab; --ok-bg: #143532; --ebay: #7aa8ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; }
a { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.15; font-family: var(--font-display); text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); margin: 0 0 .6rem; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin: 0 0 1rem; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; margin: .4rem 0; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.narrow { max-width: 680px; }
.section { padding-block: 48px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.prewrap { white-space: pre-wrap; }
.eyebrow { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin: 0 0 .5rem; }

/* Barre du haut */
.topbar { background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; flex-wrap: wrap; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; text-decoration: none; color: var(--ink); letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; }
.nav a:hover { color: var(--brand-dark); }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 1rem; font-family: inherit;
  padding: 12px 22px; border-radius: 999px; transition: transform .12s ease, background .15s, box-shadow .15s;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 30%, transparent);
}
.btn:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.nav .btn { color: #fff; }
.btn-small { padding: 7px 14px; font-size: .9rem; box-shadow: none; }
.btn-big { padding: 16px 30px; font-size: 1.1rem; }
.btn-outline { background: transparent; color: var(--brand-dark); border: 2px solid var(--brand); box-shadow: none; }
.btn-outline:hover { background: var(--brand-soft); }
.btn-danger { background: var(--error); box-shadow: none; }
.btn[disabled] { opacity: .65; cursor: wait; transform: none; }
.linklike { background: none; border: 0; color: var(--brand-dark); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; justify-self: start; }

/* Cartes */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.tag { display: inline-block; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; font-size: .78rem; padding: 3px 10px; border-radius: 999px; margin: 0 0 8px; }
.tag-grey { background: color-mix(in srgb, var(--line) 70%, transparent); color: var(--muted); }

/* Accueil */
.hero { background: radial-gradient(1200px 500px at 85% -10%, var(--accent-soft), transparent 60%), radial-gradient(900px 500px at 0% 0%, var(--brand-soft), transparent 60%); padding-block: 56px; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hl { color: var(--brand); position: relative; white-space: nowrap; }
.hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: .05em; height: .18em; background: var(--accent); opacity: .35; border-radius: 4px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.cta-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 20px; }
.phone { justify-self: center; width: min(320px, 100%); border-radius: 36px; padding: 12px; background: var(--ink); box-shadow: 0 30px 60px rgba(16, 40, 36, .25); transform: rotate(2deg); }
.phone-screen { background: var(--card); border-radius: 26px; padding: 18px; display: grid; gap: 6px; }
.phone-photo { aspect-ratio: 4 / 3; border-radius: 16px; background: linear-gradient(135deg, #2f4f8f, #1f3566); display: grid; place-items: center; font-size: 3.4rem; max-width: 100%; }
.phone h3 { margin: 4px 0 0; font-size: 1rem; }
.typing { margin: 0; font-size: .88rem; color: var(--muted); min-height: 7.5em; }
.typing:not(.typed)::after { content: "▍"; color: var(--brand); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.phone-price { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: .72rem; color: var(--muted); text-align: center; }
.phone-price span { border: 1px solid var(--line); border-radius: 10px; padding: 6px 4px; display: grid; }
.phone-price strong { color: var(--ink); font-size: .95rem; }
.phone-price .main { border-color: var(--brand); background: var(--brand-soft); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step p { color: var(--muted); margin: 0; }
.num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; }
.ba-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ba-head h2 { margin: 0; }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ba-card { margin: 0; transition: opacity .3s ease, transform .3s ease, filter .3s ease; }
.ba .ba-after { opacity: .45; filter: grayscale(.6); }
.ba.show-after .ba-before { opacity: .45; filter: grayscale(.6); transform: scale(.98); }
.ba.show-after .ba-after { opacity: 1; filter: none; transform: scale(1.02); border-color: var(--brand); }
.pricing-band { background: var(--card); border-block: 1px solid var(--line); }
.sources-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.src-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--bg); }
.src-card p { color: var(--muted); margin: 0; }
.src-dot { display: block; width: 14px; height: 14px; border-radius: 50%; }
.src-community, .share-fg.src-community { background: var(--brand); fill: var(--brand); }
.src-ebay, .share-fg.src-ebay { background: var(--ebay); fill: var(--ebay); }
.src-ai, .share-fg.src-ai { background: var(--accent); fill: var(--accent); }
details { margin-bottom: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
summary { cursor: pointer; font-weight: 700; }
details > p { margin: 8px 0 0; color: var(--muted); }
.final-cta h2 { max-width: 22ch; margin-inline: auto; }

/* Tarifs */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.plans-4 { grid-template-columns: repeat(2, 1fr); }
.plan-price { font-size: 2rem; font-weight: 800; margin: 0 0 8px; font-family: var(--font-display); }
.plan-price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.plan-best { border: 2px solid var(--brand); }
.plan form { margin-top: 8px; }

/* Formulaires */
.form { display: grid; gap: 14px; }
.form > label { display: grid; gap: 6px; font-weight: 700; }
input[type=email], input[type=password], input[type=text], textarea {
  width: 100%; font: inherit; color: var(--ink); padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
}
input:focus, textarea:focus { outline: 2px solid var(--brand); border-color: transparent; }
.check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; margin: 10px 0; }
.check input { margin-top: 4px; accent-color: var(--brand); }
.platforms { border: 0; padding: 0; margin: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.platforms legend { font-weight: 700; margin-bottom: 8px; }
.pill { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; cursor: pointer; font-weight: 600; background: var(--card); }
.pill input { accent-color: var(--brand); }
.pill:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.drop {
  position: relative; display: grid; place-items: center; text-align: center; min-height: 200px; cursor: pointer;
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px; background: var(--bg); transition: border-color .15s, background .15s;
}
.drop:hover, .drop.dragging { border-color: var(--brand); background: var(--brand-soft); }
.drop.has-photo { border-style: solid; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop img { max-height: 300px; border-radius: 12px; }
#drop-text { display: grid; gap: 4px; justify-items: center; }
.drop-icon { font-size: 2.2rem; }
.hints { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -6px; }
.hint { border: 1px dashed var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: .82rem; cursor: pointer; }
.hint:hover { border-color: var(--brand); color: var(--brand-dark); }
.quota { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; display: inline-block; }
.gen.is-sending { opacity: .5; pointer-events: none; }
.working { display: grid; justify-items: center; gap: 10px; text-align: center; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--brand-soft); border-top-color: var(--brand); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.steps-live { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.steps-live li { color: var(--muted); padding-left: 26px; position: relative; transition: color .2s; }
.steps-live li::before { content: "○"; position: absolute; left: 4px; }
.steps-live li.active { color: var(--ink); font-weight: 700; }
.steps-live li.active::before { content: "●"; color: var(--accent); }
.steps-live li.done { color: var(--brand-dark); }
.steps-live li.done::before { content: "✓"; color: var(--brand); }

/* Résultat */
.result-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.result-head h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.result-head p { margin: 0; }
.result-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.result-side { position: sticky; top: 76px; }
.field h2 { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-family: var(--font); }
.field-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.field-head > :last-child { margin-left: auto; }
.field-head .counter { margin-left: auto; }
.field-head .counter + .btn { margin-left: 0; }
.field-head label { cursor: text; }
.field p { margin: 6px 0 0; }
.counter { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.warn { color: var(--accent); }
.edit { border: 1px solid transparent !important; background: var(--bg) !important; font-size: 1rem; line-height: 1.55; resize: none; }
.edit:hover { border-color: var(--line) !important; }
#f-titre { font-weight: 700; font-size: 1.1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .88rem; cursor: pointer; text-decoration: line-through; }
.chip.on { background: var(--brand-soft); border-color: transparent; color: var(--brand-dark); text-decoration: none; font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 .card { margin-bottom: 16px; }
.tips ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }

.price-panel h2, .comps h2, .sold-card h2 { font-size: 1.05rem; margin-bottom: 12px; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tier { display: grid; gap: 2px; border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 10px 6px; cursor: pointer; font: inherit; color: var(--ink); text-align: center; transition: transform .12s, border-color .15s; }
.tier:hover { transform: translateY(-2px); border-color: var(--brand); }
.tier strong { font-family: var(--font-display); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.tier-label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tier-main { border: 2px solid var(--brand); background: var(--brand-soft); }
.tier-main strong { font-size: 1.55rem; color: var(--brand-dark); }
.tier.picked { outline: 3px solid var(--accent); outline-offset: 1px; }
.confidence { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 22px; height: 8px; border-radius: 4px; background: var(--line); }
.conf-1 .dots i:nth-child(-n+1), .conf-2 .dots i:nth-child(-n+2), .conf-3 .dots i:nth-child(-n+3) { background: var(--brand); }
.conf-1 .dots i:nth-child(1) { background: var(--accent); }
.histo { margin: 12px 0 0; }
.histo svg { width: 100%; height: auto; display: block; }
.histo .bar { fill: color-mix(in srgb, var(--ebay) 55%, var(--card)); }
.histo .marker { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 3 3; }
.histo .marker-label { fill: var(--accent); font-size: 10px; font-weight: 700; }
.histo .axis { fill: var(--muted); font-size: 9px; }
.sources { margin: 14px 0 0; background: var(--bg); box-shadow: none; }
.sources ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.src-head { display: flex; justify-content: space-between; font-size: .92rem; }
.share { width: 100%; height: 6px; display: block; margin: 4px 0; }
.share-bg { fill: var(--line); }
.comps ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.comps a { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); padding: 6px; border-radius: 10px; }
.comps a:hover { background: var(--bg); }
.comps img, .noimg { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: var(--line); display: block; }
.comp-title { font-size: .85rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sold-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 8px; }
.sold-form label { display: grid; gap: 6px; font-weight: 600; flex: 1 1 160px; }
.sold-form input[type=text] { flex: 1 1 120px; width: auto; }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow); z-index: 50; margin: 0; }

/* Alertes */
.alert { padding: 12px 14px; border-radius: 10px; }
.alert-error { background: var(--error-bg); color: var(--error); }
.alert-ok { background: var(--ok-bg); color: var(--brand-dark); }
.danger summary { color: var(--error); }
.legal h2 { margin-top: 28px; }
.history-item summary { font-weight: 400; }
.history-item summary .tag { margin: 0 0 0 6px; }
.history-item .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; }

/* Pied de page */
.footer { border-top: 1px solid var(--line); background: var(--card); margin-top: 40px; padding-block: 24px; }
.footer nav { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .result-grid { grid-template-columns: 1fr; }
  .result-side { position: static; }
}
@media (max-width: 760px) {
  .hero-inner, .steps, .ba, .plans, .plans-4, .grid-2, .sources-grid { grid-template-columns: 1fr; }
  .hero { padding-block: 32px; }
  .section { padding-block: 32px; }
  .phone { transform: none; }
  .nav { gap: 10px; font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
