.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: #e9ecef;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

/* Ajout de la flèche */
.timeline::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #e9ecef;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.5s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item:nth-child(even) {
    left: 50%;
    transform: translateX(100px);
}

.timeline-item.visible:nth-child(even) {
    transform: translateX(0);
}

.timeline-content {
    padding: 20px;
    background-color: white;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.timeline-date {
    font-weight: bold;
    color: #6c757d;
    margin-bottom: 10px;
}

.timeline-content h3 {
    margin: 0 0 10px 0;
    color: #343a40;
}

.timeline-content p {
    margin: 0;
    color: #6c757d;
}

/* Style pour les événements historiques */
.timeline-item.historical {
    width: 40%;
    padding: 5px 20px;
    opacity: 0.7;
    margin: 10px 0;
}

.timeline-item.historical:nth-child(4n + 1),
.timeline-item.historical:nth-child(4n + 2) {
    left: 0;
    transform: translateX(-50px);
}

.timeline-item.historical:nth-child(4n + 3),
.timeline-item.historical:nth-child(4n) {
    left: 60%;
    transform: translateX(50px);
}

.timeline-item.historical.visible {
    transform: translateX(0);
}

.timeline-item.historical .timeline-content {
    background-color: transparent;
    box-shadow: none;
    padding: 5px 15px;
    font-size: 0.85em;
    font-style: italic;
    color: #adb5bd;
    word-wrap: break-word;
    max-width: 100%;
    line-height: 1.4;
}

/* Catégories */
.timeline-item.vie .timeline-content {
    border-left: 4px solid #28a745;
}

.timeline-item.famille .timeline-content {
    border-left: 4px solid #17a2b8;
}

.timeline-item.education .timeline-content {
    border-left: 4px solid #0d6efd;
}

.timeline-item.travail .timeline-content {
    border-left: 4px solid #dc3545;
}

.timeline-item.projet .timeline-content {
    border-left: 4px solid #6f42c1;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        margin-bottom: 30px;
        left: 0;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item.historical {
        width: 80%;
        left: 0;
        padding-left: 70px;
    }

    .timeline-item.historical:nth-child(4n + 1),
    .timeline-item.historical:nth-child(4n + 2),
    .timeline-item.historical:nth-child(4n + 3),
    .timeline-item.historical:nth-child(4n) {
        left: 0;
        transform: translateX(0);
    }
} 