﻿/* ===== Timeline Section ===== */

.timeline-section {
    width: 100%;
    padding: var(--section-pad-top) 0 var(--section-pad-bottom);
    background: rgba(3, 10, 18, 0.99);
    border-bottom: 1px solid rgba(125, 211, 252, 0.18);
    box-shadow: inset 0 1px 0 rgba(125, 211, 252, 0.05), inset 0 -1px 0 rgba(125, 211, 252, 0.05);
    position: relative;
    overflow: hidden;
}

.timeline-section::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: none;
    pointer-events: none;
}

/* En-tete */
.timeline-section-header {
    text-align: center;
    padding-top: var(--section-title-top-offset);
    margin-bottom: var(--section-heading-gap);
}

.timeline-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--section-eyebrow-color);
    margin: 0 0 0.6rem;
    text-shadow: 0 0 18px var(--section-eyebrow-glow);
}

.timeline-heading {
    font-family: "Space Grotesk", "Lato", sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    color: #f8fdff;
    margin: 0;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
    padding-bottom: 0.7rem;
}

.timeline-heading::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    border-radius: 99px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.88) 40%, rgba(255,255,255,0.96) 50%, rgba(255,255,255,0.88) 60%, transparent 100%);
    background-size: 40px 100%;
    background-repeat: no-repeat;
    background-position: -40px 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
}

.timeline-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--section-underline-start), var(--section-underline-end));
    box-shadow: 0 0 12px var(--section-underline-glow);
    opacity: 0.22;
}

.timeline-heading.ul-animate::before {
    animation: ul-sweep-loop 6s ease-out 0.4s infinite;
}

.timeline-heading.ul-animate::after {
    animation: ul-bar-reveal 0.55s ease-out 0.4s forwards;
}

/* Layout */
.timeline-container {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem 0 3.5rem;
}

/* Ligne verticale */
.timeline-track {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 3.5rem;
    width: 2px;
    background: linear-gradient(to bottom, transparent, rgba(56,189,248,0.5) 8%, rgba(56,189,248,0.3) 88%, transparent);
    transform: translateX(-50%);
}

/* Item */
.tl-item {
    display: flex;
    align-items: flex-start;
    gap: 1.6rem;
    margin-bottom: 2.5rem;
    position: relative;
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.tl-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Dot */
.tl-dot {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(7, 19, 33, 0.95);
    border: 2px solid rgba(56, 189, 248, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    font-size: 1rem;
    position: relative;
    z-index: 1;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 0 0 4px rgba(7, 19, 33, 0.95);
}

.tl-dot i,
.tl-dot img {
    max-width: 24px;
    max-height: 24px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.tl-item:hover .tl-dot {
    border-color: #67e8f9;
    box-shadow: 0 0 18px rgba(56,189,248,0.4), 0 0 0 4px rgba(7, 19, 33, 0.95);
}

/* Carte */
.tl-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(125, 211, 252, 0.16);
    border-radius: 12px;
    padding: 1.2rem 1.4rem 1.3rem;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.tl-item:hover .tl-card {
    background: rgba(56, 189, 248, 0.055);
    border-color: rgba(125, 211, 252, 0.28);
}

.tl-card-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
}

.tl-tag {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 99px;
    padding: 0.2em 0.7em;
}

.tl-tag--formation {
    background: rgba(56,189,248,0.15);
    color: #67e8f9;
    border: 1px solid rgba(56,189,248,0.3);
}

.tl-tag--diplome {
    background: rgba(167,139,250,0.15);
    color: #c4b5fd;
    border: 1px solid rgba(167,139,250,0.3);
}

.tl-tag--projet {
    background: rgba(52,211,153,0.15);
    color: #6ee7b7;
    border: 1px solid rgba(52,211,153,0.3);
}

.tl-tag--experience {
    background: rgba(245,158,11,0.15);
    color: #fbbf24;
    border: 1px solid rgba(245,158,11,0.3);
}

.tl-date {
    font-size: 0.78rem;
    color: rgba(186,230,253,0.6);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.tl-title {
    font-family: "Space Grotesk", "Lato", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #e0f2fe;
    margin: 0 0 0.4rem;
    line-height: 1.3;
}

.tl-desc {
    font-size: 0.88rem;
    color: rgba(186,230,253,0.7);
    line-height: 1.6;
    margin: 0;
}

/* Chips */
.tl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.tl-chips span {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.22em 0.7em;
    border-radius: 99px;
    background: rgba(56,189,248,0.08);
    color: rgba(125,211,252,0.85);
    border: 1px solid rgba(125,211,252,0.2);
    letter-spacing: 0.04em;
}

/* Animation cascade */
.tl-item:nth-child(2) { transition-delay: 0.05s; }
.tl-item:nth-child(3) { transition-delay: 0.1s; }
.tl-item:nth-child(4) { transition-delay: 0.15s; }
.tl-item:nth-child(5) { transition-delay: 0.2s; }
.tl-item:nth-child(6) { transition-delay: 0.25s; }

/* Responsive */
@media (max-width: 640px) {
    .timeline-section { padding: var(--section-pad-top-mobile) 0 var(--section-pad-bottom-mobile); }
    .timeline-section-header { text-align: center; padding-right: 0; }
    .timeline-heading::after { left: 50%; right: auto; transform: translateX(-50%); }
    .timeline-container { padding: 0 1rem 0 2.8rem; }
    .timeline-track { left: 2.8rem; }
    .tl-dot { width: 36px; height: 36px; font-size: 0.85rem; }
    .tl-card { padding: 1rem 1rem 1.1rem; }
    .tl-title { font-size: 0.95rem; }
}