/* ==========================================================================
   Basik AIR-Concept — Platform Styles
   Light content | Dark navbar | Command Center aesthetic
   Brandbook: Cal Sans (titres) + Neue Metana (corps)
   Couleurs: #e4002b (rouge) | #000000 (noir) | #ffffff (blanc)
   ========================================================================== */

/* --- Fonts --- */
@font-face {
    font-family: 'Cal Sans';
    src: url('../fonts/CalSans-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Neue Metana';
    src: url('../fonts/NeueMetana-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Neue Metana';
    src: url('../fonts/NeueMetana-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --- Custom Properties --- */
:root {
    --basik-red: #e4002b;
    --basik-red-hover: #c80025;
    --basik-red-light: rgba(228, 0, 43, 0.08);
    --basik-red-border: rgba(228, 0, 43, 0.25);
    --basik-black: #000000;
    --basik-white: #ffffff;
    --basik-dark: #0a0a0a;
    --basik-content-bg: #f4f4f5;
    --basik-text: #1a1a2e;
    --basik-text-secondary: #374151;
    --basik-panel: #ffffff;
    --basik-panel-hover: #fafafa;
    --basik-border: rgba(0, 0, 0, 0.1);
    --basik-border-hover: rgba(0, 0, 0, 0.18);
    --basik-muted: #6b7280;
    --basik-muted-dark: #9ca3af;

    --status-success: #059669;
    --status-success-bg: rgba(5, 150, 105, 0.08);
    --status-success-border: rgba(5, 150, 105, 0.25);
    --status-warning: #d97706;
    --status-warning-bg: rgba(217, 119, 6, 0.08);
    --status-warning-border: rgba(217, 119, 6, 0.25);
    --status-danger: #e4002b;
    --status-danger-bg: rgba(228, 0, 43, 0.06);
    --status-danger-border: rgba(228, 0, 43, 0.2);
    --status-info: #2563eb;
    --status-info-bg: rgba(37, 99, 235, 0.08);
    --status-info-border: rgba(37, 99, 235, 0.25);
    --status-neutral: #6b7280;
    --status-neutral-bg: rgba(107, 114, 128, 0.08);
    --status-neutral-border: rgba(107, 114, 128, 0.25);

    --font-titles: 'Cal Sans', 'Arial Black', sans-serif;
    --font-body: 'Neue Metana', 'Inter', sans-serif;
}

/* --- Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--basik-content-bg);
    color: var(--basik-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-titles);
    font-weight: 400;
    color: var(--basik-text);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* --- Navbar (dark) --- */
.basik-navbar {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: var(--basik-black);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.basik-navbar .nav-link {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #94a3b8;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.basik-navbar .nav-link:hover {
    color: #ffffff;
}

.basik-navbar .nav-link.active {
    color: var(--basik-red);
    border-bottom-color: var(--basik-red);
}

.basik-logo {
    height: 36px;
    width: auto;
}

.basik-nav-icon {
    color: #94a3b8;
    transition: color 0.2s;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 4px;
}

.basik-nav-icon:hover {
    color: #ffffff;
}

.basik-nav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--basik-red);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* --- Notifications Dropdown (dark) --- */
.basik-notif-dropdown {
    width: 320px;
    padding: 0;
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.basik-notif-dropdown .dropdown-item {
    font-size: 12px;
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
    color: #94a3b8;
}

.basik-notif-dropdown .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.basik-user-info {
    text-align: right;
}

.basik-user-info .user-name {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ffffff;
    line-height: 1.2;
}

.basik-user-info .user-role {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--basik-red);
    letter-spacing: -0.02em;
}

.basik-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--basik-red-border);
    background: var(--basik-red-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    color: var(--basik-red);
}

/* --- Glass Panel (light cards) --- */
.glass-panel {
    background: var(--basik-panel);
    border: 1px solid var(--basik-border);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.glass-panel:hover {
    background: var(--basik-panel-hover);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* --- Section Headers --- */
.section-label {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--basik-muted-dark);
}

.section-label-light {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--basik-muted);
}

/* --- KPI Cards --- */
.kpi-card {
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.kpi-card .kpi-icon {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.75rem;
    opacity: 0.08;
    font-size: 2.5rem;
    color: var(--basik-red);
}

.kpi-card .kpi-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--basik-muted);
    margin-bottom: 0.5rem;
}

.kpi-card .kpi-value {
    font-family: var(--font-titles);
    font-size: 1.875rem;
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1;
    color: var(--basik-text);
}

.kpi-card .kpi-variation {
    font-size: 12px;
    font-weight: 700;
    margin-left: 0.75rem;
}

.kpi-card .kpi-variation.up {
    color: var(--status-success);
}

.kpi-card .kpi-variation.down {
    color: var(--basik-red);
}

.kpi-card .kpi-variation.stable {
    color: var(--basik-muted);
}

.kpi-bar {
    height: 4px;
    width: 100%;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 2px;
    margin-top: 1rem;
    overflow: hidden;
}

.kpi-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--basik-red);
    transition: width 0.6s ease;
}

/* --- KPI Card Link --- */
.kpi-card-link {
    transition: border-color 0.2s, transform 0.15s;
    cursor: pointer;
}

.kpi-card-link:hover {
    border-color: var(--basik-red-border);
    transform: translateY(-2px);
}

.kpi-card-link:hover .kpi-icon {
    opacity: 0.15;
}

/* --- Status Badges --- */
.badge-status {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid;
    display: inline-block;
}

.badge-success {
    color: var(--status-success);
    background: var(--status-success-bg);
    border-color: var(--status-success-border);
}

