/* Life Toolbox — Thème clair */

/* ── Variables ────────────────────────────────────── */
:root {
    --lt-primary:   #4f46e5;   /* indigo */
    --lt-secondary: #7c3aed;   /* violet */
    --lt-accent:    #0891b2;   /* cyan */
    --lt-bg:        #f1f5f9;   /* gris très clair */
    --lt-surface:   #ffffff;   /* blanc pur */
    --lt-border:    #e2e8f0;   /* gris doux */
    --lt-text:      #1e293b;   /* ardoise foncée */
    --lt-muted:     #64748b;   /* gris moyen */
}

/* ── Base ─────────────────────────────────────────── */
body {
    background-color: var(--lt-bg);
    color: var(--lt-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}

/* ── Navbar ───────────────────────────────────────── */
.navbar-light-custom {
    background: #ffffff;
    border-bottom: 1px solid var(--lt-border);
    box-shadow: 0 1px 12px rgba(0, 0, 0, .06);
}
.navbar-brand {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--lt-primary) !important;
    letter-spacing: -0.5px;
}
.nav-link {
    color: var(--lt-muted) !important;
    font-weight: 500;
    transition: color .2s;
    border-radius: 8px;
    padding: .4rem .75rem !important;
}
.nav-link:hover, .nav-link.active {
    color: var(--lt-primary) !important;
    background: rgba(79, 70, 229, .07);
}
.navbar-toggler { border-color: var(--lt-border); }

/* ── Main content ─────────────────────────────────── */
.main-content { min-height: calc(100vh - 140px); padding: 2rem 0; }

/* ── Cards ────────────────────────────────────────── */
.card-dark {
    background: var(--lt-surface);
    border: 1px solid var(--lt-border);
    border-radius: 14px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .05);
}
.card-dark .card-body { padding: 1.6rem; }
.card-dark .card-header {
    background: rgba(79, 70, 229, .05);
    border-bottom: 1px solid var(--lt-border);
    border-radius: 14px 14px 0 0 !important;
    font-weight: 600;
    color: var(--lt-text);
    padding: 1rem 1.6rem;
}

/* ── Boutons ──────────────────────────────────────── */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--lt-primary), var(--lt-secondary));
    border: none;
    border-radius: 8px;
    font-weight: 600;
    padding: .55rem 1.4rem;
    color: white;
    transition: opacity .2s, transform .1s;
}
.btn-primary-custom:hover { opacity: .88; color: white; transform: translateY(-1px); }

