/* =====================================================
   FORMULAIRE PAC - Styles (Typeform-like)
   ===================================================== */

:root {
    --pac-green: #3AA149;
    --pac-green-dark: #2e8a3c;
    --pac-orange: #EEA452;
    --pac-orange-dark: #d89442;
    --pac-bg: #f8f9fa;
    --pac-text: #1a3c34;
    --pac-text-light: #666;
    --pac-white: #fff;
    --pac-border: #e0e0e0;
    --pac-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --pac-radius: 12px;
    --pac-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body,
html {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--pac-bg);
    color: var(--pac-text);
    line-height: 1.5;
    min-height: 100%;
}

/* Container principal */
.pac-form-wrapper {
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    padding: 10px 15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    position: relative;
}

/* Header */
.pac-form-header {
    text-align: center;
    margin-bottom: 20px;
}

.pac-form-logo {
    height: 45px;
    margin-bottom: 10px;
}

.pac-form-title {
    font-size: 14px;
    color: var(--pac-green);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Progress bar */
.pac-progress {
    width: 100%;
    height: 6px;
    background: var(--pac-border);
    border-radius: 3px;
    margin-bottom: 30px;
    overflow: hidden;
}

.pac-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--pac-green), var(--pac-orange));
    border-radius: 3px;
    transition: width var(--pac-transition);
    width: 0%;
}

/* Steps container - scrollable content area */
.pac-steps-container {
    flex: 1;
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    padding-bottom: 80px;
    /* Space for sticky nav */
}

.pac-step {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transform: translateX(30px);
    pointer-events: none;
    transition: all var(--pac-transition);
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
}

.pac-step.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    position: relative;
}

.pac-step.exit-left {
    opacity: 0;
    transform: translateX(-30px);
}

/* Step content area - scrollable */
.pac-step-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 10px;
}

/* Question styling */
.pac-question-number {
    font-size: 13px;
    color: var(--pac-text-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pac-question-number span {
    background: var(--pac-green);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

.pac-question-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--pac-text);
    margin-bottom: 12px;
    line-height: 1.3;
}

.pac-question-subtitle {
    font-size: 15px;
    color: var(--pac-text-light);
    margin-bottom: 30px;
}

/* Options radio/checkbox style */
.pac-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.pac-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--pac-white);
    border: 2px solid var(--pac-border);
    border-radius: var(--pac-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.pac-option:hover {
    border-color: var(--pac-green);
    background: rgba(58, 161, 73, 0.03);
}

.pac-option.selected {
    border-color: var(--pac-green);
    background: rgba(58, 161, 73, 0.08);
}

.pac-option.clicked {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.pac-option-key {
    width: 28px;
    height: 28px;
    border: 2px solid var(--pac-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--pac-text-light);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.pac-option.selected .pac-option-key {
    background: var(--pac-green);
    border-color: var(--pac-green);
    color: white;
}

.pac-option-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--pac-text);
}

.pac-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Input fields */
.pac-input-group {
    margin-bottom: 18px;
}

.pac-input-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--pac-text);
    margin-bottom: 8px;
}

.pac-input {
    width: 100%;
    padding: 16px 18px;
    font-size: 16px;
    border: 2px solid var(--pac-border);
    border-radius: var(--pac-radius);
    background: var(--pac-white);
    color: var(--pac-text);
    transition: all 0.2s ease;
    outline: none;
}

.pac-input:focus {
    border-color: var(--pac-green);
    box-shadow: 0 0 0 3px rgba(58, 161, 73, 0.15);
}

.pac-input::placeholder {
    color: #aaa;
}

/* Select / Dropdown */
.pac-select-wrapper {
    position: relative;
}

.pac-select {
    width: 100%;
    padding: 16px 45px 16px 18px;
    font-size: 16px;
    border: 2px solid var(--pac-border);
    border-radius: var(--pac-radius);
    background: var(--pac-white);
    color: var(--pac-text);
    cursor: pointer;
    appearance: none;
    transition: all 0.2s ease;
    outline: none;
}

