@charset "utf-8";

/* ══════════════════════════════════════════════════════════════════
   GUIDE DOCUMENTATION — CSS
   Designed for visual learning, discovery, and formation
   Inspired by modern documentation sites (Stripe, Vercel, Tailwind)
   ══════════════════════════════════════════════════════════════════ */

:root {
	/* Colors from main style.css */
	--primary: #0F6FFF;
	--primary-dark: #0155d4;
	--primary-light: #5B99FF;
	--accent-1: #7B61FF;
	--accent-2: #08A9BE;
	--bg-dark: #000000;
	--bg-surface: #0a0a0a;
	--bg-card: #1a1a1a;
	--text-main: #ffffff;
	--text-secondary: #aaaaaa;
	--text-tertiary: #666666;
	--border-color: rgba(255, 255, 255, 0.1);
	--border-light: rgba(255, 255, 255, 0.05);
	
	/* Typography */
	--font-heading: 'Heebo', sans-serif;
	--font-body: 'Nunito', sans-serif;
	--font-code: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
	
	/* Spacing */
	--spacing-xs: 8px;
	--spacing-sm: 16px;
	--spacing-md: 24px;
	--spacing-lg: 32px;
	--spacing-xl: 48px;
	--spacing-2xl: 64px;
	
	/* Border Radius */
	--radius-sm: 6px;
	--radius-md: 12px;
	--radius-lg: 16px;
	--radius-xl: 24px;
}

