/* =========================================
   1. VARIABLES & RESET (Thème Animé Naruto)
   ========================================= */
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;800;900&family=Fredoka+One&display=swap");

:root {
	/* Couleurs joyeuses et vives (MODE CLAIR PAR DÉFAUT) */
	--bg: #fdfbf7;
	--surface: #ffffff;
	--surface-hover: #fff8f0;
	--border: #27272a;
	--bg-pattern: #f8fcfd;
	--item-bg: #f8fafc;
	--item-border: #e2e8f0;

	/* Couleurs principales Naruto */
	--primary: #ff6b00;
	--primary-hover: #e85a00;
	--accent: #0ea5e9;
	--accent-hover: #0284c7;
	--danger: #ef4444;
	--success: #22c55e;
	--success-bg: #dcfce7;
	--success-text: #166534;

	/* Textes */
	--text-main: #27272a;
	--text-muted: #52525b;
	--text-inverse: #ffffff;

	/* Ombres style "Cartoon" */
	--shadow-cartoon: 4px 4px 0px var(--border);
	--shadow-cartoon-hover: 6px 6px 0px var(--border);
	--shadow-cartoon-active: 0px 0px 0px var(--border);

	/* SVG Ninja Encodés en Base64 (Noir/Sombre pour mode clair) */
	--svg-shuriken: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="%2327272a" xmlns="http://www.w3.org/2000/svg"><path d="M12 2L14.5 9.5L22 12L14.5 14.5L12 22L9.5 14.5L2 12L9.5 9.5L12 2Z"/></svg>');
	--svg-kunai: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="%23ff6b00" xmlns="http://www.w3.org/2000/svg"><path d="M12 2L9 8H15L12 2ZM11 9V15H13V9H11ZM10 16H14V17H10V16ZM12 18C13.1 18 14 18.9 14 20C14 21.1 13.1 22 12 22C10.9 22 10 21.1 10 20C10 18.9 10.9 18 12 18Z"/></svg>');
}

/* =========================================
   DARK MODE MANUEL / AUTOMATIQUE
   ========================================= */
[data-theme="dark"] {
	/* Palette Nuit / Akatsuki */
	--bg: #121214;
	--surface: #1e1e24;
	--surface-hover: #27272f;
	--border: #e4e4e7;
	--bg-pattern: #18181b;
	--item-bg: #27272a;
	--item-border: #3f3f46;

	/* Couleurs principales légèrement plus fluo pour ressortir */
	--primary: #ff8533;
	--primary-hover: #ff9d5c;
	--accent: #38bdf8;
	--accent-hover: #7dd3fc;
	--danger: #f87171;
	--success: #4ade80;
	--success-bg: #14532d;
	--success-text: #bbf7d0;

	/* Textes Inversés */
	--text-main: #f4f4f5;
	--text-muted: #a1a1aa;
	--text-inverse: #18181b;

	/* SVG Ninja recolorés en blanc pour fond sombre */
	--svg-shuriken: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="%23e4e4e7" xmlns="http://www.w3.org/2000/svg"><path d="M12 2L14.5 9.5L22 12L14.5 14.5L12 22L9.5 14.5L2 12L9.5 9.5L12 2Z"/></svg>');
}

#theme-toggle {
	cursor: pointer;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* =========================================
   2. BASE STYLES
   ========================================= */
body {
	background-color: var(--bg-pattern);
	color: var(--text-main);
	font-family: "Nunito", sans-serif;
	overflow-x: hidden;
	padding-top: 16px;

	/* Motif Shuriken en filigrane + trame pointillée */
	background-image:
		var(--svg-shuriken), var(--svg-shuriken),
		radial-gradient(var(--accent) 1px, transparent 1px);
	background-position:
		10% 20%,
		85% 70%,
		0 0;
	background-size:
		40px 40px,
		60px 60px,
		40px 40px;
	background-repeat: no-repeat, no-repeat, repeat;
	background-attachment: fixed;
	transition:
		background-color 0.3s ease,
		color 0.3s ease;
}

.container {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 24px;
}

