/* ============================================================================
   Ora Factcheck — styles (extraits cohérents avec bilan-ora-life, compactés)
   ============================================================================ */

:root {
    /* Brand */
    --primary-blue: #000324;
    --white: #FFFFFF;
    --light-gray: #F5F5F7;
    --bg-page: #F2F2F7;
    --bg-card: #FFFFFF;
    --text-dark: #1D1D1F;
    --text-light: #6E6E73;
    --border: #E5E5E7;

    /* Verdict / gradation 3 couleurs (repris du système bilan) */
    --green: #34C759;
    --orange: #FF9500;
    --red: #FF3B30;

    /* Backgrounds pastels tone-on-tone */
    --bg-solide: #ECFDF5;
    --text-solide: #065F46;
    --bg-fragile: #FFF7ED;
    --text-fragile: #9A3412;
    --bg-faux: #FEF2F2;
    --text-faux: #991B1B;
    --bg-neutral: #F3F4F6;
    --text-neutral: #374151;

    /* Layout */
    --max-width: 620px;
    --radius-card: 20px;
    --radius-inner: 16px;
    --radius-pill: 9999px;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', system-ui, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-page);
    color: var(--text-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.app {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 28px 18px 64px;
    min-height: 100vh;
}

/* Header / brand */
.brand {
    text-align: center;
    margin-bottom: 28px;
}
.brand-mark {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--primary-blue);
}
.brand-sub {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 3px;
}

/* Screens */
.screen {
    display: none;
    animation: fadeIn 0.35s ease;
}
.screen.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 28px 24px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 18px;
}

/* Landing */
.h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--primary-blue);
    text-align: center;
    line-height: 1.2;
}
.lede {
    font-size: 16px;
    color: var(--text-light);
    text-align: center;
    margin: 12px auto 26px;
    max-width: 440px;
}

label.field-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 7px;
}
.field-hint {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
}

textarea.input-field,
input.input-field {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-inner);
    padding: 14px 16px;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-dark);
    background: #FBFBFD;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    resize: vertical;
}
textarea.input-field {
    min-height: 120px;
}
textarea.input-field:focus,
input.input-field:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.12);
}

.btn-primary {
    width: 100%;
    border: none;
    border-radius: var(--radius-pill);
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    background: var(--primary-blue);
    cursor: pointer;
    transition: transform 0.1s ease, opacity 0.15s ease;
    margin-top: 6px;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    display: inline-block;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 8px;
    margin-top: 14px;
}

.error-inline {
    display: none;
    background: var(--bg-faux);
    color: var(--text-faux);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 14px;
}
.error-inline.show { display: block; }

/* ============ GATE (capture avant verdict) ============ */

.teaser {
    position: relative;
    border-radius: var(--radius-inner);
    overflow: hidden;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #f6f7fb 0%, #eef0f6 100%);
    border: 1px solid var(--border);
    padding: 26px 22px;
    text-align: center;
}
.teaser-fake {
    filter: blur(7px);
    user-select: none;
    pointer-events: none;
}
.teaser-fake .fake-verdict {
    font-size: 30px;
    font-weight: 800;
    color: var(--primary-blue);
}
.teaser-fake .fake-line {
    height: 11px;
    background: #d8dbe6;
    border-radius: 6px;
    margin: 10px auto;
}
.teaser-fake .fake-line.w1 { width: 80%; }
.teaser-fake .fake-line.w2 { width: 62%; }
.teaser-fake .fake-line.w3 { width: 72%; }
.teaser-lock {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.35);
}
.teaser-lock svg { color: var(--primary-blue); }
.teaser-lock .lock-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-blue);
    max-width: 240px;
}

.form-group { margin-bottom: 18px; }

.consent-block {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 18px 0 8px;
}
.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.checkbox-row input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--green);
}
.checkbox-row label {
    font-size: 12.5px;
    color: var(--text-neutral);
    line-height: 1.45;
}
.checkbox-row label strong { color: var(--primary-blue); }
.checkbox-row a { color: var(--primary-blue); }

/* ============ LOADING ============ */

.loader-wrap {
    text-align: center;
    padding: 50px 20px;
}
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--green);
    border-radius: 50%;
    margin: 0 auto 22px;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-blue);
}
.loader-sub {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 6px;
}

/* ============ RESULT ============ */

.verdict-hero {
    text-align: center;
    border-radius: var(--radius-card);
    padding: 30px 22px;
    margin-bottom: 18px;
}
.verdict-hero.solide { background: var(--bg-solide); }
.verdict-hero.fragile { background: var(--bg-fragile); }
.verdict-hero.faux { background: var(--bg-faux); }