/* LIGHT MODE — Color Overrides */
body.light-mode {
	--bg-dark: #e8eaf0;
	--bg-surface: #dde1e8;
	--bg-card: #e8eaef;
	--text-main: #1a1a2e;
	--text-secondary: #4a5568;
	--text-tertiary: #8899aa;
	--border-color: rgba(15, 111, 255, 0.15);
	--border-light: rgba(15, 111, 255, 0.08);
	--primary: #0F6FFF;
	background: linear-gradient(180deg, #e8eaf0 0%, #d0d5dd 100%) !important;
}

/* Light Mode — Theme Toggle Styles */
body.light-mode .theme-knob-wrapper {
	background: rgba(0, 0, 0, 0.04);
	border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .theme-knob-wrapper:hover {
	background: rgba(0, 0, 0, 0.06);
	border-color: rgba(0, 0, 0, 0.12);
}

/* ══════════════════════════════════════════════════════════════════
   THEME TOGGLE (Dark/Light Mode Knob)
   ══════════════════════════════════════════════════════════════════ */

.theme-knob-wrapper {
	position: fixed;
	top: 24px;
	right: 24px;
	z-index: 1000;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 20px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.theme-knob-wrapper:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.15);
}

.knob-label {
	font-size: 8.2px;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: var(--text-secondary);
	transition: color 0.3s ease;
}

.knob-label--dark {
	padding-left: 4px;
}

.knob-label--light {
	padding-right: 4px;
}

.knob {
	width: 28px;
	height: 16px;
	background: linear-gradient(90deg, #1a1a2e, #0f6fff);
	border-radius: 8px;
	position: relative;
	transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.knob-led {
	width: 12px;
	height: 12px;
	background: #0F6FFF;
	border-radius: 3px;
	position: absolute;
	left: 2px;
	top: 2px;
	transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
	box-shadow: 0 0 8px rgba(15, 111, 255, 0.6);
}

.theme-knob-wrapper.is-dark .knob-label--dark {
	color: var(--primary);
}

.theme-knob-wrapper.is-light .knob-label--light {
	color: var(--primary);
}

.theme-knob-wrapper.is-light .knob {
	background: linear-gradient(90deg, #f8f9fa, #ffd700);
	box-shadow: inset 0 2px 4px rgba(255, 215, 0, 0.2);
}

.theme-knob-wrapper.is-light .knob-led {
	left: calc(100% - 14px);
	background: #FFD700;
	box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
}

/* Hide/show logo based on theme — CORRECT LOGIC */
/* Dark Mode: show logo-light (light colored logo on dark bg) */
body.dark-mode .logo-dark-mode,
body.dark-mode .sidebar-logo-dark {
	display: none !important;
}

body.dark-mode .logo-light-mode,
body.dark-mode .sidebar-logo-light {
	display: block !important;
}

/* Light Mode: show logo-dark (dark colored logo on light bg) */
body.light-mode .logo-dark-mode,
body.light-mode .sidebar-logo-dark {
	display: block !important;
}

body.light-mode .logo-light-mode,
body.light-mode .sidebar-logo-light {
	display: none !important;
}

/* Logo Container Centering */
.sidebar-footer a {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100%;
	height: auto;
}

/* ══════════════════════════════════════════════════════════════════
   BASE STYLES
   ══════════════════════════════════════════════════════════════════ */

html {
	scroll-behavior: smooth;
	scroll-padding-top: 120px;
	font-size: 13.12px;
}

body {
	background-color: var(--bg-dark);
	color: var(--text-secondary);
	font-family: var(--font-body);
	line-height: 1.3;
	font-size: 1rem;
}

/* ══════════════════════════════════════════════════════════════════
   HEADER / COVER
   ══════════════════════════════════════════════════════════════════ */

#couverture {
	position: relative;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: var(--spacing-2xl) var(--spacing-lg);
	overflow: hidden;
	background: linear-gradient(135deg, 
		rgba(15, 111, 255, 0.05) 0%, 
		rgba(123, 97, 255, 0.03) 50%, 
		rgba(8, 169, 190, 0.02) 100%);
}

#couverture::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -50%;
	width: 100%;
	height: 100%;
	background: radial-gradient(circle, 
		rgba(15, 111, 255, 0.1) 0%, 
		transparent 70%);
	pointer-events: none;
	animation: float-slow 20s ease-in-out infinite;
}

#couverture::after {
	content: '';
	position: absolute;
	bottom: -50%;
	left: -50%;
	width: 100%;
	height: 100%;
	background: radial-gradient(circle, 
		rgba(123, 97, 255, 0.08) 0%, 
		transparent 70%);
	pointer-events: none;
	animation: float-slow 25s ease-in-out infinite reverse;
}

@keyframes float-slow {
	0%, 100% { transform: translate(0, 0); }
	50% { transform: translate(30px, -30px); }
}

#couverture h1 {
	font-size: clamp(2rem, 4vw, 4rem);
	font-weight: 900;
	letter-spacing: -0.02em;
	color: var(--text-main);
	position: relative;
	z-index: 2;
	margin: 0 0 var(--spacing-md) 0;
	background: linear-gradient(135deg, 
		var(--text-main) 0%, 
		var(--primary) 50%, 
		var(--accent-1) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	animation: slide-up 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slide-up {
	from {
		opacity: 0;
		transform: translateY(40px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

#couverture > p {
	font-size: clamp(1rem, 2.5vw, 1.5rem);
	position: relative;
	z-index: 2;
	max-width: 800px;
	animation: slide-up 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

#couverture > p:first-of-type {
	font-weight: 600;
	color: var(--primary-light);
	font-size: clamp(1.2rem, 3vw, 1.8rem);
}

#couverture > p:nth-of-type(2) {
	color: var(--text-secondary);
	font-size: clamp(0.95rem, 1.5vw, 1.1rem);
	font-style: italic;
	opacity: 0.8;
}

#couverture > p:last-of-type {
	margin-top: var(--spacing-2xl);
	font-weight: 600;
}

.footer-link {
	font-weight: 600;
	color: var(--primary-light);
	font-size: clamp(0.9rem, 2.25vw, 1.35rem);
	letter-spacing: normal;
	text-transform: none;
	opacity: 0.9;
	text-decoration: none;
	transition: all 0.3s ease;
}

.footer-link:hover {
	opacity: 1;
	text-shadow: 0 0 10px rgba(91, 153, 255, 0.5);
	transform: translateY(-2px);
	display: inline-block;
}

/* ══════════════════════════════════════════════════════════════════
   FLOATING LOGO & HALO
   ══════════════════════════════════════════════════════════════════ */

.logo-container {
	margin-bottom: var(--spacing-lg);
	position: relative;
	z-index: 10;
	display: flex;
	justify-content: center;
	align-items: center;
}

.floating-logo {
	max-width: 180px; /* Adjust based on your logo size */
	height: auto;
	filter: drop-shadow(0 0 15px rgba(15, 111, 255, 0.4));
	animation: float-levitation 4s ease-in-out infinite;
	position: relative;
	z-index: 2;
}

/* Electric Blue Halo */
.logo-container::after {
	content: '';
	position: absolute;
	width: 120px;
	height: 30px;
	background: radial-gradient(ellipse at center, 
		rgba(15, 111, 255, 0.6) 0%, 
		rgba(15, 111, 255, 0.2) 40%, 
		transparent 70%);
	bottom: -15px;
	filter: blur(8px);
	animation: halo-pulse 4s ease-in-out infinite;
	z-index: 1;
}

@keyframes float-levitation {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-20px); }
}

