/* Variables de couleurs pour Ascendys */
:root {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --primary-color: #6c5ce7; /* Violet moderne et dynamique */
    --accent-color: #ff7675; /* Couleur de la flamme / série */
    --text-main: #f5f6fa;
    --text-muted: #7f8fa6;
}

/* Reset global */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
    /* Bloque la sélection de texte et le menu contextuel natif */
    -webkit-touch-callout: none; 
    -webkit-user-select: none; 
    user-select: none; 
}

/* Réactive le comportement normal (curseur et sélection) uniquement pour les formulaires */
input, select, textarea {
    -webkit-user-select: auto;
    user-select: auto;
}

/* Fond global (bureau) */
body {
    background-color: #000;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    /* Nouveau : Empêche le rebond d'écran (overscroll) */
    overscroll-behavior-y: none;
}

/* Modification du padding-bottom pour la navbar */
.app-container {
    width: 100%;
    max-width: 480px; 
    background-color: var(--bg-color);
    min-height: 100vh;
    padding: 24px;
    padding-bottom: 94px; /* Empêche le contenu d'être masqué par la navbar */
    position: relative;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}

/* Typographie de base */
h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 32px;
    font-size: 2.2rem;
    font-weight: 800;
}

h2, h3 {
    margin-bottom: 16px;
    font-weight: 600;
}

/* Inputs (Champs de texte) */
input {
    width: 100%;
    padding: 16px;
    margin-bottom: 16px;
    border: 2px solid transparent;
    border-radius: 12px;
    background-color: var(--surface-color);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
}

input:focus {
    border: 2px solid var(--primary-color);
}

/* Boutons façon interface mobile */
button {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 12px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

button:active {
    opacity: 0.8;
    transform: scale(0.98); /* Petit effet d'enfoncement au toucher */
}

#google-login-btn {
    background-color: #ffffff;
    color: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#logout-btn {
    background-color: transparent;
    border: 2px solid var(--surface-color);
    color: var(--text-muted);
}

/* Espacements des sections */
#auth-section, #main-app-section {
    display: flex;
    flex-direction: column;
}

hr {
    border: 0;
    height: 1px;
    background: var(--surface-color);
    margin: 24px 0;
}

#status-message {
    text-align: center;
    margin-top: 12px;
    font-size: 0.9rem;
    /* Évite tout débordement / bloc mal placé : le texte reste sous les boutons */
    width: 100%;
    word-break: break-word;
    min-height: 1.2em;
    color: var(--text-muted);
}

/* --- Design : Liste des tâches --- */
#tasks-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    /* NOUVEAU : Scrollabilité de la liste */
    max-height: 65vh;
    overflow-y: auto;
    -ms-overflow-style: none; /* IE et Edge */
    scrollbar-width: none; /* Firefox */
}

/* NOUVEAU : Masquer la scrollbar pour un aspect natif (Chrome/Safari) */
#tasks-list::-webkit-scrollbar {
    display: none;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--surface-color);
    padding: 24px; /* Bonne hauteur pour 4-5 items par écran */
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.task-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-info h4 {
    font-size: 1.2rem;
    font-weight: 600;
}

.task-streak {
    font-size: 0.95rem;
    color: var(--accent-color);
    font-weight: 500;
}

/* Nouveau conteneur pour le chrono et le bouton */
.task-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Style du texte du chrono */
.task-timer {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-main);
}

.play-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    padding-left: 18px; /* NOUVEAU : Retour de la valeur idéale pour centrer le triangle */
    box-shadow: 0 4px 10px rgba(108, 92, 231, 0.3);
}

.play-btn.stop-btn {
    background-color: var(--accent-color);
    padding-left: 15px;
    box-shadow: 0 4px 10px rgba(255, 118, 117, 0.3);
}

/* NOUVEAU : Apparence d'une tâche terminée */
.task-completed {
    opacity: 0.5;
    border: 1px solid var(--primary-color);
}

.task-completed .play-btn {
    display: none; /* Cache le bouton play une fois la tâche validée */
}

/* NOUVEAU : Badges d'état de série (Joker / série perdue) */
.streak-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
    width: fit-content;
}

.streak-badge.joker {
    color: #74b9ff;
    background-color: rgba(116, 185, 255, 0.15);
}

