/* Style inspiré de Donozeo avec fond proche du noir pour sidebar */
:root {
    --sidebar-width: 250px;
    --header-height: 60px;
    --primary-color-gradient: linear-gradient(196deg, #006494 50% 50%, #0e395c);
    --primary-color: #006494; /* Couleur bg-dark de Bootstrap */
    --secondary-color: #34495e;
    --background-color: #ecf0f1;
    --default-background-color: #ffffff; /* Couleur de fond par défaut */
    --card-bg: #f8f9fa; /* Couleur de fond des cartes */
    --header-bg: #ffffff; /* Couleur de fond de l'en-tête */
    --header-text-color: #333; /* Couleur du texte de l'en-tête */
    --header-border-color: #e9ecef; /* Couleur de la bordure de l'en-tête */
    --header-height: 60px; /* Hauteur de l'en-tête */
    --sidebar-text-color: #ffffff; /* Couleur du texte de la sidebar */
    --sidebar-hover-bg: rgba(
        255,
        255,
        255,
        0.2
    ); /* Couleur de fond au survol des liens de la sidebar */
    --sidebar-active-bg: #ecf0f1; /* Couleur de fond des liens actifs de la sidebar */
    --sidebar-link-color: #ffffff; /* Couleur des liens de la sidebar */
    --sidebar-link-hover-color: #ffffff; /* Couleur des liens de la sidebar au survol */
    --sidebar-link-active-color: #34495e; /* Couleur des liens actifs de la sidebar */
    --sidebar-icon-color: #ffffff; /* Couleur des icônes de la sidebar */
    --sidebar-icon-hover-color: #ffffff; /* Couleur des icônes de la sidebar au survol */
    --sidebar-menu-title-color: #ffffff; /* Couleur des titres de menu de la sidebar */
    --sidebar-menu-dropdown-color: rgba(
        255,
        255,
        255,
        0.95
    ); /* Couleur des sous-menus de la sidebar */
    --card-bg: #ffffff;
    --text-color: #333; /* Couleur du texte principal */
    --muted-color: #6c757d; /* Couleur du texte atténué */
    --link-color: #006494; /* Couleur des liens */
    --link-hover-color: #004d73; /* Couleur des liens au survol */
    --link-active-color: #00334d; /* Couleur des liens actifs */
    --border-color: #e9ecef; /* Couleur des bordures */
    --card-border-radius: 8px; /* Rayon de bordure des cartes */
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Ombre des cartes */
    --card-hover-shadow: 0 6px 8px rgba(0, 0, 0, 0.1); /* Ombre des cartes au survol */
    --card-padding: 1.5rem; /* Padding des cartes */
    --card-title-font-size: 1.25rem; /* Taille de police du titre des cartes */
    --card-text-color: #6c757d; /* Couleur du texte des cartes */
    --muted-color: #7f8c8d;
    --bs-btn-color: #fff;
    --bs-btn-bg: #c3c6cb;
}
.bg-primary {
    --bs-bg-opacity: 1;
    background-color: var(--primary-color) !important;
}

.btn.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #037ab1;
    --bs-btn-border-color: #0777aa;
    --bs-btn-hover-color: rgba(255, 255, 255, 0.9);
    --bs-btn-hover-bg: #034969;
    --bs-btn-hover-border-color: #025c8a;
    --bs-btn-focus-shadow-rgb: 49, 132, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #006494;
    --bs-btn-active-border-color: #045986;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #2a5b73;
    --bs-btn-disabled-border-color: #006494;
}

.btn-outline-primary {
    --bs-btn-color: #035885;
    --bs-btn-border-color: #006494;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #006494;
    --bs-btn-hover-border-color: #006494;
    --bs-btn-focus-shadow-rgb: 13, 110, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #02527d;
    --bs-btn-active-border-color: #006494;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #0d6efd;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #006494;
    --bs-gradient: none;
}

/* The Magic */
.btn-breadcrumb .btn:not(:last-child):after {
    content: " ";
    display: block;
    width: 0;
    height: 0;
    border-top: 17px solid transparent;
    border-bottom: 17px solid transparent;
    border-left: 10px solid white;
    position: absolute;
    top: 50%;
    margin-top: -17px;
    left: 100%;
    z-index: 3;
}
.btn-breadcrumb .btn:not(:last-child):before {
    content: " ";
    display: block;
    width: 0;
    height: 0;
    border-top: 17px solid transparent;
    border-bottom: 17px solid transparent;
    border-left: 10px solid rgb(173, 173, 173);
    position: absolute;
    top: 50%;
    margin-top: -17px;
    margin-left: 1px;
    left: 100%;
    z-index: 2;
}