@keyframes halo-pulse {
	0%, 100% { 
		transform: scale(1);
		opacity: 0.5;
	}
	50% { 
		transform: scale(1.4);
		opacity: 0.8;
	}
}

/* ══════════════════════════════════════════════════════════════════
   TABLE OF CONTENTS / SOMMAIRE (SIDEBAR)
   ══════════════════════════════════════════════════════════════════ */

#sommaire {
	position: fixed;
	left: 0;
	top: 0;
	bottom: 0;
	width: 240px;
	z-index: 98;
	background: rgba(10, 10, 10, 0.8);
	backdrop-filter: blur(20px);
	padding: var(--spacing-md); 
	border-right: 1px solid var(--border-light);
	margin-bottom: 0;
	overflow-y: auto;
	transform: translateX(-100%);
	transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
	display: flex;
	flex-direction: column;
}

body.has-sidebar #sommaire {
	transform: translateX(0);
}

#sommaire h2 {
	font-family: var(--font-heading);
	font-size: 1.1rem;
	color: var(--text-main);
	margin: 0 0 var(--spacing-sm) 0;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
}

#sommaire h2::before {
	content: '';
	width: 3px;
	height: 18px;
	background: linear-gradient(180deg, var(--primary), var(--accent-1));
	border-radius: 2px;
}

#sommaire ol {
	display: flex;
	flex-direction: column;
	gap: 1px;
	list-style: none;
	padding: 0;
	margin: 0;
	flex: 1 0 auto;
}

.sidebar-footer {
	margin-top: var(--spacing-xl);
	padding-top: var(--spacing-md);
	border-top: 1px solid var(--border-light);
	text-align: center;
	flex-shrink: 0;
}

.sidebar-footer a {
	display: inline-block;
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	transform: none !important;
	padding: 0 !important;
	position: relative;
	z-index: 100;
}

.sidebar-logo {
	max-width: 120px;
	height: auto;
	opacity: 0.7;
	transition: all 0.3s ease;
}

.sidebar-logo:hover {
	opacity: 1;
	transform: scale(1.05);
}

#sommaire li {
	position: relative;
	padding: 0;
	margin-bottom: 0;
	line-height: 1.4;
}

#sommaire a {
	color: var(--text-secondary);
	text-decoration: none;
	transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	font-size: 1.06rem;
	display: block;
	padding: 0px 2px;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
}

#sommaire a:hover, #sommaire a.active-nav {
	color: var(--text-main);
	background: rgba(15, 111, 255, 0.12);
	border-color: rgba(15, 111, 255, 0.4);
	transform: translateX(5px);
	box-shadow: 0 0 20px rgba(15, 111, 255, 0.25);
}

/* Specific active link color */
#sommaire a.active-nav {
	color: var(--primary-light);
	font-weight: 700;
	border-color: rgba(15, 111, 255, 0.5);
	background: rgba(15, 111, 255, 0.18);
}

/* Sub-menu Styles */
#sommaire .sub-menu {
	list-style: none;
	padding: 0 0 0 15px;
	margin: 0;
	max-height: 0;
	overflow: hidden;
	transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
	opacity: 0;
	border-left: 1px solid var(--border-light);
	margin-left: 12px;
}

#sommaire .nav-item.open .sub-menu {
	max-height: 800px; /* Large enough to fit content */
	opacity: 1;
	margin-top: 0;
	margin-bottom: 2px;
}

#sommaire .sub-menu a {
	font-size: 0.94rem;
	padding: 0px 2px;
	color: var(--text-tertiary);
	border: none;
	background: none;
	box-shadow: none;
}

#sommaire .sub-menu a:hover, 
#sommaire .sub-menu a.active-nav {
	color: var(--text-main);
	background: rgba(255, 255, 255, 0.05);
	transform: translateX(3px);
}

#sommaire .sub-menu a.active-nav {
	color: var(--accent-2);
	font-weight: 600;
}

/* Base style for toggle (hidden on desktop) */
.menu-toggle {
	display: none;
}

/* ══════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════════════════════════════════ */

