loko/streetup/interventions/static/interventions/timeline.css
2026-07-22 14:48:40 +02:00

144 lines
3.4 KiB
CSS

.timeline {
display: flex;
align-items: flex-start; /* Aligner les cercles correctement */
overflow-x: auto;
padding: 20px;
}
.step {
display: flex;
flex-direction: column;
align-items: center;
position: relative;
margin-right: 30px;
}
.step:last-child {
margin-right: 0;
padding-left: 3px;
padding-right: 3px;
}
/* Ligne entre les cercles */
.step::after {
content: "";
position: absolute;
width: 30px;
height: 5px;
background-color: #ccc;
top: 15px; /* Ajuste la position de la ligne */
left: 100%;
/* transform: translateX(15px); */
}
.step:last-child::after {
display: none;
}
/* Style des cercles */
.circle {
width: 30px;
height: 30px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
font-weight: bold;
color: white;
background-color: #ccc;
}
.past .circle {
background-color: #ccc;
}
.current .circle {
background-color: #0d6efd;
}
/* Tous les cercles au-dessus de la ligne de connexion (::after) */
.circle {
position: relative;
z-index: 1;
}
/* Statut actuel : bordure blanche + ombre colorée selon le statut */
.circle-current {
color: #fff !important;
border: 3px solid #fff !important;
position: relative;
z-index: 2;
}
.circle-current.bg-secondary { box-shadow: 0 0 0 3px var(--bs-secondary); }
.circle-current.bg-primary { box-shadow: 0 0 0 3px var(--bs-primary); }
.circle-current.bg-danger { box-shadow: 0 0 0 3px var(--bs-danger); }
.circle-current.bg-warning { box-shadow: 0 0 0 3px var(--bs-warning); }
.circle-current.bg-info { box-shadow: 0 0 0 3px var(--bs-info); }
.circle-current.bg-success { box-shadow: 0 0 0 3px var(--bs-success); }
.circle-current.bg-dark { box-shadow: 0 0 0 3px var(--bs-dark); }
.future {
display: none;
}
/* ---- Cercle d'action cliquable (transition autorisée) ---- */
.circle-action {
cursor: pointer;
color: #fff !important;
border: 2px solid rgba(255,255,255,.3);
box-shadow: 0 2px 4px rgba(0,0,0,.15);
transition: transform .15s ease, box-shadow .15s ease;
}
.circle-action:hover {
transform: scale(1.18);
box-shadow: 0 3px 8px rgba(0,0,0,.25);
}
.circle-action:active {
transform: scale(.92);
}
/* Labels uniquement sur le dernier élément et nextStep */
.steplabel {
font-size: 12px;
text-align: center;
max-width: 80px;
color: #333;
}
/* Spacer invisible pour aligner tous les cercles */
.spacer {
height: 17px; /* Compense la hauteur du label */
visibility: hidden;
}
/* Ligne en pointillé après le next step si ce n'est pas le dernier élément */
.next-step-dashed::after {
content: "";
position: absolute;
width: 30px;
height: 5px;
background: repeating-linear-gradient(90deg,#ccc 0 8px,#fff0 0 11px); /*5px red then 2px transparent -> repeat this!*/
top: 15px;
left: 100%;
display: block !important; /* Force l'affichage */
}
/* Recommended transition: subtle ring pulse */
.circle-recommended {
animation: circle-pulse 1.8s ease-out infinite;
}
@keyframes circle-pulse {
0% { box-shadow: 0 0 0 0 rgba(13, 110, 253, .5); }
70% { box-shadow: 0 0 0 10px rgba(13, 110, 253, 0); }
100% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); }
}
.timeline-editable-list .timeline-event-editing {
border-color: #0d6efd;
box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.1);
background-color: rgba(13, 110, 253, 0.05);
}