/* Assets - Conforoom CSS */

/* Mode "Excel Épuré" pour les inputs et selects dans les tableaux */
.table-view-list td {
    vertical-align: middle !important;
}

.table-view-list input[type="text"],
.table-view-list input[type="number"],
.table-view-list input[type="date"],
.table-view-list select,
.table-view-list textarea {
    border: 1px solid transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 4px 6px !important;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
    color: #1d2327;
    margin: 0 !important;
    font-size: 13px !important;
}

/* Fixer la hauteur des inputs et selects pour l'alignement */
.table-view-list input[type="text"],
.table-view-list input[type="number"],
.table-view-list input[type="date"],
.table-view-list select {
    height: 32px !important;
    min-height: 32px !important;
}

/* Affichage de la bordure uniquement au survol ou au clic */
.table-view-list input:hover,
.table-view-list select:hover,
.table-view-list textarea:hover,
.table-view-list input:focus,
.table-view-list select:focus,
.table-view-list textarea:focus {
    border: 1px solid #2271b1 !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 1px #2271b1 !important;
    border-radius: 4px;
}

/* Conteneur avec double scroll (Horizontal + Vertical) pour que le sticky header fonctionne parfaitement */
.conforoom-table-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 55vh; /* Réduit à 55% de l'écran pour que la barre de scroll du bas soit toujours visible ! */
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

/* Rendre la barre de défilement bien visible (pour Chrome/Edge/Safari) */
.conforoom-table-wrapper::-webkit-scrollbar {
    width: 12px;
    height: 12px; /* Hauteur de la barre horizontale */
}
.conforoom-table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1; 
}
.conforoom-table-wrapper::-webkit-scrollbar-thumb {
    background: #c1c1c1; 
    border-radius: 6px;
}
.conforoom-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #909090; 
}

/* Sticky Header (Entête figée) à l'intérieur de la boîte */
.table-view-list {
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 !important;
    border: none !important;
}
.table-view-list thead th {
    position: sticky;
    top: 0; /* Coller en haut du conteneur */
    background: #f0f0f1; /* Gris clair WordPress pour bien détacher l'entête */
    z-index: 10;
    box-shadow: inset 0 -1px 0 #ccd0d4;
}

/* Hover doux sur les lignes pour meilleure lecture */
.table-view-list tbody tr:hover {
    background-color: #f6f7f7 !important;
}

/* Badges de statut */
.conforoom-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-avenir { background: #fff8e5; color: #b06d0f; border: 1px solid #f6c342; }
.badge-encours { background: #e0f0fa; color: #0073aa; border: 1px solid #8abeb7; }
.badge-complete { background: #eaf7ea; color: #1e8a1e; border: 1px solid #a3cda3; }
.badge-annule { background: #f7eaea; color: #d63638; border: 1px solid #dcaeb2; }
.badge-entree { background: #eaf7ea; color: #1e8a1e; border: 1px solid #a3cda3; }
.badge-sortie { background: #f7eaea; color: #d63638; border: 1px solid #dcaeb2; }
.badge-swap { background: #f0e6ff; color: #5a189a; border: 1px solid #c77dff; }

/* Dashboard Caisse Ménage */
.conforoom-soldes-table {
    border: none;
}
.conforoom-soldes-table th {
    font-weight: 600;
    padding: 12px 15px !important;
}
.conforoom-soldes-table td {
    padding: 12px 15px !important;
    vertical-align: middle;
}