main {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 var(--spacing-lg);
	transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.has-sidebar main {
	margin-left: 280px;
	margin-right: 60px;
	max-width: calc(100% - 340px);
}

@media (max-width: 1200px) {
	body.has-sidebar main {
		margin-left: 270px;
		margin-right: 40px;
		max-width: calc(100% - 310px);
	}
}

@media (max-width: 992px) {
	/* Force Menu Toggle Visibility */
	button.menu-toggle {
		display: flex !important;
		align-items: center;
		justify-content: center;
		position: fixed;
		top: 20px;
		right: 20px;
		z-index: 2000;
		width: 48px;
		height: 48px;
		background: var(--primary);
		border: none;
		border-radius: var(--radius-sm);
		cursor: pointer;
		box-shadow: 0 4px 15px rgba(15, 111, 255, 0.4);
		transition: all 0.3s ease;
	}

	#sommaire {
		position: fixed;
		left: 0;
		top: 0;
		bottom: 0;
		width: 280px;
		height: 100vh;
		z-index: 1000;
		transform: translateX(-100%);
		background: rgba(10, 10, 10, 0.98);
		padding: var(--spacing-xl) var(--spacing-md);
		border-right: 1px solid var(--border-color);
		box-shadow: 20px 0 50px rgba(0,0,0,0.5);
		transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
		display: block;
	}
	
	body.menu-open #sommaire {
		transform: translateX(0);
	}

	body.has-sidebar #sommaire {
		transform: translateX(-100%);
	}

	body.has-sidebar.menu-open #sommaire {
		transform: translateX(0);
	}

	body.has-sidebar main {
		margin-left: auto;
		margin-right: auto;
		max-width: 100%;
	}

	#sommaire ol {
		display: flex;
		flex-direction: column;
		grid-template-columns: none;
	}

	#sommaire .sub-menu {
		display: none !important;
	}

	.menu-toggle:active {
		transform: scale(0.9);
	}

	.hamburger {
		position: relative;
		width: 24px;
		height: 2px;
		background: #ffffff !important;
		display: block;
		transition: all 0.3s ease;
	}

	.hamburger::before,
	.hamburger::after {
		content: '';
		position: absolute;
		width: 24px;
		height: 2px;
		background: #ffffff !important;
		left: 0;
		transition: all 0.3s ease;
	}

	.hamburger::before { top: -8px; }
	.hamburger::after { top: 8px; }

	body.menu-open .hamburger {
		background: transparent !important;
	}

	body.menu-open .hamburger::before {
		transform: rotate(45deg);
		top: 0;
	}

	body.menu-open .hamburger::after {
		transform: rotate(-45deg);
		top: 0;
	}

	/* Overlay */
	.menu-overlay {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: rgba(0,0,0,0.7);
		backdrop-filter: blur(5px);
		z-index: 999;
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.4s ease;
	}

	body.menu-open .menu-overlay {
		opacity: 1;
		pointer-events: auto;
	}
}

/* Base style for toggle (hidden on desktop) */
.menu-toggle {
	display: none;
}

/* ══════════════════════════════════════════════════════════════════
   SECTIONS
   ══════════════════════════════════════════════════════════════════ */

section {
	margin-bottom: var(--spacing-xl);
	scroll-margin-top: 80px;
}

