/* Correctif CSS pour forcer les styles de la timeline dans le portail */
/* Ce fichier doit être chargé APRÈS le CSS principal du site */
/* Scoped to #timeline-hj to avoid overriding global portal styles */

#timeline-hj {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

/* Polices et tailles comme l’original CodyHouse (Droid Serif + Open Sans) */
#timeline-hj .cd-timeline {
    font-size: 1rem;
    font-family: 'Droid Serif', Georgia, serif;
}

#timeline-hj .cd-timeline h2 {
    font-family: 'Open Sans', Arial, sans-serif;
    font-weight: 700;
}

/* Date: même police que le contenu, taille lisible */
#timeline-hj .cd-timeline__date {
    font-size: 1em;
    font-family: 'Droid Serif', Georgia, serif;
}

/* Contenu des blocs: police, texte plus grand et noir (sauf le h2) */
#timeline-hj .cd-timeline__content {
    font-size: 1.1em;
    font-family: 'Droid Serif', Georgia, serif;
}

#timeline-hj .cd-timeline__content h2 {
    font-family: 'Open Sans', Arial, sans-serif;
}

#timeline-hj .cd-timeline__content p {
    color: #1a1a1a;
}

@media (min-width: 64rem) {
    /* Desktop: texte lisible et noir */
    #timeline-hj .cd-timeline__content {
        font-size: 1em;
    }
}

/* Override Bootstrap/portal .container inside timeline only */
#timeline-hj .cd-timeline__container.container {
    max-width: 80rem;
    width: calc(100% - 2 * 1.25em);
}

#timeline-hj .cd-timeline__container {
    position: relative !important;
}

#timeline-hj .cd-timeline__container::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 18px !important;
    height: 100% !important;
    width: 4px !important;
    background: hsl(205, 38%, 89%) !important;
    background: var(--cd-color-2) !important;
    z-index: 1 !important;
}

@media (min-width: 64rem) {
    #timeline-hj .cd-timeline__container::before {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

#timeline-hj .cd-timeline__img {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    box-shadow: 0 0 0 4px #fff, inset 0 2px 0 rgba(0,0,0,0.08), 0 3px 0 4px rgba(0,0,0,0.05) !important;
    z-index: 2 !important;
    position: relative !important;
}

#timeline-hj .cd-timeline__img img {
    width: 24px !important;
    height: 24px !important;
}

@media (min-width: 64rem) {
    #timeline-hj .cd-timeline__img {
        width: 60px !important;
        height: 60px !important;
        order: 1 !important;
        margin-left: calc(5% - 30px) !important;
    }
    
    #timeline-hj .cd-timeline__block:nth-child(even) .cd-timeline__img {
        margin-right: calc(5% - 30px) !important;
        margin-left: 0 !important;
    }
}

#timeline-hj .cd-timeline__content::before {
    content: '' !important;
    position: absolute !important;
    top: 16px !important;
    right: 100% !important;
    width: 0 !important;
    height: 0 !important;
    border: 7px solid transparent !important;
    border-right-color: #fff !important;
    z-index: 1 !important;
}

@media (min-width: 64rem) {
    #timeline-hj .cd-timeline__content::before {
        top: 24px !important;
    }
    
    #timeline-hj .cd-timeline__block:nth-child(odd) .cd-timeline__content::before {
        right: auto !important;
        left: 100% !important;
        border-right-color: transparent !important;
        border-left-color: #fff !important;
    }
}

#timeline-hj .cd-timeline__block {
    display: flex !important;
    position: relative !important;
    z-index: 1 !important;
    margin-bottom: 2em !important;
}

#timeline-hj .cd-timeline__content {
    flex-grow: 1 !important;
    position: relative !important;
    margin-left: 1.25em !important;
    background: #fff !important;
    border-radius: 0.25em !important;
    padding: 1.25em !important;
    box-shadow: 0 3px 0 hsl(205, 38%, 89%) !important;
}

@media (min-width: 64rem) {
    #timeline-hj .cd-timeline__content {
        width: 45% !important;
        flex-grow: 0 !important;
        margin: 0 !important;
    }
    
    #timeline-hj .cd-timeline__block:nth-child(even) {
        flex-direction: row-reverse !important;
    }
}

/* Icônes Font Awesome dans la timeline (remplacement des SVG) */
#timeline-hj .cd-timeline__img img {
    width: 24px;
    height: 24px;
    display: block;
}
#timeline-hj .cd-timeline__img i {
    font-size: 1.25rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
@media (min-width: 64rem) {
    #timeline-hj .cd-timeline__img i {
        font-size: 1.5rem;
    }
}

/* Couleurs par type d’étape */
#timeline-hj .cd-timeline__img--rocket { background-color: #2563eb !important; }
#timeline-hj .cd-timeline__img--paint-brush { background-color: #7c3aed !important; }
#timeline-hj .cd-timeline__img--handshake { background-color: #059669 !important; }
#timeline-hj .cd-timeline__img--gears { background-color: #ea580c !important; }
#timeline-hj .cd-timeline__img--chart-line { background-color: #0d9488 !important; }
#timeline-hj .cd-timeline__img--newspaper { background-color: #1d4ed8 !important; }
#timeline-hj .cd-timeline__img--mobile { background-color: #dc2626 !important; }
#timeline-hj .cd-timeline__img--share-nodes { background-color: #1e40af !important; }
#timeline-hj .cd-timeline__img--trophy { background-color: #ca8a04 !important; }
#timeline-hj .cd-timeline__img--accessibility { background-color: #0284c7 !important; }
#timeline-hj .cd-timeline__img--cake { background-color: #be185d !important; }
