:root {
    --primary: #2563eb; /* Bleu Cyber */
    --secondary: #1e293b;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #334155;
    --danger: #ef4444;
    --success: #10b981;
}

body { font-family: 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); margin: 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Header */
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
h1 { color: var(--secondary); font-size: 1.8rem; }
.btn { padding: 8px 16px; border-radius: 6px; text-decoration: none; font-weight: 500; display: inline-block; cursor: pointer; border: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-small { font-size: 0.8rem; padding: 4px 8px; margin-right: 5px; }

/* Filtres */
.filters { background: var(--card-bg); padding: 15px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); display: flex; gap: 10px; margin-bottom: 20px; align-items: flex-end; }
.filter-group { display: flex; flex-direction: column; }
.filter-group label { font-size: 0.8rem; margin-bottom: 4px; font-weight: bold; }
select, input { padding: 8px; border: 1px solid #cbd5e1; border-radius: 4px; }

/* Tableau Liste */
.pc-list { width: 100%; border-collapse: collapse; background: var(--card-bg); border-radius: 8px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.pc-list th { background: var(--secondary); color: white; text-align: left; padding: 12px; }
.pc-list td { padding: 12px; border-bottom: 1px solid #e2e8f0; vertical-align: middle; }
.pc-list tr:hover { background-color: #f1f5f9; }

.pc-img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; background: #eee; }
.badge { padding: 4px 8px; border-radius: 12px; font-size: 0.75rem; color: white; }
.status-Dispo { background: var(--success); }
.status-Réservé { background: orange; }

/* Login */
.login-body { display: flex; justify-content: center; align-items: center; height: 100vh; background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%); }
.login-box { background: white; padding: 40px; border-radius: 10px; box-shadow: 0 10px 25px rgba(0,0,0,0.2); text-align: center; }
.login-box input { display: block; width: 100%; margin: 10px 0; box-sizing: border-box; }
.login-box button { width: 100%; background: var(--primary); color: white; padding: 10px; border: none; border-radius: 4px; cursor: pointer; }

/* --- NOUVEAU CSS POUR IMAGE ET LIGHTBOX --- */

/* 1. La miniature dans le tableau */
.thumb-container {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #e2e8f0;
}

.pc-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

/* Le voile noir avec la loupe (caché par défaut) */
.thumb-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(30, 41, 59, 0.6); /* Fond sombre semi-transparent */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Invisible */
    transition: opacity 0.2s ease-in-out;
    color: white;
    font-size: 1.5rem;
}

/* Au survol du conteneur, on affiche le voile et on zoome légèrement l'image */
.thumb-container:hover .thumb-overlay {
    opacity: 1;
}
.thumb-container:hover .pc-thumb {
    transform: scale(1.1);
}


/* 2. La Lightbox (Boite modale plein écran) */
#lightbox-modal {
    display: none; /* Caché par défaut */
    position: fixed; /* Reste fixe même si on scrolle */
    z-index: 9999; /* Tout au dessus */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.85); /* Fond très sombre */
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

/* L'image en grand dans la lightbox */
.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s;
}

/* La croix de fermeture */
.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

/* Petites animations d'ouverture */
@keyframes fadeIn { from {opacity: 0} to {opacity: 1} }
@keyframes zoomIn { from {transform: scale(0.9)} to {transform: scale(1)} }