/* ==========================================================================
   OSIT v2.6 - Master CSS (Identité Bleue)
   ========================================================================== */
:root { 
    --bg-body:#09090b; --bg-card:#18181b; --border-color:#27272a; 
    --text-main:#e4e4e7; --text-muted:#a1a1aa; 
    --accent:#3b82f6; /* <-- L'identité de base est maintenant BLEUE */
    --rouge:#ef4444; --orange:#f59e0b; --vert:#10b981; --gris:#64748b;
    --header-bg:#18181b; --input-bg:#000000; --badge-bg:#27272a; --badge-text:#ffffff;
}
[data-theme="light"] { 
    --bg-body:#f8fafc; --bg-card:#ffffff; --border-color:#e2e8f0; 
    --text-main:#0f172a; --text-muted:#64748b; --accent:#2563eb; 
    --header-bg:#ffffff; --input-bg:#f1f5f9; --badge-bg:#e2e8f0; --badge-text:#0f172a;
}
[data-theme="blue"] { 
    --bg-body:#1e293b; --bg-card:#334155; --border-color:#475569; 
    --text-main:#f1f5f9; --text-muted:#94a3b8; --accent:#38bdf8; 
    --header-bg:#334155; --input-bg:#1e293b; --badge-bg:#475569; --badge-text:#ffffff;
}

body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg-body); color: var(--text-main); margin: 0; min-height: 100vh; transition: 0.3s; }
.main-content { padding: 20px; max-width: 1200px; margin: 0 auto; box-sizing: border-box; }
.card { background: var(--bg-card); padding: 20px; border-radius: 12px; border: 1px solid var(--border-color); margin-bottom: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }

.header-bar { background: var(--header-bg); padding: 10px 20px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1000; height: 65px; width: 100%; box-sizing: border-box; }
.header-brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.nav-container { display: flex; gap: 12px; align-items: center; }
.desktop-menu { display: flex; gap: 5px; }
.nav-link { color: var(--text-muted); padding: 8px 12px; text-decoration: none; border-radius: 6px; font-size: 0.9em; font-weight: 500; }
.nav-link.active { background: var(--text-main); color: var(--bg-body); font-weight: bold; }
.mobile-menu { display: none; }
.nav-btn { background: var(--input-bg); border: 1px solid var(--border-color); color: var(--text-main); padding: 8px 12px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: inherit; }
.nav-logout { color: var(--rouge); text-decoration: none; font-weight: bold; font-size: 0.85em; padding: 8px 12px; border: 1px solid var(--rouge); border-radius: 6px; transition: 0.2s; }
.nav-logout:hover { background: var(--rouge); color: white; }

.tabs { display: flex; gap: 5px; margin-bottom: 25px; background: var(--bg-card); padding: 5px; border-radius: 10px; border: 1px solid var(--border-color); overflow-x: auto; }
.tab-btn { flex: 1; background: transparent; border: none; color: var(--text-muted); padding: 12px 15px; cursor: pointer; font-weight: 600; font-size: 0.9em; border-radius: 8px; transition: 0.2s; white-space: nowrap; display: flex; align-items: center; justify-content: center; gap: 8px; }
.tab-btn.active { background: var(--accent); color: white; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2); }

table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.9em; }
th { text-align: left; padding: 12px; color: var(--text-muted); border-bottom: 2px solid var(--border-color); background: rgba(0,0,0,0.05); }
td { padding: 12px; border-bottom: 1px solid var(--border-color); }
tr:hover { background: rgba(255,255,255,0.02); }

.ticket-card { border-left: 5px solid var(--gris); padding: 20px; background: var(--bg-card); border-radius: 8px; border: 1px solid var(--border-color); border-left-width: 5px; margin-bottom: 15px; }

/* OPTION URGENT - BORDURE POINTILLÉE */
.ticket-urgent { 
    border: 2px dashed var(--rouge) !important; 
    animation: pulseUrgent 2s infinite; 
}
@keyframes pulseUrgent {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3); }
    70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.badge-cat { background: var(--badge-bg); color: var(--badge-text); padding: 4px 10px; border-radius: 4px; font-size: 0.75em; font-weight: bold; }
.filter-chip { padding: 6px 14px; border-radius: 20px; background: var(--bg-card); border: 1px solid var(--border-color); cursor: pointer; font-size: 0.85em; display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); transition: 0.2s; user-select: none; }
.filter-chip.active { background: var(--text-main); color: var(--bg-body); font-weight: bold; }

input, select, textarea { width: 100%; padding: 11px; background: var(--input-bg); color: var(--text-main); border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 12px; box-sizing: border-box; font-family: inherit; }
.btn-maj { background: var(--accent); color: white; border: none; padding: 12px 24px; border-radius: 8px; cursor: pointer; font-weight: bold; transition: 0.2s; }
.btn-action { background: var(--badge-bg); color: var(--badge-text); border: 1px solid var(--border-color); padding: 8px 14px; border-radius: 6px; cursor: pointer; }
.btn-danger { background: rgba(239, 68, 68, 0.1); color: var(--rouge); border: 1px solid var(--rouge); padding: 8px 14px; border-radius: 6px; cursor: pointer; font-weight: bold; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.status-rouge { color: var(--rouge); font-weight: bold; } .status-orange { color: var(--orange); font-weight: bold; } .status-vert { color: var(--vert); font-weight: bold; } .status-gris { color: var(--gris); font-weight: bold; }

.switch { position: relative; display: inline-block; width: 44px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--border-color); transition: .3s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent); }
input:checked + .slider:before { transform: translateX(22px); }

@media (max-width: 850px) { .desktop-menu { display: none; } .mobile-menu { display: block; max-width: 130px; } .form-grid { grid-template-columns: 1fr; } .hide-mobile { display: none; } }