/* ========== GridEditor ========== */
.ge-wrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ge-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.ge-label {
    font-size: 11px;
    font-weight: 600;
    color: #000;
   /* text-transform: uppercase; */
    letter-spacing: 0.05em;
}

.ge-btn-add {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.15s;
}

.ge-btn-add:hover { background: #b91c1c; }

.ge-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.ge-table thead th {
    padding: 6px 6px;
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    color: #9ca3af;
     /* text-transform: uppercase; */
    letter-spacing: 0.04em;
    border-bottom: 1px solid #f3f4f6;
    background: #fafafa;
}

.ge-table tbody tr {
    border-bottom: 1px solid #f9fafb;
    transition: background 0.1s;
}

.ge-table tbody tr:hover { background: #fef9f9; }
.ge-table tbody tr.expanded { background: #fff5f5; }



.ge-table td {
    padding: 4px 6px;
    color: #374151;
    vertical-align: middle;
}

.ge-table td.id-col {
    color: #9ca3af;
    font-size: 11px;
}


.ge-actions {
    display: flex;
    gap: 3px;
    justify-content: flex-end;
}

.ge-action-btn {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.15s;
}

.ge-action-btn.save   { background: #f0fdf4; color: #16a34a; }
.ge-action-btn.save:hover { background: #16a34a; color: #fff; }
.ge-action-btn.delete { background: #f9e8e7; color: #dc2626; }
.ge-action-btn.delete:hover { background: #dc2626; color: #fff; }
.ge-action-btn.expand { background: #f3f4f6; color: #6b7280; }
.ge-action-btn.expand:hover { background: #e5e7eb;  }
.ge-action-btn.expand.open  { background: #e5e7eb;  }



/* Sous-grille */
.ge-detail-row td { padding: 0; }

.ge-detail-inner {
    margin: 2px 3px 8px 3px;
    padding: 10px 10px 10px 9px;
    border-left: 1px solid #dc2626;
    border-radius: 0 6px 6px 0;
    background: #fafafa;
    background: #fffafa;


    box-shadow: inset 0 1px 4px rgba(0,0,0,0.04);
}
.ge-detail-inner .ge-table thead th {
    background: #f8f1f1;
}
.ge-detail-inner .ge-table tbody td {
    padding: 1px 5px;
}

.ge-table.sub thead th { background: transparent; }
.ge-action-btn.edit   { background: #f9e8e7; color: #dc2626; }
.ge-action-btn.edit:hover { background: #dc2626; color: #fff; }
.ge-action-btn.cancel { background: #f3f4f6; color: #6b7280; }
.ge-action-btn.cancel:hover { background: #6b7280; color: #fff; }

.ge-actions {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.ge-table tbody tr:hover .ge-actions,
.ge-table tbody tr.expanded .ge-actions {
    opacity: 1;
}

/* Garder visible en mode edition */
.ge-table tbody tr .ge-actions:has(.ge-action-btn.save) {
    opacity: 1;
}

.ge-btn-add {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: none;
    color: #d9d9d9;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.15s;
}

.ge-btn-add:hover {
    color: #dc2626;
    border-color: #dc2626;
    background: #fff5f5;
}
.ge-cell-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid #dc2626;
    border-radius: 0;
    padding: 0;
    margin: 0;
    font-size: 11px;
    font-family: inherit;
    color: #374151;
    background: transparent;
    outline: none;
    height: auto;
    line-height: inherit;
    box-shadow: none;
}

.ge-cell-input:focus {
    border-bottom-color: #dc2626;
    background: transparent;
    box-shadow: none;
}

select.ge-cell-input
{
    appearance: auto;
    padding: 0;
}
.ge-empty {
    font-size: 11px;
    color: #9ca3af;
    font-style: italic;
    padding: 8px 4px;
}

.ge-sort-handle {
    cursor: grab;
    color: #dadce0;
    font-size: 11px;
    padding: 0 4px;
    width: 16px;
}

.ge-sort-handle:active { cursor: grabbing; }

.ge-sort-handle i {
    opacity: 0;
color: #a4a6a8;
    transition: opacity 0.15s ease;
}

.ge-table tbody tr:hover .ge-sort-handle i {
    color: #db2626;
    opacity: 0.7;
}
.ge-detail-inner .autocomplete-list,
.ge-wrap .autocomplete-list {
    max-height: 200px;
    overflow-y: auto;
    min-width: 250px;
    width: auto;
    z-index: 9999;
    position: absolute;
}

.ge-wrap .autocomplete-wrapper {
    position: relative;
}
.ge-wrap .autocomplete-list {
    right: 0;
    left: auto;
}
/* Placeholder des inputs normaux */
.ge-cell-input::placeholder {
    color: #d1d5db !important;
    font-style: italic;
    font-size: 11px;
}

/* Placeholder du champ autocomplete */
.ge-input-wrap input::placeholder {
    color: #d1d5db;
    font-style: italic;
    font-size: 11px;
}
.autocomplete-preview {
    display: inline;
    cursor: pointer;
}

/* selon couleur du bandeau header *******************************/
.modal-header.BKG_champ + .modal-body .ge-table tbody tr:hover,
.modal-header.BKG_champ + .modal-body .ge-table tbody tr.expanded,
.modal-header.BKG_champ + .modal-body .ge-action-btn.expand:hover,
.modal-header.BKG_champ + .modal-body .ge-action-btn.expand.open
{
    background: #fdfbf8;
    background: #f5f4f266;
}
.modal-header.BKG_champ + .modal-body .ge-detail-inner .ge-table thead th,
.modal-header.BKG_champ + .modal-body .ge-table thead th
{
    background: #fcf7f1;
    background: #F5F4F2D8;
}
.modal-header.BKG_champ + .modal-body .ge-detail-inner
{
    background: #FCF7F177;
    background: #f5f4f266;
}

.modal-header.BKG_champ2 + .modal-body .ge-table tbody tr:hover,
.modal-header.BKG_champ2 + .modal-body .ge-table tbody tr.expanded,
.modal-header.BKG_champ2 + .modal-body .ge-action-btn.expand:hover,
.modal-header.BKG_champ2 + .modal-body .ge-action-btn.expand.open
{
    background: #f5f4f266;
}
.modal-header.BKG_champ2 + .modal-body .ge-detail-inner .ge-table thead th,
.modal-header.BKG_champ2 + .modal-body .ge-table thead th
{
    background: #F5F4F2D8;
}
.modal-header.BKG_champ2 + .modal-body .ge-detail-inner
{
    background: #f5f4f266;
}