/*
* fichier: timeline.js
* créé le: 2025.02.26
* version: 2025.02.26
* description: gestion de l'affichage de timelines à partir d'un élément parent
*/

/* tableau flex pour la timeline: 2 colonnes - 1 entete */
.timeline_flex {
    display: flex;
}

/* l'ente de la ligne est l'échelle */
/*.timeline_flex > span > div {*/
/* Ne fonctionne pas */
.timeline_flex_entete_echelle{
    /*width: 4rem;*/
    background-color: transparent;
}

.timeline_flex_entete_colonnes {
    width: 4rem;
    white-space: nowrap;
    background-color: darkolivegreen;
    overflow: hidden;
}

.timeline_flex_entete_colonnes div{
    border: 1px solid black;
}

.timeline_flex_datas {
    flex-grow: 1;
    background-color: darkolivegreen;
}

.timelines{
    position: relative;
    display: block;
    /*width: 90%;*/
    margin: 0;
}

.timeline_head1_cell {
    display:block;
    min-height: 1.5rem;height: 1.5rem;max-height: 1.5rem;
}


.timeline {
    z-index: 1000;
    position: relative;
    display: block;
    /*width: 100%;  Par défaut un block prend 100% de la largeur */
    height: 1.5rem;
    margin: 0;
    padding: 0;
    border: 1px solid black;
    background-color: darkolivegreen;
    overflow: hidden;
    font-size: 1rem;
}

/* support pour les evenements */
.timeline-evenements {
    z-index: 10000;
    position: relative;
    border-left: 1px solid red;
    background-color: rgb(98, 130, 43);
    overflow: hidden;
    text-align: center;
}

/* Evenement (eventuellement sur un support) */
.timeline-evenement{
    z-index: 11000;
    position: relative;
    border-left: 1px solid red;
    background-color:rgb(98, 130, 43);
    overflow: hidden;
    text-align:center;
    }

.timeline-evenement:hover {
    /*z-index: 11001;*/
    background-color: #670c50;
}


.timeline-evenement-dynastie {
    z-index: 15000;
    /*position: relative;*/
    border: 1px solid yellow !important;
    box-sizing: border-box; /* la bordure est comprise */
    background-color: rgba(98, 130, 43, 30);
    overflow: hidden;
    height: 50% !important;
    text-align: center;
}

.timeline-evenement-dynastie:hover {
    z-index: 15001;
    background-color: #670c50;
}


/* items */
.timeline-evenement-personnage {
    z-index: 20001;
    background-color: #4349f4;
}

.timeline-evenement-personnage:hover {
     z-index: 20050;
 }

.timeline-evenement-body_icon {
    position: absolute;
    z-index: 20001;
    overflow: visible;
    height: 100%;
    transform: translate(-50%, 0);
}
.timeline-evenement-body_icon:hover {
    z-index: 20050;
}

.timeline-evenement-top {
    z-index: 20100;
    background-color: #4349f4;
    border-left: 1px solid white !important;
    transform: translateY(-50%);
    height: 50% !important;
    font-size: 50%;
}

.timeline-evenement-bottom {
    z-index: 20100;
    background-color: #4349f4;
    height: 50% !important;
    transform: translateY(100%) !important;
    font-size: 50%;
}

.timeline-evenement-top:hover,
.timeline-evenement-bottom:hover {
    z-index: 20110;
}

.timeline-evenement-top-50 {
    top: 0;
    height: 50% !important;
    line-height: 50% !important;
}

/* !important: pour qu'il soit prioritaire à js */
.timeline-evenement-bottom-50 {
    bottom: 0 !important;
    height: 50% !important;
    line-height: 50% !important;
    margin: 0;
    padding: 0;
}

.timeline-evenement-echelle {
    position: relative;
    border: 1px solid red;
    background-color: transparent;
    overflow: visible;
    border-right: none;
    text-align: left;
}



.timeline-Religion {
    background-color: #a50f80;
}

.timeline-Science {
    background-color: #0c671b;
}

.timeline-Grands_Courants {
    background-color: #2517bc;
}


