/* ==========================================================================
   COCKPIT DESIGN SYSTEM — UTILITAIRES & ATOMES CSS
   ==========================================================================
   Micro-classes normalisées pour éliminer l'artisanat HTML et les styles inline.
   Aucun style en dur ne doit subsister dans les vues PHP.
   ========================================================================== */

/* 1. Affichage & Flexbox */
.d-flex           { display: flex !important; }
.d-inline-flex    { display: inline-flex !important; }
.d-block          { display: block !important; }
.d-inline-block    { display: inline-block !important; }
.d-none, .hidden  { display: none !important; }

.flex-col, .flex-column   { flex-direction: column !important; }
.flex-row                 { flex-direction: row !important; }
.flex-wrap                { flex-wrap: wrap !important; }
.flex-nowrap              { flex-wrap: nowrap !important; }

.items-center, .align-items-center     { align-items: center !important; }
.items-start, .align-items-start       { align-items: flex-start !important; }
.items-end, .align-items-end           { align-items: flex-end !important; }
.items-stretch, .align-items-stretch   { align-items: stretch !important; }
.items-baseline, .align-items-baseline { align-items: baseline !important; }

.justify-start, .justify-content-start     { justify-content: flex-start !important; }
.justify-center, .justify-content-center   { justify-content: center !important; }
.justify-end, .justify-content-end         { justify-content: flex-end !important; }
.justify-between, .justify-content-between { justify-content: space-between !important; }

.flex-1, .flex-grow-1     { flex: 1 1 0% !important; min-width: 0 !important; }
.flex-auto                { flex: 1 1 auto !important; }
.flex-shrink-0            { flex-shrink: 0 !important; }

/* Raccourcis Flexbox Fréquents */
.flex-center                      { display: flex !important; align-items: center !important; justify-content: center !important; }
.flex-between, .flex-between-center { display: flex !important; align-items: center !important; justify-content: space-between !important; }

/* 2. Gaps Flexbox & Grid */
.gap-0            { gap: 0 !important; }
.gap-1            { gap: 4px !important; }
.gap-1-5          { gap: 6px !important; }
.gap-2            { gap: 8px !important; }
.gap-2-5          { gap: 10px !important; }
.gap-3            { gap: 12px !important; }
.gap-4            { gap: 16px !important; }
.gap-5            { gap: 20px !important; }
.gap-6            { gap: 24px !important; }

