/* --- CONFIGURATION --- */
:root {
    --bg-light: #E8EBE0;
    --accent-green: #84A98C;
    --text-mid: #52796F;
    --text-dark: #354F52;
    --text-ultra: #2F3E46;
    --font-title: 'Montserrat', sans-serif;
    --font-main: 'Inter', sans-serif;
}

.exp-container {
    max-width: 1200px;
    margin: 0 auto 100px;
    padding: 0 20px;
}

/* --- HEADER AVEC IMAGE DE FOND --- */
.exp-hero {
    position: relative;
    height: 25vh;
    min-height: 180px;
    max-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin-bottom: 80px;
    background-image: url('/img/experiences/banner.png');
    background-size: cover;
    background-position: center 40%;
    background-repeat: no-repeat;
}

.exp-hero-bg {
    display: none;
}

.exp-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(47, 62, 70, 0.7), rgba(47, 62, 70, 0.9));
    z-index: 1;
}

.exp-hero-content {
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(25px);
    animation: expHeroFade 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s forwards;
}

@keyframes expHeroFade {
    to { opacity: 1; transform: translateY(0); }
}

.exp-hero h1 {
    font-family: var(--font-title);
    font-size: clamp(2rem, 5vw, 3rem);
    color: #FFFFFF;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.exp-hero p {
    color: #CAD2C5;
    font-size: 1.15rem;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Fallback pour l'ancien header si besoin */
.exp-header {
    text-align: center;
    margin-bottom: 80px;
}

.exp-header h1 {
    font-family: var(--font-title);
    font-size: 42px;
    color: var(--text-ultra);
    margin-bottom: 10px;
}

.exp-header p {
    color: var(--text-mid);
    font-size: 18px;
}

/* --- TIMELINE (La Structure) --- */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

/* La ligne verticale centrale - se dessine au scroll via JS */
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--accent-green);
    top: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
    height: var(--line-height, 0%);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

/* Positionnement Gauche / Droite */
.timeline-item.left { left: 0; }
.timeline-item.right { left: 50%; }

/* Le Rond central sur la ligne */
/* Le rond fait 16px + 3px border x2 = 22px total, donc decalage = 11px */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -11px; /* item left : rond depasse a droite vers la ligne */
    left: auto;
    background-color: var(--text-dark);
    border: 3px solid var(--accent-green);
    top: 22px;
    border-radius: 50%;
    z-index: 1;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    opacity: 0;
    transform: scale(0);
}

.timeline-item.reveal-visible::after {
    opacity: 1;
    transform: scale(1);
}

.timeline-item.right::after {
    right: auto;
    left: -11px; /* item right : rond depasse a gauche vers la ligne */
}

.timeline-item.right.reveal-visible::after {
    transform: scale(1);
}

/* Hover : le rond grossit */
.timeline-item.reveal-visible:hover::after {
    background-color: var(--accent-green);
    transform: scale(1.3);
    border-color: var(--text-dark);
}

/* Date flottante a l'oppose */
.timeline-date {
    position: absolute;
    top: 22px;
    width: 150px;
    text-align: right;
    right: -210px; /* Pour item left, date à droite */
    font-family: var(--font-title);
    font-weight: 800;
    color: var(--text-mid);
    font-size: 1.1rem;
}

.timeline-item.right .timeline-date {
    left: -210px; /* Pour item right, date à gauche */
    text-align: left;
    right: auto;
}

/* --- CARTE CONTENU (Lien cliquable) --- */
a.timeline-content {
    display: block;
    text-decoration: none;
    color: inherit;
    /* Reset l'heritage de font-weight: 800 des balises <a> globales */
    font-weight: 400;
    padding: 30px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(47, 62, 70, 0.05);
    border: 1px solid rgba(132, 169, 140, 0.2);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

a.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(47, 62, 70, 0.15);
    border-color: var(--accent-green);
}

/* Petite flèche qui pointe vers la ligne centrale */
a.timeline-content::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    border: medium solid white;
    right: -10px;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent white;
}

.timeline-item.right a.timeline-content::before {
    left: -10px; /* Flèche à gauche pour item right */
    right: auto;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
}

/* --- TYPOGRAPHIE --- */
.exp-badge {
    display: inline-block;
    background-color: var(--text-ultra);
    color: var(--bg-light);
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.timeline-content h2 {
    margin: 0;
    font-family: var(--font-title);
    color: var(--text-ultra);
    font-size: 22px;
    transition: color 0.3s;
}

a.timeline-content:hover h2 { color: var(--accent-green); }

.timeline-content h3 {
    margin: 5px 0 15px 0;
    font-size: 16px;
    font-weight: 400;
    color: var(--text-mid);
}

.location {
    font-size: 14px;
    font-style: italic;
    color: #888;
    margin-bottom: 15px;
}

.description {
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.task-list {
    margin: 0;
    padding-left: 20px;
}

.task-list li {
    margin-bottom: 6px;
    color: #666;
    font-size: 0.95rem;
}

/* --- SCROLL REVEAL (Animation 1) --- */
.timeline-item {
    opacity: 0;
}

.timeline-item.left {
    transform: translateX(-50px);
}

.timeline-item.right {
    transform: translateX(50px);
}

.timeline-item.reveal-visible {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- PULSE SUR LE ROND EN COURS (Animation 3) --- */
.timeline-item.current.reveal-visible::after {
    background-color: var(--accent-green);
    border-color: var(--text-dark);
    animation: dotPulse 2s ease-in-out infinite;
    transform: scale(1);
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(132, 169, 140, 0.5); }
    50%      { box-shadow: 0 0 0 10px rgba(132, 169, 140, 0); }
}

/* --- STAGGER SUR LES TACHES (Animation 4) --- */
.timeline-item .task-list li {
    opacity: 0;
    transform: translateX(-10px);
}

.timeline-item.reveal-visible .task-list li {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

/* --- BADGE "EN COURS" (Design 6) --- */
.exp-badge.en-cours {
    background: linear-gradient(135deg, var(--accent-green), var(--text-mid));
    color: #fff;
    position: relative;
    padding-left: 22px;
}

.exp-badge.en-cours::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    animation: badgeBlink 1.5s ease-in-out infinite;
}

@keyframes badgeBlink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}

/* --- CTA "VOIR LE DETAIL" (Design 7) --- */
.timeline-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-mid);
    transition: color 0.3s ease, gap 0.3s ease;
}

.timeline-cta .cta-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

a.timeline-content:hover .timeline-cta {
    color: var(--accent-green);
    gap: 10px;
}

a.timeline-content:hover .timeline-cta .cta-arrow {
    transform: translateX(4px);
}