.pac-select:focus {
    border-color: var(--pac-green);
}

.pac-select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--pac-text-light);
    pointer-events: none;
}

/* Phone input */
.pac-phone-wrapper {
    display: flex;
    gap: 0;
    border: 2px solid var(--pac-border);
    border-radius: var(--pac-radius);
    overflow: hidden;
    background: var(--pac-white);
    transition: all 0.2s ease;
}

.pac-phone-wrapper:focus-within {
    border-color: var(--pac-green);
    box-shadow: 0 0 0 3px rgba(58, 161, 73, 0.15);
}

.pac-phone-prefix {
    padding: 18px 16px;
    font-size: 16px;
    background: var(--pac-bg);
    color: var(--pac-text);
    text-align: center;
    flex-shrink: 0;
    border: none;
    border-right: 2px solid var(--pac-border);
}

.pac-phone-input {
    flex: 1;
    border: none !important;
    box-shadow: none !important;
    padding: 18px 16px;
    font-size: 18px;
    letter-spacing: 1px;
}

/* Buttons */
.pac-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: var(--pac-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pac-btn-primary {
    background: var(--pac-green);
    color: white;
    box-shadow: 0 4px 15px rgba(58, 161, 73, 0.3);
}

.pac-btn-primary:hover {
    background: var(--pac-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(58, 161, 73, 0.4);
}

.pac-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.pac-btn-secondary {
    background: transparent;
    color: var(--pac-text-light);
    padding: 12px 20px;
}

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

.pac-btn-submit {
    background: var(--pac-orange);
    color: white;
    width: 100%;
    padding: 18px 32px;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(238, 164, 82, 0.35);
}

.pac-btn-submit:hover {
    background: var(--pac-orange-dark);
    transform: translateY(-2px);
}

/* Navigation - Sticky at bottom */
.pac-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--pac-bg);
    flex-shrink: 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    border-top: 1px solid var(--pac-border);
}

.pac-nav-minimal {
    padding: 12px 20px;
}

.pac-nav-hint {
    font-size: 12px;
    color: var(--pac-text-light);
}

.pac-nav-hint kbd {
    background: var(--pac-bg);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--pac-border);
    font-family: inherit;
    font-size: 11px;
}

/* Success/Thank you step */
.pac-success {
    text-align: center;
    padding: 40px 20px;
}

.pac-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--pac-green), #2ed47a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 40px;
    color: white;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.pac-success-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--pac-green);
    margin-bottom: 15px;
}

.pac-success-text {
    font-size: 16px;
    color: var(--pac-text-light);
    max-width: 380px;
    margin: 0 auto;
    line-height: 1.6;
}

.pac-success-next {
    margin-top: 25px;
    padding: 15px 20px;
    background: rgba(58, 161, 73, 0.1);
    border-radius: var(--pac-radius);
    font-size: 14px;
    color: var(--pac-green);
    font-weight: 600;
}

/* Transition message (dynamic) */
.pac-transition-msg {
    background: linear-gradient(135deg, rgba(58, 161, 73, 0.1), rgba(46, 212, 122, 0.08));
    border-left: 4px solid var(--pac-green);
    padding: 16px 20px;
    border-radius: 0 var(--pac-radius) var(--pac-radius) 0;
    margin-bottom: 20px;
    font-size: 15px;
    color: var(--pac-text);
    font-weight: 500;
}

.pac-transition-msg strong {
    color: var(--pac-green);
}

/* Trust footer - bottom of step 1 */
.pac-trust-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--pac-border);
}

.pac-trust-item {
    font-size: 12px;
    color: var(--pac-text-light);
    font-weight: 500;
}

/* Social proof */
.pac-social-proof {
    font-size: 13px;
    color: var(--pac-text-light);
    font-weight: 500;
}

/* Benefit hint */
.pac-benefit-hint {
    font-size: 13px;
    color: var(--pac-green);
    font-weight: 600;
}