/* 3. Grilles Cockpit */
.grid, .d-grid    { display: grid !important; }
.grid-2, .d-grid-2, .grid-columns-2 { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.grid-2-1         { display: grid !important; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) !important; }
.grid-3           { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.grid-4           { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }

@media (max-width: 768px) {
    .grid-2, .grid-2-1, .grid-3, .grid-4, .d-grid-2, .grid-columns-2 {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* 4. Typographie & Poids */
.text-2xs         { font-size: 10px !important; line-height: 1.3 !important; }
.text-xs          { font-size: 11.5px !important; line-height: 1.4 !important; }
.text-sm          { font-size: 12.5px !important; line-height: 1.45 !important; }
.text-base        { font-size: 13.5px !important; line-height: 1.5 !important; }
.text-md          { font-size: 15px !important; line-height: 1.5 !important; }
.text-lg          { font-size: 17px !important; line-height: 1.4 !important; font-weight: 700 !important; }

.fw-normal        { font-weight: 400 !important; }
.fw-medium        { font-weight: 500 !important; }
.fw-semibold      { font-weight: 600 !important; }
.fw-bold          { font-weight: 700 !important; }

.text-left, .text-start   { text-align: left !important; }
.text-center              { text-align: center !important; }
.text-right, .text-end    { text-align: right !important; }

.truncate         { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
.nowrap           { white-space: nowrap !important; }

/* 5. Couleurs de Texte Sémantiques */
.text-main        { color: var(--text-main) !important; }
.text-muted       { color: var(--text-muted) !important; }
.text-dim         { color: var(--text-dim) !important; }
.text-primary     { color: var(--brand-primary) !important; }
.text-success     { color: var(--status-success, #2a9308) !important; }
.text-danger      { color: var(--status-danger, #cc2525) !important; }
.text-warning     { color: #f59e0b !important; }
.text-info        { color: var(--status-info, #405783) !important; }

/* 6. Espacements (Marges & Rembourrages) */
.m-0              { margin: 0 !important; }
.mb-0             { margin-bottom: 0 !important; }
.mb-0-5           { margin-bottom: 2px !important; }
.mb-1             { margin-bottom: 4px !important; }
.mb-1-5           { margin-bottom: 6px !important; }
.mb-2             { margin-bottom: 8px !important; }
.mb-2-5           { margin-bottom: 10px !important; }
.mb-3             { margin-bottom: 12px !important; }
.mb-3-5           { margin-bottom: 14px !important; }
.mb-4             { margin-bottom: 16px !important; }
.mb-5             { margin-bottom: 20px !important; }

.mt-0             { margin-top: 0 !important; }
.mt-0-5           { margin-top: 2px !important; }
.mt-1             { margin-top: 4px !important; }
.mt-1-5           { margin-top: 6px !important; }
.mt-2             { margin-top: 8px !important; }
.mt-2-5           { margin-top: 10px !important; }
.mt-3             { margin-top: 12px !important; }
.mt-3-5           { margin-top: 14px !important; }
.mt-4             { margin-top: 16px !important; }
.mt-5             { margin-top: 20px !important; }

.my-0             { margin-top: 0 !important; margin-bottom: 0 !important; }
.my-1             { margin-top: 4px !important; margin-bottom: 4px !important; }
.my-1-5           { margin-top: 6px !important; margin-bottom: 6px !important; }
.my-2             { margin-top: 8px !important; margin-bottom: 8px !important; }
.my-2-5           { margin-top: 10px !important; margin-bottom: 10px !important; }
.my-3             { margin-top: 12px !important; margin-bottom: 12px !important; }
.my-4             { margin-top: 16px !important; margin-bottom: 16px !important; }
.mx-auto          { margin-left: auto !important; margin-right: auto !important; }
.my-auto          { margin-top: auto !important; margin-bottom: auto !important; }
.m-auto           { margin: auto !important; }
.ms-auto          { margin-left: auto !important; }
.me-auto          { margin-right: auto !important; }

.p-0              { padding: 0 !important; }
.p-0-5            { padding: 2px !important; }
.p-1              { padding: 4px !important; }
.p-1-5            { padding: 6px !important; }
.p-2              { padding: 8px !important; }
.p-2-5            { padding: 10px !important; }
.p-3              { padding: 12px !important; }
.p-3-5            { padding: 14px !important; }
.p-4              { padding: 16px !important; }
.p-5              { padding: 20px !important; }

.pt-0             { padding-top: 0 !important; }
.pt-0-5           { padding-top: 2px !important; }
.pt-1             { padding-top: 4px !important; }
.pt-1-5           { padding-top: 6px !important; }
.pt-2             { padding-top: 8px !important; }
.pt-2-5           { padding-top: 10px !important; }
.pt-3             { padding-top: 12px !important; }
.pt-3-5           { padding-top: 14px !important; }
.pt-4             { padding-top: 16px !important; }
.pt-5             { padding-top: 20px !important; }

.pb-0             { padding-bottom: 0 !important; }
.pb-0-5           { padding-bottom: 2px !important; }
.pb-1             { padding-bottom: 4px !important; }
.pb-1-5           { padding-bottom: 6px !important; }
.pb-2             { padding-bottom: 8px !important; }
.pb-2-5           { padding-bottom: 10px !important; }
.pb-3             { padding-bottom: 12px !important; }
.pb-3-5           { padding-bottom: 14px !important; }
.pb-4             { padding-bottom: 16px !important; }
.pb-5             { padding-bottom: 20px !important; }

.pl-0             { padding-left: 0 !important; }
.pl-1             { padding-left: 4px !important; }
.pl-1-5           { padding-left: 6px !important; }
.pl-2             { padding-left: 8px !important; }
.pl-2-5           { padding-left: 10px !important; }
.pl-3             { padding-left: 12px !important; }
.pl-4             { padding-left: 16px !important; }

.pr-0             { padding-right: 0 !important; }
.pr-1             { padding-right: 4px !important; }
.pr-1-5           { padding-right: 6px !important; }
.pr-2             { padding-right: 8px !important; }
.pr-2-5           { padding-right: 10px !important; }
.pr-3             { padding-right: 12px !important; }
.pr-4             { padding-right: 16px !important; }

.px-0             { padding-left: 0 !important; padding-right: 0 !important; }
.px-1             { padding-left: 4px !important; padding-right: 4px !important; }
.px-1-5           { padding-left: 6px !important; padding-right: 6px !important; }
.px-2             { padding-left: 8px !important; padding-right: 8px !important; }
.px-2-5           { padding-left: 10px !important; padding-right: 10px !important; }
.px-3             { padding-left: 12px !important; padding-right: 12px !important; }
.px-3-5           { padding-left: 14px !important; padding-right: 14px !important; }
.px-4             { padding-left: 16px !important; padding-right: 16px !important; }
.px-5             { padding-left: 20px !important; padding-right: 20px !important; }

.py-0             { padding-top: 0 !important; padding-bottom: 0 !important; }
.py-0-5           { padding-top: 2px !important; padding-bottom: 2px !important; }
.py-1             { padding-top: 4px !important; padding-bottom: 4px !important; }
.py-1-5           { padding-top: 6px !important; padding-bottom: 6px !important; }
.py-2             { padding-top: 8px !important; padding-bottom: 8px !important; }
.py-2-5           { padding-top: 10px !important; padding-bottom: 10px !important; }
.py-3             { padding-top: 12px !important; padding-bottom: 12px !important; }
.py-3-5           { padding-top: 14px !important; padding-bottom: 14px !important; }
.py-4             { padding-top: 16px !important; padding-bottom: 16px !important; }
.py-5             { padding-top: 20px !important; padding-bottom: 20px !important; }

/* 7. Largeurs & Hauteurs */
.w-full           { width: 100% !important; }
.w-auto           { width: auto !important; }
.h-full           { height: 100% !important; }

/* 8. Arrondis & Bordures */
.rounded-sm       { border-radius: 4px !important; }
.rounded          { border-radius: 6px !important; }
.rounded-md       { border-radius: 8px !important; }
.rounded-lg       { border-radius: 12px !important; }
.rounded-full     { border-radius: 9999px !important; }

.border           { border: 1px solid var(--border-color) !important; }
.border-top       { border-top: 1px solid var(--border-color) !important; }
.border-bottom    { border-bottom: 1px solid var(--border-color) !important; }
.border-0         { border: none !important; }

/* 9. Composants Cockpit Spécialisés */
.card-compact     { padding: 12px 14px !important; }
.card-dense       { padding: 10px 12px !important; }

.sidebar-label {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    display: block !important;
    margin-bottom: 4px !important;
    letter-spacing: 0.01em !important;
}

.sidebar-value-box {
    padding: 6px 10px !important;
    background: var(--bg-hover) !important;
    border-radius: 4px !important;
    font-size: 11.5px !important;
    color: var(--text-main) !important;
}

/* 10. Icônes Vectorielles Normalisées */
.zd-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: -0.15em;
    flex-shrink: 0;
    transition: transform 0.15s ease, color 0.15s ease;
}

/* 11. Arrière-plans & Positionnement */
.bg-hover         { background: var(--bg-hover) !important; }
.bg-card          { background: var(--bg-card) !important; }
.bg-subtle        { background: rgba(255, 255, 255, 0.03) !important; }
.bg-brand-subtle  { background: rgba(41, 61, 98, 0.08) !important; }
.border-brand-subtle { border: 1px solid rgba(41, 61, 98, 0.25) !important; }
.bg-danger-subtle { background: rgba(239, 68, 68, 0.1) !important; }
.border-danger    { border: 1px solid rgba(239, 68, 68, 0.35) !important; }
.btn-locked       { padding: 2px 7px !important; height: 26px !important; color: var(--text-dim) !important; display: inline-flex !important; align-items: center !important; gap: 4px !important; }
.pos-relative     { position: relative !important; }
.pos-absolute     { position: absolute !important; }
.pos-fixed        { position: fixed !important; }
.cursor-pointer   { cursor: pointer !important; }
.overflow-hidden  { overflow: hidden !important; }
.overflow-y-auto  { overflow-y: auto !important; }
.max-h-60         { max-height: 240px !important; }
.max-h-50         { max-height: 200px !important; }
.h-7              { height: 28px !important; }
.h-7-5            { height: 30px !important; }
.h-8              { height: 32px !important; }
.w-7              { width: 28px !important; }
.w-9              { width: 38px !important; }
.w-10             { width: 40px !important; }
.w-28             { width: 110px !important; }
.w-30             { width: 120px !important; }
.w-32             { width: 130px !important; }
.w-55             { width: 220px !important; }
.w-60             { width: 240px !important; }
.min-w-0          { min-width: 0 !important; }
.max-w-full       { max-width: 100% !important; }
.min-w-28         { min-width: 110px !important; }
.min-w-30         { min-width: 120px !important; }
.min-w-32         { min-width: 130px !important; }
.min-w-38         { min-width: 150px !important; }
.min-w-50         { min-width: 200px !important; }
.min-w-55         { min-width: 220px !important; }
.min-w-75         { min-width: 300px !important; }
.max-h-30         { max-height: 120px !important; }
.gap-3-5          { gap: 14px !important; }
.pl-0-5           { padding-left: 2px !important; }
.ml-0-5           { margin-left: 2px !important; }
.opacity-70       { opacity: 0.7 !important; }
.text-white       { color: #ffffff !important; }
.text-secondary   { color: var(--text-secondary, #94a3b8) !important; }
.mt-neg-1-5       { margin-top: -6px !important; }
.border-dashed    { border-style: dashed !important; }
.border-t-primary { border-top: 2px solid var(--brand-primary) !important; }

.align-middle        { vertical-align: middle !important; }
.text-decoration-none { text-decoration: none !important; }
.fst-italic          { font-style: italic !important; }
.text-rose           { color: #fb7185 !important; }
.ml-1                { margin-left: 4px !important; }
.mb-3-5              { margin-bottom: 14px !important; }

.user-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.user-status-dot-active {
    background: var(--status-success, #10b981) !important;
}
.user-status-dot-inactive {
    background: var(--text-dim, #64748b) !important;
}

.btn-icon-subtle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease, background 0.15s ease;
}
.btn-icon-subtle:hover {
    color: var(--text-main);
    background: var(--bg-hover);
}

.uppercase        { text-transform: uppercase !important; }
.tracking-tight   { letter-spacing: -0.01em !important; }
.tracking-wide    { letter-spacing: 0.03em !important; }
.tracking-wider   { letter-spacing: 0.04em !important; }
.tracking-widest  { letter-spacing: 0.05em !important; }

.pl-2             { padding-left: 8px !important; }
.pl-3             { padding-left: 12px !important; }
.pl-4             { padding-left: 16px !important; }

.pb-1             { padding-bottom: 4px !important; }
.pb-2             { padding-bottom: 8px !important; }
.pb-2-5           { padding-bottom: 10px !important; }
.pb-3             { padding-bottom: 12px !important; }

.leading-none     { line-height: 1 !important; }
.leading-tight    { line-height: 1.25 !important; }
.leading-normal   { line-height: 1.5 !important; }
.leading-relaxed  { line-height: 1.6 !important; }

.self-start       { align-self: flex-start !important; }
.self-center      { align-self: center !important; }
.self-end         { align-self: flex-end !important; }

.text-profit      { color: #10b981 !important; }
.text-brand       { color: var(--brand-primary) !important; }

.max-w-65         { max-width: 260px !important; }

/* 12. Largeurs fixes & Filtres */
.w-120            { width: 120px !important; }
.w-130            { width: 130px !important; }
.w-135            { width: 135px !important; }
.w-140            { width: 140px !important; }
.w-150            { width: 150px !important; }
.w-155            { width: 155px !important; }
.w-160            { width: 160px !important; }
.w-170            { width: 170px !important; }
.w-180            { width: 180px !important; }
.w-200            { width: 200px !important; }
.w-250            { width: 250px !important; }
.max-w-170        { max-width: 170px !important; }
.max-w-250        { max-width: 250px !important; }
.max-w-320        { max-width: 320px !important; }
.max-h-220        { max-height: 220px !important; }

/* 13. Typographie granulaire & Densité */
.fs-10            { font-size: 10px !important; }
.fs-10-5          { font-size: 10.5px !important; }
.fs-11            { font-size: 11px !important; }
.fs-11-5          { font-size: 11.5px !important; }
.fs-12            { font-size: 12px !important; }
.fs-13            { font-size: 13px !important; }
.fw-400           { font-weight: 400 !important; }
.fw-500           { font-weight: 500 !important; }
.fw-600           { font-weight: 600 !important; }
.fw-700           { font-weight: 700 !important; }

/* 14. Contrôles de formulaire compacts */
.select-compact   { height: 28px !important; min-height: 28px !important; max-height: 28px !important; padding: 2px 26px 2px 8px !important; font-size: 11.5px !important; font-weight: 500 !important; line-height: 22px !important; box-sizing: border-box !important; }
.input-compact    { padding: 4px 8px !important; font-size: 11.5px !important; height: 32px !important; min-height: 32px !important; max-height: 32px !important; box-sizing: border-box !important; }
.btn-compact      { height: 32px !important; font-size: 11.5px !important; padding: 0 10px !important; }

.opacity-80       { opacity: 0.8 !important; }
.mt-0-5           { margin-top: 2px !important; }
.min-w-120        { min-width: 120px !important; }
.min-w-150        { min-width: 150px !important; }
.min-w-160        { min-width: 160px !important; }
.min-w-170        { min-width: 170px !important; }
.min-w-200        { min-width: 200px !important; }
.min-w-280        { min-width: 280px !important; }
.w-60px           { width: 60px !important; }
.w-220            { width: 220px !important; }
.max-w-380        { max-width: 380px !important; }

.fs-12-5          { font-size: 12.5px !important; }
.fs-13-5          { font-size: 13.5px !important; }
.fs-9-5           { font-size: 9.5px !important; }
.w-100px          { width: 100px !important; }
.py-0-5           { padding-top: 2px !important; padding-bottom: 2px !important; }
.text-truncate    { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }




