/* CessionPro Agent — CSS */
.cpa-wrap { max-width: 680px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #111; }
.cpa-step { display: none; }
.cpa-step.active { display: block; }
.cpa-step-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #7c3aed; background: #ede9fe; border-radius: 20px; padding: 4px 12px; margin-bottom: 14px; }
.cpa-title { font-size: 22px; font-weight: 700; color: #111; margin: 0 0 8px; }
.cpa-sub { font-size: 14px; color: #666; margin: 0 0 24px; line-height: 1.6; }
.cpa-section-title { font-size: 13px; font-weight: 700; color: #374151; margin: 20px 0 10px; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid #f3f4f6; padding-bottom: 6px; }
.cpa-divider { height: 1px; background: #f3f4f6; margin: 20px 0; }
.req { color: #ef4444; }

/* Fields */
.cpa-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.cpa-field label { font-size: 12px; font-weight: 600; color: #555; }
.cpa-field small { font-size: 11px; color: #9ca3af; }
.cpa-field input, .cpa-field select {
    height: 42px; padding: 0 12px; border: 1.5px solid #e5e7eb; border-radius: 8px;
    font-size: 14px; color: #111; outline: none; transition: border-color .15s; width: 100%; box-sizing: border-box;
}
.cpa-field input:focus, .cpa-field select:focus { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,.08); }
.cpa-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cpa-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* SIREN */
.cpa-siren-input-wrap { position: relative; }
.cpa-siren-input-wrap input { padding-right: 36px; letter-spacing: .1em; font-weight: 600; font-size: 18px; }
.cpa-siren-loader { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 18px; animation: spin .8s linear infinite; color: #7c3aed; }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
.cpa-company-found { background: #f0fdf4; border: 1px solid #86efac; border-radius: 8px; padding: 12px 14px; font-size: 13px; }
.cpa-found-badge { display: inline-block; background: #22c55e; color: #fff; font-size: 11px; font-weight: 600; border-radius: 4px; padding: 2px 8px; margin-bottom: 6px; }
.cpa-company-found strong { display: block; font-size: 15px; margin-bottom: 4px; }
.cpa-company-found span { display: inline-block; font-size: 12px; color: #555; margin-right: 10px; }
.cpa-siren-warn { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #92400e; }

/* Scale */
.cpa-scale { display: flex; gap: 8px; }
.cpa-scale button { flex: 1; height: 54px; border: 1.5px solid #e5e7eb; border-radius: 8px; background: #fff; cursor: pointer; font-size: 16px; font-weight: 700; color: #374151; transition: all .15s; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; }
.cpa-scale button span { font-size: 9px; font-weight: 500; color: #9ca3af; }
.cpa-scale button.active { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.cpa-scale button.active span { color: #ddd6fe; }

/* Radio */
.cpa-radio-group { display: flex; flex-direction: column; gap: 8px; }
.cpa-radio { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1.5px solid #e5e7eb; border-radius: 8px; cursor: pointer; font-size: 13px; transition: all .15s; }
.cpa-radio:hover { border-color: #c4b5fd; background: #faf5ff; }
.cpa-radio input { accent-color: #7c3aed; }

/* Nav */
.cpa-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.cpa-nav-back { margin-top: 12px; }
.cpa-btn-next { background: #7c3aed; color: #fff; border: none; border-radius: 8px; padding: 12px 28px; font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity .15s; }
.cpa-btn-next:hover { opacity: .87; }
.cpa-btn-back { background: transparent; color: #9ca3af; border: none; font-size: 13px; cursor: pointer; padding: 0; }
.cpa-btn-back:hover { color: #374151; }
.cpa-btn-submit { width: 100%; height: 52px; background: #111; color: #fff; border: none; border-radius: 9px; font-size: 15px; font-weight: 600; cursor: pointer; transition: opacity .15s; margin-top: 6px; }
.cpa-btn-submit:hover { opacity: .85; }
.cpa-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 7px; padding: 10px 14px; font-size: 13px; margin: 12px 0; }
.cpa-trust { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.cpa-trust span { font-size: 11px; color: #9ca3af; }

/* Loading */
.cpa-loading-state { text-align: center; padding: 60px 20px; }
.cpa-spinner { width: 44px; height: 44px; border: 4px solid #f3f4f6; border-top-color: #7c3aed; border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 16px; }
.cpa-loading-state p { font-size: 14px; color: #666; }

/* ── RAPPORT ─── */
.cpa-report { padding: 4px 0; }
.cpa-report-header { margin-bottom: 24px; }
.cpa-report-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #7c3aed; background: #ede9fe; border-radius: 20px; padding: 4px 12px; margin-bottom: 10px; }
.cpa-report-header h2 { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.cpa-report-header p { font-size: 13px; color: #666; margin: 0; }

/* Score + Valo top row */
.cpa-report-top { display: grid; grid-template-columns: 200px 1fr; gap: 20px; margin-bottom: 24px; }
.cpa-score-card { background: #faf5ff; border: 1px solid #e9d5ff; border-radius: 12px; padding: 20px; text-align: center; }
.cpa-score-card svg { display: block; margin: 0 auto; }
.cpa-score-inner { position: relative; margin-top: -74px; margin-bottom: 10px; }
.cpa-score-num { font-size: 28px; font-weight: 800; color: #111; }
.cpa-score-of { font-size: 11px; color: #9ca3af; }
.cpa-score-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 12px; border-radius: 20px; margin-bottom: 8px; }
.cpa-profil-badge { font-size: 12px; font-weight: 600; color: #7c3aed; margin-bottom: 4px; text-transform: capitalize; }
.cpa-profil-desc { font-size: 11px; color: #666; line-height: 1.5; margin: 0; }
.cpa-valo-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; }
.cpa-valo-card h3 { font-size: 13px; font-weight: 700; color: #374151; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .05em; }
.cpa-valo-range { font-size: 24px; font-weight: 800; color: #111; margin-bottom: 6px; }
.cpa-valo-method { font-size: 12px; color: #666; margin: 0 0 4px; }
.cpa-valo-ebe { font-size: 12px; color: #666; margin: 0 0 4px; }
.cpa-valo-note { font-size: 11px; color: #9ca3af; margin: 0 0 12px; font-style: italic; }
.cpa-tendance { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; margin-bottom: 6px; }
.cpa-tendance-hausse { background: #dcfce7; color: #166534; }
.cpa-tendance-stable  { background: #f3f4f6; color: #374151; }
.cpa-tendance-baisse  { background: #fef2f2; color: #991b1b; }
.cpa-financier p { font-size: 12px; color: #555; margin: 0; line-height: 1.5; }

/* Sections */
.cpa-report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.cpa-section { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 16px; }
.cpa-section.cpa-full { grid-column: 1 / -1; }
.cpa-section h3 { font-size: 13px; font-weight: 700; color: #374151; margin: 0 0 12px; }
.cpa-empty { font-size: 13px; color: #9ca3af; }
.cpa-fort-item { font-size: 13px; color: #166534; padding: 6px 0; border-bottom: 1px solid #f3f4f6; }
.cpa-fort-item:last-child { border-bottom: none; }
.cpa-risk-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
.cpa-risk-item:last-child { border-bottom: none; }
.cpa-risk-icon { font-size: 16px; flex-shrink: 0; }
.cpa-risk-item strong { display: block; margin-bottom: 2px; }
.cpa-risk-item span { font-size: 11px; color: #666; }
.cpa-action-item { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #f3f4f6; }
.cpa-action-item:last-child { border-bottom: none; }
.cpa-action-num { width: 26px; height: 26px; background: #7c3aed; color: #fff; border-radius: 50%; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cpa-action-item strong { font-size: 13px; display: block; margin-bottom: 4px; }
.cpa-action-meta { display: flex; gap: 10px; font-size: 11px; color: #666; flex-wrap: wrap; }
.cpa-delay { background: #ede9fe; color: #7c3aed; padding: 1px 8px; border-radius: 4px; font-weight: 600; }
.cpa-conclusion { background: #1e1b4b; border-radius: 10px; padding: 20px; margin: 20px 0; font-size: 14px; color: #c7d2fe; line-height: 1.75; }
.cpa-cta-block { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.cpa-cta-primary { display: block; text-align: center; background: #7c3aed; color: #fff; border-radius: 9px; padding: 14px; font-size: 15px; font-weight: 600; text-decoration: none; transition: opacity .15s; }
.cpa-cta-primary:hover { opacity: .87; color: #fff; }
.cpa-cta-secondary { display: block; text-align: center; background: #f9fafb; color: #374151; border: 1px solid #e5e7eb; border-radius: 9px; padding: 12px; font-size: 14px; text-decoration: none; transition: all .15s; }
.cpa-cta-secondary:hover { border-color: #7c3aed; color: #7c3aed; }
.cpa-error-state { background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 20px; color: #991b1b; font-size: 14px; }

@media (max-width: 600px) {
    .cpa-grid-2, .cpa-grid-3 { grid-template-columns: 1fr; }
    .cpa-report-top { grid-template-columns: 1fr; }
    .cpa-report-grid { grid-template-columns: 1fr; }
    .cpa-scale button { height: 46px; }
}
