:root {
	--color-background-body: #edf0f4;
	--color-menu-border: #838383;
	--color-menu-text: #4e4e4e;
	--color-menu-bullet: #7f8387;
	--color-menu-text-shadow: #cfcfcf;
	--color-menu-hover-text: #fff;
	--color-menu-hover-text-shadow: #1f2327;
	--color-header-title: #afb6bc;
	--color-h1-h2-article: #9b9fa4;
	--color-article-border: #3a3c3f;
	--color-article-link: #3b3d3f;
	--color-table-border: #afb6bc;
	--color-definition-list-term: #afb6bc;
	--color-blockquote-border: #afb6bc;
	--color-aside-text: #4e4e4e;
	--color-aside-text-shadow: #cfcfcf;
	--color-footer-text: #717375;

	--gradient-menu-background:
		linear-gradient(to bottom, #838383, #838383) no-repeat top / 100% 1px,
		linear-gradient(to bottom, #fbfcfc, #fbfcfc) no-repeat top 1px left / 100% 1px,
		linear-gradient(to bottom, #f0f2f4 0%, #eef0f2 20%, #e9ebee 50%, #e4e7ea 80%, #e2e5e8 100%) no-repeat center / 100% calc(100% - 4px),
		linear-gradient(to bottom, #f7f8f9, #f7f8f9) no-repeat bottom 1px left / 100% 1px,
		linear-gradient(to bottom, #838383, #838383) no-repeat bottom / 100% 1px;
	--gradient-menu-hover-background:
		linear-gradient(to bottom, #838383, #838383) no-repeat top / 100% 1px,
		linear-gradient(to bottom, #caccce, #caccce) no-repeat top 1px left / 100% 1px,
		linear-gradient(to bottom, #83868a 0%, #7f8287 20%, #74797e 50%, #6a7077 80%, #666c73 100%) no-repeat center / 100% calc(100% - 4px),
		linear-gradient(to bottom, #a8acaf, #a8acaf) no-repeat bottom 1px left / 100% 1px,
		linear-gradient(to bottom, #838383, #838383) no-repeat bottom / 100% 1px;
}

body{
	background: image-set('images/body_back.png' 1x, 'images/body_back@x2.png' 2x) repeat-x top left var(--color-background-body);
	font-family: 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6{ font-weight: normal; }

#container{
	max-width: 950px;
	margin: 10px auto 15px;
	background: #fff;
	border-radius: 0 0 5px 5px;
}

#container > header{
	height: 170px;
	background: #fff;
	overflow: hidden;
	position: relative;
}

	#container > header h1{
		position: absolute;
		font-size: 47px;
		letter-spacing: -3px;
		margin: 100px 0 0 30px;
		z-index: 10;
	}
		#container header h1 a{
			color: #fff;
			text-shadow: 1px 1px 0 #1f2327;
		}

#mobile-menu-toggle,
#mobile-menu-panel {
    display: none;
}

#menu{
	height: 38px;
	margin-bottom: 7px;
	background: var(--gradient-menu-background);
}
#menu::after {
	content: "";
	display: block;
	height: 4px;
	background: linear-gradient(to bottom, #f8f8f8, #fff);
	pointer-events: none;
}
	#menu menu {
		height: 38px; width: 100%;
		margin: 0 0 0 -1px;
		border-left: 1px solid var(--color-menu-border);
		border-right: 1px solid var(--color-menu-border);
		display: flex;
	}
		#menu h3 {
			display: none;
		}

		#menu ul {
			display: flex;
		}
			#menu li {
				font-size: 14px; text-transform: uppercase;
				height: 37px;
				border-right: 1px solid var(--color-menu-border);
			}
			#menu li.last {
				border: none;
			}
				#menu a {
					display: block;
					padding: 10px 15px 11px 15px;
					color: var(--color-menu-text);
					text-shadow: 1px 1px 0 var(--color-menu-text-shadow);
				}
					#menu a:hover, #menu a.active {
						background: var(--gradient-menu-hover-background);
						color: var(--color-menu-hover-text);
						text-shadow: 1px 1px 0 var(--color-menu-hover-text-shadow);
					}

#content {
	padding: 20px 0 70px;
	font-size: 11px;
}
	#content .inner {
		display: grid;
		grid-template-columns: auto 1fr auto;
		gap: 14px;
	}
	
article {
	order: 1;
	color: #3a3c3f;
	text-align: justify;
	font-size: 11px;
}
	.no-menu-main article { margin: 0 0 0 8px; }
	.no-menu-sec article { margin: 0 8px 0 0; }
	.no-menu article { margin: 0 8px; }

	header {
		letter-spacing: -1px;
		color: var(--color-header-title);
	}
	
	#header-image,
	header .inner {
		width : 100%;
		height: 100%;
	}
	
	article section h1, article section h2 {
		font-size: 19px;
		color: var(--color-h1-h2-article);
		padding: 12px 4px;
		border-bottom: 1px solid var(--color-article-border);
		margin: 0 0 10px 0;
	}
	
	article h3 {
		font-size: 14px;
		font-weight: bold;
		padding: 5px;
		border-bottom: 1px solid var(--color-article-border);
		color: var(--color-article-border);
	}

	article p {
		line-height: 1.50;
		margin: 10px 0;
	}
	
	article a {
		color: var(--color-article-link);
		border-bottom: 1px solid var(--color-article-link);
	}

	article section h1 a, article section h2 a, article section h3 a {
		border: none;
	}
	
	article table {
		border: 1px solid var(--color-table-border);
		width: 100%;
		border-width: 1px 0 0 1px;
		margin: 0 0 15px 0;
	}
		article table td {
			padding: 4px;
			border: 1px solid var(--color-table-border);
			border-width: 0 1px 1px 0;
		}

	article ul, article ol {
		padding: 5px 0 5px 20px;
	}
		article ul li { padding: 2px 0; list-style-type: disc; }
		article ol li { padding: 1px 0; list-style-type: decimal; }
	
	article dl {
		line-height: 1.50;
	}	
		article dt { color: var(--color-definition-list-term); }
		article dd { padding: 5px 0 5px 20px; }
	
	article blockquote {
		border: 1px solid var(--color-blockquote-border);
		border-width: 1px 1px 1px 5px;
		color: #1f2327;
		line-height: 1.50;
		padding: 10px;
		margin: 10px 0;
	}
	
	article hr {
		background-color: var(--color-article-border);
		border: none;
		height: 1px;
	}