/* ----- Indice Pipeau /100 : score-ring (héros visuel) ----- */
.pipeau-ring-wrap {
    position: relative;
    width: 168px;
    height: 168px;
    margin: 4px auto 6px;
}
.pipeau-ring { display: block; }
#pipeau-ring-fg {
    transition: stroke-dashoffset 1.1s cubic-bezier(0.22, 1, 0.36, 1), stroke 0.4s ease;
}
.verdict-hero.solide #pipeau-ring-fg { stroke: var(--green); }
.verdict-hero.fragile #pipeau-ring-fg { stroke: var(--orange); }
.verdict-hero.faux #pipeau-ring-fg { stroke: var(--red); }
.pipeau-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.pipeau-emoji { font-size: 26px; line-height: 1; }
.pipeau-score {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
    margin-top: 2px;
}
.verdict-hero.solide .pipeau-score { color: var(--text-solide); }
.verdict-hero.fragile .pipeau-score { color: var(--text-fragile); }
.verdict-hero.faux .pipeau-score { color: var(--text-faux); }
.pipeau-unit {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    margin-top: 1px;
}
.pipeau-caption {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.verdict-label {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-top: 8px;
}
.verdict-hero.solide .verdict-label { color: var(--text-solide); }
.verdict-hero.fragile .verdict-label { color: var(--text-fragile); }
.verdict-hero.faux .verdict-label { color: var(--text-faux); }

.verdict-summary {
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.55;
    margin-top: 14px;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-light);
    margin: 0 0 12px;
}

.flag-item,
.source-item,
.check-item {
    border-radius: 12px;
    padding: 13px 15px;
    margin-bottom: 10px;
    font-size: 14.5px;
    line-height: 1.45;
}
.flag-item {
    background: var(--bg-faux);
    color: var(--text-faux);
    font-weight: 500;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.flag-item::before {
    content: '\26A0';
    flex-shrink: 0;
}
.source-item {
    background: var(--bg-solide);
    color: var(--text-solide);
}
.source-item.unverified {
    background: var(--bg-fragile);
    color: var(--text-fragile);
}
.source-item .src-title { font-weight: 700; }
.source-item .src-ref {
    font-size: 12.5px;
    opacity: 0.85;
    margin-top: 2px;
}
.source-item .src-says { margin-top: 5px; }
.source-item .src-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    margin-top: 7px;
    background: rgba(0, 0, 0, 0.06);
}
.check-item {
    background: var(--light-gray);
    color: var(--text-dark);
    display: flex;
    gap: 9px;
    align-items: flex-start;
}
.check-item .check-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ----- Pourquoi ? (le cœur du verdict, une ligne par affirmation) ----- */
.pourquoi-item {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}
.pourquoi-item:first-child { padding-top: 2px; }
.pourquoi-item:last-child {
    padding-bottom: 2px;
    border-bottom: none;
}
.pourquoi-icon {
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1.45;
}
.pourquoi-text {
    font-size: 15px;
    color: var(--text-dark);
    line-height: 1.45;
}
.pourquoi-sub {
    display: block;
    font-size: 12.5px;
    color: var(--text-light);
    margin-top: 2px;
}

/* ----- Toggle détail : études, signaux, questions (replié par défaut) ----- */
.detail-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-inner);
    padding: 15px 18px;
    width: 100%;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-blue);
    cursor: pointer;
    margin-bottom: 18px;
    box-shadow: var(--shadow-soft);
    transition: background 0.15s ease;
}
.detail-toggle:hover { background: #FBFBFD; }
.detail-chevron {
    flex-shrink: 0;
    font-size: 13px;
    color: var(--text-light);
    transition: transform 0.2s ease;
}
.detail-toggle.open .detail-chevron { transform: rotate(180deg); }

.detail-content {
    display: none;
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 24px 22px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 18px;
}
.detail-content.show { display: block; }
.detail-section { margin-bottom: 24px; }
.detail-subtitle {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-light);
    margin: 0 0 12px;
}

.prompt-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-blue);
    cursor: pointer;
    margin-top: 4px;
}
.prompt-content {
    display: none;
    background: #0d1117;
    color: #e6edf3;
    border-radius: 12px;
    padding: 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    margin-top: 10px;
    max-height: 320px;
    overflow: auto;
}
.prompt-content.show { display: block; }

.cta-card {
    background: linear-gradient(135deg, #000324 0%, #001040 100%);
    color: var(--white);
    border-radius: var(--radius-card);
    padding: 26px 22px;
    text-align: center;
    margin-top: 8px;
}
.cta-card h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}
.cta-card p {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 18px;
}
.cta-button {
    display: inline-block;
    background: var(--green);
    color: var(--white);
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
}

.disclaimer {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    margin-top: 20px;
    line-height: 1.5;
    padding: 0 10px;
}

.restart-link {
    display: block;
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 480px) {
    .h1 { font-size: 24px; }
    .card { padding: 22px 18px; }
    .verdict-label { font-size: 26px; }
}
