:root {
    --primary: #6c5ce7;
    --bg: #f9f9fb;
    --card: #ffffff;
    --text: #2d3436;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--card);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#calendar-grid {
    flex: 1;
    display: grid;
    grid-template-rows: repeat(7, 1fr); /* 7 jours de la semaine */
    gap: 10px;
    padding: 15px;
    overflow-y: auto;
}

.day-card {
    background: var(--card);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    min-height: 80px;
}

.day-label {
    font-weight: bold;
    font-size: 0.9em;
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
    color: var(--primary);
}

.event-item {
    background: #eee;
    font-size: 0.8em;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 4px;
    border-left: 3px solid var(--primary);
}

/* Bouton flottant */
#addEventBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 30px;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Modal */
#modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hidden { display: none !important; }

.modal-content {
    background: white;
    padding: 20px;
    width: 90%;
    border-radius: 15px;
}

input {
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.row { display: flex; gap: 10px; align-items: center; }
.actions { display: flex; justify-content: space-between; margin-top: 15px; }
.save { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 8px; }
/* ... (garder le style précédent et ajouter) ... */

.view {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg);
    z-index: 10;
    padding: 20px;
    box-sizing: border-box;
}

.hidden { display: none !important; }

.content-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.backBtn {
    background: none; border: none; color: var(--primary);
    font-size: 1.1em; font-weight: bold; cursor: pointer;
}

.day-card { cursor: pointer; transition: transform 0.1s; }
.day-card:active { transform: scale(0.98); }

.event-item {
    cursor: pointer;
    margin-bottom: 8px;
    padding: 10px;
    background: #f0f0f5;
}

/* Styles pour le Login */
#login-screen {
    position: fixed;
    inset: 0;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    width: 80%;
    max-width: 350px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.login-card h1 { font-size: 1.5em; margin-bottom: 10px; }

.login-card select, .login-card input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.login-card button {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 10px;
}

/* Couleurs des événements */
.event-gregoire { 
    background-color: #2ecc71 !important; /* Vert */
    border-left: 4px solid #27ae60;
    color: white;
}

.event-emma { 
    background-color: #3498db !important; /* Bleu */
    border-left: 4px solid #2980b9;
    color: white;
}

.event-both { 
    background-color: #e67e22 !important; /* Orange */
    border-left: 4px solid #d35400;
    color: white;
}

.event-item {
    font-size: 0.75em;
    padding: 4px 6px;
    border-radius: 4px;
    margin-bottom: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}