/* ===================================
   QUANTIOR - COMPARATEUR PV
   Premium Quiz Funnel - CRO Mobile
   =================================== */

:root {
    --primary: #111827;
    --accent: #0f766e;
    --accent-hover: #0d9488;
    --accent-subtle: #f0fdfa;
    --success: #059669;
    --text: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --bg: #f9fafb;
    --bg-card: #ffffff;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --error: #dc2626;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
    --radius: 12px;
    --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ===== LAYOUT ===== */
.funnel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.03em;
}

.trust-badges { display: flex; gap: 1rem; }

.badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* ===== PROGRESS ===== */
.progress-container {
    padding: 0.625rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 100px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 100px;
    width: 0%;
    transition: width 0.4s ease;
}

.progress-steps {
    text-align: center;
    margin-top: 0.375rem;
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ===== QUIZ ===== */
.quiz-wrapper {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.quiz-step {
    display: none;
    width: 100%;
    max-width: 480px;
    animation: fadeUp 0.25s ease;
}

.quiz-step.active { display: block; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem 1.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    text-align: center;
}

.step-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.375rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.step-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

/* ===== INTRO ===== */
.intro-content { text-align: center; }

h1 {
    font-size: clamp(1.375rem, 5vw, 1.75rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.highlight { color: var(--accent); }

.intro-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Social proof (#17) */
.social-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.avatars {
    display: flex;
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    margin-left: -6px;
    object-fit: cover;
}

.avatar:first-child { margin-left: 0; }

.social-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.social-text strong {
    color: var(--text-secondary);
}

/* Urgency badge (#16) */
.urgency-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: #92400e;
    margin-bottom: 1.25rem;
}

.urgency-badge svg { color: #d97706; flex-shrink: 0; }

/* Guarantees intro (#21) */
.guarantees-intro {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.875rem;
}

.guarantees-intro span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.guarantees-intro svg { color: var(--success); flex-shrink: 0; }

/* ===== CTA (#26) ===== */
.btn-primary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 1rem 1.5rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    min-height: 56px;
}

.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.99); }

.intro-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 0.875rem;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* ===== OPTIONS GRID (Cards) ===== */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
    margin-bottom: 0.5rem;
}

.option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    text-align: center;
    min-height: 52px;
}

.option-card:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.option-card.selected {
    border-color: var(--accent);
    background: var(--accent-subtle);
    box-shadow: 0 0 0 1px var(--accent);
}

.options-grid.options-2 { gap: 0.75rem; }

.option-large {
    padding: 1.5rem 1rem;
    min-height: 120px;
}

.option-icon {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.option-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.option-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

/* ===== OPTIONS LIST (Rows) ===== */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9375rem 1rem;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    text-align: left;
    width: 100%;
    min-height: 52px;
}

.option-row:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.option-row.selected {
    border-color: var(--accent);
    background: var(--accent-subtle);
    box-shadow: 0 0 0 1px var(--accent);
}

.option-text {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--text);
    font-weight: 500;
}

.option-icon-small {
    color: var(--accent);
    flex-shrink: 0;
}

.option-row svg:last-child {
    color: var(--text-muted);
    flex-shrink: 0;
    opacity: 0.4;
}

/* ===== FORM STEP HEADER ===== */
.form-step-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.form-step-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.1875rem 0.625rem;
    border-radius: 100px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* ===== FORM FIELDS ===== */
.form-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.form-group { text-align: left; }

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    letter-spacing: 0.01em;
}

.form-group input {
    width: 100%;
    padding: 0.8125rem 0.875rem;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    transition: all 0.15s ease;
    min-height: 48px;
}

/* Phone prefix */
.phone-input-wrapper {
    display: flex;
    align-items: stretch;
}

.phone-prefix {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    background: var(--border-light);
    border: 1.5px solid var(--border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
    user-select: none;
}

.phone-input-wrapper input {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
}

.form-group input::placeholder { color: var(--text-muted); }

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-card);
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.08);
}

.form-group input.valid { border-color: var(--success); }
.form-group input.error { border-color: var(--error); }

.error-message {
    display: none;
    font-size: 0.6875rem;
    color: var(--error);
    margin-top: 0.25rem;
}

.field-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 0.875rem;
    font-size: 0.625rem;
    color: var(--text-muted);
}

.field-hint svg { color: var(--success); flex-shrink: 0; }

/* ===== CHECKBOX ===== */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    cursor: pointer;
    margin-bottom: 1.25rem;
    text-align: left;
}

.checkbox-container input { display: none; }

.checkmark {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    position: relative;
    transition: all 0.15s ease;
    margin-top: 1px;
}

.checkbox-container:hover .checkmark { border-color: var(--accent); }

.checkbox-container input:checked + .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-container input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.checkbox-text a { color: var(--accent); text-decoration: underline; }

