:root {
    --bg: #121212;
    --surface: #1e1e1e;
    --surface-hover: #2d2d2d;
    --text: #ffffff;
    --text-muted: #a0a0a0;
    --accent: #7f5af0;
    --accent-hover: #9d7bff;
    --danger: #ff4a4a;
    --success: #2cb67d;
    --border: #333333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* En-tête */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
header h1 {
    font-size: 1.2rem;
    font-weight: 600;
}
.status-dot {
    width: 10px;
    height: 10px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
}

/* Contenu principal */
main {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 90px; /* Laisse de la place pour la nav */
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.2s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cartes & Listes */
.card {
    background: var(--surface);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
}

.input-card {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

input, textarea, select {
    width: 100%;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--accent);
}
textarea { resize: vertical; min-height: 80px; }

/* Boutons */
.icon-btn {
    background: var(--accent);
    color: white;
    border: none;
    width: 50px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.icon-btn:active { background: var(--accent-hover); }

.primary-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s;
}
.primary-btn:active { background: var(--accent-hover); }

/* Tâches */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.task-item {
    background: var(--surface);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--accent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}
.task-info { display: flex; flex-direction: column; gap: 5px; }
.task-title { font-weight: 500; }
.task-date { font-size: 0.8rem; color: var(--text-muted); }
.task-prio { font-size: 0.75rem; background: rgba(127, 90, 240, 0.2); color: var(--accent); padding: 2px 8px; border-radius: 10px; width: fit-content;}

.check-btn {
    background: none;
    border: 2px solid var(--text-muted);
    color: var(--text-muted);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.check-btn:active { background: var(--success); border-color: var(--success); color: white; }

/* Plan & Mémoire */
.markdown-body { white-space: pre-wrap; font-size: 0.9rem; line-height: 1.5; }
.scroll-box { max-height: 300px; overflow-y: auto; font-size: 0.85rem; line-height: 1.6; white-space: pre-wrap; color: var(--text-muted); }

/* Barre de navigation en bas */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--surface);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    z-index: 1000;
}
.bottom-nav button {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
    padding: 5px 15px;
    transition: color 0.2s;
}
.bottom-nav button i { font-size: 1.3rem; }
.bottom-nav button.active { color: var(--accent); }

/* Version PC (écrans larges) */
@media (min-width: 768px) {
    main { max-width: 800px; margin: 0 auto; width: 100%; }
    .bottom-nav { width: 400px; left: 50%; transform: translateX(-50%); bottom: 20px; border-radius: 20px; border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
}

/* ... (Garde le début du CSS : body, header, main, tab-content) ... */

/* Grille pour les boutons d'action */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.primary-btn, .secondary-btn {
    padding: 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.primary-btn { background: var(--accent); color: white; }
.secondary-btn { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.primary-btn:active, .secondary-btn:active { opacity: 0.7; }

/* Reste du CSS (inputs, task-item, etc.) */