/*  timeline-accordion.css
    À inclure une seule fois dans _Layout.cshtml ou via @section Styles.
    ─────────────────────────────────────────────────────────────────── */

/* ── Wrap ── */
.tl-accordion-wrap {
    /*    border: 0.5px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: .75rem;*/
 /*   display: flex;
    justify-content: space-between;*/
    overflow: hidden;
/*    background: #f5f5f3;*/
   
}

/*.collapse-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    cursor: pointer;
    background: #f5f5f3;
    border-top: 0.5px solid #e0dfd8;
    user-select: none;
    transition: background 0.15s;
}*/

/*.tl-accordion-wrap:hover {
    background: #eeede8;
}*/


/* ── Bouton titre ── */
.tl-acc-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    background: #f5f5f3;
    border: none;
    padding: 13px 16px;
    cursor: pointer;
    text-align: left;
    transition: background .15s;

}
    .tl-acc-btn:hover {
        background: #eeede8;
    }
.tl-acc-btn[aria-expanded="true"] { background: #f1f5f9; }

.tl-acc-icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 0px solid #212529;
 
    /* background: #1e3a8a;*/
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
    .tl-acc-icon-wrap .mdi {
        font-size: 17px;
        /*color: #212529;*/
        color: rgb(52, 108, 176);
    }

.tl-acc-texts {
    display: flex;
    align-items: center;
}
.tl-acc-title  { display: block; font-size: 13.5px; font-weight: 600; color: #1e293b; }

.tl-acc-soustitle {
    font-size: 11px;
    color: #888780;
    font-weight: 400;
    margin:0px 4px 0px 4px;
}

.tl-acc-sub    { display: block; font-size: 11px; color: #64748b; margin-top: 1px; }

.tl-acc-badge {
    background: #e8f0fe; color: #1565c0;
    font-size: 10px; font-weight: 600;
    border-radius: 20px; padding: 2px 9px;
    flex-shrink: 0; white-space: nowrap;
}

/* Chevron animé */
.tl-acc-chevron {
    font-size: 18px;
    color: #94a3b8;
    flex-shrink: 0;
    transition: transform .25s ease, color .15s;
}
.tl-acc-btn[aria-expanded="true"] .tl-acc-chevron {
    transform: rotate(180deg);
    color: #1e3a8a;
}

/* ── Panneau ── */
.tl-acc-panel {
    border-top: 0.5px solid #e2e8f0;
    /* hidden géré via l'attribut HTML hidden + animation JS max-height */
    overflow: hidden;
    transition: max-height .35s ease;
    max-height: 0;
}
/* Quand ouvert (classe ajoutée par JS après retrait de hidden) */
.tl-acc-panel.tl-open { max-height: 520px; }

/* Loader */
.tl-acc-loader {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 1.75rem;
    font-size: 12px; color: #64748b;
}
.tl-spinner {
    width: 18px; height: 18px;
    border: 2.5px solid #e2e8f0;
    border-top-color: #1e3a8a;
    border-radius: 50%;
    animation: tl-spin .65s linear infinite;
}
@keyframes tl-spin { to { transform: rotate(360deg); } }

/* ── Timeline dans le panneau ── */
.tl-acc-content { padding: 10px 4px 14px; }

.tl-outer {
    /*overflow-x: auto;*/
    overflow-y: visible;
    padding-bottom: 6px;
}
.tl-outer::-webkit-scrollbar       { height: 4px; }
.tl-outer::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

.tl-rail {
    position: relative; display: flex; align-items: flex-start;
    min-width: max-content; 
    /*padding: 0 16px;*/
}
.tl-rail::before {
    content: ''; position: absolute; left: 0; right: 0;
    top: var(--tl-ll, 40px); height: 2px;
    background: #e2e8f0; transform: translateY(-50%);
    z-index: 0; pointer-events: none;
}

.tl-col { display: flex; flex-direction: column; align-items: center; width: 145px; flex-shrink: 0; padding: 0 8px; }
.tl-col.tl-first .tl-date-lbl { font-size: 10.5px; font-weight: 700; color: #1e293b; }
.tl-date-lbl { font-size: 12px; font-weight: 600; color: #64748b; white-space: nowrap; text-align: center; margin-bottom: 5px; }

.tl-dot { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 2.5px solid #94a3b8; display: flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; z-index: 1; transition: transform .18s, border-color .18s; }
.tl-dot .mdi { font-size: 12px; color: #94a3b8; }
.tl-col.tl-first .tl-dot { width: 40px; height: 40px; background: #1e3a8a; border-color: #1e3a8a; }
.tl-col.tl-first .tl-dot .mdi { font-size: 17px; color: #fff; }
.tl-col:hover .tl-dot { border-color: #3b82f6; transform: scale(1.1); }

.tl-stem { width: 2px; height: 10px; background: #e2e8f0; }
.tl-acts { display: flex; flex-direction: column; gap: 4px; width: 100%; }

.tl-card { background: #fff; border: 0.5px solid #e2e8f0; border-radius: 7px; padding: 5px 7px; display: flex; align-items: flex-start; gap: 5px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.tl-card:hover { border-color: #93c5fd; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.tl-card:focus-visible { outline: 2px solid #3b82f6; outline-offset: 1px; }

.tl-card-ico  { width: 22px; height: 22px; border-radius: 5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.tl-card-ico .mdi { font-size: 12px; color: #fff; }
.tl-card-body { flex: 1; min-width: 0; }
.tl-card-name { font-size: 12px; font-weight: 500; color: #1e293b; line-height: 1.3; display: block; }

.tl-card-who {
    font-size: 11px;
    color: #64748b;
    gap: 2px;
    margin-top: 1px;
    line-height: 1;
}
.tl-card-who .mdi { font-size: 11.5px; }

    .tl-card-who .tl-gest {
        color: #7f00ff;
        font-weight: 500;
    }
    .tl-card-who .tl-gest.tl-fonction {
        color: #7f00ff;
        font-weight: 200;
        font-size: 9px;
    }

    .tl-card-who .tl-gest .mdi {
        color: #7f00ff;
    }

.tl-card-time { font-size: 9px; color: #94a3b8; flex-shrink: 0; white-space: nowrap; }

.tl-tt-ico {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .tl-tt-ico .mdi {
        font-size: 13px;
    }

/*-----------------------*/
/* ── En-tête de page ── */
/*.tl-page-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem 0 1.5rem;
}

.tl-page-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: #1e3a8a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .tl-page-icon .mdi {
        font-size: 22px;
        color: #fff;
    }

.tl-page-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.tl-page-sub {
    font-size: .78rem;
    color: #64748b;
    margin: 0;
}*/

/* ── Scroll horizontal ── */
/*.tl-outer {
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}

    .tl-outer::-webkit-scrollbar {
        height: 5px;
    }

    .tl-outer::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }

    .tl-outer::-webkit-scrollbar-track {
        background: transparent;
    }*/

/* ── Rail (conteneur flex horizontal) ── */
/*.tl-rail {
    position: relative;
    display: flex;
    align-items: flex-start;
    min-width: max-content;
    padding: 0 2rem;
}*/

    /* Ligne de vie — positionnée sur le centre des pastilles via JS */
    /*.tl-rail::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: var(--tl-lifeline-y, 44px);*/ /* injecté par JS */
        /*height: 2px;
        background: #e2e8f0;
        transform: translateY(-50%);
        z-index: 0;
        pointer-events: none;
    }*/

/* ── Colonne (un jour) ── */
/*.tl-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: var(--tl-col-w);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    padding: 0 8px;
}*/

/* Label de date */
/*.tl-date-lbl {
    font-size: .65rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    text-align: center;
    margin-bottom: 5px;
    letter-spacing: .01em;
}

.tl-col.is-first .tl-date-lbl {
    font-size: .7rem;
    font-weight: 700;
    color: #1e293b;
}*/

/* Pastille */
/*.tl-dot {
    width: var(--tl-dot);
    height: var(--tl-dot);
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color .18s, transform .18s;
    position: relative;
    z-index: 2;
}

    .tl-dot .mdi {
        font-size: 13px;
        color: #64748b;
    }

.tl-col.is-first .tl-dot {
    width: var(--tl-dot-f);
    height: var(--tl-dot-f);
    background: #1e3a8a;
    border-color: #1e3a8a;
}

    .tl-col.is-first .tl-dot .mdi {
        font-size: 17px;
        color: #fff;
    }

.tl-col:hover .tl-dot {
    border-color: #3b82f6;
    transform: scale(1.1);
}*/

/* Tige verticale entre pastille et cards */
/*.tl-stem {
    width: 2px;
    height: 12px;
    background: #e2e8f0;
    flex-shrink: 0;
}*/

/* ── Stack de cards ── */
/*.tl-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
}*/

/* Card action */
/*.tl-card {
    background: #fff;
    border: 0.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 8px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
    position: relative;
}

    .tl-card:hover {
        border-color: #cbd5e1;
        box-shadow: 0 2px 8px rgba(0,0,0,.07);
    }

    .tl-card:focus-visible {
        outline: 2px solid #3b82f6;
        outline-offset: 1px;
    }*/

/* Icône colorée */
/*.tl-card-ico {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

    .tl-card-ico .mdi {
        font-size: 13px;
        color: #fff;
    }*/

/* Corps */
/*.tl-card-body {
    min-width: 0;
    flex: 1;
}

.tl-card-name {
    font-size: .65rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
    display: block;*/
    /*         margin-left: 2px; */
/*}

.tl-card-who {
    font-size: .6rem;
    color: #64748b;
    margin-top: 2px;
}

    .tl-card-who .mdi {
        font-size: 11px;
    }

.tl-card-poste {
    font-size: .6rem;
    color: #64748b;
    margin-top: 2px;
}*/

/* Heure */
/*.tl-card-time {
    font-size: .58rem;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}*/

/* Contenu chargé via partial view */
 .tl-tt-head {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    color: #fff;
}

.tl-tt-ico {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .tl-tt-ico .mdi {
        font-size: 13px;
    }

.tl-tt-label {
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.3;
} 
/* .tl-tt-body { padding: 8px 11px 10px; } */
/*.tl-tt-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #475569;
    margin-top: 4px;
}

    .tl-tt-row .mdi {
        font-size: 12px;
        flex-shrink: 0;
    }

.tl-tt-ref {
    color: #94a3b8;
    font-size: 10.5px;
}*/



.badge-statut {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
}

.badge-actif {
        background: #EAF3DE;
        color: #3B6D11;
    }

.badge-resilie {
    background: #F1EFE8;
    color: #5F5E5A;
}

.badge-ouvert {
    background: #FAEEDA;
    color: #854F0B;
}

.badge-ferme {
    background: #EAF3DE;
    color: #3B6D11;
}

/* Badges canal */
.badge-email {
    background: #E6F1FB;
    color: #185FA5;
}

.badge-tel {
    background: #E1F5EE;
    color: #0F6E56;
}

.badge-courrier {
    background: #EEEDFE;
    color: #3C3489;
}
.tl-aujoudhui,
.tl-aujoudhui .tl-card-name {
    color: #D98B5F;
    display: flex;
    align-items: center;
}

    .tl-aujoudhui svg {
        width: 23px;
        fill: #D98B5F;
    }
.tl-dot svg {
    width: 23px;
}
.timeline {
/*    box-shadow: 0 0 10px 5px #dde5eb;
    box-shadow: 0 1px 5px 0 rgba(84,84,84,0.2),0 2px 2px 0 rgba(84,84,84,0.2),0 3px 1px -2px rgba(84,84,84,0.2);*/
    margin-bottom: 1em;
    background-color: #fff;  
}
.tl-duration-label {
    margin-top: 2em;
    font-size: .5rem;
    color: #6c757d;
    white-space: nowrap;
}
.tl-grp1 {
    background-color: #F7D9BC;
}
.tl-grp2 {
    background-color: #FFEE8C;
}
.tl-grp3 {
    background-color: #DDEAF6;
}
.tl-grp4 {
    background-color: #D8CFC4;
}
.tl-grp5 {
    background-color: #ff7163;
}
.tl-grp6 {
    background-color: #fe8e82;
}