/**
 * Styles pour le bloc Dates clés
 */

.bloc-dates-cles {
    position: relative;
    padding: 60px 0;
    background: #fff;
}

.bloc-dates-cles__header {
    margin-bottom: 40px;
}

.bloc-dates-cles__title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 40px;
    line-height: 1.2;
    color: #000;
    margin: 0 0 20px 0;
}

.bloc-dates-cles__description {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 27px;
    color: #000;
    margin: 0 auto;
    margin-bottom: 70px;
}

.bloc-dates-cles__description p {
    margin: 0;
}

.bloc-dates-cles__content {
    position: relative;
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin: 0 auto;
}

/* Scrollbar personnalisée - Design Figma */
.bloc-dates-cles__timeline {
    position: relative;
    width: 39px;
    flex-shrink: 0;
    height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    cursor: pointer;
    z-index: 3;
}

.bloc-dates-cles__timeline-line {
    position: relative;
    width: 4px;
    height: 447px;
    background: #d9d9d9;
    flex: 1;
    overflow: hidden; /* Empêcher l'indicateur de dépasser */
}

.bloc-dates-cles__timeline-indicator {
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 60px;
    background: #be0000;
    z-index: 2;
    cursor: grab;
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bloc-dates-cles__timeline-indicator:active {
    cursor: grabbing;
}

/* Flèches de navigation - Utilisation des images SVG Figma */
.bloc-dates-cles__timeline::before,
.bloc-dates-cles__timeline::after {
    content: '';
    width: 39px;
    height: 47px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 3;
}

.bloc-dates-cles__timeline::before {
    background-image: url(../../images/icons/arrow-up.svg);
    transform: rotate(180deg) scaleY(-1);
}

.bloc-dates-cles__timeline::after {
    background-image: url(../../images/icons/arrow-up.svg);
    transform: rotate(180deg);
}

/* Liste des dates */
.bloc-dates-cles__dates-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 300px;
    flex-shrink: 0;
    height: 500px;
    overflow-y: auto;
    /* Masquer la scrollbar native */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
    /* Défilement doux */
    scroll-behavior: smooth;
}

/* Masquer la scrollbar WebKit */
.bloc-dates-cles__dates-list::-webkit-scrollbar {
    display: none;
}

.bloc-dates-cles__date-item {
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.bloc-dates-cles__date-item{

   &::before {
        content: '';
        position: relative;
        width: 0px;
        height: 0px;
        border-radius: 0;
        margin-right: 0;
        transition: all 0.3s ease;
    }
}

.bloc-dates-cles__date-item.active{
    display: flex;
    align-items: center;
   &::before {
        content: '';
        position: relative;
        width: 50px;
        height: 12px;
        background: #be0000;
        border-radius: 2px;
        margin-right: 20px;
        transition: all 0.3s ease;
    }
}

.bloc-dates-cles__date-year {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 40px;
    line-height: 1.2;
    color: #000;
}

.bloc-dates-cles__date-item.active .bloc-dates-cles__date-year {
    font-weight: 700;
    color: #be0000;
}

/* Contenu sélectionné */
.bloc-dates-cles__selected-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 277px;
    flex-shrink: 0;
    position: relative;
    &::after{
        content: '';
        width: 200px;
        height: 250px;
        background-image: url(../../images/icons/arrow-curved.svg);
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        position: absolute;
        bottom: -100%;
        right: -50px;
        margin-top: 20px;
        @media (max-width: 992px){
            display: none;
        }
    }
}

.bloc-dates-cles__selected-year {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 190px;
    line-height: 0.81;
    color: #be0000;
    word-break: break-word;
}

.bloc-dates-cles__selected-image {
    width: 100%;
    height: 280px;
    border-radius: 0 20px 0 0;
    overflow: hidden;
}

.bloc-dates-cles__selected-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Détails de la date sélectionnée */
.bloc-dates-cles__details {
    flex: 1;
    max-width: 560px;
}

.bloc-dates-cles__detail-item {
    display: none;
    flex-direction: column;
    gap: 21px;
}

.bloc-dates-cles__detail-item.active {
    display: flex;
}

.bloc-dates-cles__detail-header {
    display: flex;
    gap: 10px;
}

.bloc-dates-cles__detail-icon {
    flex-shrink: 0;
}

.bloc-dates-cles__detail-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 25px;
    line-height: 1.2;
    color: #000;
    margin: 0;
}

.bloc-dates-cles__detail-description {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 27px;
    color: #000;
}

.bloc-dates-cles__detail-description p {
    margin: 0;
}

.bloc-dates-cles__detail-image {
    /* width: 100%;
    height: 381px;
    border-radius: 0 20px 0 0;
    overflow: hidden; */
    /* max-width: 350px; */
    /* height: 260px; */
    /* aspect-ratio: 12 / 9;
    border-radius: 0 20px 0 0;
    overflow: hidden;
    width: 100%; */
}

.bloc-dates-cles__detail-item  img {
    max-width: 250px;
    /* aspect-ratio: 12 / 9; */
    border-radius: 0 20px 0 0;
    overflow: hidden;
    width: 100%;

    object-fit: cover;
}

.bloc-dates-cles__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Animations */
.bloc-dates-cles--loaded .bloc-dates-cles__date-item {
    animation: fadeInUp 0.6s ease-out forwards;
}

