/* ===========================================
   QUESTIONNAIRE ELIGIBILITE - ORBITECH
   Theme: Purple/Violet for discovery
   =========================================== */

:root {
    --quiz-primary: #8B5CF6;
    --quiz-secondary: #A78BFA;
    --quiz-gradient: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 50%, #C4B5FD 100%);
    --quiz-success: #10B981;
    --quiz-warning: #F59E0B;
    --quiz-danger: #EF4444;
}

/* HERO */
.quiz-hero {
    background: var(--quiz-gradient);
    padding: 120px 24px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.quiz-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 2px, transparent 2px);
    background-size: 50px 50px;
    animation: heroFloat 20s linear infinite;
}

@keyframes heroFloat {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.quiz-hero-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.quiz-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    color: white;
    margin-bottom: 24px;
}

.quiz-hero h1 {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 900;
    color: white;
    line-height: 1.15;
    margin-bottom: 20px;
}

.quiz-hero h1 .highlight {
    color: #FDE68A;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.2);
}

.quiz-subtitle {
    font-size: clamp(16px, 2.5vw, 20px);
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.quiz-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.quiz-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    padding: 12px 20px;
    border-radius: 12px;
    color: white;
    font-size: 15px;
}

.quiz-stat i {
    font-size: 18px;
    color: #FDE68A;
}

/* QUIZ SECTION */
.quiz-section {
    background: var(--bg-light);
    padding: 60px 24px 80px;
    min-height: 600px;
}

.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    padding: 40px;
}

/* Progress Bar */
.quiz-progress {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--quiz-gradient);
    border-radius: 4px;
    transition: width 0.4s ease;
    width: 12.5%;
}

.progress-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--quiz-primary);
    min-width: 50px;
}

/* Quiz Steps */
.quiz-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

.question-header {
    text-align: center;
    margin-bottom: 32px;
}

.question-number {
    display: inline-block;
    background: var(--quiz-gradient);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
}

.question-header h2 {
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}

