.table-grid {
    font-size: 0.8em;
    max-height: 70dvh;
    overflow-y: scroll;
    max-width: 95%;
    margin-left: 40px;
    background-color: white;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: auto;
    border: 1px solid #2771B5;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    font-family: "Verdana", sans-serif !important;
    font-size: 14px;
}

.table-grid table {
    width: 100%;
}

.table-grid thead {
    background: #2771B5;
    color: white;
    font-weight: bold;
}

.table-grid thead th {
    padding: 5px 5px;
    border-right: 1px solid #A6D9FB;
    border-bottom: 1px solid #A6D9FB;
    position: sticky;
    top: 0;
    z-index: 10;
    background: #2771B5;
    color: #ffffff;
    text-shadow: 1px 1px 2px navy;
    font-size: 0.80em;
}

.table-grid thead th:first-child {
    border-top-left-radius: 8px;
}

.table-grid thead th:last-child {
    border-top-right-radius: 8px;
    border-right: none;
}

.table-grid thead th::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: rgba(255,255,255,0.3);
}

.table-grid thead th:last-child::after {
    display: none;
}

/* Corps du tableau */
.table-grid tbody tr {
    transition: background-color 0.15s ease;
}

.table-grid tbody tr:nth-child(odd) {
    background-color: #EDFBFF;
}

.table-grid tbody tr:nth-child(even) {
    background-color: white;
}

.table-grid tbody tr:hover {
    background-color: #fffacb !important;
}

.table-grid tbody td {
    padding: 0px 5px;
    border-right: 1px solid #A6D9FB;
    border-bottom: 1px solid #A6D9FB;
    color: #2C3E50;
    font-size: 0.80em !important;
}

.table-grid tbody td:last-child {
    border-right: none;
}

.table-grid tbody tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.table-grid tbody tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

.table-grid tbody td:focus {
    outline: 2px solid #4472C4;
    outline-offset: -2px;
    background-color: #E7EFFD;
}

/* Style pour les cellules éditables */
.table-grid tbody td[contenteditable="true"] {
    cursor: text;
}

/* Style pour les totaux (footer) */
.table-grid tfoot {
    background: linear-gradient(180deg, #5B8BD6 0%, #4472C4 100%);
    color: white;
    font-weight: 600;
}

.table-grid tfoot td {
    padding: 1px 5px;
    border-right: 1px solid #4472C4;
    border-bottom: none;
}

.table-grid tfoot td:first-child {
    border-bottom-left-radius: 8px;
}

.table-grid tfoot td:last-child {
    border-bottom-right-radius: 8px;
    border-right: none;
}

.feather-size{
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.context-menu-list {
    border-radius: 8px !important;
    overflow: hidden;
}
.context-menu-list {
    z-index: 9999 !important; /* Force le menu à passer au-dessus de tout */
}
.context-menu-list .context-menu-item span {
    font-weight: normal !important;
}
.context-menu-item {
  color: #004AAD !important;
  cursor: pointer;
}
.context-menu-item.context-menu-hover {
    background-color: #004AAD !important;
    color: white !important;
    cursor: pointer;
}

/* Aligner l'icône folder avec les autres icônes */
.folder-icon {
  color: #1976d2; /* Bleu pour correspondre aux autres icônes */
  margin-right: 16px; /* Espacement entre l'icône et le texte */
  vertical-align: middle; /* Alignement vertical */
}

/* Si vous utilisez une structure de menu avec des éléments de liste */
.menu-item {
  display: flex;
  align-items: center; /* Aligne verticalement l'icône et le texte */
  padding: 12px 16px;
}

.menu-item-icon {
  color: #1976d2; /* Bleu pour toutes les icônes */
  width: 21px; /* Largeur fixe pour l'alignement */
  margin-right: 16px;
  flex-shrink: 0; /* Empêche l'icône de rétrécir */
}

.menu-item-text {
  flex-grow: 1;
}

.context-menu-list {
    z-index: 9999 !important; /* Force le menu à passer au-dessus de tout */
}

/* Ajustements pour mobiles, tablettes, ... */
@media (max-width: 991px) {
    .table-grid {
        margin-left: 0px;  /* Réduit la marge sur mobile */
        margin-right: 0px; /* Ajoute aussi une marge droite */
        max-width: 100%; /* Compense les marges */
        font-size: 11px; /* Réduit la taille du texte */
    }

    .table-grid thead th,
    .table-grid tbody td {
        padding: 3px 3px; /* Réduit le padding */
        font-size: 0.80em;
    }
}

/* Ajustements pour desktop (PC) */
@media (min-width: 992px) {
    .table-grid table {
        font-size: 14px;
    }
}