/* The Spacing */
.btn-breadcrumb .btn {
    position: relative;
    padding: 6px 12px 6px 24px;
    border-radius: 0;
}
.btn-breadcrumb .btn:first-child {
    padding: 6px 6px 6px 10px;
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}
.btn-breadcrumb .btn:last-child {
    padding: 6px 18px 6px 24px;
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* Hover background color */
.btn-breadcrumb .btn:hover {
    background-color: #e9ecef;
    color: #000;
}

/* Default button */
.btn-breadcrumb .btn:first-child,
.btn-breadcrumb .btn:last-child {
    border-radius: 0;
}
.btn-breadcrumb .btn.btn-default:not(:last-child):after {
    border-left: 10px solid #fff;
}
.btn-breadcrumb .btn.btn-default:not(:last-child):before {
    border-left: 10px solid #ccc;
}
.btn-breadcrumb .btn.btn-default:hover:not(:last-child):after {
    border-left: 10px solid #ebebeb !important;
}
.btn-breadcrumb .btn.btn-default:hover:not(:last-child):before {
    border-left: 10px solid #adadad !important;
}
.page-header-title {
    font-size: 2rem;
    font-weight: bold;
}

#header {
    background-color: var(--default-background-color);
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}
/* Sidebar */
.container-sidebar {
    padding-left: 0.5rem;
}
/* Police moderne */
body {
    font-family: "Inter", sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-y: scroll; /* Pour appliquer la scrollbar personnalisée */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: 15px; /* Taille de police par défaut */
    line-height: 1.5; /* Hauteur de ligne pour une meilleure lisibilité */
}

/* Layout principal */
#layout-wrapper {
    min-height: 100vh;
}
.sidebar .navbar-nav .nav-link {
    color: #e9ecef;
    font-size: 14px;
}
.sidebar .collapse .nav .nav-link {
    padding: 0.2rem 0.6rem;
    font-size: 85%;
}

a {
    text-decoration: none;
    color: var(--link-color);
}

div.h-head {
    height: 60px;
    justify-content: center;
    display: flex;
    align-items: center;
    background: white;
}
.sidebar .nav-link {
    justify-content: flex-start;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    background: var(--primary-color-gradient);
    /*box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);*/
    z-index: 2000;
    display: flex;
    flex-direction: column;
    padding: 10px 0 20px; /* Ajustement pour correspondre à px-3 */
    height: calc(100% - var(--header-height));
    top: var(--header-height);
    left: 0;
    overflow: auto;
}

/* Définition de bg-dark */
.bg-dark {
    background-color: var(--primary-color) !important;
}

.sidebar .nav-link {
    color: #ffffff; /* Liens principaux en blanc */
    font-weight: 500;
    padding: 0.5rem 0.6rem;
    border-radius: 4px; /* Coins arrondis */
    transition: background-color 0.2s;
    display: flex; /* Utilisation de flexbox pour aligner les chevrons */
    align-items: center; /* Alignement vertical */
    justify-content: flex-start; /* Espacement uniforme entre texte et chevron */
    font-size: 14px;
    margin: 1px 10px 1px 0; /* Marges pour espacement */
}
a.nav-link.menu-link.active,
a.nav-link.menu-link.active i {
    color: var(--sidebar-link-active-color); /* Couleur du texte actif */
}

a.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2); /* Fond pour le lien actif */
}

.sidebar .nav-item.line-section {
    text-transform: uppercase;
    font-size: 10px;
    opacity: 0.8;
    padding: 0.2rem 0.5rem;
}

a.nav-link.menu-link.active {
    background-color: var(--sidebar-active-bg); /* Fond pour le lien actif */
    margin-right: 0;
    border-radius: 4px 0 0 4px; /* Coins arrondis pour le lien actif */
}
.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
.sidebar .nav-link i {
    color: #ffffff; /* Icônes en blanc */
    margin-right: 0.5rem;
    font-size: 1.2rem;
}
.menu-title {
    font-size: 0.7rem;
    color: #ffffff;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
}
.menu-dropdown .nav-link {
    padding-left: 2rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95); /* Sous-menus en blanc avec opacité 95% */
    display: block;
}
.menu-dropdown .nav-link i {
    display: none; /* Pas d'icônes pour sous-menus */
}
.sidebar .nav-link .bi-chevron-down {
    margin-left: auto; /* Pousse le chevron à droite */
    color: #ffffff; /* Chevrons en blanc */
    font-size: 1rem; /* Taille cohérente */
}

/* Main content */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: calc(
        var(--header-height)
    ); /* Ajustement pour éviter le chevauchement */
}

/* Page content */
.page-content {
    min-height: calc(100vh - var(--header-height) * 2);
    display: flex;
    flex-direction: column;
}

