/* Section */
.cv-experiences {
    max-width: 1300px;
    margin: 3rem auto;
    padding: 0 1rem;
}
.cv-experiences h1 {
    margin-bottom: 2rem;
    font-weight: 800;
    letter-spacing: .2px;
}

/* Timeline alternée */
.timeline-xp {
    position: relative;
    margin: 0;
    padding: 2rem 0;
}
.timeline-xp::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(180deg, #e9eefc 0%, #e5e7eb 60%, #e9eefc 100%);
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-xp-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}
.timeline-xp-item .marker {
    position: absolute;
    left: 50%;
    top: .8rem;
    transform: translate(-50%, 0);
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--brand-primary);
    border: 3px solid #fff;
    box-shadow:
        0 0 0 6px color-mix(in srgb, var(--brand-primary) 18%, transparent),
        0 8px 20px rgba(0,0,0,.06);
}

/* Carte */
.timeline-xp-card {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 1rem;
    padding: 1rem 1.15rem;
    box-shadow: 0 8px 28px rgba(0,0,0,.05);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.timeline-xp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0,0,0,.08);
    border-color: color-mix(in srgb, var(--brand-primary) 18%, var(--brand-border));
}

/* En-tête carte */
.timeline-xp-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .4rem;
}
.role {
    font-size: 1.05rem;
    font-weight: 800;
    width: 60%;
    color: #172031;
    line-height: 1.2;
}
.company {
    color: #6b7280;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.company::before {
    content: "🏢";
    font-size: .95rem;
}

/* Bandeau latéral d’accent */
.timeline-xp-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    border-radius: 1rem 0 0 1rem;
    background: linear-gradient(180deg,
    color-mix(in srgb, var(--brand-primary) 80%, transparent),
    color-mix(in srgb, var(--brand-primary) 35%, transparent));
    opacity: .85;
}

/* Dates + lieu */
.meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .6rem;
    margin: .35rem 0 .5rem;
    color: #3b4251;
    font-weight: 600;
    font-size: .9rem;
}
.badge-dates,
.badge-location,
.badge-type {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .28rem .56rem;
    border-radius: .55rem;
    border: 1px solid #e9eef7;
    background: #f7f9ff;
}
.badge-dates::before { content: "🗓️"; }
.badge-location::before { content: "📍"; }
.badge-type::before { content: "💼"; }

/* Description */
.desc {
    color: #475569;
    line-height: 1.55;
    margin: .5rem 0 .75rem;
}

/* Techs / compétences */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.tag {
    font-size: .78rem;
    font-weight: 700;
    padding: .22rem .5rem;
    border-radius: .5rem;
    color: #3b5bdb;
    background: #eef2ff;
    border: 1px solid #e0e7ff;
}

/* Layout alterné à partir du md */
@media (min-width: 768px) {
    .timeline-xp-item {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
    .timeline-xp-item:nth-child(odd) .timeline-xp-card {
        grid-column: 1 / 2;
        margin-right: 2.5rem;
    }
    .timeline-xp-item:nth-child(even) .timeline-xp-card {
        grid-column: 2 / 3;
        margin-left: 2.5rem;
    }
}

/* Petite amélioration d’accessibilité focus */
.timeline-xp-card:focus-within {
    outline: 3px solid rgba(91,141,239,.35);
    outline-offset: 2px;
}
