@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

/* Variables de marque Assistouest */
:root {
    --ao-blue: #0069e2;
    --ao-blue-light: #eff6ff;
    --ao-blue-medium: #dbeafe;
    --ao-blue-rgb: 0, 105, 226;
    --ao-ink: #0a1014;
    --ao-gray-dark: #334155;
    --ao-gray-light: #f8fafc;
    --ao-border: #e2e8f0;
}

/* Reset local */
.ao-timeline-wrapper {
    font-family: 'Inter', sans-serif;
    color: var(--ao-gray-dark);
    background-color: var(--ao-gray-light);
    padding: 60px 20px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    max-width: 1200px;
    margin: 40px auto;
    position: relative;
    overflow: hidden;
}

/* Base headings with Outfit */
.ao-card-title, .ao-step-title {
    font-family: 'Outfit', sans-serif;
}

/* SLIDER SECTION */
.ao-slider-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    margin-bottom: 50px;
}

.ao-slider-track-viewport {
    flex: 1;
    min-width: 0; /* Empêche le débordement horizontal en flexbox */
    overflow: hidden;
    padding: 20px 0;
}

.ao-slider-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

/* CARD STYLING */
.ao-card {
    flex: 0 0 100%; /* Default mobile */
    padding: 0 15px;
    box-sizing: border-box;
    opacity: 0.4;
    transform: scale(0.92);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (min-width: 768px) {
    .ao-card {
        flex: 0 0 33.333%; /* Desktop: 3 cards visible */
    }
}

.ao-card.active {
    opacity: 1;
    transform: scale(1.03);
}

.ao-card-inner {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.01);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 380px;
    position: relative;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.ao-card.active .ao-card-inner {
    box-shadow: 0 20px 40px rgba(0, 105, 226, 0.08);
    border-color: rgba(var(--ao-blue-rgb), 0.2);
}

/* Card Icon (Gradient overlay) */
.ao-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--ao-blue-light) 0%, var(--ao-blue-medium) 100%);
    color: var(--ao-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.ao-card-icon svg {
    width: 28px;
    height: 28px;
}

.ao-card.active .ao-card-icon {
    background: linear-gradient(135deg, var(--ao-blue) 0%, #0056ba 100%);
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(var(--ao-blue-rgb), 0.25);
    transform: translateY(-4px);
}

/* Header inside card */
.ao-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.ao-card-date {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ao-blue);
    letter-spacing: 0.05em;
}

.ao-card-category {
    font-size: 0.7rem;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
    padding: 4px 10px;
    border-radius: 100px;
    letter-spacing: 0.02em;
}

.ao-card.active .ao-card-category {
    background: var(--ao-blue-light);
    color: var(--ao-blue);
}

/* Title and description */
.ao-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ao-ink);
    line-height: 1.4;
    margin: 0 0 16px 0;
}

.ao-card-description {
    font-size: 0.925rem;
    line-height: 1.6;
    color: #556980;
    margin: 0 0 24px 0;
    flex-grow: 1;
}


/* Navigation arrows */
.ao-slider-arrow {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: var(--ao-ink);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    z-index: 10;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.ao-slider-arrow:hover {
    background: var(--ao-ink);
    color: #ffffff;
    border-color: var(--ao-ink);
    box-shadow: 0 6px 15px rgba(10, 16, 20, 0.15);
}

/* Force les SVG dans les flèches — neutralise les styles du thème */
.ao-timeline-wrapper .ao-slider-arrow svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2.5px !important;
    overflow: visible;
    pointer-events: none;
}

.ao-timeline-wrapper .ao-slider-arrow svg path {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2.5px !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}


/* TIMELINE NAVIGATION (DARK BLOCK EFFECT) */
.ao-timeline-navigation {
    background-color: var(--ao-ink); /* Branded black */
    border-radius: 20px;
    padding: 40px 30px;
    position: relative;
    margin-top: 20px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.ao-timeline-line-bg {
    position: absolute;
    top: 58px;
    left: 10%;
    width: 80%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    z-index: 1;
}

.ao-timeline-line-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #60a5fa, var(--ao-blue));
    transition: width 0.6s ease;
}

.ao-timeline-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.ao-timeline-step {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 12.5%;
    outline: none;
}

/* Step Circle */
.ao-step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #1e293b;
    border: 3px solid var(--ao-ink);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    margin-bottom: 16px;
}

.ao-step-number {
    font-size: 0.85rem;
    font-weight: 700;
    color: #94a3b8;
    transition: color 0.4s ease;
}

/* Step Metadata text */
.ao-step-meta {
    text-align: center;
    transition: transform 0.3s ease;
}

.ao-step-title {
    display: block;
    font-size: 0.725rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.ao-step-year {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #94a3b8;
    transition: color 0.3s ease;
}

/* Step States */
.ao-timeline-step:hover .ao-step-circle {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
    background: #334155;
}

.ao-timeline-step:hover .ao-step-number {
    color: #ffffff;
}

/* ACTIVE STATE */
.ao-timeline-step.active .ao-step-circle {
    background: linear-gradient(135deg, #60a5fa 0%, var(--ao-blue) 100%);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35), 0 0 15px rgba(var(--ao-blue-rgb), 0.4);
    transform: scale(1.1);
}

.ao-timeline-step.active .ao-step-number {
    color: #ffffff;
}

.ao-timeline-step.active .ao-step-title {
    color: var(--ao-blue);
}

.ao-timeline-step.active .ao-step-year {
    color: #ffffff;
    font-weight: 700;
}

/* Responsive — Mobile */
@media (max-width: 767px) {

    .ao-timeline-wrapper {
        padding: 28px 0;
        border-radius: 16px;
        margin: 16px 10px;
        overflow: hidden;
    }

    /* Réorganisation du slider : viewport en haut, flèches en bas centrées */
    .ao-slider-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;
        margin-bottom: 28px;
        padding: 0 16px;
    }

    .ao-slider-track-viewport {
        order: 1;
        flex: none;
        width: 100%;
        padding: 12px 0;
    }

    .ao-arrow-prev {
        order: 2;
    }

    .ao-arrow-next {
        order: 3;
    }

    .ao-slider-arrow {
        width: 48px;
        height: 48px;
    }

    .ao-card {
        flex: 0 0 100%;
    }

    .ao-card-inner {
        padding: 28px 20px;
        min-height: auto;
    }

    /* Frise du bas : scroll horizontal pour afficher 8 étapes */
    .ao-timeline-navigation {
        padding: 20px 0 20px;
        border-radius: 14px;
        margin-top: 0;
    }

    .ao-timeline-steps {
        overflow-x: auto;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 0;
        padding: 0 12px 6px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .ao-timeline-steps::-webkit-scrollbar {
        display: none;
    }

    .ao-timeline-step {
        width: auto;
        min-width: 48px;
        flex-shrink: 0;
        padding: 0 10px;
    }

    .ao-step-meta {
        display: none;
    }

    .ao-step-circle {
        margin-bottom: 0;
    }

    .ao-timeline-line-bg {
        top: 18px;
        left: 12px;
        width: calc(100% - 24px);
    }
}