.streak-badge.broken {
    color: var(--accent-color);
    background-color: rgba(255, 118, 117, 0.15);
}

/* NOUVEAU : Carte des Jokers (profil) */
.joker-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--surface-color);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 8px;
}

.joker-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.joker-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.joker-value {
    font-size: 1.2rem;
    color: #74b9ff;
}

.get-joker-btn {
    width: auto;
    padding: 10px 16px;
    margin-bottom: 0;
    background-color: rgba(116, 185, 255, 0.15);
    color: #74b9ff;
    font-size: 0.9rem;
}

.joker-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* --- NOUVEAU : Carte du personnage RPG --- */
.hero-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.25), rgba(30, 30, 30, 0.4));
    border: 1px solid rgba(108, 92, 231, 0.4);
    padding: 20px;
    border-radius: 18px;
    margin-bottom: 20px;
}

.hero-avatar {
    font-size: 2.6rem;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    min-width: 0;
}

.hero-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.hero-class {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

.xp-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 6px;
}

.xp-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), #a29bfe);
    border-radius: 8px;
    transition: width 0.5s ease;
}

.xp-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* --- NOUVEAU : Onboarding (classe RPG) --- */
.onb-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.class-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.class-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px;
    background-color: var(--bg-color);
    border: 2px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    text-align: center;
    transition: border 0.2s, transform 0.1s;
}

.class-option:active {
    transform: scale(0.97);
}

.class-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(108, 92, 231, 0.15);
}

.class-icon {
    font-size: 1.8rem;
}

.class-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.class-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* --- NOUVEAU : Animations de slide (tuto & onboarding) --- */
@keyframes slideFromRight {
    from { opacity: 0; transform: translateX(28px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideFromLeft {
    from { opacity: 0; transform: translateX(-28px); }
    to   { opacity: 1; transform: translateX(0); }
}
.slide-next { animation: slideFromRight 0.22s ease; }
.slide-prev { animation: slideFromLeft 0.22s ease; }

/* Indice de navigation tactile */
.swipe-hint {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 12px;
    opacity: 0.6;
    letter-spacing: 1px;
}

/* --- NOUVEAU : Onboarding multi-étapes --- */
.onb-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.onb-nav {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.onb-nav button {
    margin-bottom: 0;
}

.onb-back {
    background-color: var(--bg-color);
    color: var(--text-muted);
    flex: 0 0 40%;
}

.quest-block {
    background-color: var(--bg-color);
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 14px;
}

.quest-block input,
.quest-block select {
    margin-bottom: 10px;
}

.quest-block input:last-child,
.quest-block select:last-child {
    margin-bottom: 0;
}

/* Devise sur la carte du personnage */
.hero-motto {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 2px;
}

/* --- NOUVEAU : Aperçu d'archétype (onboarding) --- */
.archetype-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(30, 30, 30, 0.3));
    border: 1px solid rgba(108, 92, 231, 0.4);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 8px;
}

.archetype-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    border-radius: 12px;
    flex-shrink: 0;
}

.archetype-hint {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.archetype-label {
    font-size: 1.15rem;
    color: var(--primary-color);
}

/* --- NOUVEAU : Tutoriel --- */
.tuto-emoji {
    font-size: 3.2rem;
    margin-bottom: 12px;
}

.tuto-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
}

.tuto-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--bg-color);
    transition: background-color 0.2s, transform 0.2s;
}

.tuto-dot.active {
    background-color: var(--primary-color);
    transform: scale(1.3);
}

/* --- NOUVEAU : Toasts (XP, level up) --- */
#toast-container {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 200;
    pointer-events: none;
    width: 100%;
    max-width: 480px;
}