.question-hint {
    font-size: 15px;
    color: var(--gray);
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.options-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.options-grid.multi .option-card.selected {
    border-color: var(--quiz-primary);
    background: rgba(139, 92, 246, 0.05);
}

@media (max-width: 600px) {
    .options-grid,
    .options-grid.cols-3 {
        grid-template-columns: 1fr;
    }
}

/* Option Card */
.option-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.option-card:hover {
    border-color: var(--quiz-secondary);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
}

.option-card.selected {
    border-color: var(--quiz-primary);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(167, 139, 250, 0.12));
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

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

.option-icon {
    width: 56px;
    height: 56px;
    background: var(--quiz-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-bottom: 16px;
}

.option-icon.success { background: linear-gradient(135deg, #10B981, #34D399); }
.option-icon.warning { background: linear-gradient(135deg, #F59E0B, #FBBF24); }
.option-icon.danger { background: linear-gradient(135deg, #EF4444, #F87171); }

.option-content strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.option-content span {
    font-size: 13px;
    color: var(--gray);
}

.option-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: #E5E7EB;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    transition: all 0.3s ease;
}

.option-card.selected .option-check {
    background: var(--quiz-primary);
}

/* Select Wrapper */
.select-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.select-wrapper select {
    width: 100%;
    padding: 16px 48px 16px 20px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    background: white;
    color: var(--dark);
    cursor: pointer;
    appearance: none;
    transition: all 0.3s ease;
}

.select-wrapper select:focus {
    border-color: var(--quiz-primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.select-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    pointer-events: none;
}

/* TNE Badge */
.tne-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #10B981, #34D399);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    margin-top: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 600;
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0.9); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.tne-badge i {
    font-size: 24px;
}

/* Info Box */
.info-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(139, 92, 246, 0.1);
    padding: 16px 20px;
    border-radius: 12px;
    margin-top: 24px;
    font-size: 14px;
    color: var(--quiz-primary);
    font-weight: 500;
}

.info-box i {
    font-size: 20px;
}

/* Navigation */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 2px solid #F3F4F6;
}

.btn-prev,
.btn-next,
.btn-submit {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-prev {
    background: #F3F4F6;
    color: var(--gray);
}

.btn-prev:hover:not(:disabled) {
    background: #E5E7EB;
}

.btn-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-next,
.btn-submit {
    background: var(--quiz-gradient);
    color: white;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.btn-next:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.4);
}

/* RESULTS SECTION */
.results-section {
    background: linear-gradient(180deg, var(--bg-light) 0%, white 100%);
    padding: 60px 24px 80px;
}

.results-container {
    max-width: 1000px;
    margin: 0 auto;
}

.results-header {
    text-align: center;
    margin-bottom: 48px;
}

.results-score {
    margin-bottom: 24px;
}

.score-circle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    background: var(--quiz-gradient);
    border-radius: 50%;
    color: white;
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.3);
}

.score-value {
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
}

.score-label {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.9;
}

.results-header h2 {
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 12px;
}

.results-header p {
    font-size: 18px;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.result-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.result-card.eligible {
    border-color: var(--quiz-success);
}

.result-card.not-eligible {
    opacity: 0.7;
}

.result-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.result-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.result-card.purple .result-icon { background: linear-gradient(135deg, #8B5CF6, #A78BFA); }
.result-card.blue .result-icon { background: linear-gradient(135deg, #3B82F6, #60A5FA); }
.result-card.green .result-icon { background: linear-gradient(135deg, #10B981, #34D399); }
.result-card.orange .result-icon { background: linear-gradient(135deg, #F59E0B, #FBBF24); }

.result-status {
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.result-card.eligible .result-status {
    color: var(--quiz-success);
}

.result-card.not-eligible .result-status {
    color: var(--gray);
}

.result-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}

.result-amount {
    font-size: 22px;
    font-weight: 900;
    color: var(--quiz-primary);
    margin-bottom: 16px;
}

.result-score-bar {
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 16px;
}

.result-score-bar .score-fill {
    height: 100%;
    background: var(--quiz-gradient);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.result-reasons {
    list-style: none;
    padding: 0;
    margin: 0;
}

.result-reasons li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray);
    padding: 6px 0;
}

.result-reasons li i {
    font-size: 12px;
    color: var(--quiz-success);
}

.result-card.not-eligible .result-reasons li i {
    color: var(--gray);
}

/* Results Summary */
.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    padding: 20px 24px;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
}

.summary-card.highlight {
    background: var(--quiz-gradient);
}

.summary-card.highlight .summary-icon,
.summary-card.highlight .summary-label,
.summary-card.highlight .summary-value {
    color: white;
}

.summary-icon {
    width: 48px;
    height: 48px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--quiz-primary);
}

.summary-card.highlight .summary-icon {
    background: rgba(255,255,255,0.2);
}

.summary-label {
    font-size: 13px;
    color: var(--gray);
    display: block;
}

.summary-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
}

/* Results CTA */
.results-cta {
    text-align: center;
    padding: 48px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.results-cta h3 {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 12px;
}

.results-cta > p {
    font-size: 16px;
    color: var(--gray);
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.results-cta .btn-primary {
    background: var(--quiz-gradient);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
}

.results-cta .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.4);
}

.results-cta .btn-secondary {
    background: white;
    color: var(--quiz-primary);
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--quiz-primary);
    transition: all 0.3s ease;
}

.results-cta .btn-secondary:hover {
    background: rgba(139, 92, 246, 0.05);
}

.btn-restart {
    background: transparent;
    border: none;
    color: var(--gray);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.btn-restart:hover {
    color: var(--quiz-primary);
}

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

    .quiz-stats {
        gap: 12px;
    }

    .quiz-stat {
        padding: 10px 14px;
        font-size: 13px;
    }

    .quiz-container {
        padding: 24px;
        border-radius: 20px;
    }

    .quiz-navigation {
        flex-direction: column;
        gap: 12px;
    }

    .btn-prev,
    .btn-next,
    .btn-submit {
        width: 100%;
        justify-content: center;
    }

    .results-cta {
        padding: 32px 20px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .results-cta .btn-primary,
    .results-cta .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Petits mobiles - 480px */
@media (max-width: 480px) {
    .quiz-hero {
        padding: 100px 16px 50px;
    }

    .quiz-hero h1 {
        font-size: 28px;
    }

    .quiz-subtitle {
        font-size: 15px;
    }

    .quiz-stats {
        gap: 8px;
    }

    .quiz-stat {
        padding: 10px 12px;
        font-size: 12px;
        border-radius: 10px;
    }

    .quiz-stat i {
        font-size: 14px;
    }

    .quiz-section {
        padding: 40px 16px 60px;
    }

    .quiz-container {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .quiz-progress {
        margin-bottom: 28px;
        gap: 12px;
    }

    .progress-text {
        font-size: 12px;
        min-width: 40px;
    }

    .question-header {
        margin-bottom: 24px;
    }

    .question-number {
        font-size: 11px;
        padding: 5px 12px;
    }

    .question-header h2 {
        font-size: 20px;
    }

    .question-hint {
        font-size: 13px;
    }

    .option-card {
        padding: 20px 14px;
        border-radius: 14px;
    }

    .option-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
        margin-bottom: 12px;
    }

    .option-content strong {
        font-size: 14px;
    }

    .option-content span {
        font-size: 12px;
    }

    .option-check {
        width: 20px;
        height: 20px;
        font-size: 10px;
        top: 10px;
        right: 10px;
    }

    .select-wrapper select {
        padding: 14px 40px 14px 16px;
        font-size: 14px;
    }

    .tne-badge {
        padding: 14px 18px;
        font-size: 14px;
        gap: 10px;
    }

    .tne-badge i {
        font-size: 20px;
    }

    .info-box {
        padding: 14px 16px;
        font-size: 13px;
        gap: 10px;
    }

    .info-box i {
        font-size: 16px;
    }

    .quiz-navigation {
        margin-top: 28px;
        padding-top: 20px;
        gap: 10px;
    }

    .btn-prev,
    .btn-next,
    .btn-submit {
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 10px;
    }

    .results-section {
        padding: 40px 16px 60px;
    }

    .results-header {
        margin-bottom: 32px;
    }

    .score-circle {
        width: 100px;
        height: 100px;
    }

    .score-value {
        font-size: 40px;
    }

    .score-label {
        font-size: 10px;
    }

    .results-header h2 {
        font-size: 24px;
    }

    .results-header p {
        font-size: 15px;
    }

    .results-grid {
        gap: 16px;
    }

    .result-card {
        padding: 20px;
        border-radius: 16px;
    }

    .result-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .result-status {
        font-size: 11px;
    }

    .result-card h3 {
        font-size: 16px;
    }

    .result-amount {
        font-size: 18px;
    }

    .result-reasons li {
        font-size: 12px;
    }

    .results-summary {
        gap: 12px;
        margin-bottom: 32px;
    }

    .summary-card {
        padding: 16px;
        gap: 12px;
    }

    .summary-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .summary-label {
        font-size: 11px;
    }

    .summary-value {
        font-size: 16px;
    }

    .results-cta {
        padding: 28px 16px;
        border-radius: 20px;
    }

    .results-cta h3 {
        font-size: 22px;
    }

    .results-cta > p {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .results-cta .btn-primary,
    .results-cta .btn-secondary {
        padding: 14px 24px;
        font-size: 14px;
    }

    .btn-restart {
        font-size: 13px;
    }
}

/* Touch devices - bigger targets */
@media (hover: none) and (pointer: coarse) {
    .option-card,
    .btn-prev,
    .btn-next,
    .btn-submit,
    .results-cta .btn-primary,
    .results-cta .btn-secondary {
        min-height: 48px;
    }

    .select-wrapper select {
        min-height: 56px;
    }

    .footer-links a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* Landscape phones */
@media (max-width: 768px) and (orientation: landscape) {
    .quiz-hero {
        padding: 100px 32px 40px;
    }

    .quiz-hero h1 {
        font-size: 32px;
    }

    .quiz-stats {
        gap: 16px;
    }

    .quiz-container {
        padding: 28px;
    }

    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .results-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .quiz-navigation {
        flex-direction: row;
    }

    .btn-prev,
    .btn-next,
    .btn-submit {
        width: auto;
    }
}