h1,
h2,
h3,
h4 {
	font-family: "Fredoka One", cursive;
	letter-spacing: 0.5px;
	position: relative;
	display: inline-block;
}

h1::before,
h2::before {
	content: "";
	position: absolute;
	left: -35px;
	top: 50%;
	transform: translateY(-50%) rotate(45deg);
	width: 24px;
	height: 24px;
	background-image: var(--svg-kunai);
	background-size: contain;
	background-repeat: no-repeat;
}

/* =========================================
   3. ANIMATIONS
   ========================================= */
@keyframes bounce {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-8px);
	}
}
@keyframes shurikenSpin {
	from {
		transform: rotate(0deg) scale(1);
	}
	50% {
		transform: rotate(180deg) scale(1.2);
	}
	to {
		transform: rotate(360deg) scale(1);
	}
}
@keyframes pulse-green {
	0% {
		box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5);
	}
	70% {
		box-shadow: 0 0 0 10px rgba(74, 222, 128, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
	}
}

/* =========================================
   4. NAVBAR & LOGO
   ========================================= */
nav {
	padding: 20px 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: var(--surface);
	border: 3px solid var(--border);
	border-radius: 24px;
	margin-top: 10px;
	box-shadow: var(--shadow-cartoon);
	padding: 10px 24px;
	transition:
		background-color 0.3s ease,
		border-color 0.3s ease;
}

.logo {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.2s ease;
}
.logo:hover {
	transform: scale(1.05) rotate(-2deg);
}
.logo-img {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--border);
	box-shadow: 2px 2px 0px var(--primary);
	transition: all 0.3s ease;
}
.logo:hover .logo-img {
	animation: shurikenSpin 0.6s ease-in-out forwards;
	border-color: var(--primary);
}

.logo-text {
	font-family: "Fredoka One", cursive;
	font-size: 1.8rem;
	color: var(--text-main);
	text-shadow:
		2px 2px 0px var(--bg),
		4px 4px 0px var(--primary);
}
.logo-text span {
	color: var(--primary);
}
.logo-text::before {
	display: none;
}

.nav-links {
	display: flex;
	gap: 10px;
	align-items: center;
}
.nav-link {
	color: var(--text-main);
	text-decoration: none;
	font-weight: 800;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: 16px;
	font-size: 1.05rem;
	border: 2px solid transparent;
	transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.nav-link i {
	color: var(--primary);
}
.nav-link:hover {
	background: var(--surface-hover);
	border: 2px solid var(--border);
	box-shadow: 3px 3px 0px var(--accent);
	transform: translateY(-2px);
}
.nav-link.active {
	background: var(--primary);
	color: var(--text-inverse);
	border: 2px solid var(--border);
	box-shadow: 3px 3px 0px var(--border);
}
.nav-link.active i {
	color: var(--text-inverse);
}

/* =========================================
   5. COMPONENTS (Buttons, Badges, Cards)
   ========================================= */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 14px 28px;
	border-radius: 16px;
	font-weight: 800;
	font-size: 1.1rem;
	text-decoration: none;
	transition: all 0.2s ease;
	border: 3px solid var(--border);
	box-shadow: var(--shadow-cartoon);
	font-family: "Fredoka One", cursive;
	text-transform: uppercase;
	letter-spacing: 1px;
}
.btn:active {
	transform: translate(4px, 4px);
	box-shadow: var(--shadow-cartoon-active);
}
.btn-primary {
	background: var(--primary);
	color: var(--text-inverse);
}
.btn-primary:hover {
	background: var(--primary-hover);
	transform: translate(-2px, -2px);
	box-shadow: var(--shadow-cartoon-hover);
}
.btn-secondary {
	background: var(--surface);
	color: var(--text-main);
}
.btn-secondary:hover {
	background: var(--surface-hover);
	transform: translate(-2px, -2px);
	box-shadow: var(--shadow-cartoon-hover);
}
.btn-nav {
	padding: 10px 20px;
	font-size: 1rem;
	box-shadow: 3px 3px 0px var(--border);
}
.btn-nav:hover {
	box-shadow: 4px 4px 0px var(--border);
}
.btn-nav:active {
	box-shadow: 0 0 0 var(--border);
}
.btn-group {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}