/* ── Formulaires ──────────────────────────────────── */
.form-control, .form-select {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: var(--lt-text);
    border-radius: 8px;
}
.form-control:focus, .form-select:focus {
    background-color: #ffffff;
    border-color: var(--lt-primary);
    color: var(--lt-text);
    box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .18);
}
.form-control::placeholder { color: #94a3b8; }
.form-label { color: var(--lt-muted); font-size: .875rem; font-weight: 500; }
.form-check-input { border-color: #cbd5e1; }
.form-check-input:checked { background-color: var(--lt-primary); border-color: var(--lt-primary); }

/* ── Alertes ──────────────────────────────────────── */
.alert { border-radius: 10px; border: none; }
.alert-success { background: rgba(16, 185, 129, .1); color: #065f46; border: 1px solid rgba(16, 185, 129, .25); }
.alert-danger  { background: rgba(239, 68,  68, .1); color: #991b1b; border: 1px solid rgba(239, 68, 68, .25); }
.alert-warning { background: rgba(245, 158, 11, .1); color: #92400e; border: 1px solid rgba(245, 158, 11, .25); }
.alert-info    { background: rgba(6,  182, 212, .1); color: #164e63; border: 1px solid rgba(6, 182, 212, .25); }

/* ── Flash ────────────────────────────────────────── */
.flash-message { animation: slideIn .3s ease-out; }
@keyframes slideIn { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Dropdown ─────────────────────────────────────── */
.dropdown-menu {
    background: #ffffff !important;
    border: 1px solid var(--lt-border) !important;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .1);
}
.dropdown-item { color: var(--lt-text) !important; border-radius: 8px; margin: 1px 4px; }
.dropdown-item:hover { background: rgba(79, 70, 229, .07) !important; color: var(--lt-primary) !important; }
.dropdown-divider { border-color: var(--lt-border) !important; }

/* ── Footer ───────────────────────────────────────── */
footer { background: #ffffff; border-top: 1px solid var(--lt-border); }

/* ── Badges humeur ────────────────────────────────── */
.badge-mood-1 { background: #fecaca; color: #991b1b; }
.badge-mood-2 { background: #fed7aa; color: #9a3412; }
.badge-mood-3 { background: #fef08a; color: #713f12; }
.badge-mood-4 { background: #bbf7d0; color: #14532d; }
.badge-mood-5 { background: #c7d2fe; color: #3730a3; }
.mood-badge { font-size: 1.5rem; }

/* ── Streak badge ─────────────────────────────────── */
.streak-badge {
    display: inline-flex; align-items: center; gap: .3rem;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white; border-radius: 20px; padding: .2rem .7rem;
    font-size: .82rem; font-weight: 700;
}
.streak-number { font-size: 1.8rem; font-weight: 800; line-height: 1; }

/* ── Hygiène toggles ──────────────────────────────── */
.hygiene-toggle {
    width: 70px; height: 70px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; cursor: pointer; transition: all .2s;
    border: 3px solid var(--lt-border);
    background: #f8fafc;
}
.hygiene-toggle.done     { border-color: #16a34a; background: rgba(22, 163, 74, .1); }
.hygiene-toggle.not-done { border-color: #cbd5e1; background: #f8fafc; }
.hygiene-toggle:hover    { transform: scale(1.08); box-shadow: 0 4px 12px rgba(0,0,0,.1); }

/* ── Hobby dots ───────────────────────────────────── */
.hobby-dot {
    width: 12px; height: 12px; border-radius: 50%;
    display: inline-block; margin-right: .4rem;
}

/* ── Journal entries ──────────────────────────────── */
.journal-entry-card {
    border-left: 4px solid var(--lt-primary);
    transition: transform .15s, box-shadow .15s;
}
.journal-entry-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, .1);
}

/* ── Éditeur TipTap ───────────────────────────────── */
.tiptap-toolbar {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: .5rem;
    display: flex; gap: .3rem; flex-wrap: wrap;
}
.tiptap-toolbar button {
    background: transparent;
    border: 1px solid transparent;
    color: var(--lt-muted);
    border-radius: 5px; padding: .25rem .6rem;
    font-size: .85rem; cursor: pointer; transition: all .15s;
}
.tiptap-toolbar button:hover, .tiptap-toolbar button.is-active {
    background: rgba(79, 70, 229, .1);
    border-color: var(--lt-primary);
    color: var(--lt-primary);
}
.tiptap-editor {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0 0 8px 8px;
    padding: 1rem;
    min-height: 300px;
    color: var(--lt-text);
    outline: none;
    line-height: 1.7;
}
.tiptap-editor:focus { border-color: var(--lt-primary); }

/* ── Badge rappels ────────────────────────────────── */
.reminder-badge-btn {
    position: relative; background: transparent; border: none;
    color: var(--lt-muted); padding: .4rem .6rem; border-radius: 8px;
    cursor: pointer; transition: all .2s;
}
.reminder-badge-btn:hover {
    color: var(--lt-primary);
    background: rgba(79, 70, 229, .07);
}
.reminder-count {
    position: absolute; top: -4px; right: -4px;
    background: #ef4444; color: white; font-size: .65rem;
    font-weight: 700; border-radius: 10px; padding: .1rem .4rem;
    min-width: 18px; text-align: center;
}
.reminder-dropdown {
    position: absolute; right: 0; top: calc(100% + .5rem);
    background: #ffffff; border: 1px solid var(--lt-border); border-radius: 12px;
    min-width: 300px; box-shadow: 0 12px 40px rgba(0, 0, 0, .12); z-index: 1050;
}
.reminder-item {
    padding: .75rem 1rem; border-bottom: 1px solid var(--lt-border);
    display: flex; justify-content: space-between; align-items: center;
    color: var(--lt-text);
}
.reminder-item:last-child { border-bottom: none; }

/* ── Tables ───────────────────────────────────────── */
.table { color: var(--lt-text); }
.table thead th {
    background: #f8fafc;
    border-bottom: 2px solid var(--lt-border);
    color: var(--lt-muted);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.table tbody tr:hover { background: rgba(79, 70, 229, .03); }

/* ── Badges Bootstrap ─────────────────────────────── */
.badge.bg-primary { background-color: var(--lt-primary) !important; }

/* ── Progress bars ────────────────────────────────── */
.progress { background-color: #e2e8f0; border-radius: 100px; }
.progress-bar { background: linear-gradient(90deg, var(--lt-primary), var(--lt-secondary)); }

/* ── Heatmap calendrier ───────────────────────────── */
.react-calendar-heatmap rect { rx: 3; ry: 3; }
.react-calendar-heatmap .color-empty   { fill: #f1f5f9; }
.react-calendar-heatmap .color-scale-1 { fill: rgba(79, 70, 229, .2); }
.react-calendar-heatmap .color-scale-2 { fill: rgba(79, 70, 229, .45); }
.react-calendar-heatmap .color-scale-3 { fill: rgba(79, 70, 229, .7); }
.react-calendar-heatmap .color-scale-4 { fill: rgba(79, 70, 229, 1); }

/* ── Page login / register ────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #ede9fe 0%, #dbeafe 100%);
}
.auth-card {
    background: #ffffff;
    border: 1px solid var(--lt-border);
    border-radius: 18px;
    box-shadow: 0 8px 40px rgba(79, 70, 229, .12);
    padding: 2.5rem;
    width: 100%; max-width: 430px;
}
.auth-logo { font-size: 2.8rem; line-height: 1; }
.auth-title { font-weight: 800; font-size: 1.6rem; color: var(--lt-text); margin-bottom: .25rem; }
.auth-subtitle { color: var(--lt-muted); font-size: .95rem; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .main-content { padding: 1rem 0; }
    .card-dark .card-body { padding: 1.1rem; }
    .auth-card { margin: 1rem; padding: 1.8rem; }
}