section > h1 {
	font-family: var(--font-heading);
	font-size: clamp(1.4rem, 4vw, 1.8rem);
	color: var(--text-main);
	margin: var(--spacing-xl) 0 var(--spacing-lg) 0;
	font-weight: 900;
	letter-spacing: -0.01em;
	position: relative;
	padding-bottom: var(--spacing-sm);
	border-bottom: 2px solid var(--border-color);
	text-transform: uppercase;
	
	/* Underline effect */
	background: linear-gradient(90deg, 
		var(--primary) 0%, 
		var(--accent-1) 50%, 
		var(--accent-2) 100%);
	background-size: 300% 100%;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

section > h1::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 200px;
	height: 2px;
	background: linear-gradient(90deg, 
		var(--primary) 0%, 
		transparent 100%);
	animation: expand-width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes expand-width {
	from { width: 0; }
	to { width: 200px; }
}

section > p {
	color: var(--text-secondary);
	font-size: 1.05rem;
	line-height: 1.45;
	margin: var(--spacing-lg) 0;
	max-width: 900px;
}

/* ══════════════════════════════════════════════════════════════════
   ARTICLES
   ══════════════════════════════════════════════════════════════════ */

article {
	margin-bottom: var(--spacing-xl);
	padding: var(--spacing-md) var(--spacing-lg);
	background: linear-gradient(135deg, 
		var(--bg-card) 0%, 
		rgba(123, 97, 255, 0.03) 100%);
	border: 1px solid var(--border-light);
	border-radius: var(--radius-md);
	transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	position: relative;
	overflow: hidden;
}

article:hover {
	border-color: rgba(15, 111, 255, 0.3);
	background: linear-gradient(135deg, 
		rgba(15, 111, 255, 0.05) 0%, 
		rgba(123, 97, 255, 0.05) 100%);
	box-shadow: 0 4px 20px rgba(15, 111, 255, 0.1);
	transform: translateY(-2px);
}

article h2 {
	font-family: var(--font-heading);
	font-size: clamp(1.3rem, 2.5vw, 1.7rem);
	color: var(--text-main);
	margin: 0 0 var(--spacing-sm) 0;
	position: relative;
	z-index: 1;
}

article p {
	color: var(--text-secondary);
	line-height: 1.4;
	margin: var(--spacing-sm) 0;
	position: relative;
	z-index: 1;
}

/* ══════════════════════════════════════════════════════════════════
   HEADINGS IN ARTICLES
   ══════════════════════════════════════════════════════════════════ */

article h3 {
	font-family: var(--font-heading);
	font-size: 1.15rem;
	color: var(--primary-light);
	margin: var(--spacing-md) 0 var(--spacing-sm) 0;
	position: relative;
	z-index: 1;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	font-weight: 700;
}

article > section {
	margin: var(--spacing-sm) 0;
	padding: 8px 16px;
	background: rgba(255, 255, 255, 0.02);
	border-left: 3px solid var(--primary);
	border-radius: var(--radius-sm);
	position: relative;
	z-index: 1;
}

article > section h3 {
	margin-top: 0;
	margin-bottom: 4px;
}

article > section p {
	margin: 4px 0;
}

/* ══════════════════════════════════════════════════════════════════
   LISTS
   ══════════════════════════════════════════════════════════════════ */

ul, ol {
	padding-left: var(--spacing-lg);
	position: relative;
	z-index: 1;
}

li {
	margin-bottom: var(--spacing-md);
	color: var(--text-secondary);
	line-height: 1.45;
}

ul li::marker {
	color: var(--primary);
	font-weight: bold;
}

ol li::marker {
	color: var(--accent-2);
	font-weight: bold;
}

/* ══════════════════════════════════════════════════════════════════
   BLOCKQUOTES
   ══════════════════════════════════════════════════════════════════ */

blockquote {
	position: relative;
	margin: var(--spacing-lg) 0;
	padding: var(--spacing-lg);
	padding-left: var(--spacing-xl);
	background: linear-gradient(135deg, 
		rgba(15, 111, 255, 0.1) 0%, 
		rgba(123, 97, 255, 0.05) 100%);
	border-left: 4px solid var(--primary);
	border-radius: var(--radius-md);
	z-index: 1;
	font-style: italic;
	font-size: 1.05rem;
}

blockquote::before {
	content: '"';
	position: absolute;
	left: var(--spacing-md);
	top: -var(--spacing-md);
	font-size: 3rem;
	color: var(--primary);
	opacity: 0.3;
	font-family: 'Georgia', serif;
}

blockquote p {
	margin: 0;
	color: var(--text-main);
}

/* ══════════════════════════════════════════════════════════════════
   DEFINITION LISTS
   ══════════════════════════════════════════════════════════════════ */

dl {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 12px;
	margin: var(--spacing-md) 0;
	position: relative;
	z-index: 1;
}

dt {
	font-weight: 700;
	color: var(--primary-light);
	font-family: var(--font-heading);
	padding: 8px 12px;
	background: rgba(15, 111, 255, 0.05);
	border-radius: var(--radius-sm);
	border-left: 3px solid var(--primary);
	font-size: 0.95rem;
}

dd {
	color: var(--text-secondary);
	line-height: 1.6;
	padding: 8px 12px;
	background: rgba(255, 255, 255, 0.02);
	border-radius: var(--radius-sm);
	margin: 0;
	font-size: 0.95rem;
}

#partie1 dt, #partie1 dd {
	font-size: 1.045rem;
}

@media (max-width: 768px) {
	dl {
		grid-template-columns: 1fr;
	}
}

/* ══════════════════════════════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════════════════════════════ */

table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	margin: var(--spacing-lg) 0;
	background: var(--bg-card);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: 0 4px 16px rgba(15, 111, 255, 0.08);
	position: relative;
	z-index: 1;
}

thead {
	background: linear-gradient(90deg, 
		rgba(15, 111, 255, 0.15) 0%, 
		rgba(123, 97, 255, 0.1) 100%);
}

th {
	padding: 8px var(--spacing-lg);
	text-align: left;
	color: var(--primary-light);
	font-weight: 700;
	font-family: var(--font-heading);
	border-bottom: 2px solid rgba(15, 111, 255, 0.3);
	text-transform: uppercase;
	font-size: 0.9rem;
	letter-spacing: 0.05em;
}