.glass-card {
	background: var(--surface);
	border: 4px solid var(--border);
	border-radius: 24px;
	padding: 30px;
	position: relative;
	box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.2);
	background-image:
		linear-gradient(90deg, rgba(128, 128, 128, 0.05) 1px, transparent 1px),
		linear-gradient(rgba(128, 128, 128, 0.05) 1px, transparent 1px);
	background-size: 20px 20px;
	color: var(--text-main);
}
.glass-card::before {
	content: "";
	position: absolute;
	top: -15px;
	left: 20px;
	width: 40px;
	height: 30px;
	background: var(--danger);
	border: 3px solid var(--border);
	border-radius: 8px;
	z-index: -1;
}
.glass-card::after {
	content: "";
	position: absolute;
	bottom: -15px;
	right: 20px;
	width: 40px;
	height: 30px;
	background: var(--accent);
	border: 3px solid var(--border);
	border-radius: 8px;
	z-index: -1;
}

.ip-display,
.ip-display-mini {
	background: var(--bg);
	border: 3px dashed var(--primary);
	border-radius: 16px;
	padding: 18px 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	margin-bottom: 24px;
	transition: all 0.2s;
}
.ip-display:hover,
.ip-display-mini:hover {
	background: var(--surface-hover);
	border-style: solid;
	transform: scale(1.02);
}
.ip-display:hover .copy-label::before {
	animation: shurikenSpin 0.5s infinite linear;
}
.ip-display-mini {
	padding: 10px 16px;
	margin-bottom: 0;
}
.ip-code {
	font-family: "Fredoka One", cursive;
	font-size: 1.3rem;
	color: var(--text-main);
}

.copy-label,
.copy-label-mini {
	font-size: 0.9rem;
	color: var(--text-inverse);
	background: var(--primary);
	padding: 6px 12px 6px 36px;
	border-radius: 10px;
	border: 2px solid var(--border);
	text-transform: uppercase;
	font-weight: 800;
	display: flex;
	align-items: center;
	box-shadow: 2px 2px 0px var(--border);
	position: relative;
}
.copy-label::before {
	content: "";
	position: absolute;
	left: 8px;
	width: 18px;
	height: 18px;
	background-image: var(--svg-shuriken);
	background-size: contain;
	filter: invert(1);
}
@media (prefers-color-scheme: dark) {
	.copy-label::before {
		filter: invert(0) !important;
	}
}
.copy-label i {
	display: none;
}

.meta-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.meta-list li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 1.1rem;
	padding: 8px 12px;
	background: var(--bg);
	border: 2px solid var(--border);
	border-radius: 12px;
	box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}
.meta-list li span:first-child {
	color: var(--text-muted);
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 800;
}
.meta-list li span:first-child i {
	font-size: 1.4rem;
	color: var(--accent);
	background: rgba(14, 165, 233, 0.1);
	padding: 6px;
	border-radius: 8px;
}
.meta-list li span:last-child {
	color: var(--text-main);
	font-weight: 800;
}

.status-container {
	display: flex;
	justify-content: flex-end;
}
/* Modification: Badge statut non cliquable */
.status-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--success-bg);
	color: var(--success-text);
	padding: 6px 16px;
	border-radius: 99px;
	font-size: 0.95rem;
	font-weight: 800;
	border: 2px solid var(--success);
	cursor: default;
	box-shadow: 2px 2px 0px var(--success);
	white-space: nowrap;
	transition: transform 0.2s;
}
.status-badge:hover {
	transform: scale(1.02);
}
.status-dot {
	width: 10px;
	min-width: 10px;
	height: 10px;
	background: var(--success);
	border-radius: 50%;
	border: 2px solid var(--bg);
	animation: pulse-green 2s infinite;
	flex-shrink: 0;
}

/* =========================================
   6. SECTIONS (Hero, Features)
   ========================================= */
