/* Styles pour le quiz multi-étapes sur les landing pages */

.quiz-hero {
    min-height: auto;
    padding: 120px 0 60px;
}

.quiz-form {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.quiz-container {
    min-height: 200px;
    position: relative;
    width: 100%;
}

/* Barre de progression */
.quiz-progress-container {
    margin-bottom: 2.5rem;
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.quiz-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.quiz-progress-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.quiz-progress-text {
    font-size: 0.95rem;
    color: #1e293b;
    font-weight: 600;
}

.quiz-progress-percent {
    font-size: 0.9rem;
    color: #3B82F6;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
}

.quiz-save-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #10b981;
    font-weight: 500;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    transition: opacity 0.5s ease-out;
}

.quiz-save-indicator svg {
    width: 14px;
    height: 14px;
    stroke: #10b981;
}

.quiz-progress-bar {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3B82F6, #60A5FA, #3B82F6);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: progressShimmer 2s ease infinite;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
    position: relative;
}

.quiz-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s ease infinite;
}

@keyframes progressShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.quiz-progress-time {
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* Container des questions */
.quiz-questions-container {
    min-height: 400px;
    position: relative;
}

.quiz-question {
    animation: fadeInSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.quiz-question-header {
    margin-bottom: 2rem;
    text-align: center;
}

.quiz-question-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.quiz-question-description {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.quiz-question-content {
    margin-bottom: 2rem;
}

/* Options radio */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.quiz-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #3B82F6, #60A5FA);
    transform: scaleY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-option:hover {
    border-color: #3B82F6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(96, 165, 250, 0.05));
    transform: translateX(4px) scale(1.01);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.quiz-option:hover::before {
    transform: scaleY(1);
}

.quiz-option input[type="radio"] {
    width: 22px;
    height: 22px;
    margin: 0;
    cursor: pointer;
    accent-color: #3B82F6;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.quiz-option input[type="radio"]:checked {
    transform: scale(1.1);
}

.quiz-option:has(input[type="radio"]:checked) {
    border-color: #3B82F6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(96, 165, 250, 0.12));
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2);
    transform: translateX(6px) scale(1.02);
    animation: optionSelected 0.3s ease;
}

@keyframes optionSelected {
    0% {
        transform: translateX(0) scale(1);
    }
    50% {
        transform: translateX(8px) scale(1.03);
    }
    100% {
        transform: translateX(6px) scale(1.02);
    }
}

.quiz-option:has(input[type="radio"]:checked)::before {
    transform: scaleY(1);
}

.quiz-option-label {
    flex: 1;
    font-size: 1rem;
    color: #1e293b;
    font-weight: 500;
    line-height: 1.5;
}

.quiz-option:has(input[type="radio"]:checked) .quiz-option-label {
    font-weight: 700;
    color: #3B82F6;
}

/* Select */
.quiz-select {
    width: 100%;
    padding: 1.125rem 1rem;
    padding-right: 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    background: #ffffff;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231e293b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
}

.quiz-select:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

/* Inputs text, email, tel, url */
.quiz-input {
    width: 100%;
    padding: 1.125rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    background: #ffffff;
    color: #1e293b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.quiz-input::placeholder {
    color: #94a3b8;
}

.quiz-input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.quiz-input:valid:not(:placeholder-shown) {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

/* Textarea */
.quiz-textarea {
    width: 100%;
    padding: 1.125rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    background: #ffffff;
    color: #1e293b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.quiz-textarea::placeholder {
    color: #94a3b8;
}

.quiz-textarea:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

/* Clarification */
.quiz-clarification {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 12px;
    border-left: 4px solid #3B82F6;
    font-size: 0.9rem;
    color: #1e293b;
    line-height: 1.6;
}

.quiz-clarification strong {
    color: #3B82F6;
}

/* Checkbox pour certification */
.quiz-checkbox-label {
    display: flex;
    align-items: start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    text-align: left;
}

.quiz-checkbox-label:hover {
    border-color: #3B82F6;
    background: #f1f5f9;
}

.quiz-checkbox-label input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin: 0;
    cursor: pointer;
    accent-color: #3B82F6;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.quiz-checkbox-label:has(input[type="checkbox"]:checked) {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.quiz-checkbox-label span {
    flex: 1;
    font-size: 0.95rem;
    color: #1e293b;
    line-height: 1.6;
}

/* Navigation */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

.quiz-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 52px;
    font-family: inherit;
}

.quiz-btn-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
    margin-left: auto;
}

.quiz-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.quiz-btn-primary:active {
    transform: translateY(0);
}

.quiz-btn-secondary {
    background: #ffffff;
    color: #3B82F6;
    border: 2px solid #3B82F6;
}

.quiz-btn-secondary:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.quiz-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .quiz-hero {
        padding: 100px 0 40px;
    }

    .quiz-progress-container {
        margin-bottom: 2rem;
        padding: 1.25rem;
    }
    
    .quiz-progress-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .quiz-progress-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .quiz-save-indicator {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .quiz-question-title {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }

    .quiz-option {
        padding: 1rem 1.25rem;
        min-height: 56px;
    }

    .quiz-option-label {
        font-size: 0.95rem;
    }

    .quiz-input,
    .quiz-select,
    .quiz-textarea {
        padding: 1rem 0.875rem;
        font-size: 16px;
        min-height: 50px;
    }

    .quiz-textarea {
        min-height: 110px;
    }

    .quiz-navigation {
        flex-direction: column;
        gap: 0.75rem;
    }

    .quiz-btn {
        width: 100%;
        padding: 1rem 1.5rem;
    }

    .quiz-btn-primary {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .quiz-option {
        padding: 0.875rem 1rem;
    }

    .quiz-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Animation de chargement */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

