/* ============================================
   DIAGNOSTIC CONVERSION SHOPIFY · QOUBRA
   Scopé sous .sc-app. Aucune couleur de fond propre : la page reprend les
   jetons du site (--bg, --card, --line, --ink…), donc le fond clair par
   défaut et le thème sombre quand le visiteur l'active.
   Boutons, étiquettes et bande sombre viennent de site.css
   (.btn, .eyebrow, .cta-band, .lead-privacy).
   ============================================ */

.sc-app {
    --sc-green: #4ec58a;
    --sc-orange: #f0a623;
    --sc-red: #e5564e;
    position: relative;
    overflow: hidden;
}
[data-theme="light"] .sc-app {
    --sc-green: #23784f;
    --sc-orange: #a86200;
    --sc-red: #c2382f;
}
.sc-app [hidden] { display: none !important; }

.sc-app > .glow { top: -260px; left: 50%; transform: translateX(-50%); width: 1000px; height: 600px; }

.sc-app .tone-green  { --tone: var(--sc-green); }
.sc-app .tone-orange { --tone: var(--sc-orange); }
.sc-app .tone-red    { --tone: var(--sc-red); }

/* ── Écrans ─────────────────────────────────────────────────── */
.sc-app .screen { display: none; position: relative; z-index: 1; padding: 130px 0 clamp(64px, 8vw, 110px); min-height: 100svh; }
.sc-app .screen.active { display: block; animation: sc-in var(--dur-reveal) var(--ease-out); }
@keyframes sc-in { from { opacity: 0; } to { opacity: 1; } }

.sc-app .sc-container { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.sc-app .sc-narrow { max-width: 520px; }

/* Carte statique : même surface que .card du site, sans ses effets de survol */
.sc-app .sc-card {
    padding: clamp(24px, 4vw, 40px);
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
}
[data-theme="light"] .sc-app .sc-card { background: rgba(255, 255, 255, 0.72); border-color: transparent; }

/* ── Accueil ────────────────────────────────────────────────── */
.sc-app .sc-hero {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px;
    min-height: calc(100svh - 260px); justify-content: center;
}
.sc-app .sc-hero h1 { max-width: 20ch; }
.sc-app .sc-nowrap { white-space: nowrap; }
.sc-app .sc-hero .lead { max-width: 46ch; }
.sc-app .sc-proof { font-size: 14px; color: var(--ink-2); }
.sc-app .sc-proof span { color: var(--accent-ink); padding: 0 4px; }

.sc-app .sc-zones-preview {
    list-style: none; margin: 18px 0 0; padding: 0;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 620px;
}
.sc-app .sc-zones-preview li {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px 7px 7px; border: 1px solid var(--line-strong); border-radius: 999px;
    font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.sc-app .sc-zones-preview li span {
    display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(255, 85, 0, 0.14); color: var(--ink); font-size: 12px; font-weight: 700;
}

/* ── Progression et zone ────────────────────────────────────── */
.sc-app .sc-progress { margin-bottom: 28px; }
.sc-app .sc-progress-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.sc-app .sc-progress-fill { height: 100%; width: 0; background: var(--accent); border-radius: 6px; transition: width 400ms var(--ease-out); }
.sc-app .sc-progress-text { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 13px; color: var(--ink-3); font-weight: 500; }

.sc-app .sc-zone-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.sc-app .sc-zone-num {
    flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
    background: var(--accent); color: #fff; font-family: var(--font-display); font-size: 22px;
}
.sc-app .sc-zone-head h2 { font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -0.02em; line-height: 1.1; }
.sc-app .sc-zone-head p { font-size: 14px; color: var(--ink-3); margin-top: 3px; }

/* ── Question ───────────────────────────────────────────────── */
.sc-app .sc-question { position: relative; margin-bottom: 20px; }
.sc-app .sc-question.is-in { animation: sc-slide 320ms var(--ease-out); }
@keyframes sc-slide { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.sc-app .sc-question .eyebrow { margin-bottom: 14px; }
.sc-app .sc-question-num {
    position: absolute; top: 20px; right: 26px;
    font-family: var(--font-display); font-size: 44px; line-height: 1; color: var(--accent); opacity: 0.12;
}
.sc-app .sc-question-text {
    font-family: var(--font-body); font-size: clamp(18px, 2vw, 20px); font-weight: 600;
    letter-spacing: -0.01em; line-height: 1.4; max-width: 88%; margin-bottom: 22px;
}
.sc-app .sc-helper { font-size: 14px; color: var(--ink-3); margin: -12px 0 22px; }

.sc-app .sc-answers { display: flex; flex-direction: column; gap: 10px; }
.sc-app .sc-answer {
    --tone: var(--accent);
    display: flex; align-items: center; gap: 14px; width: 100%;
    padding: 15px 18px; border: 1px solid var(--line-strong); border-radius: var(--r-btn);
    background: transparent; color: var(--ink); font: inherit; font-size: 15px; font-weight: 500;
    text-align: left; line-height: 1.4; cursor: pointer;
    transition: border-color var(--dur), background var(--dur), transform var(--dur) var(--ease-out);
}
@media (hover: hover) {
    .sc-app .sc-answer:hover { border-color: var(--tone); transform: translateY(-1px); }
}
.sc-app .sc-answer:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sc-app .sc-answer .dot {
    flex: none; width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid var(--ink-3); position: relative; transition: border-color var(--dur), background var(--dur);
}
.sc-app .sc-answer.selected { border-color: var(--tone); background: color-mix(in srgb, var(--tone) 9%, transparent); }
.sc-app .sc-answer.selected .dot { border-color: var(--tone); background: var(--tone); }
.sc-app .sc-answer.selected .dot::after {
    content: ""; position: absolute; inset: 0; margin: auto; width: 6px; height: 6px; border-radius: 50%; background: #fff;
}

.sc-app .sc-nav { display: flex; justify-content: space-between; gap: 12px; }
.sc-app .sc-btn-next { background: var(--accent); color: #fff; }
.sc-app .sc-btn-next:hover:not(:disabled) { background: var(--accent-hover); }
.sc-app .sc-btn-next:disabled { opacity: 0.35; cursor: not-allowed; }
.sc-app .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── Coordonnées ────────────────────────────────────────────── */
.sc-app .sc-lead-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 26px; }
.sc-app .sc-lead-head h2 { font-size: clamp(26px, 3vw, 34px); }
.sc-app .sc-lead-head p { font-size: 15px; }
.sc-app .sc-field { margin-bottom: 14px; }
.sc-app .sc-field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.sc-app .sc-field input {
    width: 100%; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: var(--r-btn);
    background: var(--bg-field); color: var(--ink); font: inherit; font-size: 16px;
    transition: border-color var(--dur), box-shadow var(--dur);
}
.sc-app .sc-field input::placeholder { color: var(--ink-3); }
.sc-app .sc-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 85, 0, 0.18); }
.sc-app .sc-field input:user-invalid { border-color: var(--sc-red); }
.sc-app .sc-btn-full { width: 100%; margin-top: 8px; }
.sc-app .lead-privacy a { display: inline-block; margin-top: 4px; }
/* Piège à robots : hors écran, jamais vu ni atteint au clavier */
.sc-app .sc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sc-app .sc-link {
    display: block; margin: 18px auto 0; padding: 6px 4px; background: none; border: 0;
    font: inherit; font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px;
}
.sc-app .sc-link:hover { color: var(--accent-ink); }
.sc-app .sc-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sc-app [tabindex="-1"]:focus { outline: none; }

/* ── Résultats ──────────────────────────────────────────────── */
.sc-app .sc-results-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 28px; }