/* Info box */
.pac-info-box {
    background: rgba(238, 164, 82, 0.1);
    border-left: 4px solid var(--pac-orange);
    padding: 14px 18px;
    border-radius: 0 var(--pac-radius) var(--pac-radius) 0;
    margin: 20px 0;
    font-size: 14px;
    color: var(--pac-text);
}

.pac-info-box strong {
    color: var(--pac-orange-dark);
}

/* Privacy note */
.pac-privacy-note {
    text-align: center;
    font-size: 12px;
    color: var(--pac-text-light);
    margin-top: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--pac-radius);
}

/* Loading spinner */
.pac-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error state */
.pac-input.error {
    border-color: #e74c3c;
}

.pac-error-msg {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
}

/* =====================================================
   RESPONSIVE - Mobile
   ===================================================== */
@media (max-width: 600px) {
    .pac-form-wrapper {
        padding: 12px;
    }

    .pac-steps-container {
        min-height: 340px;
        max-height: 360px;
    }

    .pac-question-text {
        font-size: 18px;
        margin-bottom: 5px;
    }

    .pac-question-subtitle {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .pac-option {
        padding: 12px 14px;
    }

    .pac-option-label {
        font-size: 14px;
    }

    /* Improved select dropdown for mobile */
    .pac-select {
        font-size: 15px;
        padding: 14px 40px 14px 14px;
        line-height: 1.3;
    }

    .pac-select option {
        font-size: 14px;
        padding: 12px 10px;
    }

    .pac-btn {
        padding: 14px 20px;
        font-size: 14px;
    }

    /* Bigger submit button on mobile */
    .pac-btn-submit {
        padding: 18px 24px;
        font-size: 16px;
        font-weight: 800;
    }

    .pac-nav {
        flex-direction: column;
        gap: 12px;
        padding-top: 15px;
        margin-top: 15px;
    }

    .pac-nav-hint {
        display: none;
    }

    .pac-btn-primary {
        width: 100%;
    }

    .pac-progress {
        margin-bottom: 15px;
    }

    .pac-transition-msg {
        padding: 12px 14px;
        font-size: 13px;
        margin-bottom: 15px;
    }

    /* Phone input mobile improvements */
    .pac-phone-prefix {
        padding: 16px 14px;
        font-size: 15px;
    }

    .pac-phone-input {
        padding: 16px 14px;
        font-size: 20px;
        letter-spacing: 2px;
    }

    /* Privacy note mobile */
    .pac-privacy-note {
        font-size: 11px;
        padding: 8px;
        margin-top: 12px;
    }

    /* Trust footer mobile */
    .pac-trust-footer {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    /* Submit button mobile - extra prominent */
    .pac-btn-submit {
        padding: 20px 28px;
        font-size: 17px;
        font-weight: 800;
        width: 100%;
        border-radius: 14px;
    }

    /* Nav mobile improvements */
    .pac-nav {
        flex-direction: column-reverse;
        gap: 10px;
        padding: 12px 16px 20px;
    }

    .pac-nav .pac-btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 12px;
        font-size: 13px;
    }
}

/* Embedded mode (iframe) */
.pac-embedded .pac-form-wrapper {
    min-height: auto;
    padding: 20px 24px 100px;
    max-width: 100%;
    overflow: visible;
}

.pac-embedded .pac-form-header {
    display: none;
}

.pac-embedded .pac-question-text {
    font-size: 22px;
}

.pac-embedded .pac-question-subtitle {
    font-size: 14px;
    margin-bottom: 24px;
}

.pac-embedded .pac-progress {
    margin-bottom: 20px;
}

.pac-embedded .pac-option {
    padding: 18px 22px;
}

.pac-embedded .pac-option-label {
    font-size: 17px;
}

/* Sticky nav in embedded mode */
.pac-embedded .pac-nav {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 -24px -100px;
    padding: 15px 24px;
    background: linear-gradient(180deg, rgba(248, 249, 250, 0) 0%, var(--pac-bg) 20%);
    box-shadow: none;
    border-top: none;
}

.pac-embedded .pac-steps-container {
    padding-bottom: 20px;
}