td {
	padding: 8px var(--spacing-lg);
	color: var(--text-secondary);
	border-bottom: 1px solid var(--border-light);
	line-height: 1.2;
}

tr:last-child td {
	border-bottom: none;
}

tbody tr {
	transition: all 0.3s ease;
}

tbody tr:hover {
	background: rgba(15, 111, 255, 0.05);
}

tbody tr:hover td {
	color: var(--text-main);
}

/* ══════════════════════════════════════════════════════════════════
   CODE BLOCKS
   ══════════════════════════════════════════════════════════════════ */

code {
	font-family: var(--font-code);
	font-size: 1.04em;
	background: rgba(15, 111, 255, 0.1);
	padding: 2px 6px;
	border-radius: var(--radius-sm);
	color: var(--primary-light);
	border: 1px solid rgba(15, 111, 255, 0.2);
}

pre {
	background: var(--bg-surface);
	border: 1px solid var(--border-light);
	padding: var(--spacing-lg);
	border-radius: var(--radius-lg);
	overflow-x: auto;
	margin: var(--spacing-lg) 0;
	position: relative;
	z-index: 1;
}

pre code {
	background: none;
	padding: 0;
	color: var(--primary-light);
	border: none;
	font-size: 1.09em;
	line-height: 1.3;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE TYPOGRAPHY
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
	:root {
		--spacing-2xl: 40px;
		--spacing-xl: 32px;
		--spacing-lg: 24px;
	}
	
	#couverture {
		padding: var(--spacing-xl) var(--spacing-md);
		min-height: 100vh;
	}
	
	#sommaire {
		padding: var(--spacing-lg) var(--spacing-md);
	}
	
	#sommaire ol {
		grid-template-columns: 1fr;
	}

	#sommaire .sub-menu {
		display: none !important;
	}
	
	main {
		padding: 0 var(--spacing-md);
	}
	
	section > h1 {
		font-size: 1.75rem;
	}
	
	article {
		padding: var(--spacing-lg);
	}
	
	dl {
		grid-template-columns: 1fr;
		gap: var(--spacing-md);
	}
	
	table {
		font-size: 0.9rem;
	}
	
	th, td {
		padding: 6px var(--spacing-sm);
	}
}

/* ══════════════════════════════════════════════════════════════════
   ANIMATIONS & TRANSITIONS
   ══════════════════════════════════════════════════════════════════ */

/* Fade in on scroll - you can add data-animate class */
@media (prefers-reduced-motion: no-preference) {
	article {
		animation: fade-in-up 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
	}
	
	article:nth-child(1) { animation-delay: 0s; }
	article:nth-child(2) { animation-delay: 0.1s; }
	article:nth-child(3) { animation-delay: 0.2s; }
	article:nth-child(4) { animation-delay: 0.3s; }
	article:nth-child(5) { animation-delay: 0.4s; }
}

@keyframes fade-in-up {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ══════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ══════════════════════════════════════════════════════════════════ */

/* Highlight key words */
.highlight {
	color: var(--primary);
	font-weight: 600;
	position: relative;
}

.highlight::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	right: 0;
	height: 2px;
	background: linear-gradient(90deg, var(--primary), transparent);
	opacity: 0.4;
}

/* Accent colored text */
.accent-text {
	color: var(--accent-2);
	font-weight: 600;
}

/* Subtle background boxes */
.info-box {
	padding: 12px 16px;
	background: linear-gradient(135deg, 
		rgba(8, 169, 190, 0.1) 0%, 
		rgba(15, 111, 255, 0.05) 100%);
	border: 1px solid rgba(8, 169, 190, 0.3);
	border-radius: var(--radius-sm);
	margin: var(--spacing-md) 0;
	position: relative;
	z-index: 1;
}

.info-box::before {
	content: 'ℹ';
	position: absolute;
	top: 10px;
	left: 12px;
	color: var(--accent-2);
	font-size: 1.1rem;
	font-weight: bold;
}

.info-box p {
	margin: 0 0 0 24px;
}

/* Warning / Important boxes */
.warning-box {
	padding: 12px 16px;
	background: linear-gradient(135deg, 
		rgba(123, 97, 255, 0.1) 0%, 
		rgba(15, 111, 255, 0.05) 100%);
	border: 1px solid rgba(123, 97, 255, 0.3);
	border-radius: var(--radius-sm);
	margin: var(--spacing-md) 0;
	position: relative;
	z-index: 1;
}

