/* Styles Timeline */
.timeline-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline-line-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: #e0e0e0;
    top: 0;
    overflow: hidden;
}

.timeline-line {
    position: absolute;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, #3498db 0%, #9b59b6 100%);
    top: 0;
    transition: height 0.1s linear;
}

.timeline-item {
    position: relative;
    margin: 40px 0;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-container:not(.start-right) .timeline-item:nth-child(odd) {
    padding-right: 50%;
    padding-left: 0;
    text-align: right;
}

.timeline-container:not(.start-right) .timeline-item:nth-child(even) {
    padding-left: 50%;
    padding-right: 0;
    text-align: left;
}

.timeline-container.start-right .timeline-item:nth-child(odd) {
    padding-left: 50%;
    padding-right: 0;
    text-align: left;
}

.timeline-container.start-right .timeline-item:nth-child(even) {
    padding-right: 50%;
    padding-left: 0;
    text-align: right;
}

.timeline-content {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.timeline-container:not(.start-right) .timeline-item:nth-child(odd) .timeline-content {
    margin-right: 40px;
}

.timeline-container:not(.start-right) .timeline-item:nth-child(even) .timeline-content {
    margin-left: 40px;
}

.timeline-container.start-right .timeline-item:nth-child(odd) .timeline-content {
    margin-left: 40px;
}

.timeline-container.start-right .timeline-item:nth-child(even) .timeline-content {
    margin-right: 40px;
}

.timeline-date {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 15px;
}

.timeline-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 15px;
    color: #2c3e50;
}

.timeline-description {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: #fff;
    border: 4px solid #3498db;
    border-radius: 50%;
    top: 30px;
    z-index: 10;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    width: 24px;
    height: 24px;
    border-color: #9b59b6;
}

.timeline-connector {
    position: absolute;
    top: 40px;
    height: 2px;
    background: #3498db;
    z-index: 5;
    transition: all 0.3s ease;
}

.timeline-container:not(.start-right) .timeline-item:nth-child(odd) .timeline-connector {
    right: 50%;
    left: auto;
    width: 40px;
    margin-right: -10px;
}

.timeline-container:not(.start-right) .timeline-item:nth-child(even) .timeline-connector {
    left: 50%;
    right: auto;
    width: 40px;
    margin-left: -10px;
}

.timeline-container.start-right .timeline-item:nth-child(odd) .timeline-connector {
    left: 50%;
    right: auto;
    width: 40px;
    margin-left: -10px;
}

.timeline-container.start-right .timeline-item:nth-child(even) .timeline-connector {
    right: 50%;
    left: auto;
    width: 40px;
    margin-right: -10px;
}

.timeline-item:hover .timeline-connector {
    background: #9b59b6;
}

.timeline-container.shape-square .timeline-dot {
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.timeline-container.shape-square .timeline-item:hover .timeline-dot {
    transform: translateX(-50%) rotate(45deg);
}

.timeline-container.shape-diamond .timeline-dot {
    border-radius: 0;
    transform: translateX(-50%) rotate(45deg);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.timeline-container.shape-diamond .timeline-item:hover .timeline-dot {
    transform: translateX(-50%) rotate(90deg) scale(1.2);
}

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

@media (max-width: 767px) {
    .timeline-container {
        padding: 20px 0;
    }
    
    .timeline-line-wrapper {
        left: 30px !important;
        transform: none !important;
    }
    
    .timeline-item {
        margin: 30px 0;
    }
    
    /* Forcer TOUS les éléments à droite sur mobile */
    .timeline-item,
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even),
    .timeline-container.start-right .timeline-item,
    .timeline-container.start-right .timeline-item:nth-child(odd),
    .timeline-container.start-right .timeline-item:nth-child(even),
    .timeline-container:not(.start-right) .timeline-item,
    .timeline-container:not(.start-right) .timeline-item:nth-child(odd),
    .timeline-container:not(.start-right) .timeline-item:nth-child(even) {
        padding-left: 80px !important;
        padding-right: 0 !important;
        text-align: left !important;
    }
    
    .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content,
    .timeline-container.start-right .timeline-item:nth-child(odd) .timeline-content,
    .timeline-container.start-right .timeline-item:nth-child(even) .timeline-content,
    .timeline-container:not(.start-right) .timeline-item:nth-child(odd) .timeline-content,
    .timeline-container:not(.start-right) .timeline-item:nth-child(even) .timeline-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 20px;
    }
    
    .timeline-dot {
        left: 30px !important;
        transform: translateX(-50%) !important;
        width: 16px;
        height: 16px;
        border-width: 3px;
        top: 25px;
    }
    
    .timeline-item:hover .timeline-dot {
        width: 20px;
        height: 20px;
    }
    
    /* Forcer le carré à rester carré sur mobile */
    .timeline-container.shape-square .timeline-item:hover .timeline-dot {
        transform: translateX(-50%) rotate(45deg) !important;
    }
    
    /* Forcer le losange sur mobile */
    .timeline-container.shape-diamond .timeline-dot {
        transform: translateX(-50%) rotate(45deg) !important;
    }
    
    .timeline-container.shape-diamond .timeline-item:hover .timeline-dot {
        transform: translateX(-50%) rotate(90deg) scale(1.2) !important;
    }
    
    /* Connecteur toujours de gauche vers la droite */
    .timeline-connector {
        left: 30px !important;
        right: auto !important;
        width: 50px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        top: 33px;
    }
    
    .timeline-title {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .timeline-date {
        font-size: 12px;
        padding: 6px 15px;
        margin-bottom: 10px;
    }
    
    .timeline-description {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .timeline-container {
        padding: 15px 0;
    }
    
    .timeline-line-wrapper {
        left: 20px !important;
        width: 3px;
    }
    
    .timeline-item {
        margin: 25px 0;
    }
    
    .timeline-item,
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even),
    .timeline-container.start-right .timeline-item:nth-child(odd),
    .timeline-container.start-right .timeline-item:nth-child(even) {
        padding-left: 60px !important;
        padding-right: 0 !important;
    }
    
    .timeline-dot {
        left: 20px !important;
        width: 14px;
        height: 14px;
        border-width: 3px;
        top: 20px;
    }
    
    .timeline-item:hover .timeline-dot {
        width: 16px;
        height: 16px;
    }
    
    .timeline-connector {
        left: 20px !important;
        width: 40px !important;
        top: 27px;
    }
    
    .timeline-content {
        padding: 15px;
        border-radius: 6px;
    }
    
    .timeline-title {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .timeline-date {
        font-size: 11px;
        padding: 5px 12px;
        margin-bottom: 8px;
    }
    
    .timeline-description {
        font-size: 13px;
        line-height: 1.5;
    }
}