/* Reset de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global style */
span.agrement {
    font-weight: 500;
    font-family: monospace;
}

table.stats {
    text-align: left !important;
}

/* LIGHT THEME */
.light-theme {
    background-color: #f8f9fa;
    color: #333;
}

.light-theme h1, .light-theme h2 {
    color: #007bff;
    font-weight: bold;
    margin-bottom: 20px;
}

.light-theme .container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.light-theme .navbar-light {
    background-color: #007bff;
    padding: 15px 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.light-theme .navbar-light .navbar-brand {
    color: #fff;
    font-weight: bold;
    font-size: 1.8rem;
}

.light-theme .navbar-light .nav-link {
    color: #fff;
    font-size: 1.1rem;
    margin-left: 20px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.light-theme .navbar-light .nav-link:hover {
    color: #007bff;
    background-color: #fff;
    border-radius: 5px;
    padding: 10px 15px;
}

.light-theme .navbar-toggler {
    border-color: #fff;
}

.light-theme .navbar-toggler-icon {
    background-color: #fff;
}

.light-theme .navbar-collapse {
    justify-content: center;
}

.light-theme .nav-link.active, .light-theme .nav-link:hover {
    background-color: #007bff;
    color: #ffffff !important;
    border-radius: 5px;
}

.light-theme footer {
    background-color: #f8f9fa;
    padding: 40px 0;
    text-align: center;
}

.light-theme footer h5 {
    font-weight: bold;
    margin-bottom: 20px;
}

.light-theme footer p {
    font-size: 16px;
    color: #555;
}

.light-theme footer .bg-dark {
    background-color: #333 !important;
    padding: 10px 0;
}

.light-theme footer .text-white a {
    color: #fff;
    text-decoration: none;
}

.light-theme footer .text-white a:hover {
    text-decoration: underline;
}

.light-theme footer .p-3 {
    padding: 20px;
    font-size: 14px;
}

/* Tableaux */
.light-theme #resultsTable, .light-theme #updatesTable {
    font-size: 14px;
    width: 100%;
}

.light-theme #resultsTable td, .light-theme #resultsTable th,
.light-theme #updatesTable td, .light-theme #updatesTable th {
    padding: 8px 10px;
    text-align: left;
}

.light-theme #resultsTable thead th, .light-theme #updatesTable thead th {
    font-weight: bold;
    font-size: 14px;
}

.light-theme #resultsTable tbody tr, .light-theme #updatesTable tbody tr {
    font-size: 13px;
}

.light-theme #resultsTable .btn, .light-theme #updatesTable .btn {
    font-size: 12px;
    padding: 3px 6px;
}

/* Formulaires */
.light-theme input[type="text"], .light-theme input[type="email"], 
.light-theme input[type="password"], .light-theme select {
    background-color: #ffffff;
    color: #333;
    border: 1px solid #ccc;
}

.light-theme input[type="text"]::placeholder, 
.light-theme input[type="email"]::placeholder, 
.light-theme input[type="password"]::placeholder {
    color: #888;
}

.light-theme select.form-control {
    background-color: #ffffff;
    color: #333;
    border: 1px solid #ccc;
}

.light-theme option {
    background-color: #ffffff;
    color: #333;
}

/* Boutons */
.light-theme .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
}

.light-theme .btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.light-theme .card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, .125);
    border-radius: .25rem;
    color: #333;
}

/* Tableau pour le mode clair */
.light-theme .table {
    background-color: #fff;
    color: #333;
    border-color: #ccc;
}

.light-theme .table th,
.light-theme .table td {
    border: 1px solid #ccc;
}

.light-theme .table-striped tbody tr:nth-of-type(odd) {
    background-color: #f9f9f9;
}

.light-theme .table-striped tbody tr:nth-of-type(even) {
    background-color: #fff;
}

/* Formulaires en mode clair */
.light-theme .form-control {
    background-color: #fff;
    color: #333;
    border: 1px solid #ccc;
}

.light-theme .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.25);
}


/* Gestion des agréments en mode light */
.light-theme span.agrement-valide {
    color: #4CAF50;
}

.light-theme span.agrement-extension-cl {
    color: #03A9F4;
}

.light-theme span.agrement-rejete {
    color: #E91E63;
}

.light-theme span.agrement-pasdemande {
    color: #9E9E9E;
}

.light-theme span.agrement-annule {
    color: #616161;
}

