/* ==========================================
   TIMELINE.CSS - Styles de la section expériences
   ========================================== */

.timeline {
    position: relative;
    padding: 2rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
}

.timeline-column-title {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.timeline-column .timeline {
    max-width: none;
    margin: 0;
    padding-top: 1rem;
}

.timeline-column .timeline::before {
    left: 0;
    transform: none;
}

.timeline-column .timeline-item:nth-child(odd) .timeline-content,
.timeline-column .timeline-item:nth-child(even) .timeline-content {
    width: calc(100% - 64px);
    margin-left: 54px;
    margin-right: 0;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    text-align: left;
}

.timeline-column .timeline-marker {
    left: 0;
    position: absolute;
}

/* Ligne verticale de la timeline */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color), transparent);
    transform: translateX(-50%);
}

/* ==========================================
   ÉLÉMENTS DE LA TIMELINE
   ========================================== */

.timeline-item {
    margin-bottom: 2rem;
    position: relative;
    animation: fadeInUp 0.6s ease-out forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0s; }
.timeline-item:nth-child(2) { animation-delay: 0.1s; }
.timeline-item:nth-child(3) { animation-delay: 0.2s; }
.timeline-item:nth-child(4) { animation-delay: 0.3s; }
.timeline-item:nth-child(5) { animation-delay: 0.4s; }
.timeline-item:nth-child(6) { animation-delay: 0.5s; }

/* Alternance gauche/droite sur desktop */
.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 0;
    margin-right: auto;
    padding-right: 2rem;
    padding-left: 1rem;
    text-align: right;
    width: calc(50% - 60px);
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
    margin-right: 0;
    padding-left: 2rem;
    padding-right: 1rem;
    text-align: left;
    width: calc(50% - 60px);
}

/* Marqueur de la timeline */
.timeline-marker {
    position: absolute;
    left: 50%;
    top: 0;
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    transform: translateX(-50%);
    transition: var(--transition);
    z-index: 2;
}

.timeline-item:hover .timeline-marker {
    background: var(--primary-color);
    box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.1);
    transform: translateX(-50%) scale(1.3);
}

/* ==========================================
   CONTENU DE LA TIMELINE
   ========================================== */

.timeline-content {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    background: white;
}

.timeline-content h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.timeline-date {
    display: inline-block;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-description {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==========================================
   RESPONSIVE - TABLETTE
   ========================================== */

@media (max-width: 768px) {
    .timeline-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline-column-title {
        font-size: 1.2rem;
    }

    .timeline-column .timeline-item:nth-child(odd) .timeline-content,
    .timeline-column .timeline-item:nth-child(even) .timeline-content {
        width: calc(100% - 10px);
        margin-left: 10px;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        width: 100%;
        margin-left: auto;
        margin-right: 0;
        padding-left: 50px;
        padding-right: 1.5rem;
        text-align: left;
    }

    .timeline-marker {
        left: 0;
    }

    .timeline-item:hover .timeline-marker {
        transform: translateX(-50%) scale(1.2);
    }
}

/* ==========================================
   RESPONSIVE - MOBILE
   ========================================== */

@media (max-width: 480px) {
    .timeline {
        padding: 1rem 0;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        width: 100%;
        padding: 1.5rem 1rem;
        padding-left: 40px;
    }

    .timeline-column .timeline-item:nth-child(odd) .timeline-content,
    .timeline-column .timeline-item:nth-child(even) .timeline-content {
        width: calc(100% - 8px);
        margin-left: 8px;
    }

    .timeline-marker {
        width: 16px;
        height: 16px;
        border-width: 3px;
    }

    .timeline-content {
        padding: 1.2rem;
        border-radius: 0.5rem;
    }

    .timeline-content h3 {
        font-size: 1rem;
    }

    .timeline-date {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .timeline-description {
        font-size: 0.9rem;
    }
}