.badge-warning {
    color: var(--status-warning);
    background: var(--status-warning-bg);
    border-color: var(--status-warning-border);
}

.badge-danger {
    color: var(--status-danger);
    background: var(--status-danger-bg);
    border-color: var(--status-danger-border);
}

.badge-info {
    color: var(--status-info);
    background: var(--status-info-bg);
    border-color: var(--status-info-border);
}

.badge-neutral {
    color: var(--status-neutral);
    background: var(--status-neutral-bg);
    border-color: var(--status-neutral-border);
}

/* --- Alert Card --- */
.alert-critical {
    background: var(--status-danger-bg);
    border: 1px solid var(--status-danger-border);
    border-radius: 0.5rem;
    padding: 1.25rem;
}

.alert-critical .alert-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(228, 0, 43, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--basik-red);
    flex-shrink: 0;
}

/* --- Tables --- */
.basik-table {
    width: 100%;
    border-collapse: collapse;
}

.basik-table thead th {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--basik-muted);
    padding: 0.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--basik-border);
}

.basik-table tbody td {
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    color: var(--basik-text);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.basik-table tbody tr {
    transition: background 0.15s;
}

.basik-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.basik-table .cell-id {
    font-weight: 700;
    color: var(--basik-text);
}

.basik-table .cell-action {
    text-align: right;
}

.basik-table .cell-action button {
    background: none;
    border: none;
    color: var(--basik-muted);
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.basik-table .cell-action button:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--basik-text);
}

/* --- Military Border --- */
.military-border {
    border-left: 3px solid var(--basik-red);
}

/* --- Buttons --- */
.btn-basik {
    background: var(--basik-red);
    color: #ffffff;
    border: none;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.625rem 1.5rem;
    border-radius: 0.25rem;
    transition: background 0.2s;
    cursor: pointer;
}

.btn-basik:hover {
    background: var(--basik-red-hover);
    color: #ffffff;
}

.btn-basik-outline {
    background: transparent;
    color: var(--basik-red);
    border: 1px solid var(--basik-red);
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.625rem 1.5rem;
    border-radius: 0.25rem;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}

.btn-basik-outline:hover {
    background: var(--basik-red);
    color: #ffffff;
}

.btn-basik-ghost {
    background: var(--basik-red-light);
    color: var(--basik-red);
    border: 1px solid var(--basik-red-border);
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.625rem 1.5rem;
    border-radius: 0.25rem;
    transition: background 0.2s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-basik-ghost:hover {
    background: rgba(228, 0, 43, 0.15);
}

/* --- Task Checklist --- */
.task-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    border: 1px solid var(--basik-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.task-item:hover .task-checkbox {
    border-color: var(--basik-red);
}

.task-checkbox.checked {
    border-color: var(--basik-red-border);
}

.task-checkbox.checked .material-symbols-outlined {
    color: var(--basik-red);
    font-size: 14px;
}

.task-label {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--basik-muted);
    transition: color 0.2s;
}

.task-item:hover .task-label {
    color: var(--basik-text);
}

.task-label.completed {
    text-decoration: line-through;
    color: var(--basik-muted-dark);
}

/* --- Stepper / Pipeline --- */
.pipeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 0 1.5rem;
}

.pipeline::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 2.5rem;
    right: 2.5rem;
    height: 2px;
    background: rgba(0, 0, 0, 0.08);
}

.pipeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    z-index: 1;
}

.pipeline-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--basik-panel);
    color: #ffffff;
}

.pipeline-dot.done {
    background: var(--status-success);
    box-shadow: 0 0 12px rgba(5, 150, 105, 0.2);
}

.pipeline-dot.active {
    background: var(--basik-red);
    box-shadow: 0 0 12px rgba(228, 0, 43, 0.2);
}

.pipeline-dot.pending {
    background: var(--basik-muted-dark);
    opacity: 0.3;
}

.pipeline-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.pipeline-label.done {
    color: var(--status-success);
}

.pipeline-label.active {
    color: var(--basik-red);
}

.pipeline-label.pending {
    color: var(--basik-muted-dark);
    opacity: 0.5;
}

/* --- Live Badge --- */
.live-badge {
    font-size: 10px;
    background: rgba(0, 0, 0, 0.04);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    color: var(--basik-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--status-success);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- Main Content Area --- */
.basik-main {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* --- Utilities --- */
.text-basik-red { color: var(--basik-red); }
.text-basik-muted { color: var(--basik-muted); }
.text-basik-muted-dark { color: var(--basik-muted-dark); }
.bg-basik-red { background-color: var(--basik-red); }
.border-basik { border-color: var(--basik-border); }

.font-title { font-family: var(--font-titles); }
.font-body { font-family: var(--font-body); }

.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }
.tracking-widest { letter-spacing: 0.12em; }

.text-xxs { font-size: 10px; }
.text-xxxs { font-size: 8px; }

/* --- Bootstrap Overrides (light) --- */
.table-dark {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--basik-border);
}

.form-control {
    background-color: #ffffff;
    border: 1px solid var(--basik-border);
    color: var(--basik-text);
    font-family: var(--font-body);
}

.form-control:focus {
    background-color: #ffffff;
    border-color: var(--basik-red);
    color: var(--basik-text);
    box-shadow: 0 0 0 0.2rem rgba(228, 0, 43, 0.12);
}

.form-control::placeholder {
    color: var(--basik-muted-dark);
}

/* Dropdown in navbar context — stays dark */
.dropdown-menu {
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-item {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

