/* Timeline Horizontale - Option 1 (Scroll Horizontal) - Nouveau Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.horizontal-timeline-wrapper {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #4169E1 0%, #2E4F9F 100%);
}

/* Classe ajoutée dynamiquement quand la timeline doit être fixée */
.horizontal-timeline-wrapper.is-fixed {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
}

.timeline-container {
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: relative;
}

/* Masquer la scrollbar */
.timeline-container::-webkit-scrollbar {
    display: none;
}

/* Ligne horizontale pointillée centrale */
.timeline-center-line {
    position: absolute;
    top: 50%;
    left: 5vw;
    width: 100%;
    height: 2px;
    background-image: repeating-linear-gradient(
        to right,
        rgba(255, 255, 255, 0.6) 0px,
        rgba(255, 255, 255, 0.6) 10px,
        transparent 10px,
        transparent 20px
    );
    z-index: 1;
    pointer-events: none;
}

.timeline-track {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 5vw;
    min-width: max-content;
    position: relative;
}

/* ===== INTRODUCTION ===== */
.timeline-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-width: 80vw;
    height: 100%;
    padding: 0 60px;
    position: relative;
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.intro-content {
    margin-bottom: 60px;
    z-index: 2;
}

.intro-title {
    font-size: 48px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-bottom: 30px;
    max-width: 500px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.intro-cta {
    display: inline-block;
    padding: 14px 32px;
    background: white;
    color: #4169E1;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.intro-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.intro-date-range {
    position: absolute;
    bottom: calc(50% - 60px);
    left: 60px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
}

.intro-date-range span {
    font-size: 32px;
    font-weight: 700;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.date-range-arrow {
    color: white;
    opacity: 0.8;
}

.intro-dot {
    position: absolute;
    top: 50%;
    left: 5vw;
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

/* ===== ÉVÉNEMENTS ===== */
.timeline-event {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 600px;
    height: 100%;
    padding: 0 40px;
    position: relative;
    opacity: 0;
    animation: fadeInSlide 0.8s ease-out forwards;
}

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

@keyframes fadeInSlide {
    to {
        opacity: 1;
    }
}

/* Ligne verticale pointillée - Affichée en premier */
.event-vertical-line {
    position: absolute;
    left: 50px;
    width: 2px;
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.6) 0px,
        rgba(255, 255, 255, 0.6) 10px,
        transparent 10px,
        transparent 20px
    );
    /*transform: translateX(-50%);*/
    z-index: 1;
}

.timeline-event[data-position="top"] .event-vertical-line {
    top: calc(15% + 80px);
    height: calc(35% - 80px - 14px);
}

.timeline-event[data-position="bottom"] .event-vertical-line {
    bottom: calc(15% + 80px);
    height: calc(35% - 80px - 14px);
}

/* Cercle de la date (vert) - Au-dessus de la ligne */
.event-year-circle {
    position: absolute;
    width: 100px;
    height: 100px;
    background: #4CAF50;
    border-radius: 50%;
    display: flex;
    left: 0;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.timeline-event[data-position="top"] .event-year-circle {
    top: 15%;
}

.timeline-event[data-position="bottom"] .event-year-circle {
    bottom: 15%;
}

.event-year-circle span {
    font-size: 20px;
    font-weight: 700;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Cercle d'intersection (blanc 28x28px) */
.event-intersection-dot {
    position: absolute;
    top: 50%;
    left: 37px;
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

/* Contenu de l'événement - Wrapper pour image + contenu */
.event-content {
    /*position: absolute;*/
    display: flex;
    flex-direction: row;
    gap: 20px;
    z-index: 2;
    left: 120px;
    width: auto;
    height: 100%;
}

/* Position TOP : Contenu en haut, Image en bas */
.timeline-event[data-position="top"] .event-content {
    top: 0;
    bottom: auto;
}

/* Position BOTTOM : Image en haut, Contenu en bas */
.timeline-event[data-position="bottom"] .event-content {
    top: auto;
    bottom: 0;
}

.event-content__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.timeline-event[data-position="top"] .event-content__item {
    padding-top: 40px;
}

.timeline-event[data-position="bottom"] .event-content__item {
    padding-bottom: 40px;
}

/* Section individuelle - Contenu (texte + CTA) */
.event-section {
    background: white;
    max-width: 100%;
    width: 350px;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* Position TOP : Contenu au-dessus de la ligne */
.timeline-event[data-position="top"] .event-section {
    order: 1;
    margin-bottom: 0;
}

/* Position BOTTOM : Contenu en-dessous de la ligne */
.timeline-event[data-position="bottom"] .event-section {
    order: 2;
    margin-top: 0;
}

/* Image */
.section-image {
    width: 305px;
    height: auto;
    min-height: 150px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.section-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.section-image:hover img {
    transform: scale(1.1);
}

/* Position TOP : Image en-dessous de la ligne */
.timeline-event[data-position="top"] .section-image {
    order: 2;
    margin-top: 0;
}

/* Position BOTTOM : Image au-dessus de la ligne */
.timeline-event[data-position="bottom"] .section-image {
    order: 1;
    margin-bottom: 0;
}

/* Contenu texte - Pas de style supplémentaire nécessaire */

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #2E4F9F;
    margin-bottom: 8px;
    line-height: 1.3;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.section-description {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.section-link {
    display: inline-block;
    font-size: 13px;
    color: #4169E1;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.section-link:hover {
    color: #2E4F9F;
}

/* Indicateur de scroll */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 30px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    animation: bounce 2s ease-in-out infinite;
    pointer-events: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    z-index: 10;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .timeline-intro {
        min-width: 90vw;
        padding: 0 30px;
    }
    
    .intro-title {
        font-size: 32px;
    }
    
    .intro-date-range {
        left: 30px;
    }
    
    .intro-date-range span {
        font-size: 24px;
    }
    
    .timeline-event {
        min-width: 400px;
        padding: 0 20px;
    }
    
    .event-content {
        flex-direction: column;
    }
    
    .event-section {
        width: 240px;
    }
    
    .section-image {
        height: 140px;
    }
}
