/* ──────────────────────────────────────────────────────────────────────────
   FSRM.html — thème clair (cohérent avec dashboard.css)
   ────────────────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }
body {
    margin: 0;
    background: #f8fafc;
    color: #0f172a;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 13px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 28px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}
.logo-icon {
    font-size: 32px;
    width: 52px; height: 52px;
    display: grid; place-items: center;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
}
header h1 {
    margin: 0;
    font-size: 19px;
    font-weight: 600;
    color: #0f172a;
}
.subtitle {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

main {
    padding: 24px 28px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ── KPIs ───────────────────────────────────────────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}
.kpi {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 3px solid;
    border-radius: 8px;
    padding: 16px 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.15s, box-shadow 0.15s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(15, 23, 42, 0.08); }
.kpi-icon { font-size: 28px; opacity: 0.85; }
.kpi-body { flex: 1; }
.kpi-value { font-size: 24px; font-weight: bold; color: #0f172a; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-label { font-size: 11px; text-transform: uppercase; color: #64748b; letter-spacing: 0.5px; margin-top: 3px; }
.kpi-sub   { font-size: 10px; color: #94a3b8; margin-top: 2px; }
.kpi-alert { font-size: 10px; color: #b91c1c; margin-top: 4px; font-weight: bold; }

.kpi-blue  { border-left-color: #3b82f6; }
.kpi-green { border-left-color: #10b981; }
.kpi-amber { border-left-color: #d97706; }
.kpi-red   { border-left-color: #dc2626; background: linear-gradient(90deg, #fef2f2 0%, #ffffff 50%); }

/* ── Filtres ────────────────────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.filter-label { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-right: 4px; }
.filter-sep { width: 1px; height: 20px; background: #e2e8f0; margin: 0 4px; }

.pill {
    padding: 5px 13px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.pill:hover { border-color: #3b82f6; color: #1e40af; background: #eff6ff; }
.pill.active           { background: #3b82f6; border-color: #3b82f6; color: #ffffff; }
.pill.pill-danger.active { background: #dc2626; border-color: #dc2626; color: #fff; }
.pill.pill-warn.active   { background: #ea580c; border-color: #ea580c; color: #fff; }
.pill.pill-ok.active     { background: #16a34a; border-color: #16a34a; color: #fff; }
.pill.pill-soft.active   { background: #7c3aed; border-color: #7c3aed; color: #fff; }

.pill.pill-server { font-family: Consolas, monospace; font-size: 11px; }

.search-input {
    padding: 5px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
    color: #0f172a;
    background: #fff;
    outline: none;
    min-width: 220px;
    transition: border-color 0.15s;
}
.search-input:focus { border-color: #3b82f6; }

/* ── Tableau ────────────────────────────────────────────────────────────── */
.table-wrap {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
table {
    width: 100%;
    border-collapse: collapse;
}
thead th {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
    font-weight: 600;
    white-space: nowrap;
}
thead th.sortable { cursor: pointer; user-select: none; }
thead th.sortable:hover { background: #eef2f7; color: #1e40af; }
thead th.sort-asc  .sort-icon::after { content: ' ▲'; }
thead th.sort-desc .sort-icon::after { content: ' ▼'; }
.sort-icon { color: #cbd5e1; font-size: 10px; }

tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }

tbody td {
    padding: 9px 14px;
    vertical-align: middle;
}

.col-serveur {
    font-family: Consolas, monospace;
    font-size: 11px;
    color: #475569;
    white-space: nowrap;
}
.col-disque {
    font-family: Consolas, monospace;
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
}
.col-chemin {
    font-family: Consolas, monospace;
    font-size: 11px;
    color: #334155;
    max-width: 380px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.col-usage, .col-size {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-size: 12px;
}
.col-usage { font-weight: 600; }

/* ── Barre de progression ────────────────────────────────────────────────── */
.col-pct { min-width: 120px; }
.pct-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pct-bar-bg {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}
.pct-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}
.pct-label {
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 38px;
    text-align: right;
}

.fill-ok      { background: #10b981; }
.fill-warn    { background: #f59e0b; }
.fill-danger  { background: #ef4444; }
.fill-over    { background: #dc2626; }

.text-ok      { color: #059669; }
.text-warn    { color: #d97706; }
.text-danger  { color: #dc2626; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.badge-hard   { background: #fee2e2; color: #991b1b; }
.badge-soft   { background: #ede9fe; color: #5b21b6; }
.badge-ok     { background: #dcfce7; color: #166534; }
.badge-warn   { background: #fef3c7; color: #92400e; }
.badge-over   { background: #fee2e2; color: #991b1b; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.table-footer {
    margin-top: 12px;
    font-size: 11px;
    color: #94a3b8;
    text-align: right;
}

.empty-state {
    padding: 48px;
    text-align: center;
    color: #94a3b8;
    font-style: italic;
}

/* ── Scrollbars ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
