/* ---- Fond global de la page ---- */
body {
    background-color: #b0b0b0; /* gris doux, légèrement plus sombre que #c7c7c7 */
}

/* ---- Champs de saisie standard (input, select, textarea...) ---- */
input[type="text"],
input[type="date"],
input[type="number"],
input[type="email"],
input[type="password"],
textarea,
select {
    background-color: #f8f9fa;  /* fond très clair */
    border: 1px solid #ced4da;  /* bordure grise classique */
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    color: #212529; /* texte noir/gris foncé */
}

/* ---- Boutons personnalisés ---- */
.btn-sobre {
    background-color: #6c757d; /* gris foncé */
    color: #fff;
}

.btn-sobre:hover {
    background-color: #5a6268;
}

.btn-sobre.active {
    background-color: #495057;
    border: 1px solid #adb5bd;
}

/* ---- Champs de formulaire stylisés Bootstrap ---- */
input.form-control,
textarea.form-control,
select.form-select {
    background-color: #f0f0f0;  /* fond clair pour une meilleure lisibilité */
    border: 1px solid #bbb;    /* bordure douce */
    color: #333;               /* texte foncé */
}

/* ---- Fond des cases à cocher ---- */
input[type="checkbox"] {
    accent-color: #6c757d;         /* gris standard Bootstrap */
    background-color: #e0e0e0;     /* fond de la case (si supporté) */
}

/* ---- Tableaux sobres ---- */
table.table {
    background-color: #f8f9fa;     /* fond global du tableau */
    border-collapse: collapse;
}

/* ---- Zébrage des lignes pour lisibilité ---- */
.table tbody tr:nth-child(even) {
    background-color: #e2e3e5;  /* gris plus soutenu que #e9ecef */
}

/* ---- Cellules de tableau ---- */
table.table th,
table.table td {
    background-color: #f8f9fa;
    color: #212529;                /* texte noir/gris foncé */
    border: 1px solid #dee2e6;
}

/* ---- Surlignage au survol ---- */
table.table-hover tbody tr:hover {
    background-color: #dee2e6;
}

/* ---- Barre d'en-tête (logo, login/logout) ---- */
.navbar,
.site-header {
    background-color: #e9ecef;     /* gris clair uniforme */
    border-bottom: 1px solid #adb5bd;
}

/* ---- Liens dans la barre d'en-tête ---- */
.navbar a,
.site-header a {
    color: #212529;
}

.navbar a:hover,
.site-header a:hover {
    color: #000;
    text-decoration: none;
}

/* --- Tableau comptes redimensionnable --- */
.table-container {
    resize: vertical;
    overflow: auto;
    min-height: 150px;
    max-height: 500px;
    border: 1px solid #ccc;
    padding: 0;
    margin-bottom: 1rem;
    overflow-x: hidden !important;  /* ✅ Empêche tout scroll horizontal */
    padding-right: 0 !important;   /* ✅ Supprime le petit décalage qui provoque la barre */
}


.table-container table {
    width: 100%;
    table-layout: fixed;
}

/* ---- Mise en forme des formulaires alignés (ajouter/modifier opération) ---- */
form .form-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

form .form-group label {
    min-width: 150px;
    margin-right: 1rem;
    font-weight: bold;
}

form .form-group input,
form .form-group select,
form .form-group textarea {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

form textarea {
    resize: vertical;
}

form .btn {
    margin-right: 10px;
}

/* ---- Saisie épargne : champs étroits pour montants ---- */
.input-solde {
    width: 10ch;
    max-width: 10ch;
    min-width: 10ch;
    box-sizing: content-box;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    display: inline-block;
}
label.form-label {
    font-weight: 500;
    margin-bottom: 0.3rem;
}


/* ---- Tableau liste de comptes compacté ---- */
.table-col-tight th,
.table-col-tight td {
  white-space: nowrap;         /* empêche les retours à la ligne */
  padding-left: 0.4rem;
  padding-right: 0.4rem;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
  width: 1%;
}

.table-resizable {
  resize: vertical;
  overflow: auto;
  display: block;
  width: 100%;
  min-height: 150px;
  max-height: 80vh;
  height: 280px; /* ✅ Hauteur par défaut pour ~7 lignes */
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
  background-color: #fff;
}

/* ---- Menu déroulant sobre ---- */
.dropdown-menu {
  background-color: #f8f9fa !important;
  border: 1px solid #ced4da !important;
  border-radius: 0.5rem !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

.dropdown-menu .dropdown-item {
  background-color: transparent !important;
  color: #212529 !important;
  padding: 0.375rem 1rem !important;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
  background-color: #e2e6ea !important;
  color: #212529 !important;
}

/* ---- Boutons d'action harmonisés ---- */
.btn-creer {
    background-color: #6c757d;  /* même teinte que btn-sobre */
    color: #fff;
    border: none;
}

.btn-creer:hover {
    background-color: #5a6268;
}

.btn-ignorer {
    background-color: #adb5bd;
    color: #fff;
    border: none;
}

.btn-ignorer:hover {
    background-color: #8d99a0;
}
