﻿:root{
        --accent: #ffdbcb;
    --line: #ddd;
    --bar: #90817b;
    --bar-height:4px;
    --dot-shadow: 0 0 0 4px rgba(168, 115, 0, 0.18);

}

/* ─────────────────────────────────────────────────────────────
   LC-Select — style neutre (gris)
   ───────────────────────────────────────────────────────────── */

/* ── Base ──────────────────────────────────────────────────── */
.lcs-main {
    display: block;
    position: relative;
    font-family: inherit;
    font-size: 14px;
    color: #1f1f1f;
    box-sizing: border-box;
    outline: none;
    margin: auto;
}

/* ── Wrap ──────────────────────────────────────────────────── */
.lcs-wrap {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    min-height: 36px;
    padding: 2px 8px;
    border: 1.5px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    cursor: text;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}

.lcs-main.full .lcs-wrap{
    cursor: pointer;
}

.lcs-wrap:focus-within,
.picker-open .lcs-wrap {
    border-color: #888;
}

/* ── Input ─────────────────────────────────────────────────── */
.lcs-input{
    padding: 4px 8px;
    min-height: 36px;
    border: 1.5px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
}
.lcs-wrap .lcs-input {
    all: unset;
    flex: 1 0 60px;
    min-width: 60px;
    height: 22px;
    font-size: 14px;
    color: #1f1f1f;
}