.bloc-dates-cles--loaded .bloc-dates-cles__date-item:nth-child(1) { animation-delay: 0.1s; }
.bloc-dates-cles--loaded .bloc-dates-cles__date-item:nth-child(2) { animation-delay: 0.2s; }
.bloc-dates-cles--loaded .bloc-dates-cles__date-item:nth-child(3) { animation-delay: 0.3s; }
.bloc-dates-cles--loaded .bloc-dates-cles__date-item:nth-child(4) { animation-delay: 0.4s; }
.bloc-dates-cles--loaded .bloc-dates-cles__date-item:nth-child(5) { animation-delay: 0.5s; }
.bloc-dates-cles--loaded .bloc-dates-cles__date-item:nth-child(6) { animation-delay: 0.6s; }
.bloc-dates-cles--loaded .bloc-dates-cles__date-item:nth-child(7) { animation-delay: 0.7s; }
.bloc-dates-cles--loaded .bloc-dates-cles__date-item:nth-child(8) { animation-delay: 0.8s; }

.bloc-dates-cles__detail-item {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bloc-dates-cles__detail-item.active {
    opacity: 1;
    transform: translateX(0);
}

.bloc-dates-cles__selected-year {
    transition: all 0.3s ease;
}

.bloc-dates-cles__timeline-indicator {
    transition: top 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus et accessibilité */
.bloc-dates-cles__date-item:focus {
    outline: 2px solid #be0000;
    outline-offset: 2px;
}

.bloc-dates-cles__date-item:focus:not(:focus-visible) {
    outline: none;
}

.bloc-dates-cles__date-item:focus-visible {
    outline: 2px solid #be0000;
    outline-offset: 2px;
}

/* Timeline horizontale pour écrans jusqu'à 992px */
@media (max-width: 992px) {
    .bloc-dates-cles__content {
        flex-direction: column;
        gap: 30px;
    }
    
    .bloc-dates-cles__timeline {
        display: none;
    }
    
    /* Timeline horizontale */
    .bloc-dates-cles__dates-list {
        position: relative;
        display: flex;
        flex-direction: row;
        width: 100%;
        height: auto;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 0;
        /* Masquer la scrollbar native */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* Internet Explorer 10+ */
        /* Défilement doux */
        scroll-behavior: smooth;
    }
    
    .bloc-dates-cles__date-item {
        position: relative;
        
        th: 120px;
        height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px 15px;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        flex-shrink: 0;
    }
    
    /* Masquer la scrollbar WebKit pour la timeline horizontale */
    .bloc-dates-cles__dates-list::-webkit-scrollbar {
        display: none;
    }
    
    /* Navigation en flèches sous les dates */
    .bloc-dates-cles__navigation {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 20px;
        margin: 0 auto;
        margin-bottom: 40px;

    }
    
    .bloc-dates-cles__nav-arrow {
        width: 40px;
        height: 40px;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        cursor: pointer;
        transition: opacity 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        background: none;
    }
    
    .bloc-dates-cles__nav-arrow:hover {
        opacity: 0.7;
    }
    
    .bloc-dates-cles__nav-arrow--left {
        background-image: url(../../images/icons/arrow-up.svg);
        transform: rotate(-90deg);
    }
    
    .bloc-dates-cles__nav-arrow--right {
        background-image: url(../../images/icons/arrow-up.svg);
        transform: rotate(90deg);
    }
    
    .bloc-dates-cles__nav-arrow:hover .bloc-dates-cles__nav-arrow--left,
    .bloc-dates-cles__nav-arrow:hover .bloc-dates-cles__nav-arrow--right {
        filter: brightness(0) invert(1);
    }
    
    
    .bloc-dates-cles__date-item::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 4px;
        background: #be0000;
        border-radius: 2px;
        transition: width 0.3s ease;
    }
    
    .bloc-dates-cles__date-item.active::before {
        display: none;
    }
    
    .bloc-dates-cles__date-year {
        font-size: 24px;
        text-align: center;
        transition: all 0.3s ease;
    }
    
    .bloc-dates-cles__date-item.active .bloc-dates-cles__date-year {
        font-weight: 700;
        color: #be0000;
        font-size: 28px;
    }
    
    .bloc-dates-cles__selected-content {
        width: 100%;
        align-items: flex-start;
    }
    
    .bloc-dates-cles__selected-year {
        font-size: 120px;
    }
    
    .bloc-dates-cles__details {
        max-width: 100%;
    }
}

/* Responsive pour écrans moyens */
@media (max-width: 1200px) and (
    th: 993px) {
    .bloc-dates-cles__content {
        flex-direction: column;
        gap: 30px;
    }
    
    .bloc-dates-cles__timeline {
        display: none;
    }
    
    .bloc-dates-cles__dates-list {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
    }
    
    .bloc-dates-cles__date-item {
        
        th: 80px;
    }
    
    .bloc-dates-cles__date-item.active::before {
        display: none;
    }
    
    .bloc-dates-cles__selected-content {
        width: 100%;
        align-items: flex-start;
    }
    
    .bloc-dates-cles__selected-year {
        font-size: 120px;
    }
    
    .bloc-dates-cles__details {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .bloc-dates-cles {
        padding: 40px 0;
    }
    
    .bloc-dates-cles__title {
        font-size: 8vw;
    }
    

    
    .bloc-dates-cles__selected-year {
        font-size: 20vw;
    }
    
    .bloc-dates-cles__detail-title {
        font-size: 5vw;
    }
    
    .bloc-dates-cles__dates-list {
        gap: 10px;
    }
    
    .bloc-dates-cles__date-item {
        
        th: 60px;
        padding: 5px;
    }
}

@media (min-width: 993px){
    .bloc-dates-cles__navigation{
        display: none;
    }
}