:root {
    --bg-color: #f4f7f6;
    --surface-color: #ffffff;
    --primary-color: #0077b5; /* Bleu pro */
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --radius: 8px;
    --spacing: 1rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', system-ui, sans-serif; }

body { background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; }

/* Conteneur principal */
.container { max-width: 1200px; margin: 0 auto; padding: var(--spacing); }

/* Navigation */
nav { background: var(--surface-color); padding: 1rem; box-shadow: 0 2px 4px rgba(0,0,0,0.05); display: flex; justify-content: space-between; align-items: center;}
nav a { text-decoration: none; color: var(--primary-color); font-weight: bold; padding: 0.5rem;}

/* Formulaires et Boutons (Cibles tactiles >= 44px pour Cordova/Mobile) */
input, textarea, button { width: 100%; min-height: 44px; padding: 0.8rem; margin-bottom: 1rem; border: 1px solid var(--border-color); border-radius: var(--radius); font-size: 1rem; }
button { background-color: var(--primary-color); color: white; border: none; font-weight: bold; cursor: pointer; transition: opacity 0.2s; }
button:active { opacity: 0.8; }

/* Grille Dashboard */
.grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); } }

.card { background: var(--surface-color); padding: 1rem; border-radius: var(--radius); text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.card img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 0.5rem; }

/* Messagerie */
.chat-container { display: flex; flex-direction: column; height: calc(100vh - 80px); }
@media (min-width: 768px) { .chat-container { flex-direction: row; } }
.chat-list { flex: 1; border-right: 1px solid var(--border-color); overflow-y: auto; background: var(--surface-color); }
.chat-box { flex: 2; display: flex; flex-direction: column; background: var(--bg-color); }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem;}
.msg-bubble { padding: 0.8rem; border-radius: var(--radius); max-width: 80%; }
.msg-sent { background: var(--primary-color); color: white; align-self: flex-end; }
.msg-received { background: var(--surface-color); align-self: flex-start; border: 1px solid var(--border-color);}
.chat-input-area { display: flex; gap: 0.5rem; padding: 1rem; background: var(--surface-color); }
.chat-input-area input { margin-bottom: 0; }
.chat-input-area button { width: auto; padding: 0 1.5rem; }