.hero {
	padding: 60px 0 100px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: center;
}
.hero-mini {
	padding: 50px 0 30px;
	text-align: center;
}

.hero-visual-side {
	display: flex;
	flex-direction: column;
	gap: 40px;
	align-items: center;
}
.hero-artwork {
	width: 100%;
	max-width: 480px;
	height: auto;
	border-radius: 32px;
	border: 4px solid var(--border);
	box-shadow:
		8px 8px 0px rgba(236, 72, 153, 0.4),
		16px 16px 0px rgba(249, 115, 22, 0.2);
	transform: rotate(3deg);
	transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	animation: floatArtwork 6s ease-in-out infinite;
}
.hero-artwork:hover {
	transform: scale(1.05) rotate(0deg);
	box-shadow:
		12px 12px 0px rgba(236, 72, 153, 0.6),
		24px 24px 0px rgba(249, 115, 22, 0.4);
}
@keyframes floatArtwork {
	0%,
	100% {
		transform: translateY(0) rotate(3deg);
	}
	50% {
		transform: translateY(-15px) rotate(1deg);
	}
}
.hero-visual-side .glass-card {
	width: 100%;
	max-width: 480px;
}

.hero-content h1,
.hero-mini h1 {
	color: var(--text-main);
	text-shadow:
		3px 3px 0px var(--bg),
		6px 6px 0px var(--accent);
	line-height: 1.1;
	transform: rotate(-2deg);
	margin-left: 20px;
}
.hero-content h1 {
	font-size: 4.5rem;
	margin-bottom: 24px;
}
.hero-mini h1 {
	font-size: 3.5rem;
	margin-bottom: 16px;
}

.hero-content p,
.hero-mini p {
	font-size: 1.25rem;
	color: var(--text-muted);
	line-height: 1.6;
	font-weight: 600;
	background: var(--surface);
	padding: 20px;
	border: 3px solid var(--border);
	border-radius: 16px;
	box-shadow: var(--shadow-cartoon);
	position: relative;
}
.hero-content p::after {
	content: "";
	position: absolute;
	top: -15px;
	left: 40px;
	width: 20px;
	height: 20px;
	background: var(--surface);
	border-top: 3px solid var(--border);
	border-left: 3px solid var(--border);
	transform: rotate(45deg);
}
.hero-content p {
	margin-bottom: 40px;
	max-width: 95%;
	margin-top: 30px;
}

/* --- Features Grid --- */
.features {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	margin-bottom: 100px;
}
.feature-box {
	background: var(--surface);
	border: 4px solid var(--border);
	border-radius: 24px;
	padding: 40px 30px;
	transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	text-align: center;
	box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
	color: var(--text-main);
}
.feature-box:nth-child(1) {
	border-bottom-color: var(--primary);
	border-bottom-width: 8px;
}
.feature-box:nth-child(2) {
	border-bottom-color: var(--accent);
	border-bottom-width: 8px;
}
.feature-box:nth-child(3) {
	border-bottom-color: var(--danger);
	border-bottom-width: 8px;
}
.feature-box:hover {
	transform: translateY(-10px) scale(1.03);
	box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.25);
}

.icon {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	background: var(--bg);
	border: 3px solid var(--border);
	padding: 20px;
	border-radius: 50%;
	margin-bottom: 24px;
	font-size: 2.5rem;
	box-shadow: 4px 4px 0px var(--border);
	animation: bounce 4s infinite ease-in-out;
}
.feature-box:nth-child(1) .icon {
	color: var(--primary);
}
.feature-box:nth-child(2) .icon {
	color: var(--accent);
	animation-delay: 0.5s;
}
.feature-box:nth-child(3) .icon {
	color: var(--danger);
	animation-delay: 1s;
}
.feature-box h3 {
	font-size: 1.6rem;
	margin-bottom: 16px;
	color: var(--text-main);
}
.feature-box h3::before {
	display: none;
}
.feature-box p {
	color: var(--text-muted);
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.6;
}

/* =========================================
   8. TUTORIAL PAGE
   ========================================= */