.toast {
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    background-color: var(--primary-color);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-xp {
    background-color: var(--surface-color);
    color: #a29bfe;
    border: 1px solid var(--primary-color);
}

.toast-levelup {
    background: linear-gradient(135deg, #f0932b, #ffbe76);
    color: #1e1e1e;
}

/* --- Design : Navbar --- */

.bottom-nav {
    /* Nouveau : Positionnement fixe attaché au bas de l'écran */
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    height: 70px;
    background-color: var(--surface-color);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 40; /* toujours au-dessus du contenu (ex: cadenas 🔒 Pro des stats) */
}

.nav-item {
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    padding: 10px;
}

.nav-item.active {
    color: var(--primary-color);
    transform: translateY(-2px); /* Petit effet de surélévation */
}

/* --- Bouton Ajout --- */

.add-btn {
    background-color: var(--surface-color);
    color: var(--primary-color);
    border: 2px dashed var(--primary-color);
    margin-top: 10px;
}

/* --- Modales --- */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.modal-content {
    background-color: var(--surface-color);
    width: 100%;
    max-width: 400px;
    padding: 24px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    /* Sécurité mobile : la modale ne dépasse jamais l'écran et défile si besoin */
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.custom-select {
    width: 100%;
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 12px;
    background-color: var(--bg-color);
    color: var(--text-main);
    border: none;
    outline: none;
    font-size: 1rem;
}

/* --- Grille de Statistiques & Premium --- */

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-box {
    background-color: var(--bg-color);
    padding: 16px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.stat-box span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-box strong {
    font-size: 1.1rem;
    color: var(--primary-color);
}

/* L'effet de flou ciblé pour les stats Premium */
.premium-value {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 4px;
}

.fake-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-muted);
    filter: blur(4px); /* Floute uniquement cette fausse valeur */
    user-select: none; /* Empêche de sélectionner le texte caché */
}

.lock-overlay {
    position: absolute;
    color: #ffd32a; /* Doré premium */
    font-size: 1rem;
    z-index: 1; /* au-dessus du flou seulement, JAMAIS au-dessus de la navbar */
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8); /* Fait ressortir le cadenas sur le flou */
}

.premium-upsell-btn {
    background: linear-gradient(135deg, #f0932b, #ffbe76);
    color: #1e1e1e;
    margin-bottom: 0;
}

/* ============================================================= */
/* NOUVEAU : barre de progression live (chrono)                  */
/* ============================================================= */
.task-item {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.task-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task-progress-track {
    width: 100%;
    height: 12px;
    background-color: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
}

.task-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 8px;
    transition: width 0.4s linear, background-color 0.4s linear;
}

.task-progress-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
}

/* Endurance : objectif atteint → pulsation verte encourageante */
.task-progress.pulse-green .task-progress-track {
    animation: pulseGreen 1s ease-in-out infinite;
}
@keyframes pulseGreen {
    0%, 100% { box-shadow: 0 0 0 0 rgba(46, 213, 115, 0.5); }
    50%      { box-shadow: 0 0 12px 3px rgba(46, 213, 115, 0.8); }
}

/* Sprint : cible proche → tremblement "menaçant" */
.task-progress.shake-red .task-progress-track {
    animation: shakeRed 0.35s ease-in-out infinite;
}
@keyframes shakeRed {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-3px); }
    75%      { transform: translateX(3px); }
}

/* ============================================================= */
/* NOUVEAU : animation de montée de niveau                       */
/* ============================================================= */
#levelup-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

#levelup-overlay.show {
    opacity: 1;
}

.levelup-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transform: scale(0.6);
    opacity: 0;
}

#levelup-overlay.show .levelup-card {
    animation: levelupPop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}
@keyframes levelupPop {
    0%   { transform: scale(0.6); opacity: 0; }
    60%  { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.levelup-burst {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 211, 42, 0.4), transparent 70%);
    z-index: -1;
}
#levelup-overlay.show .levelup-burst {
    animation: burst 1.2s ease-out infinite;
}
@keyframes burst {
    0%   { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(1.4); opacity: 0; }
}

.levelup-title {
    font-size: 1rem;
    letter-spacing: 3px;
    color: #ffd32a;
    font-weight: 700;
}

.levelup-number {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-main);
    text-shadow: 0 4px 20px rgba(108, 92, 231, 0.6);
}

.levelup-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ============================================================= */
/* NOUVEAU : rythme hebdomadaire (stats)                         */
/* ============================================================= */
.week-card {
    background-color: var(--surface-color);
    border-radius: 16px;
    padding: 18px;
    margin-top: 16px;
}

.week-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.week-head h3 {
    margin-bottom: 0;
}

.week-goal {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

.week-strip {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 14px;
}

.week-day {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    background-color: var(--bg-color);
    border-radius: 10px;
    border: 1px solid transparent;
}

.week-day.active {
    background-color: rgba(255, 118, 117, 0.12);
}

.week-day.is-today {
    border-color: var(--primary-color);
}

.week-day-letter {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.week-day-dot {
    font-size: 0.85rem;
    min-height: 1em;
}

.week-bar {
    width: 100%;
    height: 10px;
    background-color: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
}

.week-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-color), #ffbe76);
    border-radius: 8px;
    transition: width 0.5s ease;
}