.warning-box::before {
	content: '⚠';
	position: absolute;
	top: 10px;
	left: 12px;
	color: var(--accent-1);
	font-size: 1.1rem;
}

.warning-box p {
	margin: 0 0 0 24px;
}

/* ══════════════════════════════════════════════════════════════════
   FOOTER STYLES
   ══════════════════════════════════════════════════════════════════ */

#site-footer {
	background: linear-gradient(135deg, 
		var(--bg-surface) 0%, 
		rgba(123, 97, 255, 0.03) 100%);
	margin-top: var(--spacing-2xl);
	color: var(--text-secondary);
	font-size: 0.95rem;
	transition: margin-left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.has-sidebar #site-footer {
	margin-left: 280px;
}

@media (max-width: 992px) {
	body.has-sidebar #site-footer {
		margin-left: 0;
	}
}

#site-footer h3 {
	font-family: var(--font-heading);
	font-size: 1.1rem;
	color: var(--text-main);
	margin-bottom: 16px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

#site-footer a {
	color: var(--text-secondary);
	text-decoration: none;
	transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	position: relative;
}

#site-footer a:hover {
	color: var(--primary-light);
	transform: translateX(2px);
}

#site-footer a::before {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 1px;
	background: linear-gradient(90deg, var(--primary), transparent);
	transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#site-footer a:hover::before {
	width: 100%;
}

/* ══════════════════════════════════════════════════════════════════
   SCROLL TO TOP BUTTON (via JavaScript)
   ══════════════════════════════════════════════════════════════════ */

/* Handled in JavaScript - button is created dynamically */

/* ══════════════════════════════════════════════════════════════════
   PRINT STYLES
   ══════════════════════════════════════════════════════════════════ */

@media print {
	#sommaire {
		display: none;
	}
	
	article {
		page-break-inside: avoid;
		box-shadow: none;
		border: 1px solid var(--border-light);
	}
	
	body {
		background: white;
		color: black;
	}
	
	a {
		color: #0066cc;
	}
}

/* ------------------------------------------------------------------
   LIGHT MODE  COMPREHENSIVE 3D STYLING
   ------------------------------------------------------------------ */

/* Sidebar 3D Effect - Raised with Depth */
body.light-mode #sommaire {
	background: linear-gradient(135deg, #f8f9fc 0%, #eff2f7 100%);
	backdrop-filter: blur(30px);
	border-right: 2px solid rgba(15, 111, 255, 0.2);
	box-shadow: 12px 0 40px rgba(15, 111, 255, 0.15),
		inset -3px 0 12px rgba(255, 255, 255, 0.8),
		inset 2px 0 6px rgba(0, 0, 0, 0.03);
}

/* Main Links  Bold Blue */
body.light-mode #sommaire a {
	color: #0F6FFF;
	font-weight: 700;
}

body.light-mode #sommaire > ol > li > a {
	color: #0F6FFF;
	font-weight: 700;
	font-size: 1.05rem;
}

body.light-mode #sommaire > ol > li > a:hover {
	color: #0155d4;
	background: rgba(15, 111, 255, 0.1);
	box-shadow: 0 4px 16px rgba(15, 111, 255, 0.2),
		inset 0 1px 4px rgba(255, 255, 255, 0.8);
}

/* Sub-menu Links  Gray */
body.light-mode #sommaire .sub-menu a {
	color: #4a5568;
	font-weight: 500;
	font-size: 0.95rem;
}

body.light-mode #sommaire .sub-menu a:hover {
	color: #0F6FFF;
	background: rgba(15, 111, 255, 0.08);
}

