:root {
    --primary: #3498db;
    --secondary: #2c3e50;
    --bg: #f4f7f6;
    --card-bg: #ffffff;
    --text: #333;
    --radius: 12px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* --- LOGIN SCREEN --- */
#login-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
    width: 300px;
}

.login-icon { font-size: 40px; margin-bottom: 15px; }
.login-box h2 { margin: 0 0 10px 0; color: var(--secondary); }
.login-box input {
    width: 100%; padding: 10px; margin: 15px 0;
    border: 1px solid #ddd; border-radius: 6px; box-sizing: border-box;
}
.login-box button {
    width: 100%; padding: 10px; background: var(--primary);
    color: white; border: none; border-radius: 6px; cursor: pointer;
    font-size: 16px; transition: background 0.3s;
}
.login-box button:hover { background: #2980b9; }
.error { color: #e74c3c; font-size: 0.9em; min-height: 20px; margin-top: 10px;}

/* --- MAIN APP --- */
nav {
    background: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
}
.nav-content {
    max-width: 1000px; margin: 0 auto; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.logo { font-weight: bold; font-size: 1.2em; color: var(--secondary); }
.logout-btn {
    background: none; border: 1px solid var(--secondary);
    padding: 5px 15px; border-radius: 20px; cursor: pointer;
    color: var(--secondary); font-size: 0.9em;
}

.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

header { text-align: center; margin-bottom: 50px; }
h1 { color: var(--secondary); margin-bottom: 10px; }
.subtitle { color: #7f8c8d; font-size: 1.1em; }

/* GRID SYSTEM */
.grid-menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 25px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
}

/* IMAGES CIRCULAIRES */
.card-img-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #f0f0f0;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Important pour ne pas déformer l'image */
}

.card h3 { margin: 0 0 10px 0; font-size: 1.1em; color: var(--secondary); }

.badge {
    display: inline-block;
    padding: 4px 10px;
    background: #e8f8f5;
    color: #27ae60;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

/* Style pour les cartes inactives */
.card.disabled {
    opacity: 0.7;
    cursor: default;
    pointer-events: none; /* Empêche le clic */
}
.badge.gray { background: #f0f0f0; color: #95a5a6; }

footer { text-align: center; margin-top: 60px; color: #aaa; font-size: 0.9em; }