/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link for accessibility */
.skip-link:focus {
    position: absolute;
    left: 6px;
    top: 7px;
    z-index: 999999;
    width: auto;
    height: auto;
    padding: 8px 16px;
    background: #4f46e5;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo-icon {
    font-size: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Introduction */
.intro {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.intro-content h2 {
    color: #4a5568;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.intro-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #718096;
}

.reassurance-box {
    background: linear-gradient(135deg, #e6fffa 0%, #f0fff4 100%);
    border: 2px solid #38b2ac;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.reassurance-box h3 {
    color: #2c7a7b;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.reassurance-box ul {
    list-style: none;
}

.reassurance-box li {
    margin-bottom: 0.5rem;
    color: #2d3748;
    font-weight: 500;
}

.motivation {
    font-style: italic;
    color: #4a5568;
    background: #f7fafc;
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-1px);
}

/* Focus styles for better accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* Questionnaire */
.questionnaire {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Progress bar */
.progress-bar {
    background: #e2e8f0;
    height: 8px;
    border-radius: 10px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 20%;
}

.progress-text {
    position: absolute;
    top: -25px;
    right: 0;
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

/* Question cards */
.question-card {
    display: none;
    animation: fadeIn 0.5s ease;
}

.question-card.active {
    display: block;
}

.question-card h3 {
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.question-card p {
    color: #718096;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Radio groups */
.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.radio-option, .checkbox-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.radio-option:hover, .checkbox-option:hover {
    border-color: #667eea;
    background: #edf2f7;
    transform: translateX(5px);
}

.radio-option input, .checkbox-option input {
    display: none;
}

.radio-custom, .checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    margin-right: 15px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.radio-custom {
    border-radius: 50%;
}

.checkbox-custom {
    border-radius: 4px;
}

.radio-option input:checked + .radio-custom {
    background: #667eea;
    border-color: #667eea;
    box-shadow: inset 0 0 0 3px white;
}

.checkbox-option input:checked + .checkbox-custom {
    background: #667eea;
    border-color: #667eea;
    position: relative;
}

.checkbox-option input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.radio-option input:checked, .checkbox-option input:checked {
    + .radio-custom, + .checkbox-custom {
        ~ * {
            color: #2d3748;
            font-weight: 600;
        }
    }
}

/* Rating scale */
.rating-scale {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.rating-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f7fafc;
    text-align: center;
}

.rating-option:hover {
    border-color: #667eea;
    background: #edf2f7;
    transform: translateY(-3px);
}

.rating-option input {
    display: none;
}

.rating-emoji {
    font-size: 2rem;
    margin-bottom: 8px;
}

.rating-text {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

.rating-option input:checked {
    ~ .rating-emoji {
        transform: scale(1.2);
    }
    ~ .rating-text {
        color: #2d3748;
        font-weight: 600;
    }
}

.rating-option input:checked + .rating-emoji + .rating-text {
    color: #2d3748;
    font-weight: 600;
}

/* Text input groups */
.text-input-group {
    margin: 1rem 0;
}

.text-input-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 120px;
    background: #f7fafc;
    transition: all 0.3s ease;
}

.text-input-group input[type="text"],
.text-input-group input[type="email"],
.text-input-group input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    background: #f7fafc;
    transition: all 0.3s ease;
}

.text-input-group input[type="text"]:focus,
.text-input-group input[type="email"]:focus,
.text-input-group input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.text-input-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.text-input-group textarea::placeholder {
    color: #a0aec0;
    font-style: italic;
}
.text-input-group input::placeholder {
    color: #a0aec0;
    font-style: italic;
}
.text-input-group label {
    display: block;
    margin-bottom: 6px;
    color: #4a5568;
    font-weight: 500;
}
.helper-text {
    color: #a0aec0;
    font-style: italic;
    margin-top: 10px;
    display: block;
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    gap: 15px;
}

/* Thank you section */
.thank-you {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.thank-you-content h2 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.summary-box {
    background: #f7fafc;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: left;
}

.summary-box h3 {
    color: #4a5568;
    margin-bottom: 1rem;
}

.final-message {
    color: #718096;
    font-style: italic;
    margin: 1.5rem 0;
}

.contact-info {
    background: linear-gradient(135deg, #e6fffa 0%, #f0fff4 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid;
    }
    
    .checkbox-custom {
        border: 2px solid;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .intro, .questionnaire, .thank-you {
        padding: 1.5rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .rating-scale {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .navigation {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    .rating-scale {
        grid-template-columns: 1fr;
    }
    
    .logo-icon {
        font-size: 2rem;
        padding: 10px;
    }
}