/* Articles  Raised 3D Cards */
body.light-mode article {
	background: linear-gradient(135deg, #ffffff 0%, #f8f9fb 100%);
	border: 1px solid rgba(15, 111, 255, 0.1);
	border-radius: var(--radius-lg);
	box-shadow: 0 4px 16px rgba(15, 111, 255, 0.08),
		0 2px 8px rgba(0, 0, 0, 0.04),
		inset 0 1px 2px rgba(255, 255, 255, 0.8),
		inset 0 -1px 2px rgba(0, 0, 0, 0.02);
	transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.light-mode article:hover {
	transform: translateY(-8px);
	box-shadow: 0 16px 32px rgba(15, 111, 255, 0.15),
		0 4px 12px rgba(0, 0, 0, 0.08),
		inset 0 1px 3px rgba(255, 255, 255, 0.9),
		inset 0 -2px 4px rgba(0, 0, 0, 0.03);
}

/* Tables  Embossed Style */
body.light-mode table {
	background: linear-gradient(to bottom, #ffffff 0%, #f8f9fc 100%);
	border: 1px solid rgba(15, 111, 255, 0.12);
	border-radius: var(--radius-md);
	overflow: hidden;
	box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.8),
		0 4px 12px rgba(15, 111, 255, 0.1);
}

body.light-mode thead {
	background: linear-gradient(135deg, rgba(15, 111, 255, 0.12) 0%, rgba(123, 97, 255, 0.08) 100%);
	box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.6),
		inset 0 -1px 2px rgba(0, 0, 0, 0.05);
}

body.light-mode tbody tr:hover {
	background: rgba(15, 111, 255, 0.06);
	box-shadow: inset 4px 0 0 rgba(15, 111, 255, 0.3);
}

/* Blockquotes  Inset 3D */
body.light-mode blockquote {
	background: linear-gradient(135deg, rgba(15, 111, 255, 0.08) 0%, rgba(123, 97, 255, 0.04) 100%);
	border-left: 4px solid #0F6FFF;
	border-radius: var(--radius-md);
	padding: var(--spacing-md);
	margin: var(--spacing-md) 0;
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.03),
		inset -2px 0 4px rgba(255, 255, 255, 0.6);
}

/* Info Boxes  3D Inset */
body.light-mode .info-box {
	background: linear-gradient(135deg, rgba(8, 169, 190, 0.12) 0%, rgba(15, 111, 255, 0.08) 100%);
	border: 1px solid rgba(8, 169, 190, 0.3);
	border-radius: var(--radius-md);
	box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.7),
		inset 0 -2px 4px rgba(0, 0, 0, 0.02),
		0 4px 12px rgba(8, 169, 190, 0.1);
}

/* Warning Boxes  3D Inset */
body.light-mode .warning-box {
	background: linear-gradient(135deg, rgba(123, 97, 255, 0.12) 0%, rgba(15, 111, 255, 0.08) 100%);
	border: 1px solid rgba(123, 97, 255, 0.3);
	border-radius: var(--radius-md);
	box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.7),
		inset 0 -2px 4px rgba(0, 0, 0, 0.02),
		0 4px 12px rgba(123, 97, 255, 0.1);
}

/* Code Blocks  Sunken 3D */
body.light-mode code {
	background: rgba(15, 111, 255, 0.08);
	border: 1px solid rgba(15, 111, 255, 0.15);
	color: #0F6FFF;
	border-radius: var(--radius-sm);
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04),
		inset 0 -1px 2px rgba(255, 255, 255, 0.6);
}

body.light-mode pre {
	background: linear-gradient(135deg, #f0f4fb 0%, #eff2f7 100%);
	border: 1px solid rgba(15, 111, 255, 0.15);
	border-radius: var(--radius-lg);
	box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.04),
		inset 0 -2px 4px rgba(255, 255, 255, 0.4),
		0 8px 24px rgba(15, 111, 255, 0.1);
}

/* ============================================
   CUSTOM STYLES FOR GUIDE V3
   ============================================ */

/* Augmente tous les textes de 10% sauf H1 à H4 */
body {
  font-size: 110%;
}

p, li, td, th, span, div, a, label, input, textarea, button {
  font-size: 110%;
}

section p, section li, article p, article li {
  font-size: 110%;
}

.sub-menu li a {
  font-size: 105%;
}

/* Section II specific: dt and dd +10% */
#partie1 dt, #partie1 dd {
  font-size: 1.045rem;
}

/* Sidebar adjustments */
#sommaire .sidebar-header {
  padding-bottom: 10px !important;
  margin-bottom: 10px !important;
}

#sommaire .sidebar-logo,
#sommaire .sidebar-header img {
  height: 85px !important;
  padding: 0 !important;
}

#sommaire h2 {
  font-size: 113%;
}

#sommaire a {
  font-size: 95%;
  padding: 1px 0 !important;
  margin: 0 !important;
}

#sommaire .main-link {
  font-size: 95%;
  padding: 2px 0 !important;
  white-space: nowrap;
}

#sommaire .sub-menu {
  padding-left: 8px !important;
}

#sommaire .sub-menu li a {
  font-size: 75%;
}

#sommaire .nav-item {
  margin: 2px 0 !important;
}

/* Glossaire - Agent IA +15% et description +5% */
#annexe-glossaire dt {
  font-size: 115%;
}

#annexe-glossaire dd {
  font-size: 105%;
}
