/* Métriques Raspberry Pi — layout liste verticale */
/* version: 1.2.0 */

/* Card Infrastructure — deux Pi dans une seule card */

.infra-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.infra-label {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    padding-bottom: 4px;
}

.infra-divider {
    width: 70%;
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 10px auto;
    border-radius: 999px;
}

/* Métriques — une ligne par stat */

.pi-metrics {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pi-metric {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 8px;
    border-radius: 8px;
    transition: background 0.15s;
}

.pi-metric:hover {
    background: rgba(255,255,255,0.03);
}

.pi-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    color: var(--muted);
}

.pi-label {
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    flex-shrink: 0;
    width: 52px;
}

.pi-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text) !important;
    font-variant-numeric: tabular-nums;
}

.pi-badge {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    color: var(--muted);
    flex-shrink: 0;
}

.pi-badge.ok     { background: rgba(58, 210, 159, 0.14); color: var(--success); }
.pi-badge.warn   { background: rgba(255, 179, 0, 0.12);  color: #ffb300; }
.pi-badge.danger { background: rgba(255, 75, 92, 0.16);  color: var(--danger); }

/* Ligne disque — barre intégrée */

.pi-metric--disk {
    flex-wrap: wrap;
    align-items: center;
}

.pi-disk-content {
    display: contents; /* les enfants participent au flex parent */
}

.pi-disk-top {
    display: contents;
}

.pi-disk-bar-track {
    flex-basis: 100%;
    margin-left: calc(13px + 7px + 52px + 7px); /* icon + gap + label + gap */
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-top: -1px;
    margin-bottom: 2px;
}

.pi-disk-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--success);
    transition: width 0.6s ease, background 0.3s ease;
    width: 0%;
}

.pi-disk-bar-fill.warn   { background: #f59e0b; }
.pi-disk-bar-fill.danger { background: var(--danger); }
