#page {
  max-width: 100%;
}
.container {
  max-width: 100%;
}
.library-management {
  max-width: 100%;
}
.tab_admin-container {
  max-width: 100%;
}
.droits-container {
	overflow-x: auto;
	max-width: 100%;
}
.widefat th, .widefat td {
	white-space: nowrap;
}
.library-management {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}
.tab-menu {
    list-style-type: none;
    padding: 0;
	margin: 0;
    display: flex;
    justify-content: space-around;
    border-bottom: 2px solid #ccc;
}
.tab-link {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab-link.active {
    border-bottom: 2px solid #0073aa;
    font-weight: bold;
}

.tab-menu li {
  padding: 10px 20px;
  cursor: pointer;
}

.tab-menu .active {
  font-weight: bold;
  border-bottom: 2px solid #0073e6;
}

.tab-content {
  margin-top: 20px;
   padding: 20px;
}

.tab {
  display: none;
}

.tab.active {
  display: block;
}

.tab h2 {
  color: #333;
}

.tab p {
  font-size: 16px;
  color: #555;
}
/* Conteneur principal */
.containerGB {
  display: flex;
  /*flex-wrap: wrap;*/ /* Permet aux colonnes de passer à la ligne quand la largeur de l'écran est insuffisante */
  gap: 20px; /* Espace entre les colonnes */
}

/* Colonne 1 */
.colGB-1 {
  flex: 1 1 60%; /* La première colonne occupe 60% de la largeur de l'écran */
  background-color: lightblue; /* Juste pour l'exemple */
  padding: 20px;
  box-sizing: border-box;
}

/* Colonne 2 */
.colGB-2 {
  flex: 1 1 39%; /* La deuxième colonne occupe 40% de la largeur de l'écran */
  background-color: lightcoral; /* Juste pour l'exemple */
  padding: 20px;
  box-sizing: border-box;
}
@media (max-width: 480px) {
    .tab-link {
        padding: 15px;
        font-size: 14px;
    }

    .tab-content {
        padding: 10px;
    }
}

/* Styles de base pour tous les écrans */

.tab_admin-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.tab_admin-menu {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: space-around;
    border-bottom: 1px solid #ccc;
}

.tab_admin-link {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab_admin-link.active {
    border-bottom: 2px solid #0073aa;
    font-weight: bold;
}

.tab_admin-content {
    padding: 20px;
}

.tab_admin {
    display: none;
}

.tab_admin.active {
    display: block;
}

@media (max-width: 768px) {
     .tab-menu {
        flex-direction: column;
        align-items: flex-start;
    }
	.tab-menu li {
	  padding: 0px 0px;
	}
    .tab-link {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #ccc;
    }

    .tab-link.active {
        border-bottom: 2px solid #0073aa;
    }

    .tab-content {
        padding: 10px;
    }
	.tab_admin-menu {
        flex-direction: column;
        align-items: flex-start;
    }

    .tab_admin-link {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #ccc;
    }

    .tab_admin-link.active {
        border-bottom: 2px solid #0073aa;
    }

    .tab_admin-content {
        padding: 10px;
    }
}


/* Police moderne et joyeuse */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

.gestionnaire-form {
    font-family: 'Poppins', sans-serif;
    max-width: 800px;
    margin: 20px auto;
    padding: 25px;
    background-color: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #333;
}

.form-title {
    text-align: center;
    color: #4a6fa5;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus, .form-textarea:focus {
    border-color: #4a6fa5;
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
    outline: none;
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-button {
    background-color: #4a6fa5;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: block;
    margin: 20px auto 0;
}

.form-button:hover {
    background-color: #3a5a8f;
    transform: translateY(-2px);
}

.form-button:active {
    transform: translateY(0);
}

/* Animation pour les champs */
.form-input, .form-textarea {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.journal-exercice-container {
            width: 100%;
            margin: 0 auto;
            padding: 15px;
            background: #fff;
            border: 1px solid #ddd;
            border-radius: 5px;
        }

        .journal-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 15px;
        }

        .journal-table th,
        .journal-table td {
            padding: 10px;
            text-align: left;
            border: 1px solid #ddd;
        }

        .journal-table th {
            background-color: #f9f9f9;
            font-weight: bold;
        }

        .journal-table tr:nth-child(even) {
            background-color: #f2f2f2;
        }

        .button-modifier {
            background-color: #2271b1;
            color: white;
            border: none;
            padding: 5px 10px;
            border-radius: 3px;
            cursor: pointer;
        }

        .button-modifier:hover {
            background-color: #135e96;
        }

        /* Style pour le conteneur principal */
        .plan-compta-container {
            width: 100%;
            margin: 0 auto;
            padding: 20px;
            background: #fff;
            border: 1px solid #ddd;
            border-radius: 5px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        /* Style pour les onglets */
        .plan-compta-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin-bottom: 20px;
        }

        .plan-compta-tab-button {
            padding: 10px 15px;
            background: #f1f1f1;
            border: 1px solid #ddd;
            border-radius: 5px 5px 0 0;
            cursor: pointer;
            font-weight: bold;
        }

        .plan-compta-tab-button:hover {
            background: #e1e1e1;
        }

        .plan-compta-tab-button.active {
            background: #2271b1;
            color: white;
        }

        /* Style pour le contenu des onglets */
        .plan-compta-tab-content {
            display: none;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 0 5px 5px 5px;
        }

        /* Style pour les tableaux */
        .plan-compta-table-container {
            overflow-x: auto;
            margin-top: 20px;
        }

        .plan-compta-table {
            width: 100%;
            border-collapse: collapse;
        }

        .plan-compta-table th,
        .plan-compta-table td {
            padding: 10px;
            text-align: left;
            border: 1px solid #ddd;
        }

        .plan-compta-table th {
            background: #f9f9f9;
            font-weight: bold;
        }

        .plan-compta-table tr:nth-child(even) {
            background: #f2f2f2;
        }

        /* Style pour les boutons */
        .button {
            padding: 8px 12px;
            border: none;
            border-radius: 3px;
            cursor: pointer;
            font-weight: bold;
            margin-right: 5px;
        }

        .button-primary {
            background: #2271b1;
            color: white;
        }

        .button-secondary {
            background: #6c757d;
            color: white;
        }

        .button-modifier {
            background: #ffc107;
            color: black;
        }

        .button-supprimer {
            background: #dc3545;
            color: white;
        }

        /* Style pour le modal */
        .plan-compta-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        .plan-compta-modal-content {
            background: white;
            padding: 20px;
            border-radius: 5px;
            width: 80%;
            max-width: 600px;
            max-height: 80vh;
            overflow-y: auto;
        }

        .plan-compta-close {
            float: right;
            font-size: 24px;
            font-weight: bold;
            cursor: pointer;
        }

        .form-group {
            margin-bottom: 15px;
        }

        .form-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }

        .form-group input,
        .form-group select {
            width: 100%;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 3px;
        }

        
        /* ====== En-tête ====== */
        .cb-form-header {
            display: flex; align-items: center; gap: 14px;
            margin-bottom: 22px; padding-bottom: 16px;
            border-bottom: 2px solid var(--cb-bordure);
        }
        .cb-form-header .cb-icon {
            width: 46px; height: 46px; border-radius: 12px;
           background: linear-gradient(135deg, var(--cb-principal), var(--cb-principal2));
            display: flex; align-items: center; justify-content: center;
            box-shadow: 0 4px 14px var(--cb-focus);
            flex-shrink: 0;
        }
        .cb-form-header h2 { margin: 0; font-size: 21px; font-weight: 700; color: #1e2a4a; }
        .cb-form-header p  { margin: 2px 0 0; font-size: 13px; color: #7a89a6; }

        /* ====== Cadres (fieldset) ====== */
        .cb-cadre {
            background: #ffffff;
            border: 1.5px solid var(--cb-bordure);
            border-radius: 14px;
            padding: 18px 20px 20px;
            margin-bottom: 18px;
        }
        .cb-cadre > legend,
        .cb-cadre-titre {
            display: inline-flex; align-items: center; gap: 8px;
            font-size: 14px; font-weight: 700; color: #1e2a4a;
            padding: 4px 14px;
            background: var(--cb-clair); 
            border: 1px solid var(--cb-bordure);
            border-radius: 20px;
            margin-bottom: 14px;
        }

        /* ====== Flux des champs à la suite ====== */
        .cb-ligne-champs {
            display: flex;
            flex-wrap: wrap;
            align-items: flex-end;   /* aligne les champs par le bas (labels au-dessus) */
            gap: 16px 18px;
        }

        /* ====== Champ ====== */
        .cb-field { display: flex; flex-direction: column; gap: 6px; }
        .cb-field label {
            font-size: 12.5px; font-weight: 600; color: #46536e;
            display: flex; align-items: center; gap: 6px;
        }
        .cb-field label svg { opacity: .55; }

        /* ====== Champs à taille adaptée (largeur auto) ====== */
        .cb-field input[type="date"],
        .cb-field input[type="text"],
        .cb-field input[type="number"],
        .cb-field select {
            padding: 9px 12px;
            font-size: 14px;
            color: #22304d;
            background: #ffffff;
            border: 1.5px solid #dbe3f0;
            border-radius: 9px;
            outline: none;
            width: auto;              /* <-- taille adaptée au contenu */
            transition: border-color .2s, box-shadow .2s;
        }
        /* Tailles indicatives par type de champ */
        .cb-field input[type="date"] { min-width: 140px; }   /* date */
        .cb-field select             { min-width: 160px; }   /* selects */
        .cb-field.num-paiement input { min-width: 150px; }   /* n° paiement */

        /* Libellé : champ longueur moyenne */
        .cb-field.libelle input { width: 260px; }

        /* Montant : compact et mis en avant */
        .cb-field.montant input {
            min-width: 110px; text-align: right;
            font-size: 16px; font-weight: 700; color: #1e2a4a;
        }
        .cb-field.montant input:focus {
            border-color: #22b573;
            box-shadow: 0 0 0 4px rgba(34, 181, 115, .15);
        }
        .cb-field span {
            font-size: x-small;
            font-weight: bold;
            color: #46536e;
        }
        .cb-field select {
            appearance: none;
            background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%237a89a6' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
            background-repeat: no-repeat;
            background-position: right 12px center;
            padding-right: 32px;
        }
        .cb-field input:hover, .cb-field select:hover { border-color: #b9c6de; }
        .cb-field input:focus, .cb-field select:focus {
            border-color: var(--cb-principal); box-shadow: 0 0 0 4px var(--cb-focus);
        }
                /* Champ sur toute la ligne */
        .cb-field.full { flex-basis: 100%; }

        /* ====== Actions ====== */
        .cb-actions { display: flex; gap: 12px; margin-top: 4px; }
        .cb-btn {
            display: inline-flex; align-items: center; gap: 9px;
            padding: 12px 30px;
            font-size: 15px; font-weight: 700; color: #fff;
            background: linear-gradient(135deg, var(--cb-principal), var(--cb-principal2)); box-shadow: 0 6px 20px var(--cb-focus);
            border: none; border-radius: 12px; cursor: pointer;
       
            transition: transform .15s, box-shadow .2s;
        }
        .cb-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px var(--cb-focus); }
        .cb-btn:active { transform: translateY(0); }

        @media (max-width: 640px) {
            .cb-form-wrap { padding: 16px; }
            .cb-ligne-champs { flex-direction: column; align-items: stretch; }
            .cb-field input, .cb-field select, .cb-field.libelle input { width: 100%; }
        }
                /* ====== Champs avec bouton loupe ====== */
        .cb-field-bouton { display: flex; align-items: center; gap: 6px; }
        .cb-field-bouton input {
            flex: 1; min-width: 0;
        }
                /* Champ avec label et input sur la même ligne */
        .cb-field.inline {
            flex-direction: row;
            align-items: center;
            gap: 10px;
        }
        .cb-field.inline label { margin: 0; }
        .cb-field.inline select { min-width: 160px; }
        
        .cb-btn-loupe {
            display: inline-flex; align-items: center; justify-content: center;
            width: 36px; height: 36px; flex-shrink: 0;
            background: #ffffff;
            border: 1.5px solid var(--cb-bordure);
            border-radius: 9px;
            cursor: pointer;
            transition: border-color .2s, box-shadow .2s, background .2s;
        }
        .cb-btn-loupe:hover {
            border-color: var(--cb-principal); box-shadow: 0 0 0 3px var(--cb-focus); background: var(--cb-clair);
        }

        /* ====== Case à cocher ====== */
        .cb-check {
            display: inline-flex; align-items: center; gap: 7px;
            font-size: 12.5px; font-weight: 600; color: #46536e;
            cursor: pointer; padding: 0 2px;
        }
        .cb-check input[type="checkbox"] {
            width: 17px; height: 17px; accent-color: var(--cb-principal); cursor: pointer;
        }

        /* ====== Zone saisie compacte (num pièce) ====== */
        /*.cb-field.num-piece input { min-width: 120px; }*/

        /* ====== Cadre Ventillation ====== */
        .cb-ventil-top {
            display: flex; flex-wrap: wrap; align-items: flex-end;
            gap: 16px 18px;
            padding-bottom: 14px;
            margin-bottom: 14px;
            border-bottom: 1.5px dashed #dbe3f0;
        }
        .cb-ventil-liste {
            max-height: 180px; overflow-y: auto;
            font-size: 13px; color: #46536e;
        }
        .cb-ventil-liste table { width: 100%; border-collapse: collapse; }
        .cb-ventil-liste th, .cb-ventil-liste td {
            padding: 7px 10px; text-align: left;
            border-bottom: 1px solid #eef2f9;
        }
        .cb-ventil-liste th { font-size: 11.5px; text-transform: uppercase; color: #7a89a6; }
        .cb-ventil-liste td:last-child, .cb-ventil-liste th:last-child { text-align: right; }
        .cb-ventil-liste .montant-ventil { font-weight: 700; color: #1e2a4a; }
        .cb-ventil-vide { padding: 8px 2px; font-style: italic; color: #a8b3c9; }

        /* Bouton valider ventilation (plus petit) */
        .cb-btn-vert {
            display: inline-flex; align-items: center; gap: 8px;
            padding: 9px 22px;
            font-size: 14px; font-weight: 700; color: #fff;
            background: linear-gradient(135deg, #22b573, #1a9e63);
            border: none; border-radius: 10px; cursor: pointer;
            box-shadow: 0 4px 14px rgba(34, 181, 115, .35);
            transition: transform .15s, box-shadow .2s;
        }
        .cb-btn-vert:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(34, 181, 115, .45); }

                /* ====== Tailles de champs spécifiques ====== */
        /* Montants : 50px (neutralise le min-width du .montant) */
        .cb_montant {
            width: 90px !important;
            min-width: 0 !important;
            text-align: right;
            font-size: 16px; font-weight: 700; color: #1e2a4a;
        }

        /* N° de pièce : 95px */
        #num_pieces_ligne_compte { width: 95px !important; min-width: 0 !important; }

        /* Comptes (tiers, financier, ventilation) : 70px */
        .num_compta {
            width: 70px !important;
            min-width: 0 !important;
        }

        /* ====== Bouton loupe avec image detail.png ====== */
        .cb-btn-loupe {
            display: inline-flex; align-items: center; justify-content: center;
            width: 36px; height: 36px; flex-shrink: 0;
            background: #ffffff;
            border: 1.5px solid var(--cb-bordure);
            border-radius: 9px;
            cursor: pointer;
            padding: 0;
            transition: border-color .2s, box-shadow .2s, background .2s;
        }
        .cb-btn-loupe img {
            width: 20px; height: 20px; display: block;
        }
        .cb-btn-loupe:hover {
            border-color: var(--cb-principal);
            box-shadow: 0 0 0 3px var(--cb-focus);
            background: var(--cb-clair);
        }
       
       
       .cb-liste-comptes { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
        .cb-liste-comptes table {
            width: 100%; border-collapse: collapse; font-size: 13px; color: #22304d;
            background: #fff; border-radius: 10px; overflow: hidden;
            box-shadow: 0 2px 12px rgba(30,60,120,.08);
        }
        .cb-liste-comptes .titre-classe td {
            background: linear-gradient(135deg, #f0f4ff, #e8eefa);
            color: #1e2a4a; font-weight: 700; font-size: 12.5px;
            padding: 8px 12px; border-bottom: 2px solid #dbe3f0;
            text-transform: uppercase; letter-spacing: .3px;
        }
        .cb-liste-comptes th {
            text-align: left; font-size: 11.5px; text-transform: uppercase;
            color: #7a89a6; padding: 7px 12px; border-bottom: 1.5px solid #e3e9f5;
        }
        .cb-liste-comptes span {
           font-size: x-small;
            font-weight: bold;
        }
        .cb-liste-comptes td { padding: 7px 12px; border-bottom: 1px solid #eef2f9; }
        .cb-liste-comptes tr.ligne-compte { cursor: pointer; transition: background .12s; }
        .cb-liste-comptes tr.ligne-compte:hover { background: #f5f8ff; }
        .cb-liste-comptes tr.ligne-compte td:first-child { font-weight: 600; color: #4f7cff; white-space: nowrap; }