.light-theme span.agrement-suspendu {
    color: #FF9800;
}




/* DARK THEME */
.dark-theme {
    background-color: #121212;
    color: #e0e0e0;
}

.dark-theme h1, .dark-theme h2 {
    color: #90caf9;
    font-weight: bold;
    margin-bottom: 20px;
}

.dark-theme .container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.dark-theme .navbar {
    background-color: #1f1f1f;
    padding: 15px 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dark-theme .navbar .navbar-brand {
    color: #e0e0e0;
    font-weight: bold;
    font-size: 1.8rem;
}

.dark-theme .navbar .nav-link {
    color: #e0e0e0;
    font-size: 1.1rem;
    margin-left: 20px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.dark-theme .navbar .nav-link:hover {
    color: #90caf9;
    background-color: #333;
    border-radius: 5px;
    padding: 10px 15px;
}

.dark-theme .navbar-toggler {
    border-color: #333;
}

.dark-theme .navbar-toggler-icon {
    background-color: #333;
}

.dark-theme .navbar-collapse {
    justify-content: center;
}

.dark-theme .nav-link.active, .dark-theme .nav-link:hover {
    background-color: #333;
    color: #90caf9 !important;
    border-radius: 5px;
}

.dark-theme footer {
    background-color: #1f1f1f;
    padding: 40px 0;
    text-align: center;
}

.dark-theme footer h5 {
    font-weight: bold;
    margin-bottom: 20px;
}

.dark-theme footer p {
    font-size: 16px;
    color: #e0e0e0;
}

.dark-theme footer .bg-dark {
    background-color: #1f1f1f !important;
    padding: 10px 0;
}

.dark-theme footer .text-white a {
    color: #e0e0e0;
    text-decoration: none;
}

.dark-theme footer .text-white a:hover {
    text-decoration: underline;
}

.dark-theme footer .p-3 {
    padding: 20px;
    font-size: 14px;
}

/* Tableaux */
.dark-theme #resultsTable, .dark-theme #updatesTable {
    font-size: 14px;
    width: 100%;
    background-color: #2b2b2b;
}

.dark-theme #resultsTable td, .dark-theme #resultsTable th, 
.dark-theme #updatesTable td, .dark-theme #updatesTable th {
    padding: 8px 10px;
    text-align: left;
    border: 1px solid #555;
    color: #ffffff;
}

.dark-theme #resultsTable thead th, .dark-theme #updatesTable thead th {
    font-weight: bold;
    background-color: #343a40;
    color: #90caf9;
}

.dark-theme #resultsTable tbody tr, .dark-theme #updatesTable tbody tr {
    font-size: 13px;
    background-color: #3c3c3c;
}

.dark-theme #resultsTable .btn, .dark-theme #updatesTable .btn {
    font-size: 12px;
    padding: 3px 6px;
}

/* Formulaires */
.dark-theme input[type="text"], .dark-theme input[type="email"], 
.dark-theme input[type="password"], .dark-theme select {
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;
}

.dark-theme input[type="text"]::placeholder, 
.dark-theme input[type="email"]::placeholder, 
.dark-theme input[type="password"]::placeholder {
    color: #888;
}

.dark-theme select.form-control {
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;
}

.dark-theme option {
    background-color: #333;
    color: #e0e0e0;
}

/* Boutons */
.dark-theme .btn-primary {
    background-color: #90caf9;
    border-color: #90caf9;
    color: #1f1f1f;
}

.dark-theme .btn-primary:hover {
    background-color: #64b5f6;
    border-color: #64b5f6;
}

/* DataTables */
.dark-theme .dataTables_wrapper {
    color: #ffffff;
    background-color: #2b2b2b;
}

.dark-theme table.dataTable thead {
    background-color: #343a40;
    color: #ffffff;
}

.dark-theme table.dataTable tbody tr {
    background-color: #3c3c3c;
    color: #ffffff;
}

.dark-theme table.dataTable tbody tr:nth-child(odd) {
    background-color: #3a3a3a;
}

.dark-theme table.dataTable tbody tr:nth-child(even) {
    background-color: #2e2e2e;
}

.dark-theme .dataTables_wrapper .dataTables_paginate .paginate_button {
    background-color: #3c3c3c;
    color: #ffffff !important;
    border: 1px solid #555;
}