#content nav.placeholder {
	width: 200px;
}

	#content aside h3 {
		width: 200px; height: 24px;
		text-transform: uppercase;
		color: var(--color-aside-text); text-shadow: 1px 1px 0 var(--color-aside-text-shadow);
		font-size: 13px;
		padding: 20px 0 0 17px;
	}
	
	#content aside .menu-content,
	#content aside .block > ul {
		width: 152px;
		background: #edf0f4;
		border-radius: 0 0 5px 5px;
		
		padding: 15px;
	}
	
	#content aside .block > ul > li {
		padding: 3px 0 3px 15px;
		position: relative;
	}

	#content aside .block > ul > li::before {
		content: "";
		position: absolute;
		left: 0;
		top: 6px;
		width: 6px;
		height: 6px;
		background: var(--color-menu-bullet);
		border-radius: 50%;
	}
	
	#content aside a { color: #3a3c3f; }

#navigation-main {
	order: 0;
}
	#navigation-main h3 {
		background: image-set('images/menu_title_left.png' 1x, 'images/menu_title_left@x2.png' 2x) no-repeat 1px top;
		margin: 0 0 0 -14px;
	}
	#navigation-main .menu-content, #navigation-main ul { margin: 0 0 0 8px; }
	
#navigation-sec {
	order: 2;
}
	#navigation-sec h3 {
		background: image-set('images/menu_title_right.png' 1x, 'images/menu_title_right@x2.png' 2x) no-repeat left top;
		margin: 0 -12px 0 5px;
	}
	#navigation-sec .menu-content, #navigation-sec ul { margin: 0 0 0 20px; }

#footer {
	max-width: 950px;
	padding: 15px 15px 30px;
	font-size: 11px;
	line-height: 1.25;
	margin: 0 auto;
	box-sizing: border-box;
}
	#footer, #footer a {
		color: var(--color-footer-text);
	}

#menu-top-wrapper {
	width: 100%;
}

/* --- Styles Mobile (Breakpoint) --- */
@media (max-width: 950px) {
	#main-content {
		word-wrap: anywhere;
	}

    /* 1. Masquer les menus d'origine */
    #menu,
    #navigation-main,
    #navigation-sec {
        display: none;
    }

    /* 2. Afficher et styler le bouton Hamburger */
    #mobile-menu-toggle {
        display: block;
        position: fixed; /* Fixe pour rester visible au scroll */
        top: 15px;
        right: 15px;
        z-index: 1001;
        width: 40px;
        height: 40px;
        background: #3a3c3f; /* Couleur de votre article */
        border: none;
        border-radius: 3px;
        cursor: pointer;
    }
    
    /* Style pour les barres du hamburger */
    #mobile-menu-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: #fff;
        margin: 5px auto;
        transition: transform 0.3s, opacity 0.3s;
    }

    /* Animation du hamburger en croix (facultatif mais pro) */
    body.nav-open #mobile-menu-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    body.nav-open #mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }
    body.nav-open #mobile-menu-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* 3. Styler le panneau mobile (état "fermé" par défaut) */
    #mobile-menu-panel {
        display: block; /* Important: il est 'block', mais hors écran */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh; /* Plein écran */
        background: #fff;
        z-index: 1000;
        overflow-y: auto;
        padding: 70px 20px 20px; /* Espace pour le bouton */
        box-sizing: border-box; /* Pour que le padding soit inclus */
        
        /* État "fermé": hors de l'écran */
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }
    
    /* 4. AFFICHER LE PANNEAU (état "ouvert") */
    /* C'est la règle qui s'active quand le JS ajoute la classe au body */
    body.nav-open #mobile-menu-panel {
        transform: translateX(0);
    }
    
    /* 5. Bloquer le scroll de la page quand le menu est ouvert */
    body.nav-open {
        overflow: hidden;
    }
    
    /* 6. Gérer le layout du contenu principal */
    #content .inner {
        grid-template-columns: 1fr; /* Passage à 1 colonne */
        padding: 0 10px; /* Un peu d'air sur les côtés */
    }

    article {
        order: 0; 
        margin: 0 !important; /* Annule les marges .no-menu */
    }
    
    /* 7. Styler les menus clonés (même CSS que la dernière fois) */
    #mobile-menu-panel .block { margin-bottom: 20px; }
    #mobile-menu-panel .block h3 {
        font-size: 1rem;
        font-weight: bold;
        text-transform: uppercase;
        padding: 10px;
        background-color: #edf0f4; /* Couleur de fond de l'aside */
        color: var(--color-aside-text);
    }
    #mobile-menu-panel ul { display: block; }
    #mobile-menu-panel li {
        display: block;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    #mobile-menu-panel a {
        display: block;
        padding: 15px 10px;
        color: #3a3c3f;
        text-shadow: none;
    }
    /* Cacher le menu horizontal de base s'il est cloné */
    #mobile-menu-panel > menu { display: none; }
    /* Si vous voulez aussi le menu horizontal, changez la règle ci-dessus */
}