/* Header */
.navbar {
    z-index: 1001;
    background-color: var(--card-bg);
    border-bottom: 1px solid #e9ecef;
}
.navbar-nav .nav-link {
    color: var(--text-color);
    font-weight: 500;
}
.dropdown-menu {
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Footer */
.footer {
    /*margin-left: var(--sidebar-width);*/
    border-top: 1px solid #e9ecef;
    font-size: 13px;
}

/* Cards (inspiré de Donozeo avec marges et centrage) */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    background-color: var(--card-bg);
    overflow: hidden;
    position: relative;
    margin: 0.5rem 0;
}
.card-animate .position-absolute svg {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    opacity: 0.05;
    fill: var(--secondary-color);
}
.card-body {
    z-index: 1;
    position: relative;
}
.card-title {
    font-size: 1.25rem;
    font-weight: 600;
}
.card-text {
    color: var(--muted-color);
}
.card .fa-4x,
.card .fa-5x {
    color: #34495e;
}

/* Vertical Overlay */
.vertical-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: none;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--background-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #0e395c;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #04111d;
}
* {
    transition: all 0.5s ease;
}

/* Responsive */
@media (max-width: 991px) {
    .sidebar {
        top: var(--header-height);
        width: 100%;
        height: calc(100vh - var(--header-height));
        overflow: auto;
        left: 0;
        display: none;
    }
    .sidebar .navbar-nav {
        flex-direction: column;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
        margin-left: 0 !important;
    }
    .container {
        margin: auto !important;
        max-width: 100%;
    }
    .footer {
        margin-left: 0;
    }
    .vertical-overlay.show {
        display: block;
    }
}

/* Custom styles for Donozeo-like widgets */
.dashboard-widget {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    background-color: var(--card-bg);
    margin-bottom: 1rem;
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);*/
}
.dashboard-widget i {
    font-size: 2rem;
    margin-right: 1rem;
    color: #34495e;
}
.dashboard-widget .widget-content {
    flex-grow: 1;
}
.dashboard-widget .widget-title {
    font-size: 1rem;
    color: var(--muted-color);
    text-transform: uppercase;
}
.dashboard-widget .widget-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Centrage des cartes */
.row {
    justify-content: center;
}
.modal {
    z-index: 9999 !important;
}

#main-body {
    flex-grow: 1;
    min-height: 70vh;
}

#card-body,
.dashboard-card {
    display: flex;
    flex-direction: column;
    min-height: 70vh;
    padding: 1.5rem;
    background: var(--default-background-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

/* HOME CARD*/
.card .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.card .card-category {
    font-size: 1rem;
}
.card .card-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card.card-equal {
    min-height: 80px; /* hauteur fixe ou adaptative */
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.table-title {
    font-size: 1.25rem; /* fs-5 */
    font-weight: 300; /* fw-light */
    margin-bottom: 0; /* mb-0 */
    padding-top: 0.5rem; /* pt-2 */
    padding-bottom: 0.5rem; /* pb-2 */
}
.table tr > td,
.table tr > th {
    padding-left: 0.75rem; /* pl-2 */
    padding-right: 0.75rem; /* pr-2 */
}
.table > :not(caption) > * > * {
    vertical-align: middle;
    font-size: 95%;
}

.table tr .action-icons i {
    color: var(--card-text-color); /* couleur par défaut (noir ou héritée) */
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

table tbody tr {
    border-bottom: none !important;
}

.table {
    --bs-table-hover-bg: rgba(209, 219, 227, 0.8);
    --bs-table-striped-bg: var(--background-color);
}
.table > :not(caption) > * > * {
    border-bottom-width: 0;
}

@media (min-width: 768px) {
    .card.card-equal {
        min-height: 100px;
    }
}

@media (min-width: 1200px) {
    .card.card-equal {
        min-height: 120px;
    }
}

/* Card hover effect */
.card:hover {
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-2px);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
/* Card active effect */
.card:active {
    box-shadow: var(--card-shadow);
    transform: translateY(0);
    transition: box-shadow 0.1s ease, transform 0.1s ease;
}

/************************************************/
tr .action-icons i {
    color: inherit; /* couleur par défaut (noir ou héritée) */
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

tr:hover .action-icons i {
    opacity: 1;
}
.dataTables_filter label,
.dataTables_length label {
    display: flex;
    align-items: center;
    gap: 0.2em; /* espace entre le texte et le select */
    font-weight: normal;
    white-space: nowrap;
    margin: 0.5rem 0;
    font-size: smaller;
}
.dataTables_filter input,
.dataTables_length select {
    width: auto; /* Largeur automatique pour s'adapter au contenu */
}

.dataTables_length select {
    margin: 0 0.3em;
}

#accordionMenu {
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: thin;
}
/**********************************************************/
