/* ===================================
   ED TIMELINE - CSS
   =================================== */

.ed-timeline {
    position: relative;
    margin: 80px 0 50px 0;
    padding-bottom: 50px;
}

.ed-timeline > .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

/* Point de départ de la timeline */
.ed-timeline:before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    background-color: #000000;
    border-radius: 100%;
    border: 6px solid #fff;
    box-shadow: 0 0 0 8px #f7f8fc;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 0 0 16px rgba(0, 0, 0, 0.1);
    }
}

.timeline-post {
    background-color: #fff;
    padding: 30px;
    position: relative;
    width: 100%;
    margin-bottom: 30px;
    border-radius: 20px;
    animation: fadeInUp 0.6s ease-out;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.timeline-post:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-post .img-wrap {
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
}

.timeline-post .img-wrap img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.timeline-post:hover .img-wrap img {
    transform: scale(1.05);
}

.timeline-post .img-wrap .date {
    position: absolute;
    left: 20px;
    bottom: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 20px;
    color: #2d313d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.date.without-img {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 15px;
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f7f8fc, #eff1f9);
    border-radius: 20px;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.more {
    border: none;
    background: #000000;
    width: 44px;
    height: 44px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    float: right;
    transition: all 0.3s ease;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.more:after {
    content: "+";
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.3s ease;
}

.more.active:after {
    content: "−";
    transform: rotate(0deg);
}

.more:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.more:active {
    transform: translateY(0);
}

.timeline-post .content {
    clear: both;
    margin-top: 20px;
    line-height: 1.6;
    color: #555;
}

.timeline-post h3 {
    font-size: 26px;
    margin-bottom: 15px;
    font-weight: 700;
    color: #2d313d;
    line-height: 1.4;
}

/* Colonnes */
.timeline-post-col {
    width: 50%;
    padding: 0 15px;
    position: relative;
    margin-bottom: 0;
}

.timeline-post-col.even {
    padding-right: calc(12% + 15px);
}

.timeline-post-col.odd {
    padding-left: calc(12% + 15px);
    margin-top: 100px;
}

/* Flèche pointant vers la ligne centrale */
.timeline-post:after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    top: 45px;
    border-style: solid;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.timeline-post-col.even .timeline-post:after {
    right: -18px;
    border-width: 18px 0 18px 18px;
    border-color: transparent transparent transparent #fff;
}

.timeline-post-col.odd .timeline-post:after {
    left: -18px;
    border-width: 18px 18px 18px 0;
    border-color: transparent #fff transparent transparent;
}

/* Point sur la ligne centrale */
.timeline-post-col:before {
    content: "";
    width: 18px;
    height: 18px;
    background-color: #000000;
    border-radius: 100%;
    border: 5px solid #fff;
    position: absolute;
    top: 50px;
    z-index: 2;
    animation: scaleIn 0.5s ease-out;
    box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.timeline-post-col:hover:before {
    background-color: #333333;
    box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.3);
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.timeline-post-col.even:before {
    right: -9px;
}

.timeline-post-col.odd:before {
    left: -9px;
}

/* Ligne horizontale vers le centre */
.timeline-post-col .line {
    position: absolute;
    top: 56px;
    height: 3px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.3), #000000);
    animation: drawLine 0.8s ease-out;
    z-index: 1;
}

.timeline-post-col.even .line {
    right: 0;
    width: 12%;
    transform-origin: right;
}

.timeline-post-col.odd .line {
    left: 0;
    width: 12%;
    transform-origin: left;
    background: linear-gradient(90deg, #000000, rgba(0, 0, 0, 0.3));
}

@keyframes drawLine {
    0% {
        transform: scaleX(0);
        opacity: 0;
    }
    100% {
        transform: scaleX(1);
        opacity: 1;
    }
}

/* Ligne verticale centrale */
.ed-timeline:after {
    content: "";
    width: 4px;
    height: calc(100% + 40px);
    background: linear-gradient(to bottom, #000000, rgba(0, 0, 0, 0.3));
    position: absolute;
    left: 50%;
    top: -40px;
    transform: translateX(-50%);
    animation: growDown 1.5s ease-out;
    transform-origin: top;
    border-radius: 2px;
}

@keyframes growDown {
    0% {
        height: 0;
        opacity: 0;
    }
    100% {
        height: calc(100% + 40px);
        opacity: 1;
    }
}

/* Bouton Charger plus */
.load-more-container {
    text-align: center;
    margin-top: 70px;
    position: relative;
    z-index: 4;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 160px;
    height: 160px;
    border: 5px solid #f7f8fc;
    border-radius: 100%;
    text-transform: uppercase;
    position: relative;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    background: #fff;
    cursor: pointer;
    transition: all 0.4s ease;
    color: #000000;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.08);
}

.load-more-btn:hover {
    border-color: #000000;
    background: linear-gradient(135deg, #000000, #1a1a1a);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.load-more-btn .plus-icon {
    font-size: 42px;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 8px;
    display: block;
    transition: transform 0.3s ease;
}

.load-more-btn:hover .plus-icon {
    transform: rotate(90deg);
}

.load-more-btn .spinner {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 90px;
    height: 90px;
    transition: all 0.3s ease;
}

.load-more-btn .spinner circle {
    stroke: #fff;
    stroke-dasharray: 125;
    stroke-dashoffset: 125;
    animation: spinCircle 1.5s linear infinite;
}

@keyframes spinCircle {
    to {
        stroke-dashoffset: 0;
        transform: rotate(360deg);
    }
}

.load-more-btn.loading {
    border-color: #000000;
    background: linear-gradient(135deg, #000000, #1a1a1a);
    color: #fff;
}

.load-more-btn.loading .spinner {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.load-more-btn.loading .btn-inner {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

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

@media screen and (max-width: 767px) {
    .ed-timeline {
        margin-top: 60px;
        padding-left: 0;
    }
    
    .ed-timeline:before {
        left: 14px !important;
        transform: none !important;
    }
    
    .timeline-post-col {
        width: 100%;
        padding-left: 60px !important;
        padding-right: 15px !important;
        margin-top: 0 !important;
    }
    
    .timeline-post-col.odd {
        margin-top: 0 !important;
    }
    
    .ed-timeline:after {
        left: 24px !important;
        transform: none !important;
        top: -20px;
    }
    
    .timeline-post-col:before {
        left: 16px !important;
        right: auto !important;
    }
    
    .timeline-post-col .line {
        display: none;
    }
    
    .timeline-post:after {
        left: -18px !important;
        right: auto !important;
        border-width: 18px 18px 18px 0 !important;
        border-color: transparent #fff transparent transparent !important;
    }
    
    .timeline-post-col.very-last:after {
        display: none;
    }
    
    .load-more-btn {
        width: 140px;
        height: 140px;
        font-size: 11px;
    }
    
    .load-more-btn .plus-icon {
        font-size: 36px;
    }
}