.dark-theme .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: #007bff;
    color: #ffffff !important;
    border: 1px solid #007bff;
}

.dark-theme .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: #007bff;
    color: #ffffff !important;
}

.dark-theme .dataTables_wrapper .dataTables_filter input {
    background-color: #3c3c3c;
    color: #ffffff;
    border: 1px solid #555;
}

.dark-theme .dataTables_wrapper .dataTables_length select {
    background-color: #3c3c3c;
    color: #ffffff;
    border: 1px solid #555;
}

.dark-theme .card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #1f1f1f;
    background-clip: border-box;
    border: 1px solid #333;
    border-radius: .25rem;
    color: #e0e0e0;
}

.dark-theme .card .card-header {
    color: #90caf9;
}

/* Tableau pour le mode sombre */
.dark-theme .table {
    background-color: #1f1f1f;
    color: #e0e0e0;
    border-color: #444;
}

.dark-theme .table th,
.dark-theme .table td {
    border: 1px solid #555;
}

.dark-theme .table-striped tbody tr:nth-of-type(odd) {
    background-color: #2b2b2b;
}

.dark-theme .table-striped tbody tr:nth-of-type(even) {
    background-color: #333;
}

/* Formulaires en mode sombre */
.dark-theme .form-control {
    background-color: #2b2b2b;
    color: #e0e0e0;
    border: 1px solid #555;
}

.dark-theme .form-control:focus {
    border-color: #90caf9;
    box-shadow: 0 0 5px rgba(144, 202, 249, 0.25);
}



.dark-theme .table-striped>tbody>tr:nth-of-type(odd)>* {
    color: #e0e0e0;
}

/* Gestion des agréments en mode dark */
.dark-theme span.agrement-valide {
    color: #43a047;
}

.dark-theme span.agrement-extension-cl {
    color: #03A9F4;
}

.dark-theme span.agrement-rejete {
    color: #ec407a;
}

.dark-theme span.agrement-pasdemande {
    color: #9E9E9E;
}

.dark-theme span.agrement-annule {
    color: #616161;
}

.dark-theme span.agrement-suspendu {
    color: #ffc107;
}


/* Styles par défaut pour les onglets */
.nav-tabs .nav-link {
    border: 1px solid transparent;
    border-radius: 0.25rem 0.25rem 0 0;
    color: #007bff;
    font-weight: bold;
    padding: 10px;
    transition: background-color 0.3s ease;
}

/* Onglet actif */
.nav-tabs .nav-link.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff #007bff transparent;
}

/* Hover sur onglet */


/* Version Light Theme */
.light-theme .nav-tabs .nav-link {
    color: #007bff;
}

.light-theme .nav-tabs .nav-link.active {
    background-color: #007bff;
    color: #fff;
}



/* Version Dark Theme */
.dark-theme .nav-tabs .nav-link {
    color: #bbb;
    border-color: #444;
}

.dark-theme .nav-tabs .nav-link.active {
    background-color: #444;
    color: #fff;
    border-color: #444 #444 transparent;
}

.dark-theme .nav-tabs .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Contenu des onglets */
.tab-content {
    padding: 20px;
    border: 1px solid #ddd;
    border-top: none;
}

/* Dark mode pour le contenu des onglets */
.dark-theme .tab-content {
    background-color: #333;
    border-color: #444;
    color: #fff;
}

.light-theme .tab-content {
    background-color: #fff;
    border-color: #ddd;
    color: #000;
}

a.btn.btn-primary.versionsite.inactive {
    background-color: transparent;
    color: #90caf9;
}

a.btn.btn-primary.versionsite {
    margin-right: 5px;
}

a.btn.btn-primary.versionsite.changelog {
    background-color: transparent;
    color: #FF5722;
    border-color: #FF5722;
}

