/* ============================================================
   custom-modern.css — Overrides thème Material Admin
   Palette : violet #7c6fcd / sidebar sombre #1e1a2e
   ============================================================ */

/* ---- Typographie ---- */
body,
.page-content,
.panel,
.modal-content {
    font-family: 'Inter', sans-serif !important;
}

/* ---- Menu fixe desktop (renfort CSS) ---- */
@media (min-width: 1200px) {
    #menubar                        { width: 240px !important; }
    #base                           { padding-left: 240px !important; }
    body.menubar-hoverable #menubar { width: 240px !important; }
    body.menubar-hoverable #base    { padding-left: 240px !important; }
    /* Force les titres toujours visibles — empêche le thème de les masquer */
    #menubar .title                 { display: inline !important; opacity: 1 !important; }
    #menubar .gui-controls li a     { white-space: nowrap; overflow: hidden; }
}

/* ---- Sidebar sombre violette ---- */
#menubar {
    background-color: #1e1a2e !important;
    border-right: none !important;
}

#menubar.menubar-inverse::before {
    background: #1e1a2e !important;
}

.page-sidebar {
    background-color: #1e1a2e !important;
}

/* Items de menu */
.gui-controls > li > a {
    color: #b8b0d8 !important;
    font-size: 13px !important;
    font-weight: 400;
    border-radius: 4px;
    margin: 1px 8px;
    padding-left: 12px !important;
    transition: background 0.15s, color 0.15s;
}

.gui-controls > li > a:hover {
    background-color: rgba(255,255,255,0.07) !important;
    color: #ffffff !important;
}

.gui-controls > li.active > a,
.gui-controls > li.open > a {
    background-color: #7c6fcd !important;
    color: #ffffff !important;
}

/* Icônes menu */
.gui-controls > li > a .icons {
    color: inherit !important;
}

/* Sous-menus */
.gui-controls > li ul {
    background-color: #17142a !important;
}

.gui-controls > li ul > li > a {
    color: #9d94c4 !important;
    font-size: 13px !important;
    padding-left: 48px !important;
    transition: color 0.15s;
}

.gui-controls > li ul > li > a:hover,
.gui-controls > li ul > li.active > a {
    color: #a99ee0 !important;
    background-color: transparent !important;
}

/* Titres de section dans le menu */
.gui-controls small,
.sidebar-section-title {
    font-size: 11px !important;
    color: #5a5180 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Scrollbar sidebar */
#menubar::-webkit-scrollbar { width: 4px; }
#menubar::-webkit-scrollbar-track { background: transparent; }
#menubar::-webkit-scrollbar-thumb { background: #3d3660; border-radius: 2px; }

/* Logo / branding dans sidebar */
.menubar-header {
    background-color: #17132a !important;
}

/* ---- Header ---- */
#topbar,
.page-topbar {
    background-color: #17132a !important;
    border-bottom: none !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3) !important;
}

#topbar a,
.page-topbar a {
    color: #b8b0d8 !important;
}

#topbar a:hover,
.page-topbar a:hover {
    color: #ffffff !important;
}

/* ---- Boutons ---- */
.btn {
    border-radius: 6px !important;
    font-size: 13px;
    font-weight: 500;
    transition: box-shadow 0.15s, opacity 0.15s;
}

.btn:hover {
    opacity: 0.9;
}

.btn-primary,
.btn-info {
    background-color: #7c6fcd !important;
    border-color: #7c6fcd !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-info:hover {
    background-color: #9085d4 !important;
    border-color: #9085d4 !important;
}

/* ---- Inputs ---- */
.form-control {
    border-radius: 4px !important;
    border-color: #d5d0e8 !important;
    font-size: 13px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
    border-color: #7c6fcd !important;
    box-shadow: 0 0 0 2px rgba(124,111,205,0.2) !important;
    outline: none;
}

/* ---- Cartes / Panels ---- */
.panel {
    border-radius: 8px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08) !important;
    border: 1px solid #e0e0e0 !important;
}

.panel-heading {
    border-radius: 8px 8px 0 0 !important;
    font-weight: 600;
    font-size: 13px;
}

/* ---- DataTables ---- */
table.dataTable thead th {
    background-color: #7c6fcd !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-bottom: none !important;
    letter-spacing: 0.03em;
}

table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::after {
    color: rgba(255,255,255,0.7) !important;
}

table.dataTable tbody tr:hover {
    background-color: rgba(124,111,205,0.06) !important;
}

table.dataTable tbody td {
    font-size: 13px;
    vertical-align: middle;
}

/* ---- Badges & Labels ---- */
.label-primary,
.badge-primary {
    background-color: #7c6fcd !important;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
    background-color: transparent !important;
    font-size: 12px;
    padding-left: 0;
}

.breadcrumb > .active {
    color: #7c6fcd !important;
    font-weight: 600;
}

/* ---- Liens actifs / accent général ---- */
a {
    color: #7c6fcd;
}

a:hover {
    color: #9085d4;
}

/* ---- Page title ---- */
.page-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #2d2560 !important;
}

/* ---- Modal ---- */
.modal-header {
    background-color: #7c6fcd !important;
    color: #ffffff !important;
    border-radius: 4px 4px 0 0;
}

.modal-title {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 15px;
}

.modal-header .close {
    color: #ffffff !important;
    opacity: 0.8;
}

.modal-content {
    border-radius: 6px !important;
    border: none !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2) !important;
}

/* ---- Select2 ---- */
.select2-container--default .select2-selection--single {
    border-radius: 4px !important;
    border-color: #d5d0e8 !important;
}

.select2-container--default .select2-results__option--highlighted {
    background-color: #7c6fcd !important;
}