.tutorial-section {
	display: flex;
	flex-direction: column;
	gap: 30px;
	padding-bottom: 80px;
}
.step-card {
	background: var(--surface);
	border: 4px solid var(--border);
	border-radius: 24px;
	padding: 40px;
	display: flex;
	gap: 30px;
	box-shadow: var(--shadow-cartoon);
	transition: transform 0.2s;
	color: var(--text-main);
}
.step-card:hover {
	transform: translateX(5px);
	box-shadow: 8px 8px 0px var(--primary);
}

.step-number {
	font-family: "Fredoka One", cursive;
	font-size: 2rem;
	color: var(--text-inverse);
	background: var(--primary);
	border: 3px solid var(--border);
	border-radius: 50%;
	width: 70px;
	height: 70px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 3px 3px 0px var(--border);
	transform: rotate(-10deg);
}

.step-content {
	flex: 1;
}
.step-content h2 {
	font-size: 1.8rem;
	margin-bottom: 16px;
	color: var(--text-main);
}
.step-content h2::before {
	display: none;
}
.step-content p {
	color: var(--text-muted);
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.6;
}

.inline-link {
	color: var(--accent);
	text-decoration: none;
	font-weight: 800;
	background: rgba(14, 165, 233, 0.1);
	padding: 2px 8px;
	border-radius: 6px;
	border: 2px solid transparent;
	transition: all 0.2s;
}
.inline-link:hover {
	border-color: var(--accent);
	transform: translateY(-2px);
	display: inline-block;
}

.checklist {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 20px;
}
.checklist li {
	display: flex;
	align-items: center;
	gap: 16px;
	color: var(--text-main);
	font-weight: 800;
	font-size: 1.05rem;
	background: var(--item-bg);
	padding: 12px 20px;
	border-radius: 12px;
	border: 2px solid var(--item-border);
	position: relative;
}
.checklist li i {
	display: none;
}
.checklist li::before {
	content: "";
	width: 20px;
	height: 20px;
	background-image: var(--svg-shuriken);
	background-size: contain;
}
.checklist li:hover::before {
	animation: shurikenSpin 1s infinite linear;
}

/* =========================================
   9. UTILITIES (Toast, Footers)
   ========================================= */
footer {
	border-top: 4px solid var(--border);
	padding: 40px 0;
	text-align: center;
	color: var(--text-main);
	font-weight: 800;
	font-size: 1rem;
	background: var(--surface);
	margin-top: 40px;
}

#toast {
	visibility: hidden;
	min-width: 300px;
	background: var(--surface);
	color: var(--text-main);
	font-family: "Fredoka One", cursive;
	text-align: center;
	border-radius: 20px;
	padding: 16px 24px;
	position: fixed;
	z-index: 100;
	bottom: 40px;
	left: 50%;
	transform: translateX(-50%) translateY(50px);
	border: 4px solid var(--border);
	box-shadow: 6px 6px 0px var(--primary);
	opacity: 0;
	transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	font-size: 1.2rem;
}
#toast i {
	color: var(--success);
	font-size: 1.8rem;
}
#toast.show {
	visibility: visible;
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* =========================================
   10. RESPONSIVE
   ========================================= */
@media (max-width: 960px) {
	.hero {
		grid-template-columns: 1fr;
		text-align: center;
		gap: 50px;
	}
	h1::before {
		display: none;
	}
	.hero-content p::after {
		left: 50%;
		transform: translateX(-50%) rotate(45deg);
	}
	.hero-content h1 {
		font-size: 3.5rem;
		transform: rotate(0);
		margin-left: 0;
	}
	.btn-group {
		justify-content: center;
	}
	.features {
		grid-template-columns: 1fr;
	}
	.glass-card {
		max-width: 500px;
		margin: 0 auto;
	}
}

@media (max-width: 768px) {
	nav {
		flex-direction: column;
		gap: 20px;
		border-radius: 16px;
	}
	.nav-links {
		width: 100%;
		justify-content: space-between;
		flex-wrap: wrap;
	}
	.hero-mini h1 {
		font-size: 2.5rem;
		margin-left: 0;
	}
	.step-card {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
}
