:root {
    --bg: #f3f4f6;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #d1d5db;
    --primary: #1877f2;
    --primary-dark: #145dbf;
    --ok-bg: #e8f7ee;
    --ok: #137a3a;
    --err-bg: #fdecec;
    --err: #b42318;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111318;
        --card: #1c1f26;
        --text: #e5e7eb;
        --muted: #9ca3af;
        --border: #374151;
        --ok-bg: #12301f;
        --ok: #6fdc9a;
        --err-bg: #3a1714;
        --err: #ff9b8f;
    }
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.topbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; }
main { max-width: 640px; margin: 0 auto; padding: 16px; }
.card {
    background: var(--card); border: 1px solid var(--border); border-radius: 12px;
    padding: 16px; margin-bottom: 16px;
}
h1, h2 { margin: 0 0 12px; line-height: 1.25; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
label { display: block; font-weight: 600; margin: 12px 0 6px; }
input[type=text], input[type=password], select, textarea {
    width: 100%; padding: 12px; font: inherit; color: var(--text);
    background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
}
textarea { resize: vertical; min-height: 140px; }
input[type=file] { width: 100%; font: inherit; }
button {
    min-height: 44px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer;
    color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
}
button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
button.primary:hover { background: var(--primary-dark); }
button.big { width: 100%; margin-top: 16px; font-size: 1.1rem; min-height: 52px; }
button.danger { color: var(--err); }
button.link { background: none; border: none; color: var(--primary); padding: 0; min-height: auto; }
button:disabled { opacity: .6; cursor: wait; }
form.inline { display: inline; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row select { flex: 1 1 200px; }
.muted { color: var(--muted); font-size: .9rem; }
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; }
.alert-success { background: var(--ok-bg); color: var(--ok); }
.alert-error { background: var(--err-bg); color: var(--err); }
.result-ok { border-color: var(--ok); background: var(--ok-bg); }
.result-error { border-color: var(--err); background: var(--err-bg); }
.result a { color: var(--primary); font-weight: 600; }
.preview { display: block; max-width: 100%; max-height: 240px; margin-top: 10px; border-radius: 8px; }
[hidden] { display: none !important; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { padding: 6px 0; }
.checks li.ok { color: var(--ok); }
.checks li.error { color: var(--err); font-weight: 600; }
code { overflow-wrap: anywhere; }

/* ---------- En-tête ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
a.link { color: var(--primary); font-weight: 600; text-decoration: none; }

/* ---------- Page d'accueil ---------- */
body.home main { max-width: 1040px; }
.hero {
    display: grid; gap: 32px; align-items: center;
    padding: 24px 0 40px;
}
.eyebrow {
    display: inline-block; margin: 0 0 12px; padding: 4px 12px; border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary);
    font-size: .85rem; font-weight: 700;
}
.hero h1 { font-size: clamp(2rem, 7vw, 3.2rem); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 16px; }
.accent {
    background: linear-gradient(90deg, var(--primary), #8b5cf6 55%, #f97316);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 1.1rem; color: var(--muted); max-width: 32em; margin: 0 0 24px; }
.cta {
    display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px;
    border-radius: 999px; background: var(--primary); color: #fff; font-weight: 700; font-size: 1.05rem;
    text-decoration: none; box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 35%, transparent);
    transition: transform .15s ease, box-shadow .15s ease;
}
.cta:hover { transform: translateY(-2px); background: var(--primary-dark); }

.phone {
    justify-self: center; width: min(280px, 100%); padding: 12px; border-radius: 36px;
    background: #1f2430; box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
    transform: rotate(-3deg); animation: float 6s ease-in-out infinite;
}
.phone-screen { border-radius: 26px; background: var(--bg); padding: 18px 12px; }
.mock-post { background: var(--card); border-radius: 14px; padding: 12px; font-size: .9rem; border: 1px solid var(--border); }
.mock-post p { margin: 10px 0; }
.mock-head { display: flex; gap: 8px; align-items: center; line-height: 1.2; }
.mock-head small { color: var(--muted); }
.mock-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #f97316, #8b5cf6); flex: none; }
.mock-photo { height: 120px; border-radius: 10px; overflow: hidden; }
.mock-actions { display: flex; justify-content: space-around; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); color: var(--muted); font-size: .8rem; }
.mock-button {
    display: block; margin-top: 14px; padding: 12px; border-radius: 10px; text-align: center;
    background: var(--primary); color: #fff; font-weight: 700; animation: pulse 2.4s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-3deg) translateY(-10px); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 50%, transparent); } 50% { box-shadow: 0 0 0 10px transparent; } }
@media (prefers-reduced-motion: reduce) { .phone, .mock-button { animation: none; } }

.steps { padding: 16px 0 24px; }
.steps h2, .perks h3 { margin-bottom: 8px; }
.steps h2 { font-size: 1.5rem; text-align: center; margin-bottom: 24px; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
.steps li {
    position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px;
    counter-increment: step;
}
.steps li::before {
    content: counter(step); position: absolute; top: 16px; right: 18px;
    font-size: 2.2rem; font-weight: 800; color: var(--border); line-height: 1;
}
.steps h3 { margin: 8px 0 6px; font-size: 1.1rem; }
.steps p, .perk p { margin: 0; color: var(--muted); }
.step-icon { font-size: 1.8rem; }

.perks { display: grid; gap: 16px; padding: 8px 0 32px; }
.perk { padding: 18px 20px; border-radius: 16px; background: color-mix(in srgb, var(--primary) 7%, var(--card)); }
.perk h3 { font-size: 1.05rem; }

.site-footer {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
    padding: 20px 0 8px; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem;
}
.site-footer a { color: var(--muted); }

@media (min-width: 760px) {
    .hero { grid-template-columns: 1.2fr 1fr; padding: 56px 0 64px; }
    .steps ol, .perks { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Page de texte (confidentialité) ---------- */
.prose h1 { margin-bottom: 4px; }
.prose h2 { margin-top: 24px; }
.prose a { color: var(--primary); }
.history { list-style: none; margin: 0; padding: 0; }
.history li { padding: 10px 0 10px 10px; border-bottom: 1px solid var(--border); border-left: 3px solid var(--ok); margin-bottom: 4px; overflow-wrap: anywhere; }
.history li.error { border-left-color: var(--err); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