.sc-app .sc-score { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-bottom: clamp(40px, 5vw, 56px); }
.sc-app .sc-score-circle { position: relative; width: 200px; height: 200px; }
.sc-app .sc-score-circle svg { width: 100%; height: 100%; }
.sc-app .sc-score-track { fill: none; stroke: var(--line); stroke-width: 12; }
.sc-app .sc-score-arc { fill: none; stroke: var(--tone, var(--accent)); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease-out); }
.sc-app .sc-score-value { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-family: var(--font-display); font-size: 60px; line-height: 1; letter-spacing: -0.04em; color: var(--ink); }
.sc-app .sc-score-value small { font-size: 20px; color: var(--ink-3); letter-spacing: 0; margin-top: 4px; }
.sc-app .sc-score-level { font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 26px); line-height: 1.25; letter-spacing: -0.02em; color: var(--ink); text-align: center; max-width: 30ch; text-wrap: balance; }

.sc-app .sc-block { margin-bottom: clamp(36px, 5vw, 52px); }
.sc-app .sc-block-title { font-family: var(--font-body); font-size: 13.5px; font-weight: 600; letter-spacing: 0; color: var(--ink-2); margin-bottom: 14px; }

.sc-app .sc-zones { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sc-app .sc-zone-row {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, 200px) 54px; align-items: center; gap: 16px;
    padding: 14px 18px; border-radius: var(--r-btn); background: var(--card);
}
.sc-app .sc-zone-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.sc-app .sc-zone-bar { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.sc-app .sc-zone-bar span { display: block; height: 100%; border-radius: 8px; background: var(--tone); }
.sc-app .sc-zone-score { text-align: right; font-family: var(--font-display); font-size: 22px; color: var(--ink); }
.sc-app .sc-zone-score small { font-size: 13px; color: var(--ink-3); }

.sc-app .sc-priorities { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sc-app .sc-priority { padding: clamp(22px, 3vw, 30px); display: flex; flex-direction: column; gap: 10px; }
.sc-app .sc-priority-tag { font-size: 12.5px; font-weight: 600; color: var(--accent-ink); }
.sc-app .sc-priority h3 { font-size: clamp(20px, 2.2vw, 24px); }
.sc-app .sc-priority p { font-size: 15px; }

.sc-app .sc-cta .lead { max-width: 60ch; }
.sc-app .sc-thanks { text-align: center; }
.sc-app .sc-thanks p { font-size: 17px; color: var(--ink); }

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .sc-app .screen { padding-top: 110px; }
    .sc-app .sc-container { padding: 0 18px; }
    .sc-app .sc-progress-text { font-size: 12px; }
    .sc-app .sc-question-num { font-size: 34px; top: 16px; right: 18px; }
    .sc-app .sc-zone-row { grid-template-columns: minmax(0, 1fr) 48px; row-gap: 8px; }
    .sc-app .sc-zone-bar { grid-column: 1 / -1; grid-row: 2; }
    .sc-app .sc-priorities { grid-template-columns: 1fr; }
    .sc-app .sc-score-circle { width: 170px; height: 170px; }
    .sc-app .sc-score-value { font-size: 50px; }
}

@media (prefers-reduced-motion: reduce) {
    .sc-app .screen.active, .sc-app .sc-question.is-in { animation: none; }
    .sc-app .sc-score-arc, .sc-app .sc-progress-fill { transition: none; }
}