/* ===== SUBMIT ===== */
.btn-submit { position: relative; }
.btn-submit.loading .btn-text,
.btn-submit.loading svg { opacity: 0; }
.btn-loading { display: none; position: absolute; }
.btn-submit.loading .btn-loading { display: block; }

.guarantees {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.875rem;
    margin-top: 0.875rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--border-light);
}

.guarantee {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.guarantee svg { color: var(--success); flex-shrink: 0; }

/* ===== THANK YOU ===== */
.result-content { text-align: center; }
.result-header { margin-bottom: 1.25rem; }

.result-icon-success {
    width: 56px;
    height: 56px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.result-icon-success svg { color: white; }

.result-header h2 {
    font-size: 1.375rem;
    margin-bottom: 0.5rem;
}

.result-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.thankyou-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.25rem 0;
    text-align: left;
}

.thankyou-step {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.thankyou-step-number {
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    flex-shrink: 0;
}

.thankyou-step-text strong {
    display: block;
    font-size: 0.875rem;
    color: var(--text);
    margin-bottom: 0.0625rem;
}

.thankyou-step-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.thankyou-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: #92400e;
    line-height: 1.5;
    text-align: left;
}

.thankyou-note svg { color: #d97706; flex-shrink: 0; margin-top: 1px; }

/* ===== ANALYSIS LOADING ===== */
.analysis-content {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.analysis-dots {
    display: flex;
    justify-content: center;
    gap: 0.375rem;
    margin-bottom: 1.25rem;
}

.analysis-dots span {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.analysis-dots span:nth-child(1) { animation-delay: 0s; }
.analysis-dots span:nth-child(2) { animation-delay: 0.2s; }
.analysis-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.analysis-content h2 {
    font-size: 1.125rem;
    margin-bottom: 0.375rem;
}

.analysis-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    min-height: 1.5em;
}

.analysis-bar-container {
    height: 3px;
    background: var(--border);
    border-radius: 100px;
    overflow: hidden;
    max-width: 240px;
    margin: 0 auto;
}

.analysis-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 100px;
    width: 0%;
    transition: width 0.5s ease;
}

/* ===== RESULTS PAGE ===== */
.results-content { text-align: center; }

.results-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #065f46;
    margin-bottom: 0.75rem;
}

.results-badge svg { color: var(--success); flex-shrink: 0; }

.results-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Artisan cards */
.artisan-cards {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.artisan-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.artisan-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.artisan-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.artisan-info strong {
    display: block;
    font-size: 0.875rem;
    color: var(--text);
}

.artisan-cert {
    font-size: 0.6875rem;
    color: var(--success);
    font-weight: 500;
}

.artisan-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
    flex-shrink: 0;
}

.artisan-stars {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #d97706;
}

.artisan-dist {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.recontact-question {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
}

.btn-skip {
    display: block;
    width: 100%;
    padding: 0.625rem;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.8125rem;
    color: var(--text-muted);
    cursor: pointer;
    margin-top: 0.5rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.btn-skip:hover { color: var(--text-secondary); }

/* ===== FOOTER SPACER ===== */
.footer-spacer {
    min-height: 120px;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 20px 16px;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 6px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 11px;
}

.footer-links a:hover { color: var(--accent); }

.footer-disclaimer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 9px;
    color: var(--text-muted);
    line-height: 1.6;
    text-align: left;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.footer-disclaimer p { margin-bottom: 6px; }
.footer-disclaimer p:last-child { margin-bottom: 0; }

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 28px;
    border-radius: var(--radius);
    max-width: 520px;
    width: 100%;
    position: relative;
    margin: 40px 0;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--bg);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.modal-close:hover { background: var(--border); color: var(--text); }

.modal-content h2 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
    padding-right: 36px;
    letter-spacing: -0.02em;
}

.modal-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.modal-content h3 {
    font-size: 0.875rem;
    font-weight: 700;
    margin-top: 16px;
    margin-bottom: 6px;
    color: var(--text);
}

.modal-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 10px;
}

.modal-content ul { margin: 0 0 10px 0; padding-left: 18px; }

.modal-content li {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 3px;
}

.modal-content a { color: var(--accent); text-decoration: none; }
.modal-content a:hover { text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .header { padding: 0.75rem 1rem; }
    .trust-badges { display: none; }
    .progress-container { padding: 0.5rem 1rem; }

    .quiz-wrapper {
        padding: 1rem 0.75rem;
    }

    .step-content {
        padding: 1.5rem 1.25rem;
        border-radius: var(--radius-sm);
    }

    .options-grid.options-2 { grid-template-columns: 1fr 1fr; }

    .option-large { padding: 1.25rem 0.875rem; min-height: 100px; }

    .guarantees {
        flex-direction: column;
        align-items: center;
        gap: 0.375rem;
    }

    .guarantees-intro {
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }

    .footer-spacer { min-height: 80px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