.proportion-bar {
        display: flex;
        height: 30px;
        width: 100%;
        background-color: #e0e0e0;
        position: relative;
    }
    .bar-section {
        height: 100%;
        position: relative;
    }
    .bar-section.vl { background-color: #3498db; }
    .bar-section.cl { background-color: #2ecc71; }
    .bar-section.pl { background-color: #e67e22; }
    .bar-section.valide-cl { background-color: #43A047; }
    .bar-section.extension-cl { background-color: #03A9F4; }
    .bar-section.reseau { background-color: #9b59b6; }

    .bar-section:hover::after {
        content: attr(data-tooltip);
        position: absolute;
        top: -25px;
        left: 50%;
        transform: translateX(-50%);
        background-color: #333;
        color: #fff;
        padding: 5px;
        border-radius: 3px;
        white-space: nowrap;
        font-size: 12px;
    }

    .color-vl { color: #3498db; }
    .color-cl { color: #2ecc71; }
    .color-pl { color: #e67e22; }
    .color-valide-cl { color: #43A047; }
    .color-extension-cl { color: #03A9F4; }
    /* Exemple de couleurs pour les réseaux */
    .bar-section.reseau-Z { background-color: #9e9e9e; } /* Indépendant */
    .bar-section.reseau-T { background-color: #2ecc71; } /* Sécuritest */
    .bar-section.reseau-C { background-color: #ffc42c; } /* Autosécurité */
    .bar-section.reseau-V { background-color: #ffd236; } /* Dekra Norisko */
    .bar-section.reseau-K { background-color: #027d41; } /* Auto Bilan France (Dekra) */
    .bar-section.reseau-S { background-color: #0d529c; } /* Secta Autosur */
    .bar-section.reseau-F { background-color: #ee272d; } /* Vivauto (Autovision) */
    .bar-section.reseau-D { background-color: #027d41; } /* Dekra Automotive */
    .bar-section.reseau-J { background-color: #ee272d; } /* Vivauto PL */
    .legende-graph {text-align: center; margin: 5px;}
    .legende-graph .reseau-Z { color: #9e9e9e; } /* Indépendant */
    .legende-graph .reseau-T { color: #2ecc71; } /* Sécuritest */
    .legende-graph .reseau-C { color: #ffc42c; } /* Autosécurité */
    .legende-graph .reseau-V { color: #ffd236; } /* Dekra Norisko */
    .legende-graph .reseau-K { color: #027d41; } /* Auto Bilan France (Dekra) */
    .legende-graph .reseau-S { color: #0d529c; } /* Secta Autosur */
    .legende-graph .reseau-F { color: #ee272d; } /* Vivauto (Autovision) */
    .legende-graph .reseau-D { color: #027d41; } /* Dekra Automotive */
    .legende-graph .reseau-J { color: #ee272d; } /* Vivauto PL */
    p.legende-graph span {
    margin-left: 10px;
}

button {
    margin: 0px 2px;
}

span.badge {
    margin: 0px 2px;
}

footer span.version {
    color: white;
    background-color: #9C27B0;
    padding: 3px 5px;
    border-radius: 5px;
}

td.action, .nowrap {
    text-wrap: nowrap;
}

.issustable .description {
    margin: 0px 5px;
}

.modal-dialog {
    max-width: 1200px;
}

.modal-content {
    padding: 30px;
}

.modal-content p {
    text-align: justify;
}

.light-theme .modal-content {
    color: black;
    border: solid 2px #007bff;
}

.dark-theme .modal-content {
    background-color: #121212;
    color: #e0e0e0;
    border: solid 2px #e0e0e0;
}

table.controleurs {
    vertical-align: middle;
}
table.controleurs td {
        font-size: 0.8rem;
    }
table.controleurs td.actions {
    text-align: right;
}
table.controleurs td.actions a {
    font-size: 0.7rem;
}

span.prenom {
    text-transform: capitalize;
}

span.nom {
    text-transform: uppercase;
}

.dark-theme span.prenom {
    color: #b7b7b7;
}

.dark-theme span.nom {
    color: white;
}

.light-theme span.prenom {
    color: #858585;
}

.light-theme span.nom {
    color: black;
}

button.habilitations_pl {
    font-size: 11px !important;
}

.agrement-cell {
    display: flex;
    align-items: center;
    max-width: 280px;
    gap: 10px;
    flex-wrap: nowrap;
}

.reseau-logo {
    height: 40px;
    width: auto;
    flex-shrink: 0;
}

.agrement-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2em;
}

.casecochecoteacote {
    display: flex
;
    align-items: center;
    justify-content: space-evenly;
}

.dark-theme #searchForm .labeltitre {
    color: #90caf9 !important;
    font-weight: 700 !important;
    border-bottom: 1px solid #90caf9;
    margin-bottom: 4px;
}

.light-theme #searchForm .labeltitre {
    color: #007bff !important;
    font-weight: 700 !important;
    border-bottom: 1px solid #90caf9;
    margin-bottom: 4px;
}