/* ==============================================
   FONCTIONNALITÉS INTERACTIVES
   ============================================== */

/* Timeline Interactive */
.cyber-timeline-section {
    margin: 60px 0;
    padding: 40px 0;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.05) 0%, rgba(25, 118, 210, 0.02) 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.cyber-timeline-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="%232196F3" opacity="0.1"/></svg>');
    pointer-events: none;
}

.timeline-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-container {
    max-width: 1500px;
    margin: 0 auto;
    position: relative;
    padding: 0 110px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.timeline-content {
    max-width: 300px;
}

.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    margin: 20px 0;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
    cursor: pointer;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item.active {
    transform: scale(1.05);
}

.timeline-item.active .timeline-content {
    box-shadow: 0 10px 30px rgba(33, 150, 243, 0.3);
    border-color: var(--primary-color);
}

.timeline-item:nth-child(even) .timeline-content {
    left: -40%;
    text-align: right;
}

.timeline-item:nth-child(odd) .timeline-content {
    left: 40%;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border: 4px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.2);
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item.active::before {
    background: var(--secondary-color);
    transform: translate(-50%, -50%) scale(1.2);
}

.timeline-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    max-width: 400px;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.timeline-content p {
    color: #555;
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.timeline-stats {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    font-size: 0.9rem;
}

/* Mini Quiz */
.mini-quiz-section {
    margin: 60px 0;
    padding: 40px 0;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05) 0%, rgba(46, 139, 87, 0.02) 100%);
    border-radius: 20px;
}

.quiz-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--accent-color);
    margin-bottom: 40px;
    font-weight: 700;
}

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

.quiz-question h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 1.3rem;
    font-weight: 600;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.quiz-options.show {
    opacity: 1;
    transform: translateY(0);
}

.quiz-option {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 1rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-weight: 500;
}

.quiz-option:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

.quiz-option.correct {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-color: #28a745;
}

.quiz-option.incorrect {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    color: white;
    border-color: #dc3545;
}

.quiz-option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.quiz-progress {
    margin: 30px 0;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: #6c757d;
    font-weight: 600;
    font-size: 0.9rem;
}

.quiz-result {
    text-align: center;
    padding: 20px;
}

.quiz-result h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.quiz-result p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.quiz-restart {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-restart:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

/* Animation des statistiques */
.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2px;
    display: block;
    transition: all 0.3s ease;
}

.stat-percentage {
    display: inline-block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0;
    margin-left: 6px;
    vertical-align: middle;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-percentage {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 5px;
}

/* Responsive Design pour les fonctionnalités interactives */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-item:nth-child(even) .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content {
        left: 80px;
        text-align: left;
        max-width: calc(100% - 100px);
    }

    .timeline-item::before {
        left: 30px;
    }

    .timeline-content {
        padding: 20px;
    }

    .quiz-container {
        margin: 0 20px;
        padding: 20px;
    }

    .quiz-title {
        font-size: 1.8rem;
    }

    .timeline-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .timeline-item {
        margin: 30px 0;
    }

    .timeline-content {
        padding: 15px;
    }

    .quiz-option {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}
