/* ==========================================================================
   MODULE HOSPITALISATION & SUIVI DES LITS — CLINIQUE MÉDICALE NOFLAY
   Fichier : assets/css/hospitalisation.css
   ========================================================================== */

/* --- 1. Disposition Générale (Layout) --- */
.hosp-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-app, #f8fafc);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

.hosp-sidebar {
    width: 260px;
    background: #0f172a;
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 1.5rem 1rem;
}

.hosp-sidebar .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.hosp-sidebar .sidebar-brand img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.hosp-sidebar .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.hosp-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.hosp-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.hosp-sidebar .nav-link.active {
    background: #0284c7;
    color: #ffffff;
}

.hosp-main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    min-width: 0;
}

/* --- 2. Indicateurs & Cartes KPI --- */
.hosp-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.hosp-kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hosp-kpi-card .kpi-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

.hosp-kpi-card .kpi-val {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

/* --- 3. Cartes des Salles & Chambres --- */
.salle-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1.75rem;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.salle-header {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.salle-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.badge-salle-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    background: #e2e8f0;
    color: #334155;
    text-transform: uppercase;
}

.salle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.25rem;
    padding: 1.5rem;
}

/* --- 4. Boîtes Visuelles des Lits & Statuts --- */
.bed-box {
    border-radius: 10px;
    padding: 1rem;
    border: 2px solid #cbd5e1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
    background: #ffffff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bed-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Vert = Disponible */
.bed-box.bed-disponible {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

/* Rouge = Occupé */
.bed-box.bed-occupe {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

/* Jaune = Nettoyage / Asepsie */
.bed-box.bed-nettoyage {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.bed-title {
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bed-type {
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.05);
}

.bed-patient {
    margin: 8px 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
}

.bed-action {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed rgba(0, 0, 0, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-action-bed {
    background: #0284c7;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-action-bed:hover {
    background: #0369a1;
}

/* --- 5. Surveillance au Chevet & Plan de Soins --- */
.surv-header-banner {
    background: #0f172a;
    color: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.surv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .surv-grid {
        grid-template-columns: 1fr;
    }
}

.card-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.soin-item-row {
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
}

.soin-item-row.fait {
    background: #f0fdf4;
    border-color: #86efac;
}