.lcs-input::placeholder { color: #aaa; }

.full .lcs-input {
    width: 0; min-width: 0;
    flex: 0 0 0;
    opacity: 0;
    pointer-events: none;
}
.full .lcs-picker{
    flex:0 0 0;
    opacity: 0;
}
/* En mode addable, l'input reste toujours visible même quand full * /
.full.addable .lcs-input {
    flex: 1 1 60px;
    min-width: 60px;
    opacity: 1;
    pointer-events: auto;
    width: auto;
}
*/

/* ── Label plain (select / autocomplete max=1) ─────────────── */
.lcs-result-chip {
    flex: 1;
    color: #1f1f1f;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    align-self: center;
}

/* ── Chips ─────────────────────────────────────────────────── */
.lcs-result { 
    display: block; 
    flex: 0 1 auto; 
    min-width: 0; 
    overflow: auto; 
    white-space: nowrap; 
    margin-bottom: -4px;
    padding-bottom: 4px;
    margin-left: -4px;
    padding-left: 4px
}
.lcs-result::-webkit-scrollbar { height: 2px; margin:6px; background:#FFF;}
.lcs-result::-webkit-scrollbar-track{ 
    background: transparent; 
    box-shadow: none;
    border-radius: 10px;
}
.lcs-result::-webkit-scrollbar-thumb{ background: rgba(0,0,0,.4); }


.lcs-result-chip.tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 4px 2px 9px;
    background: #ebebeb;
    color: #333;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    user-select: none;
    min-width: 80px;
}
.lcs-wrap .lcs-result-chip.tag {
    border: 1px solid rgba(0,0,0,.1);
    min-width: 60px;
    max-width: 200px;
    overflow: hidden;
    margin-right: 5px;
}

.lcs-result-chip .lcs-label {
    flex: 1 1 0;
    min-width: 0;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lcs-result-chip.tag[draggable="true"] { cursor: grab; }


.lcs-result-chip.tag .lcs-result-remove{
    min-width: 22px;
}

.lcs-result-chip.tag .lcs-item,
.lcs-result-chip.tag .lcs-item .label{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lcs-result-chip.tag .lcs-item{
    padding: 0px;
}

/* ── ITEM dans Chips  ───────────────────────────────────────── */
.lcs-result-chip .lcs-item.selected{
    background: none;
}
.lcs-result-chip .lcs-item>.icon{
    width: var(--icon-size,--icon-width,16px);
    height: var(--icon-size,--icon-height,16px);
    object-fit: contain;
}



/* ── Grip (drag handle, mode sortable) ───────────────────── */
.lcs-result-grip {
    display: inline-flex;
    align-items: center;
    opacity: 0.2;
    flex-shrink: 0;
    cursor: grab;
    color: inherit;
    margin-right: 5px;
    line-height: 0;
    transition: opacity 0.15s;
}
.lcs-result-chip.tag:hover .lcs-result-grip { opacity: 0.6; }
.lcs-result-chip.tag[draggable="true"]:active { cursor: grabbing; }

/* ── États drag-and-drop ─────────────────────────────────── */
.lcs-result-chip.tag.drag-ghost {
    opacity: 0.3;
    box-shadow: none;
}
.lcs-result-chip.tag.drag-over-before {
    box-shadow: -3px 0 0 0 #555, 0 0 0 2px rgba(0,0,0,.08);
}
.lcs-result-chip.tag.drag-over-after {
    box-shadow:  3px 0 0 0 #555, 0 0 0 2px rgba(0,0,0,.08);
}

.lcs-main .lcs-item .label,
.lcs-result-chip.tag > span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.lcs-result-remove {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    color: #999;
    transition: background .1s, color .1s;
}

.lcs-result-remove:hover {
    background: #d0d0d0;
    color: #111;
}

/* ── Loading spinner ────────────────────────────────────────── */
.lcs-main.loading {
    pointer-events: none;
}

/* Spinner dans la flèche (mode select) */
.lcs-main.loading .lcs-arrow::after {
    content: '';
    display: block;
    width: 14px;
    height: 14px;
    border: 2px solid #d0d0d0;
    border-top-color: #777;
    border-radius: 50%;
    transform: none;
    animation: lcs-spin 0.6s linear infinite;
}

/* Spinner pour les modes sans flèche (list, tab, etc.) */
.lcs-main.loading:not(:has(.lcs-arrow))::after {
    content: '';
    position: absolute;
    top: calc(50% - 7px);
    right: 8px;
    width: 14px;
    height: 14px;
    border: 2px solid #d0d0d0;
    border-top-color: #777;
    border-radius: 50%;
    animation: lcs-spin 0.6s linear infinite;
}

@keyframes lcs-spin {
    to { transform: rotate(360deg); }
}

/* ── Flèche ────────────────────────────────────────────────── */
.lcs-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    margin-left: auto;
    cursor: pointer;
    color: #aaa;
    transition: color .15s;
}

.lcs-arrow:hover { color: #555; }

.lcs-arrow::after {
    content: '';
    display: block;
    width: 7px; height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s;
}

.picker-open .lcs-arrow::after {
    transform: rotate(-135deg) translateY(-2px);
}

/* ── Picker ────────────────────────────────────────────────── */
.lcs-picker {
    background: #fff;
    border: 1.5px solid #d0d0d0;
    border-radius: 6px;
    overflow-y: auto;
    max-height: 260px;
    z-index: 99;
    padding: 3px;
    box-sizing: border-box;
}

.lcs-picker.picker-above {
    box-shadow: 0 -6px 20px -4px rgba(0,0,0,.12), 0 -2px 6px -2px rgba(0,0,0,.06);
}

/* ── Items ─────────────────────────────────────────────────── */
.lcs-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: var(--item-padding, 7px 11px);
    border-radius: 4px;
    cursor: pointer;
    color: #2a2a2a;
    font-size: 14px;
    user-select: none;
    position: relative;
    z-index: 1;
    transition: background .1s;
}

/*
.lcs-item.active {
    background: #f0f0f0;
}*/

/* En mode list : l'actif reste marqué mais s'atténue quand le composant perd le focus */
/*.lcs-main[type="list"]:not(:focus) .lcs-item.active {
    background: transparent;
    outline: 1px dashed #ccc;
    outline-offset: -1px;
}*/

/* Slider-active : le slider fournit le retour visuel → on supprime le fond .active */
/*.lcs-main[slider] .lcs-item.active {
    background: transparent !important;
}*/
/*.lcs-main[type="list"]:not(:focus)[slider] .lcs-item.active {
    outline: none;
}*/

.lcs-item.selected {
    text-shadow: 0.2px 0 0 ;
    color: #111;
    background: #e9e9e96d;
}

/*
.lcs-item.selected.active {
    background: #e8e8e8;
}
*/

.lcs-item.isNew {
    color: #555;
    font-style: italic;
}

.lcs-item.isNew::before {
    content: '+ ';
    font-style: normal;
    font-weight: 700;
}

/* ── Description (sous le label, style plus fin) ────────────── */
.lcs-item > .text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    min-width: 0;
    flex: 1 1 auto;
}

.lcs-item > .text > .label {
    line-height: 1.25;
}

.lcs-item .description {
    font-size: 12px;
    font-weight: 400;
    color: #999;
    line-height: 1.3;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lcs-item.selected .description {
    color: #777;
}

/* ── Champ "autre" (isOther) ────────────────────────────────── */
/* L'item passe en flex-wrap pour que le champ se place en pleine largeur sous le label */
.lcs-main .lcs-item.selected.isOther {
    flex-direction: row;
}
.lcs-main.grid .lcs-item.selected.isOther {

}

.lcs-item > .other {
    display: none;
    flex: 1 1 100%;
    width: 100%;
    margin-top: 6px;
    box-sizing: border-box;
}

.lcs-item.selected > .other {
    display: block;
}

/* Le champ est masqué tant que l'item n'est pas sélectionné : on neutralise le tabindex */
.lcs-item:not(.selected) > .other {
    visibility: hidden;
    height: 0;
    margin: 0;
}

.lcs-item > input.other,
.lcs-item > textarea.other,
.lcs-item > select.other,
.lcs-item > .other input,
.lcs-item > .other textarea,
.lcs-item > .other select {
    width: 100%;
    padding: 6px 9px;
    font-size: 13px;
    color: #1f1f1f;
    border: 1.5px solid #d0d0d0;
    border-radius: 5px;
    background: #fff;
    box-sizing: border-box;
    outline: none;
    transition: border-color .15s;
}

.lcs-item > input.other:focus,
.lcs-item > textarea.other:focus,
.lcs-item > .other input:focus,
.lcs-item > .other textarea:focus {
    border-color: #888;
}

/* "autre" en liste/arbre : le champ remplace le libellé et reste visible en continu,
   accompagné d'une croix de désélection (visible quand l'item est sélectionné). */
.lcs-item.other-inline{
    flex-wrap: nowrap;
}
.lcs-item.other-inline.selected > .label,
.lcs-item.other-inline.selected > .text{
    display: none;
}
.lcs-item.other-inline.selected > .other{
    display: block;
    visibility: visible;
    height: auto;
    margin: 0;
    flex: 1 1 auto;
    width: auto;
}
.lcs-item.other-inline > .other-remove{
    display: none;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    flex: 0 0 auto;
    border-radius: 50%;
    cursor: pointer;
    color: #999;
    transition: background .1s, color .1s;
}
.lcs-item.other-inline.selected > .other-remove{ display: inline-flex; }
.lcs-item.other-inline > .other-remove:hover{ background: #d0d0d0; color: #111; }

/* "autre" dans un picker (select/autocomplete) : la saisie est rendue dans le chip
   de résultat, sous forme d'un petit champ inline sans bordure. */
.lcs-result-chip .other.lcs-result-other-input{
    all: unset;
    flex: 1 1 auto;
    min-width: 70px;
    font-size: 12.5px;
    color: #1f1f1f;
    cursor: text;
}
.lcs-result-chip .other.lcs-result-other-input::placeholder{ color: #aaa; }

/* Valeur saisie rappelée dans le chip de résultat */
.lcs-result-other-value {
    margin-left: 4px;
    opacity: .7;
    font-style: italic;
}
.lcs-result-other-value::before {
    content: "« ";
}
.lcs-result-other-value::after {
    content: " »";
}

/* ── Mode isOther + addable ──────────────────────────────────────────────
   L'item n'est jamais sélectionnable : toujours visible avec label + input + bouton. */

.lcs-item.isOther-addable {
    cursor: default;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    border-top: 1px solid #f0f0f0;
    margin-top: 2px;
    padding-top: 8px;
}

/* Aucun retour visuel de survol / sélection */
.lcs-item.isOther-addable:hover,
.lcs-item.isOther-addable.selected {
    background: transparent !important;
    text-shadow: none !important;
}

/* Le champ est TOUJOURS affiché (annule les règles display/visibility des isOther classiques) */
.lcs-item.isOther-addable > .other {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    margin: 0 !important;
    flex: 1 1 auto;
    width: auto;
}

/* Champ compact en ligne */
.lcs-item.isOther-addable > input.other,
.lcs-item.isOther-addable > textarea.other,
.lcs-item.isOther-addable > .other input,
.lcs-item.isOther-addable > .other textarea {
    padding: 4px 8px;
    font-size: 13px;
    width: 100%;
}

/* Bouton valider (✓) */
.lcs-item.isOther-addable > .other-add {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    height: 28px;
    border: 1.5px solid #d0d0d0;
    border-radius: 5px;
    background: #fff;
    color: #555;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    transition: background .12s, border-color .12s, color .12s;
}
.lcs-item.isOther-addable > .other-add:hover {
    background: #2d7ff9;
    border-color: #2d7ff9;
    color: #fff;
}
.lcs-item.isOther-addable > .other-add:active {
    background: #1a6fef;
    border-color: #1a6fef;
    color: #fff;
}

/* Mode grid : colonne, input + bouton pleine largeur */
.lcs-main.grid .lcs-item.isOther-addable {
    flex-direction: column;
    padding: 8px;
    gap: 6px;
    justify-content: flex-start;
    align-items: stretch;
    border-top: none;
    margin-top: 0;
    padding-top: 8px;
}
.lcs-main.grid .lcs-item.isOther-addable > .label {
    text-align: center;
    margin: 0;
    padding: 2px 0;
    min-height: 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: #999;
    border-radius: 0;
}
.lcs-main.grid .lcs-item.isOther-addable > .other {
    flex: 0 0 auto;
    width: 100%;
}
.lcs-main.grid .lcs-item.isOther-addable > .other-add {
    width: 100%;
    justify-content: center;
    height: 26px;
    font-size: 11px;
}

/* Pas de pseudo-élément checkSel sur les items isOther-addable */
.lcs-main.checkSel .lcs-item.isOther-addable::after {
    display: none;
}



/* ── Barre d'ajout persistante au niveau du LC_Select (mode list + addable) ─ */
.lcs-addable {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
}
.lcs-addable .lcs-addable-input {
    flex: 1 1 0;
    min-width: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 14px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.lcs-addable .lcs-addable-input:focus {
    border-color: #2d7ff9;
    box-shadow: 0 0 0 3px rgba(45,127,249,.15);
}
.lcs-addable .lcs-addable-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    border: none;
    background: #2d7ff9;
    color: #fff;
    cursor: pointer;
    transition: background .15s;
}
.lcs-addable .lcs-addable-btn:hover { background: #1a6ee0; }

/* ── type:searchList — liste toujours visible sous la barre de recherche ──── */
/* Le conteneur de la liste complète (tous les items, sélectionnés ou non) */
.lcs-list {
    border: 1.5px solid #d0d0d0;
    border-top: none;          /* accolé au wrap */
    border-radius: 0 0 6px 6px;
    overflow-y: auto;
    max-height: 280px;
    box-sizing: border-box;
    background: #fff;
}
/* Wrap arrondi seulement en haut quand _listEl est présent (classe posée par JS) */
.lcs-main.searchlist .lcs-wrap {
    border-radius: 6px 6px 0 0;
}

/* ── Bouton de suppression d'item (option removable) ─────────────────────── */
.lcs-item > .item-remove {
    flex: 0 0 auto;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    cursor: pointer;
    color: #888;
    background: #f0f0f0;
    border: 1px solid #ddd;
    transition: background .15s, color .15s, border-color .15s;
    flex-shrink: 0;
}
.lcs-item > .item-remove:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
}
/* En grid, le bouton se positionne en haut à droite de la carte */

.lcs-main.grid .lcs-item > .item-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    margin-left: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Sous-sélections imbriquées (arbre) — branches, compteur, flèche, modes
   ═══════════════════════════════════════════════════════════════════════════ */

/* Item branche : DOM = deux enfants directs → l'en-tête (.head) et le sous-select (.branch).
   On empile ces deux blocs et on déplace le padding/gap sur .head pour que le fond .selected
   / le slider n'englobe pas la sous-liste. */
.lcs-item.isBranch {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
}

/* En-tête d'une branche : reprend le layout d'un item plat (flex row, padding, cursor…).
   Elle contient : grip, flèche, icône, label/texte, description, compteur, bouton remove. */
.lcs-item.isBranch > .head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border-radius: 4px;
    cursor: pointer;
    color: inherit;
    font-size: inherit;
    user-select: none;
    min-width: 0;
    transition: background .1s;
}

/* Chaque élément d'en-tête garde sa taille naturelle et ne se replie pas… */
.lcs-item.isBranch > .head > .lcs-item-grip,
.lcs-item.isBranch > .head > .branch-arrow,
.lcs-item.isBranch > .head > .icon,
.lcs-item.isBranch > .head > .count,
.lcs-item.isBranch > .head > .item-remove {
    flex: 0 0 auto;
}
/* …sauf le libellé qui absorbe l'espace restant (et se tronque au lieu de wrapper) */
.lcs-item.isBranch > .head > .label,
.lcs-item.isBranch > .head > .text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}
/* Le conteneur du sous-select occupe toute la largeur, sous l'en-tête */
.lcs-item.isBranch > .branch {
    width: 100%;
}

/* Flèche / chevron : pivote au dépliage.
   La flèche vit dans .head — on couvre les deux placements possibles (compat.) */
.lcs-item > .branch-arrow,
.lcs-item > .head > .branch-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-right: 6px;
    color: #999;
    transition: transform .2s ease;
}
.lcs-item.open > .branch-arrow,
.lcs-item.open > .head > .branch-arrow {
    transform: rotate(90deg);
}

/* Badge compteur (nombre de feuilles sélectionnées) */
.lcs-item > .count,
.lcs-item > .head > .count {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    border-radius: 9px;
    background: #e6e6e6;
    color: #666;
    transition: background .15s ease, color .15s ease;
}
.lcs-item.has-selection > .count,
.lcs-item.has-selection > .head > .count {
    background: var(--lc-primary, #2d7ff9);
    color: #fff;
}

/* Conteneur du sous-select : animation d'ouverture (grid-template-rows: 0fr -> 1fr) */
.lcs-item > .branch {
    flex: 1 1 100%;
    width: 100%;
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows .25s ease, opacity .2s ease, margin .2s ease;
    overflow: hidden;
}
.lcs-item.open > .branch {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 2px;
}
/* Replié : on neutralise tout résidu visuel (hauteur, marges, interactions) */
.lcs-item:not(.open) > .branch {
    margin: 0;
    pointer-events: none;
}
.lcs-item > .branch > * {
    min-height: 0;
    overflow: hidden;
}

/* Le sous-select est aligné à gauche (indenté via margin-left), sans cadre ni fond */
.lcs-item > .branch > .lcs-main,
.lcs-item > .branch > .lcs-main[type="list"] {
    margin: 0 0 0 16px;
    padding: 1px 0;
    border: none;
    border-left: 1px solid #ececec;
    border-radius: 0;
    background: transparent;
}


/* Mode "visible" : la branche est un groupe figé, son en-tête sert de titre de catégorie */
.lcs-item.group{
    cursor: default;
}
.lcs-item.group > .branch-arrow,
.lcs-item.group > .count,
.lcs-item.group > .head > .branch-arrow,
.lcs-item.group > .head > .count{
    display: none;
}
.lcs-item.group > .label,
.lcs-item.group > .text > .label,
.lcs-item.group > .head > .label,
.lcs-item.group > .head > .text > .label{
    font-size: 11px;
    font-weight: 600;
    color: #9a9a9a;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ── Mode page (drill-down) ── */
.nesting-page .lcs-item.page-hidden {
    display: none !important;
}
/* En mode page, l'item ouvert occupe tout l'espace et masque l'animation de hauteur */
.nesting-page .lcs-item.open > .branch {
    grid-template-rows: 1fr;
}

/* En mode page, la flèche et le compteur de l'item ouvert sont superflus */
.nesting-page .lcs-item.open > .branch-arrow,
.nesting-page .lcs-item.open > .head > .branch-arrow{
    /*display: none;*/
    transform: rotate(180deg) scale(1.1);
    border:1px solid #ccc;
    border-radius: 50%;
    padding: 4px;
}
.nesting-page .lcs-item.open > .branch > .lcs-main {
    margin-left: 0;
    border-left: none;
    padding-left: 0;
}
.lcs-main[nesting="page"] .lcs-item.isBranch::after{
    display:none;
}

.lcs-item[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.lcs-item>.icon ,
.lcs-item > .head > .icon{
    width: var(--icon-size, 45px);
}

/* ── Drag & drop d'items entre listes (sortable / arborescence) ───────────── */
/* Poignée de déplacement (n'apparaît que sur les items de listes triables) */
.lcs-item-grip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-right: 2px;
    color: inherit;
    opacity: 0.25;
    cursor: grab;
    line-height: 0;
    transition: opacity 0.15s;
}
.lcs-item:hover > .lcs-item-grip { opacity: 0.55; }
.lcs-item-grip:active { cursor: grabbing; }

/* Item en cours de déplacement */
.lcs-item.drag-ghost { opacity: 0.4; }

/* Indicateurs de dépôt : avant (haut) / après (bas) / dans une branche */
.lcs-item.drag-over-before { box-shadow: inset 0 2px 0 0 var(--lc-primary, #2d7ff9); }
.lcs-item.drag-over-after  { box-shadow: inset 0 -2px 0 0 var(--lc-primary, #2d7ff9); }
.lcs-item.drag-into {
    background: #eaf2ff;
    box-shadow: inset 0 0 0 2px var(--lc-primary, #2d7ff9);
}

/* ── Slider ────────────────────────────────────────────────── */
.lcs-slider {
    position: absolute;
    left: 3px;
    right: 3px;
    pointer-events: none;
    background: #f1f1f1;
    border-radius: 4px;
    z-index: 0;
    opacity: 1;
    transition:
        all   0.4s cubic-bezier(.4,0,.2,1),
        opacity .15s;
}
.lcs-main:not(:hover):not(.focus) .lcs-slider {
    background: linear-gradient(35deg, #f9f9f92c, #f9f9f92c);
    border-radius: 4px;
    border: 1px dashed #eeeeee90;

}

/* ── Focus visible (list / tab) ────────────────────────────── */
.lcs-main[type="list"].focus,
.lcs-main[type="tab"].focus {
    box-shadow:0 0px 1px 1px rgba(0, 0, 0, 0.3);
    outline: 1px solid #aaa;
    border-radius: 6px;
}



/* ── Type : list ───────────────────────────────────────────── */
.lcs-main[type="list"] {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 3px;
    border: 1.5px solid #d8d8d8;
    border-radius: 6px;
    background: #fff;
    position: relative;
}



/* ── Disabled state ────────────────────────────────────────── */
.lcs-main[disabled] .lcs-slider,
.lcs-main[disabled] .lcs-slider.active,
.lcs-main[disabled][type="tab"] .lcs-slider, 
.lcs-main[disabled][type="tab"]:not(.focus) .lcs-slider,
.lcs-main[disabled]{
    background:#f4f4f4; color:#555; filter:grayscale(0.5);  cursor:not-allowed;
}





/* NoSlider */
.lcs-main.noSlider .lcs-slider,
.lcs-picker.noSlider .lcs-slider {
    display:none;
}

.lcs-main.noSlider .lcs-item.active {
    background: #f0f0f0;
}



/* ── Type : tab ────────────────────────────────────────────── */
.lcs-main[type="tab"] {
    display: inline-flex;
    flex-direction: row;
    border-radius: 8px;
    padding: 3px;
    position: relative;
    background:linear-gradient(-3deg, #BBB, 5%, #FEFEFE, 40%, #FFF);
}

.lcs-main[type="tab"] .lcs-item {
    flex: 1;
    justify-content: center;
    padding: var(--item-padding, 6px 16px);
    border-radius: 5px;
    font-weight: 500;
    color: #222;
    background: transparent;
    transition: color .15s;
}


.lcs-main[type="tab"].focus .lcs-item.active {
    color: #111;
    text-shadow: 0.2px 0 0 #111;
}

.lcs-main[type="tab"] .lcs-slider,
.lcs-main[type="tab"]:not(.focus) .lcs-slider {
    margin-left: -0.8px;
    margin-top: -0.8px;
    padding: 0;
    box-sizing: content-box;
    background: #FFF;
    border: none;
    box-shadow: inset 1px 1px 3px 0px rgba(50, 50, 50, .5), 0px 0px 10px -5px, 0px 0px 0 1px #999;
}



/* TAB Vertical */

    .lcs-main[type="tab"].vertical {
        display:flex;
        flex-direction: column;
        justify-content: start;
        align-items: start;
        display: block;
    }

    .lcs-picker[type="tab"].vertical .lcs-item{
        justify-content:start;
    }

    .lcs-picker[type="tab"].vertical.center .lcs-item{
        justify-content:center;
    }


/* GRID */

/*.lcs-main.grid[type="list"],
.lcs-picker.grid:not{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}*/

.lcs-main.grid:not(.searchlist),
.lcs-main.grid.searchlist .lcs-list,
.lcs-main.grid .lcs-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding:5px;
    justify-content: stretch;
}

.lcs-main.grid:not(.searchlist) .lcs-item,
.lcs-main.grid.searchlist .lcs-list .lcs-item {
    display:flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
}
.lcs-main.grid:not(.searchlist) .lcs-item .icon,
.lcs-main.grid.searchlist .lcs-list .lcs-item .icon {
    height: 32px;
    object-fit: contain;
}



.lcs-main.grid:not([max="1"]){
    border: none;
    outline: none;    
}

.lcs-main.grid .lcs-item{

}






.lcs-main.grid:not(.searchlist) .lcs-item .icon,
.lcs-main.grid.searchlist .lcs-list .lcs-item .icon {
    height: 50px;
    padding: 5px 10px;
    padding-top: 10px;
    background-size: 20px;
    flex: auto;
    position: relative;
    transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.2s, opacity 0.2s;
    opacity: 0.85;
}
.lcs-main.grid:not(.searchlist) .lcs-item:hover,
.lcs-main.grid.searchlist .lcs-list .lcs-item:hover .icon {
    border-color: #dfdedc;
    color: #333;
    opacity: 1;
    box-shadow: 0 2px 8px -2px #c7c7c7;
}

.lcs-main.grid:not(.searchlist) .lcs-item,
.lcs-main.grid.searchlist .lcs-list .lcs-item {
    flex-direction: column;
    gap: 4px;
    padding: 0px;
    box-shadow: 1px 1px 1px -1px #666;
    border-radius: 4px;
    background-size: 20px;
    flex: auto;
    position: relative;
}
.lcs-main.grid:not([max="1"]) .lcs-item{
    border: 1.5px solid #BBB;
}



.lcs-main.green:not([max="1"]) .lcs-item.selected{
    background: #e0f7e9;
    border-color: #2ecc71;
    color: #217a4a;
    box-shadow: 0 0 0 2px #b2f2d7;
    
}

.lcs-main.green[max="1"] .lcs-slider{
    background: #e0f7e9;
    border-color: #2ecc71;
    color: #217a4a;
    box-shadow: 0 0 0 2px #b2f2d7;    
}



.lcs-main.checkSel:not(.grid) .lcs-item{
    padding-left: 22px;
}

.lcs-main.checkSel .lcs-item::after {
    content: " ";
    position: absolute;
    top: 8px;
    left: 12px;
    width: 15px;
    height: 15px;
    line-height: 12px;
    background: #fff;
    font-size: 1.2em;
    border-radius: 50%;
}


.lcs-main.checkSel .lcs-item.selected::after {
    content: "✔";
    text-align: center;
    color: #0f0f0f;
    box-shadow: 0 1px 3px #c2c2c2;

}

.lcs-main.checkSel.green .lcs-item.selected::after {
    color: #2ecc71;
    box-shadow: 0 1px 3px #b2f2d7;
}

.lcs-main.grid .lcs-item .label{
    flex:1;
    font-size: 0.9rem;
    min-height: 1.6rem;
    width: 100%;
    text-align: center;
    margin-top:5px;
    padding: 8px;
    border-radius: 0 0 3px 3px;
}

.lcs-main.grid .lcs-item.selected>.label{
    text-shadow:0.4px 0px 0px rgba(34, 34, 34, 1);
}











/* Style formTab */
.formTab[type="tab"],
.formTab[type="tab"].focus {
    display:flex;
    flex-direction: row;
    justify-content: center;
    font-size: 1rem;
    letter-spacing: 0.15em;
    position: relative;
    box-shadow: inset -1px -1px 2px #666;
    padding: 10px 50px;
    margin: -20px -50px;
    margin-bottom: 20px;
    background: #f7f3f3;
    border-radius: 2px;
    gap: 20px;
    overflow: visible;
    border: none;
    outline:none;
}

.formTab[type="tab"].focus{
    box-shadow: inset -1px -1px 2px #222;   
}


.formTab[type="tab"]>*,
.formTab[type="tab"] .lcs-item{
    flex:0 0 auto;
    padding: 8px 10px;
    cursor: pointer;
    z-index: 2;
    color: #848484ec;
    font-weight: 450;
    font-size: 1rem;
    letter-spacing: 0.15em;
}
.formTab[type="tab"].focus .lcs-item.active{
    color: #313131ec;
    text-shadow: 0.01rem 0.01rem 0px;
}
.formTab[type="tab"].focus .lcs-item.selected,
.formTab[type="tab"] .lcs-item.selected {
    text-shadow: 0.02rem 0.02rem 0px;
    color: rgb(90, 32, 32);
}



.formTab[type="tab"] .lcs-slider {
    all:unset;
    position: absolute;
    transition: all 0.3s ease;
}
.formTab[type="tab"] .lcs-slider::after {
    content: '';
    display: block;
    position: absolute;
    border-radius: 10px 10px 0px 0px;
    margin: 0 auto;
    
    height: calc(100% + 15px);
    background-color: rgb(255, 255, 255);
    box-shadow: inset 1px 2px 2px #888;
    bottom: -11.2px;
    left: -2%;
    right: -2%;

}


/* ─────────────────────────────────────────────────────────────
   Stepper  —  N points reliés par une barre fine.
   Le slider (pastille) marque l'étape courante et se rétracte
   dans la barre pendant la transition (effet géré en JS).
   Usage :  <lc-select type="list" min="1" max="1" class="stepper"> … </lc-select>
   ───────────────────────────────────────────────────────────── */
.lcs-main.stepper {
    --dot: 25px;          /* diamètre des points        */
    --border: 4px;        /* épaisseur du contour       */
    
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 120px;
    margin: 50px 30px;
    padding: 0;
    padding-right: 22px;
    border: none;
    background: transparent;
    overflow: visible;
}

/* La barre fine qui relie les points (de centre à centre) */
.lcs-main.stepper::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 15px;
    right: 22px;
    height: var(--bar-height);
    transform: translateY(-50%);
    background: var(--bar);
    border-radius: var(--bar-height);
    box-shadow:inset 1px 1px 2px rgba(0,0,0,.85);
    z-index: 0;
}

/* Les points */
.lcs-main.stepper .lcs-item {
    flex: 0 0 auto;
    width: var(--dot);
    height: var(--dot);
    min-width: var(--dot);
    padding: 0;
    gap: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.5), inset 0 0 0 var(--bar-height) var(--bar);
    border: var(--border) rgba(0,0,0,0) solid;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    transition: border-color .25s;
}
.lcs-main.stepper .lcs-item:hover { border-color: #b3b3b3; }



/* Le slider = pastille mobile qui marque l'étape courante */
.lcs-main.stepper .lcs-slider,
.lcs-main.stepper:not(:hover):not(.focus) .lcs-slider {
    right: auto;
    background: var(--accent);
    border: none;
    border-radius: 50%;
    box-shadow: var(--dot-shadow);
    transform-origin: center center;
    transform:scale(0.6);
    z-index: 2;
}

/* Labels : présents sur certains points seulement, placés en oblique */
.lcs-main.stepper .lbl {
    position: absolute;
    left: 50%;
    white-space: nowrap;
    font-size: 12px;
    color: #666;
    pointer-events: none;
}
.lcs-main.stepper .lcs-item.selected .lbl {
    color: var(--accent);
    font-weight: 600;
}
.lcs-main.stepper .lbl.up {
    bottom: 100%;
    margin-bottom: 6px;
    transform-origin: left bottom;
    transform: translateX(-2px) rotate(-32deg);
}
.lcs-main.stepper .lbl.down {
    top: 100%;
    margin-top: 6px;
    transform-origin: left top;
    transform: translateX(-2px) rotate(32deg);
}


/* ─────────────────────────────────────────────────────────────
   Rating  —  notation type "étoiles".
   max=1 (la valeur reste simple) + selectAllBefore : les items
   situés avant l'item choisi reçoivent la classe .before et sont
   donc remplis eux aussi (style uniquement).
   Usage :  <lc-select type="list" max="1" selectAllBefore class="rating"> … </lc-select>
   ───────────────────────────────────────────────────────────── */
.lcs-main.rating {
    --size: 30px;
    --on: #f5b301;
    --off: #d8d8d8;

    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: none;
    background: transparent;
}

/* Pas de slider en mode notation : le remplissage suffit */
.lcs-main.rating .lcs-slider { display: none; }

.lcs-main.rating .lcs-item {
    padding: 0 2px;
    background: none;
    border: none;
    border-radius: 0;
    font-size: var(--size);
    line-height: 1;
    color: var(--off);
    text-shadow: none;
    transition: color .12s, transform .12s;
}
.lcs-main.rating .lcs-item:hover { transform: scale(1.18); }

/* Item choisi + tous ceux situés avant (selectAllBefore) → remplis */
.lcs-main.rating .lcs-item.selected,
.lcs-main.rating .lcs-item.before {
    color: var(--on);
}


/* ─────────────────────────────────────────────────────────────
   Mobile — picker plein écran avec backdrop
   Activé en JS (option mobileFullscreen) pour les pickers flottants
   (type select / autocomplete) en dessous de mobileBreakpoint.
   ───────────────────────────────────────────────────────────── */

/* Backdrop assombrissant derrière l'overlay plein écran */
.lcs-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 9998;
    opacity: 0;
    transition: opacity .2s ease;
    -webkit-tap-highlight-color: transparent;
}
.lcs-backdrop.show { opacity: 1; }

/* Bloque le scroll de la page sous l'overlay plein écran */
html.lcs-no-scroll { overflow: hidden !important; }

/* Conteneur plein écran : en-tête (saisie) + picker (liste) */
.lcs-fs-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    background: #fff;
    transform: translateY(14px);
    opacity: 0;
    transition: transform .22s cubic-bezier(.4, 0, .2, 1), opacity .2s ease;
}
.lcs-fs-overlay.show {
    transform: translateY(0);
    opacity: 1;
}

/* En-tête fixe : zone de saisie + bouton fermer */
.lcs-fs-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 10px;
    background: #fff;
    border-bottom: 1px solid var(--line, #ddd);
    box-shadow: 0 2px 6px -3px rgba(0, 0, 0, .25);
}
.lcs-fs-header .lcs-wrap {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.lcs-fs-close {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #555;
    cursor: pointer;
    transition: background .12s, color .12s;
}
.lcs-fs-close:hover,
.lcs-fs-close:active { background: #eee; color: #111; }

/* Picker (liste) en plein écran : occupe l'espace restant et défile */
.lcs-picker.picker-fullscreen {
    position: relative; /* relative = bloc contenant du slider ; static brisait le positionnement absolu du slider */
    flex: 1 1 auto;
    width: 100% !important;
    min-width: 0 !important;
    max-height: none !important;
    height: auto !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0 calc(env(safe-area-inset-bottom, 0px) + 8px);
}

/* Items plus larges (cible tactile) dans le picker plein écran */
.lcs-picker.picker-fullscreen .lcs-item {
    padding: 14px 18px;
    font-size: 16px;
    border-radius: 0;
}

/* Le slider reste cohérent dans le picker plein écran */
.lcs-picker.picker-fullscreen .lcs-slider { border-radius: 0; }


/* ─────────────────────────────────────────────────────────────
   Fil d'ariane — mode page + option breadcrumb
   ───────────────────────────────────────────────────────────── */

.lcs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    border-bottom: 1px solid #e4e4e4;
    border-radius: 4px 4px 0 0;
    flex-shrink: 0;
    min-height: 34px;
    font-size: 13px;
    box-sizing: border-box;
    overflow: hidden;
    max-height:50px;
    transition: 0.5s all ease;
    opacity:1;
}

.lcs-breadcrumb.empty{
    min-height:0;
    max-height:0;
    opacity:0;
    padding:0;
}


/* Boutons ← et ⌂ */
.lcs-breadcrumb-back {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 5px;
    cursor: pointer;
    color: #555;
    background: transparent;
    transition: background .12s, color .12s;
    flex-shrink: 0;
    box-sizing: border-box;
}
.lcs-breadcrumb-back:hover:not(:disabled) {
    background: #e4e4e4;
    color: #111;
}
.lcs-breadcrumb-back:disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}
/* Le bouton ⌂ est séparé visuellement du chemin */
.lcs-breadcrumb .bc-home {
    margin-right: 6px;
    padding-right: 8px;
    border-right: 1px solid #ddd;
    border-radius: 0 5px 5px 0;
    width: 34px;
}
.lcs-breadcrumb .bc-back {
    border-radius: 5px 0 0 5px;
}

/* Items cliquables du chemin */
.lcs-breadcrumb-item {
    cursor: pointer;
    color: #555;
    padding: 2px 5px;
    border-radius: 3px;
    transition: background .1s, color .1s;
    white-space: nowrap;
    user-select: none;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
}
.lcs-breadcrumb-item:not(.active):hover {
    background: #e4e4e4;
    color: #111;
}
.lcs-breadcrumb-item.active {
    color: #1a1a1a;
    font-weight: 600;
    cursor: default;
}

/* Séparateur › */
.lcs-breadcrumb-sep {
    color: #bbb;
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
    user-select: none;
    margin: 0 1px;
}

/* En mode breadcrumb, masque le head des branches ouvertes
   (le fil d'ariane les représente visuellement) */
.lcs-main.has-breadcrumb .lcs-item.isBranch.open > .head {
    display: none;
}
/* Supprime tout décalage résiduel quand le head est masqué */
.lcs-main.has-breadcrumb .lcs-item.isBranch.open > .branch {
    margin-top: 0;
}
/* Le sous-select occupe toute la largeur sans indentation */
.lcs-main.has-breadcrumb .lcs-item.isBranch.open > .branch > .lcs-main {
    margin-left: 0;
    border-left: none;
}
















