/* 🌚 Thèmes : sombre et clair */
[data-theme="dark"] {
	--bg-color: #212121;
	--container-bg: #2b2b2b;
	--text-color: #ececec;
	--text-muted: #aaa;
	--border-color: #555;
	--card-bg: #333;
	--info-bg: #333;
	--stat-bg: #3a3a3a;
	--avatar-gradient: linear-gradient(135deg, #4d9eff, #2f80ed);
	--primary: #4d9eff;
	--primary-hover: #2f80ed;
	--secondary-bg: #444;
	--secondary-hover: #555;
	--shadow: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] {
	--bg-color: #f7f9fc;
	--container-bg: #ffffff;
	--text-color: #1f2d3d;
	--text-muted: #666;
	--border-color: #f2f4f8;
	--card-bg: #f8f9fb;
	--info-bg: #f8f9fb;
	--stat-bg: #f2f4f8;
	--avatar-gradient: linear-gradient(135deg, #2f80ed, #1366d6);
	--primary: #2f80ed;
	--primary-hover: #1366d6;
	--secondary-bg: #f2f4f8;
	--secondary-hover: #e0e0e0;
	--shadow: rgba(0, 0, 0, 0.05);
}

/* ------------------------------ */
/* 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;
	transition: background 0.3s ease, color 0.3s ease;
}

/* ------------------------------ */
/* Conteneur principal */
.container {
	max-width: 960px;
	margin: auto;
	background: var(--container-bg);
	border-radius: 12px;
	padding: 2rem;
	box-shadow: 0 4px 12px var(--shadow);
	transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* ------------------------------ */
/* En-tête */
.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 */
.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    margin-left: 0; /* Supprime la marge existante */
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav a:hover {
    color: white;
    background-color: var(--primary);
    text-decoration: none; /* Supprime le soulignement existant */
}

/* ------------------------------ */
/* Profil */
.profile-section {
	margin-bottom: 2rem;
}

.profile-header {
	display: flex;
	align-items: center;
	gap: 2rem;
	margin-bottom: 2rem;
	padding-bottom: 2rem;
	border-bottom: 2px solid var(--border-color);
}

.profile-avatar {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	background: var(--avatar-gradient);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3rem;
	color: white;
	flex-shrink: 0;
}

.profile-info h2 {
	font-size: 1.8rem;
	margin-bottom: 0.5rem;
	color: var(--text-color);
}

.profile-info p {
	color: var(--text-muted);
	font-size: 1rem;
}

/* ------------------------------ */
/* Informations */
.info-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.info-card {
	background: var(--info-bg);
	padding: 1.5rem;
	border-radius: 8px;
	border-left: 4px solid var(--primary);
	transition: background 0.3s ease, border-color 0.3s ease;
}

.info-card h3 {
	font-size: 0.9rem;
	color: var(--text-muted);
	margin-bottom: 0.5rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.info-card p {
	font-size: 1.1rem;
	color: var(--text-color);
	font-weight: 600;
}

/* ------------------------------ */
/* Statistiques */
.stats {
	display: flex;
	gap: 1rem;
	margin-bottom: 2rem;
	flex-wrap: wrap;
}

.stat-box {
	flex: 1;
	background: var(--stat-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-muted);
}

.stat-box strong {
	font-size: 1.5rem;
	color: var(--primary);
}

/* ------------------------------ */
/* Titres et boutons */
.section-title {
	font-size: 1.3rem;
	margin-bottom: 1rem;
	color: var(--text-color);
	font-weight: 600;
}

.btn-group {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.btn {
	background-color: var(--primary);
	color: #fff;
	text-decoration: none;
	padding: 0.6rem 1.2rem;
	border-radius: 6px;
	font-weight: 600;
	transition: background-color 0.2s ease;
	border: none;
	cursor: pointer;
	font-size: 1rem;
}

.btn:hover {
	background-color: var(--primary-hover);
}

.btn-secondary {
	background-color: var(--secondary-bg);
	color: var(--text-color);
}

.btn-secondary:hover {
	background-color: var(--secondary-hover);
}

/* ------------------------------ */
/* 🌗 Switch de thème */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    height: 40px;
    margin-top: 0; /* Supprime la marge existante */
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 26px;
    align-self: center;
    transform: translateY(1px);
}

.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;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

.slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary);
    transition: .4s;
    border-radius: 50%;
    z-index: 2;
}

input:checked + .slider:before {
    transform: translate(26px, -50%);
}

/* ------------------------------ */
/* Responsive Design */
@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%;
	}

	.profile-header {
		flex-direction: column;
		text-align: center;
	}
}

@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;
	}

	.nav a {
		margin: 0;
		font-size: 0.9rem;
	}

	.profile-avatar {
		width: 100px;
		height: 100px;
		font-size: 2.5rem;
	}

	.profile-info h2 {
		font-size: 1.5rem;
	}

	.btn {
		padding: 0.5rem 1rem;
		font-size: 0.9rem;
	}

	.info-grid {
		grid-template-columns: 1fr;
	}
}
