:root {
    --xp-blue: #245edb;
    --win-sidebar: #f0f0f0;
    --accent-color: #00e5ff;
}

* { box-sizing: border-box; }

body {
    margin: 0; padding: 0; overflow: hidden;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: #000 url('background.png') no-repeat center center fixed;
    background-size: cover;
}

/* --- Écran de Login --- */
#login-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: url('background.png') no-repeat center center;
    background-size: cover; display: flex; align-items: center; justify-content: center; z-index: 2000;
}

#login-screen::before {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(8px); z-index: -1;
}

.login-container {
    text-align: center; background: rgba(0, 0, 0, 0.6); padding: 50px;
    border-radius: 30px; border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0,0,0,0.8); width: 90%; max-width: 1000px;
}

.main-logo { max-width: 250px; margin-bottom: 10px; }
.select-text { color: white; font-size: 1.8rem; margin-bottom: 40px; text-transform: uppercase; letter-spacing: 2px; }

.user-list { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; }
.user-item { cursor: pointer; text-align: center; transition: all 0.3s; }
.user-img-wrapper { 
    width: 150px; height: 150px; border: 3px solid rgba(255,255,255,0.4); 
    border-radius: 15px; overflow: hidden; margin-bottom: 10px; background: #222;
}
.user-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.username { color: white; font-weight: bold; display: block; font-size: 1.1rem; }

.user-item:hover { transform: translateY(-10px); }
.user-item:hover .user-img-wrapper { border-color: var(--accent-color); box-shadow: 0 0 20px var(--accent-color); }
.user-item:hover .username { color: var(--accent-color); }

/* --- Bureau et Fenêtre --- */
#desktop { width: 100vw; height: 100vh; position: relative; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, 110px); gap: 15px; padding: 20px; }
.folder-icon-wrapper { text-align: center; color: white; cursor: pointer; text-shadow: 2px 2px 4px black; font-size: 0.8rem; }
.folder-icon-wrapper img { width: 48px; }

#cancun-widget {
    position: absolute; bottom: 45px; right: 20px; width: 150px;
    z-index: 50; cursor: move; filter: drop-shadow(2px 2px 5px rgba(0,0,0,0.5));
}

.xp-window {
    position: absolute; top: 50px; left: 80px; width: 780px; height: 520px;
    background: white; border: 3px solid var(--xp-blue); border-radius: 8px 8px 0 0;
    display: none; flex-direction: column; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.window-title-bar {
    background: linear-gradient(to bottom, #245edb, #3f8cf3); padding: 5px 10px;
    color: white; font-weight: bold; display: flex; justify-content: space-between; cursor: move;
}

.win-btn { background: #3f8cf3; border: 1px solid white; color: white; cursor: pointer; width: 22px; height: 22px; font-weight: bold; }
.win-btn.close { background: #e04343; }

.window-content { display: flex; flex: 1; overflow: hidden; }
.window-sidebar { width: 160px; background: var(--win-sidebar); border-right: 1px solid #ccc; padding: 10px; }
.sidebar-item { padding: 8px; cursor: pointer; font-size: 0.9rem; }
.sidebar-item:hover { background: #e0e0e0; }

.track-view { flex: 1; overflow-y: auto; padding: 15px; }
.track-row { padding: 10px; cursor: pointer; border-bottom: 1px solid #eee; }
.track-row:hover { background: #f5faff; }

/* --- Barre des tâches --- */
.taskbar {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 30px;
    background: linear-gradient(to bottom, #245edb, #3f8cf3); display: flex; align-items: center; z-index: 1000;
}
#start-btn { background: linear-gradient(to bottom, #388e3c, #4caf50); color: white; padding: 0 15px; height: 100%; border: none; font-style: italic; font-weight: bold; }
.taskbar-item { background: rgba(255,255,255,0.2); color: white; padding: 2px 10px; border-radius: 3px; margin-left: 10px; font-size: 0.8rem; }
.system-tray { margin-left: auto; background: #1290eb; padding: 0 15px; color: white; height: 100%; display: flex; align-items: center; font-size: 0.8rem; }

.xp-window {
    min-width: 300px;
    min-height: 200px;
    resize: both; /* Permet le redimensionnement natif */
    overflow: auto; /* Nécessaire pour que 'resize' fonctionne */
    display: flex;
    flex-direction: column;
}

.window-content {
    flex: 1;
    display: flex;
    overflow: hidden; /* Empêche le contenu de casser la fenêtre */
}