/* ============================================================= */
/* NOUVEAU : rappel par tâche (modale de stats)                  */
/* ============================================================= */
.task-reminder {
    background-color: var(--bg-color);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}

.reminder-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.reminder-row input[type="time"] {
    margin-bottom: 0;
    flex: 1;
}

.save-reminder-btn {
    width: auto;
    padding: 12px 18px;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.reminder-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ============================================================= */
/* NOUVEAU : classement (leaderboard)                            */
/* ============================================================= */
.lb-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.lb-header h3 {
    margin-bottom: 0;
}

.lb-myrank {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.lb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background-color: var(--surface-color);
    border-radius: 12px;
    border: 1px solid transparent;
}

.lb-rank {
    font-size: 1rem;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
}

.lb-icon {
    font-size: 1.2rem;
}

.lb-name {
    flex: 1;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-name em {
    color: var(--primary-color);
    font-style: normal;
    font-size: 0.8rem;
}

.lb-xp {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Bordures spéciales pour le podium */
.lb-row.rank-1 {
    border-color: #ffd32a;
    background: linear-gradient(135deg, rgba(255, 211, 42, 0.18), var(--surface-color));
}
.lb-row.rank-2 {
    border-color: #c8d6e5;
    background: linear-gradient(135deg, rgba(200, 214, 229, 0.15), var(--surface-color));
}
.lb-row.rank-3 {
    border-color: #cd7f32;
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), var(--surface-color));
}

.lb-row.lb-me {
    box-shadow: 0 0 0 1px var(--primary-color) inset;
}

.lb-row.lb-outside {
    margin-top: 4px;
    opacity: 0.9;
}

/* ============================================================= */
/* NOUVEAU : menu burger                                         */
/* ============================================================= */
.burger-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    background-color: var(--surface-color);
    color: var(--text-main);
    font-size: 1.3rem;
    border-radius: 12px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-item {
    text-align: left;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.menu-item.menu-danger {
    color: var(--accent-color);
}

.lb-see-all {
    width: auto;
    padding: 0;
    margin: 0;
    background: transparent;
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
}

/* ============================================================= */
/* NOUVEAU : catégorie de tâche (badge)                          */
/* ============================================================= */
.task-cat {
    font-size: 0.78rem;
    color: var(--text-muted);
    background-color: var(--bg-color);
    padding: 2px 8px;
    border-radius: 8px;
    width: fit-content;
}

/* ============================================================= */
/* NOUVEAU : mode édition des tâches                             */
/* ============================================================= */
#edit-done-btn {
    background-color: #2ed573;
    color: #0b3d1f;
    margin-top: 12px;
}

.task-edit {
    gap: 10px;
}

.task-edit input,
.task-edit select {
    margin-bottom: 0;
}

.edit-inline {
    display: flex;
    gap: 10px;
}

.edit-inline .edit-type {
    flex: 1;
}

.edit-inline .edit-target {
    width: 90px;
    flex-shrink: 0;
}

.edit-delete {
    background-color: rgba(255, 118, 117, 0.15);
    color: var(--accent-color);
    font-size: 0.85rem;
    padding: 10px;
    margin-bottom: 0;
}

/* ============================================================= */
/* NOUVEAU : succès / badges                                     */
/* ============================================================= */
.ach-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.ach-header h3 {
    margin-bottom: 0;
}

.ach-count-label {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.ach-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 4px;
    border-radius: 12px;
    background-color: var(--surface-color);
    text-align: center;
    transition: transform 0.15s;
}

.ach-badge.unlocked {
    background: linear-gradient(135deg, rgba(255, 211, 42, 0.18), var(--surface-color));
    border: 1px solid rgba(255, 211, 42, 0.5);
}

.ach-badge.locked {
    opacity: 0.45;
    filter: grayscale(0.6);
}

.ach-icon {
    font-size: 1.5rem;
}

.ach-title {
    font-size: 0.62rem;
    color: var(--text-muted);
    line-height: 1.1;
}

.ach-badge.unlocked .ach-title {
    color: var(--text-main);
}