/* --- S-CLOUD — Utility Classes & Shared Styles --- */
/*
   Note : Les variables de thème (light/mid/dark) sont définies
   dans layout.php via [data-theme="..."] sur <html>.
   Ce fichier contient uniquement les classes utilitaires.
*/

/* ============================================================
   UTILITY CLASSES — remplace les style="..." inline
   ============================================================ */

/* Couleurs texte */
.text-brand  { color: var(--purple, #7A4183) !important; }
.text-warning    { color: var(--lb-gold) !important; }
.text-theme-main     { color: var(--ks-text-main) !important; }
.text-theme-muted    { color: var(--ks-text-muted) !important; }

/* Badge or doré (thème-aware) */
.badge-gold {
    background: var(--lb-gold-dim);
    color: var(--lb-gold);
    border: 1px solid var(--lb-gold-border);
}

/* Bordures */
.border-theme-soft   { border-color: var(--ks-border-soft) !important; }

/* Tailles de texte */
.fs-2xs { font-size: .65rem !important; }
.fs-xs  { font-size: .72rem !important; }
.fs-sm  { font-size: .8rem !important; }
.fs-md  { font-size: .88rem !important; }

/* Conteneurs de formulaire */
.max-w-form    { max-width: 640px; width: 100%; }
.max-w-form-sm { max-width: 460px; width: 100%; }

/* Panel avec bordure gauche accent */
.border-left-purple { border-left: 4px solid var(--purple, #7A4183); }

/* Card header avec fond purple */
.sc-card-head {
    background: var(--purple, #7A4183);
    color: #fff;
    border-radius: 12px 12px 0 0;
}

/* Password strength bars */
.pw-strength-bar {
    height: 4px;
    background: #dee2e6;
    border-radius: 2px;
    flex: 1;
}

/* Sidebar sticky (extrait de layout inline) */
.ks-sidebar-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
}

/* ============================================================
   HEROICONS — Inline SVG icon system
   ============================================================ */

.ks-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    line-height: 0;
    width: 1.15em;
    height: 1.15em;
}

/* Inside sidebar nav-icon boxes */
.nav-icon .ks-icon {
    width: 100%;
    height: 100%;
    padding: 5px;
}
.ks-nav-icon--md .ks-icon { padding: 6px; }
.ks-nav-icon--sm .ks-icon { padding: 5px; }

/* Inside buttons */
.btn .ks-icon {
    width: 16px;
    height: 16px;
    vertical-align: -0.125em;
}

/* Inside headings */
h1 .ks-icon, h2 .ks-icon, h3 .ks-icon, h4 .ks-icon, h5 .ks-icon {
    width: 1.1em;
    height: 1.1em;
    vertical-align: -0.15em;
}

/* Badge context */
.badge .ks-icon {
    width: 14px;
    height: 14px;
    vertical-align: -0.1em;
}

/* ============================================================
   TABLE HEADERS — Violet uniforme (Purple Horizon #7A4183)
   ============================================================ */

table.sc-table thead th,
table.ent-table thead th,
table.sc-table thead th.sorting,
table.sc-table thead th.sorting_asc,
table.sc-table thead th.sorting_desc,
table.ent-table thead th.sorting,
table.ent-table thead th.sorting_asc,
table.ent-table thead th.sorting_desc,
table.dataTable.sc-table thead th,
table.dataTable.ent-table thead th {
    background: var(--purple, #7A4183) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 700 !important;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
table.sc-table thead tr:first-child th:first-child { border-top-left-radius: .75rem; }
table.sc-table thead tr:first-child th:last-child  { border-top-right-radius: .75rem; }

/* ============================================================
   FOOTER — Violet
   ============================================================ */

.app-footer {
    color: var(--purple, #7A4183) !important;
}
.app-footer .text-muted {
    color: var(--purple, #7A4183) !important;
}

/* Clickable table rows (data-ks-crud) */
tr[data-ks-crud] {
    cursor: pointer;
}

/* Missing icon placeholder (debug) */
.ks-icon-missing {
    display: inline-block;
    width: 1em;
    height: 1em;
    background: rgba(255,0,0,0.08);
    border: 1px dashed rgba(255,0,0,0.4);
    border-radius: 3px;
}