/* 🌚 Style sombre */
	[data-theme="dark"] {
		--bg-color: #212121;
		--container-bg: #2b2b2b;
		--text-color: #ececec;
		--card-bg: #3a3a3a;
		--task-bg: #333333;
		--primary: #4d9eff;
		--primary-hover: #2f80ed;
		--border-color: #555;
		--shadow: rgba(255, 255, 255, 0.05);
	}

	/* 🌞 Style clair */
	[data-theme="light"] {
		--bg-color: #f7f9fc;
		--container-bg: #ffffff;
		--text-color: #1f2d3d;
		--card-bg: #f2f4f8;
		--task-bg: #f8f9fb;
		--primary: #2f80ed;
		--primary-hover: #1366d6;
		--border-color: #e0e0e0;
		--shadow: rgba(0, 0, 0, 0.05);
	}

	html {
		background-color: var(--bg-color);
		color: var(--text-color);
	}

	/* Reset / Base */
	* {
		margin: 0;
		padding: 0;
		box-sizing: border-box;
	}

	body {
		font-family: 'Segoe UI', sans-serif;
		background: var(--bg-color);
		color: var(--text-color);
		padding: 2rem;
	}

	/* Container */
	.container {
		max-width: 960px;
		margin: auto;
		background: var(--container-bg);
		border-radius: 12px;
		padding: 2rem;
		box-shadow: 0 4px 12px var(--shadow);
	}

	/* Header */
	.header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 2rem;
		flex-wrap: wrap;
		gap: 1rem;
	}

	.header h1 {
		font-size: 2rem;
		font-weight: 700;
	}

	/* Navigation et alignement */
	.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

	.nav a {
		text-decoration: none;
		color: var(--primary);
		font-weight: 500;
		margin: 0; /* Supprime la marge existante */
	}

	/* Titles */
	.summary h2,
	.recent-tasks h2 {
		font-size: 1.2rem;
		margin-bottom: 1rem;
		color: var(--text-color);
	}

	/* Stats */
	.stats {
		display: flex;
		gap: 1rem;
		margin-bottom: 2rem;
		flex-wrap: wrap;
	}

	.stat-box {
		flex: 1;
		background: var(--card-bg);
		padding: 1rem;
		border-radius: 8px;
		text-align: center;
		box-shadow: inset 0 0 0 1px var(--border-color);
		min-width: 200px;
	}

	.stat-box p {
		font-size: 0.9rem;
		margin-bottom: 0.5rem;
		color: var(--text-color);
		opacity: 0.8;
	}

	.stat-box strong {
		font-size: 1.5rem;
		color: var(--primary);
	}

	/* Tasks */
	.recent-tasks .task-list {
		list-style: none;
		margin-bottom: 1.5rem;
	}

	.task-list li {
		background: var(--task-bg);
		border-left: 4px solid var(--primary);
		padding: 0.75rem 1rem;
		margin-bottom: 0.5rem;
		border-radius: 6px;
		font-size: 0.95rem;
		display: flex;
		align-items: center;
		word-wrap: break-word;
	}

	.emoji {
		margin-right: 0.5rem;
	}

	/* Buttons */
	.btn {
		background-color: var(--primary);
		color: var(--text-color);
		text-decoration: none;
		padding: 0.6rem 1.2rem;
		border-radius: 6px;
		font-weight: 600;
		transition: background-color 0.2s ease;
	}

	.btn:hover {
		background-color: var(--primary-hover);
	}

	/* Theme Switch */
	.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin: 0; /* Supprime la marge droite précédente */
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
    transform: translateY(1px); /* Ajustement fin pour l'alignement vertical */
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: .4s;
    border-radius: 30px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 3px;
    background-color: var(--primary);
    transition: .4s;
    border-radius: 50%;
    z-index: 2;
}

.slider-icon {
    font-size: 13px;
    z-index: 1;
}

.slider-icon.light {
    margin-left: 4px;
}

.slider-icon.dark {
    margin-right: 4px;
}

input:checked + .slider:before {
    transform: translateX(29px);
}

/* Animation au survol */
.slider:hover {
    box-shadow: 0 0 5px var(--primary);
}

.slider:active:before {
    width: 28px;
    transition: .2s;
}

/* État du switch selon le thème */
[data-theme="dark"] .theme-switch input:checked + .slider:before {
    background-color: var(--primary);
}

[data-theme="light"] .theme-switch input:not(:checked) + .slider:before {
    background-color: var(--primary);
}

/* Responsive */
	@media (max-width: 992px) {
		body {
			padding: 1.5rem;
		}
		.header h1 {
			font-size: 1.8rem;
		}
		.nav a {
			margin-left: 1rem;
			font-size: 0.95rem;
		}
		.stats {
			flex-direction: column;
		}
		.stat-box {
			width: 100%;
		}
	}

	@media (max-width: 600px) {
		body {
			padding: 1rem;
		}
		.container {
			padding: 1.2rem;
		}
		.header {
			flex-direction: column;
			align-items: flex-start;
		}
		.header h1 {
			font-size: 1.6rem;
		}
		.nav {
			display: flex;
			flex-wrap: wrap;
			gap: 0.8rem;
			width: 100%;
			justify-content: flex-start;
		}
		.nav a {
			margin: 0;
			font-size: 0.9rem;
		}
		.task-list li {
			font-size: 0.9rem;
			padding: 0.6rem 0.8rem;
		}
		.btn {
			padding: 0.5rem 1rem;
			font-size: 0.9rem;
		}
		.theme-switch-wrapper {
        order: -1; /* Place le switch en premier sur mobile */
    }
	}
