/* ============================================
   TIMELINE SECTION - FORMAT VISUEL INTERACTIF
   Timeline avec accordéons déroulants
   ============================================ */

.timeline {
    background: linear-gradient(135deg, #141414 0%, #0A0A0A 100%);
    position: relative;
    overflow: hidden;
}

.timeline .container {
    position: relative;
    z-index: 1;
}

/* Header */
.timeline .section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.timeline .section-title {
    font-size: 2.8rem;
    font-weight: 900;
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.timeline .section-subtitle {
    font-size: 1.3rem;
    color: #B0B0B0;
    font-weight: 400;
    font-style: italic;
}

/* Wrapper de timeline avec ligne verticale */
.timeline-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 60px;
}

/* Ligne verticale centrale */
.timeline-wrapper::before {
    content: '';
    position: absolute;
    left: 25px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, 
        rgba(255, 107, 0, 0.8) 0%, 
        rgba(255, 107, 0, 0.4) 50%, 
        rgba(255, 107, 0, 0.1) 100%);
}

/* Item de timeline */
.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    background: rgba(26, 26, 26, 0.6);
    border: 2px solid rgba(255, 107, 0, 0.2);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.timeline-item:hover {
    border-color: rgba(255, 107, 0, 0.5);
    box-shadow: 0 10px 40px rgba(255, 107, 0, 0.15);
}

/* Point sur la ligne */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -48px;
    top: 30px;
    width: 20px;
    height: 20px;
    background: #FF6B00;
    border: 4px solid #0A0A0A;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.3);
    z-index: 2;
}

/* Header cliquable de la timeline */
.timeline-header {
    padding: 2rem 2.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    transition: background 0.3s ease;
    position: relative;
}

.timeline-header:hover {
    background: rgba(255, 107, 0, 0.05);
}

.timeline-header-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Année */
.timeline-year {
    font-size: 1.3rem;
    font-weight: 900;
    color: #FF6B00;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 150px;
}

/* Titre du poste */
.timeline-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    line-height: 1.3;
}

/* Bouton toggle */
.timeline-toggle {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: linear-gradient(135deg, #FF6B00, rgba(255, 107, 0, 0.8));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.timeline-item.active .timeline-toggle {
    transform: rotate(45deg);
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.8), #FF6B00);
}

.timeline-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.5);
}

/* Contenu déroulant */
.timeline-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
    padding: 0 2.5rem;
}

.timeline-item.active .timeline-content {
    max-height: 1000px;
    padding: 0 2.5rem 2rem 2.5rem;
}

/* Description */
.timeline-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #C0C0C0;
    margin-bottom: 1.5rem;
}

/* Highlights */
.timeline-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-highlights li {
    font-size: 1rem;
    color: #B0B0B0;
    padding: 0.7rem 0 0.7rem 2rem;
    position: relative;
    border-left: 2px solid rgba(255, 107, 0, 0.3);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.timeline-highlights li:hover {
    border-color: #FF6B00;
    color: #E0E0E0;
    padding-left: 2.5rem;
}

.timeline-highlights li::before {
    content: '▸';
    position: absolute;
    left: 0.5rem;
    color: #FF6B00;
    font-size: 1.2rem;
}

/* Badge d'icône pour type de poste */
.timeline-badge {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: rgba(255, 107, 0, 0.15);
    border: 2px solid rgba(255, 107, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #FF6B00;
}

/* Animation d'entrée progressive */
.timeline-item {
    opacity: 0;
    transform: translateX(-30px);
    animation: fadeInTimeline 0.6s ease forwards;
}

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

@keyframes fadeInTimeline {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .timeline-wrapper {
        padding-left: 50px;
    }
    
    .timeline-item::before {
        left: -43px;
    }
}

@media (max-width: 768px) {
    .timeline .section-title {
        font-size: 2.2rem;
    }
    
    .timeline-wrapper {
        padding-left: 40px;
    }
    
    .timeline-wrapper::before {
        left: 15px;
    }
    
    .timeline-item::before {
        left: -33px;
        width: 16px;
        height: 16px;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .timeline-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        width: 100%;
    }
    
    .timeline-year {
        font-size: 1.1rem;
        min-width: auto;
    }
    
    .timeline-title {
        font-size: 1.3rem;
    }
    
    .timeline-toggle {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
    }
    
    .timeline-content {
        padding: 0 1.5rem;
    }
    
    .timeline-item.active .timeline-content {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }
    
    .timeline-description {
        font-size: 1rem;
    }
    
    .timeline-highlights li {
        font-size: 0.95rem;
        padding-left: 1.5rem;
    }
}

@media (max-width: 480px) {
    .timeline .section-title {
        font-size: 1.8rem;
    }
    
    .timeline-wrapper {
        padding-left: 30px;
    }
    
    .timeline-wrapper::before {
        left: 10px;
        width: 3px;
    }
    
    .timeline-item::before {
        left: -24px;
        width: 14px;
        height: 14px;
        border-width: 3px;
    }
    
    .timeline-header {
        padding: 1.25rem;
    }
    
    .timeline-year {
        font-size: 1rem;
    }
    
    .timeline-title {
        font-size: 1.15rem;
    }
    
    .timeline-toggle {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}
