* {
	margin: 0;
	padding: 0;
	text-decoration: none;
	list-style: none;
	/* background-color: rgba(128, 128, 128, 0.178); */
}

.no-js body {
	color: black !important;
	background: white !important;
}

.no-js nav {
	background-color: #ddd !important;
}


html {
	height: 100%;
}

a {
	transition: color 0.15s;
}

.dark-theme {
	--color: rgb(206, 206, 206);
	--link-color: var(--color);
	--link-color-hover: rgb(149, 138, 255);

	--navbar-background-color: rgba(17, 18, 19, 0.9);
	--navbar-text-color: rgb(214, 214, 214);
	--navbar-color-hover: rgb(143, 129, 255);

	--button-color-off: rgb(226, 226, 226);
	--button-color-on: rgb(226, 226, 226);
}

.light-theme {
	--color: black;
	--link-color: var(--color);
	--link-color-hover: rgb(68, 0, 205);

	--navbar-background-color: rgba(6, 6, 21, 0.85);
	--navbar-text-color: rgb(214, 214, 214);
	--navbar-color-hover: rgb(143, 129, 255);

	--button-color-off: rgb(36, 36, 36);
	--button-color-on: rgb(216, 216, 216);
}

@property --gradColor1 {
	syntax: '<color>';
	initial-value: rgb(35, 41, 41);
	/* initial-value: rgb(3, 223, 223); */
	inherits: false;
}

@property --gradColor2 {
	syntax: '<color>';
	initial-value: rgb(33, 33, 36);
	inherits: false;
}

@property --gradColor3 {
	syntax: '<color>';
	initial-value: rgb(32, 29, 46);
	/* initial-value: rgb(46, 6, 223); */
	inherits: false;
}

@property --gradPercentage1 {
	syntax: '<percentage>';
	initial-value: 20%;
	inherits: false;
}

@property --gradPercentage2 {
	syntax: '<percentage>';
	initial-value: 60%;
	inherits: false;
}


@keyframes background_move {
	0% {
		--gradPercentage1: 25%;
		--gradPercentage2: 75%;
	}

	5% {
		--gradPercentage1: 25%;
		--gradPercentage2: 75%;
	}

	25% {
		--gradPercentage1: 28%;
		--gradPercentage2: 72%;
	}

	50% {
		--gradPercentage1: 35%;
		--gradPercentage2: 65%;
	}

	55% {
		--gradPercentage1: 35%;
		--gradPercentage2: 65%;
	}

	75% {
		--gradPercentage1: 32%;
		--gradPercentage2: 68%;
	}

	100% {
		--gradPercentage1: 25%;
		--gradPercentage2: 75%;
	}
}

body {
	position: fixed;
	top: 0;
	left: 0;
	height: 100dvh;
	width: 100dvw;

	font-family: Helvetica, Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.25;

	color: var(--color);
	background-color: var(--gradColor2);
	background:
		linear-gradient(90deg, var(--gradColor1) 0%, var(--gradColor2) var(--gradPercentage1), var(--gradColor2) var(--gradPercentage2), var(--gradColor3) 100%);
	/* background: var(--gradColor2); */
	animation: 30s linear infinite background_move;
	transition-property: --gradColor1, --gradColor2, --gradColor3, background-color, color;
	transition-duration: 0.3s;
}

.light-theme {
	--gradColor1: rgb(255, 255, 241);
	--gradColor2: rgb(255, 255, 251);
	--gradColor3: rgb(255, 250, 238);
}

.dark-theme {
	--gradColor1: oklab(27.504% -0.00817 -0.00248);
	--gradColor2: oklch(24.899% 0.00564 285.917);
	--gradColor3: oklab(24.241% 0.01204 -0.02996);
}



/* ________________ Content _________________ */

#main-holder {
	overflow-y: auto;
	width: 100%;
	height: 100%;
	display: flex;
}

#main-holder::before {
	content: '';
	/* background-color: aqua; */
	transition: flex var(--navbar-transition-time) var(--navbar-transition-style);
	flex: 0 0 var(--navbar-margin);
}

#main-holder::after {
	content: '';
	flex: 0 100000 var(--navbar-margin);
}

@media screen and (max-width: 600px) {
	#main-holder::before {
		flex: 0 0 0;
	}
}

main {
	margin-left: auto;
	margin-right: auto;
	margin-top: 40px;
	margin-bottom: 30px;
	padding: 0px 40px;
	max-width: 700px;
	height: fit-content;
	transition: padding 1s, margin-left var(--navbar-transition-time) var(--navbar-transition-style), filter 0.2s;
}

.spaced-list li {
	margin-bottom: 10px;
	line-height: 1.2;
}

.picture {
	width: 170px;
	margin: 30px;
	border-radius: 12px;
}

h1 {
	padding: 20px 0 40px 0;
	text-align: center;
	font-family: sans-serif;
	font-size: 2.7rem;
	font-weight: 300;
	letter-spacing: 0.1em;
}

h4 {
	margin-top: 23px;
	margin-bottom: 17px;
	font-family: sans-serif;
	font-size: 1.4rem;
	font-weight: normal;
}

/* ________________ Boring color details _________________ */

main a {
	text-decoration: underline;
}

main a {
	color: var(--link-color);
}

main a:is(:hover, :focus-visible) {
	color: var(--link-color-hover);
}

@media screen and (max-width: 600px) {
	.navbar-visible main>* {
		filter: blur(0.2rem);
		transition: filter 0.6s;
		cursor: default;
		pointer-events: none;
	}

	main>* {
		transition: filter 0.2s;
	}

	.navbar-visible main a {
		pointer-events: none;
	}
}

.it {
	font-style: italic;
}

/* ---- Ajustements pour l'espacement de la page d'accueil ---- */

/* Crée un espace sous votre nom Laurent CHARLES */
main h3 {
    margin-bottom: 20px;
    font-size: 1.5rem; /* Ajuste légèrement la taille si besoin */
}

/* Crée un espace sous le bloc contenant votre texte de présentation */
main article {
    margin-bottom: 20px;
}

/* Force les paragraphes de contact à aller à la ligne et s'espacer */
main p {
    margin-bottom: 20px;
}

/* /\* ---- Ajustements pour la liste des collaborations ---- *\/ */

/* ul.spaced-list { */
/*     margin-left: 15px;    /\* Décale la liste vers la droite pour l'alignement *\/ */
/*     margin-bottom: 20px;  /\* Règle parfaitement l'espace sous la liste *\/ */
/*     padding-left: 10px;   /\* Donne un peu de confort visuel avant le texte *\/ */
/* } */

/* .spaced-list li { */
/*     display: list-item !important;       /\* Force le comportement d'une liste *\/ */
/*     list-style-type: disc !important;    /\* FORCE la puce sur le LI (écrase le * du haut) *\/ */
/*     list-style-position: outside !important; /\* Place la puce joliment dans la marge de gauche *\/ */
/*     margin-bottom: 10px;                 /\* Espace entre chaque collaborateur *\/ */
/*     line-height: 1.4;                    /\* Améliore la lisibilité *\/ */
/* } */

/* /\* ---- Correction pour la liste imbriquée ---- *\/ */

/* /\* On cible uniquement les puces de la sous-liste *\/ */
/* .spaced-list li ul.sous-liste li { */
/*     display: list-item !important; */
/*     list-style-type: circle !important; /\* Force de jolies puces creuses (cercles) *\/ */
/*     list-style-position: outside !important; */
/*     margin-left: 25px;                  /\* Décale proprement les chapitres vers la droite *\/ */
/*     margin-bottom: 5px;                 /\* Un espace plus petit entre les chapitres *\/ */
/*     font-size: 0.95rem;                 /\* Écrit les sous-éléments un tout petit peu plus petits *\/ */
/* } */



/* /\* ---- Style pour le menu déroulant (details/summary) ---- *\/ */

/* summary { */
/*     display: list-item !important;      /\* Force le navigateur à pouvoir dessiner la flèche *\/ */
/*     list-style-type: disclosure-closed !important; /\* Force l'affichage de la flèche de fermeture (▶) *\/ */
/*     cursor: pointer;                    /\* Transforme la souris en main au survol *\/ */
/*     padding-left: 5px; */
/*     outline: none; */
/* } */

/* /\* Quand le menu est ouvert, la flèche pivote automatiquement *\/ */
/* details[open] summary { */
/*     list-style-type: disclosure-open !important; /\* Force la flèche d'ouverture (▼) *\/ */
/* } */

/* /\* Compatibilité pour Safari (Mac/iPhone) qui utilise un code ancien *\/ */
/* summary::-webkit-details-marker { */
/*     display: list-item !important; */
/* } */

/* /\* Aligne le lien interne avec la couleur du thème *\/ */
/* summary a { */
/*     color: inherit; */
/* } */



/* /\* ---- Bouton de détails à la fin des titres ---- *\/ */

/* /\* 1. On garde la puce ronde classique au début *\/ */
/* .spaced-list li:has(details) { */
/*     list-style-type: disc !important; */
/* } */

/* /\* 2. On cache la flèche native et on prépare le texte du titre *\/ */
/* .spaced-list li details summary { */
/*     display: block !important; */
/*     list-style: none !important; */
/*     cursor: pointer; */
/*     outline: none; */
/* } */
/* summary::-webkit-details-marker { */
/*     display: none !important; /\* Pour Safari *\/ */
/* } */

/* /\* 3. Quand le menu est FERMÉ : on affiche "[ + Détails ]" *\/ */
/* .spaced-list li details summary::after { */
/*     content: ' [Chapitres]'; */
/*     font-size: 0.85rem;              /\* Texte un peu plus petit et discret *\/ */
/*     font-weight: bold; */
/*     color: var(--link-color-hover);  /\* Utilise la couleur secondaire du thème *\/ */
/*     opacity: 0.8; */
/*     transition: opacity 0.2s; */
/* } */

/* /\* 4. Quand le menu est OUVERT : on change le texte en "[ – Masquer ]" *\/ */
/* .spaced-list li details[open] summary::after { */
/*     content: ' [Masquer]'; */
/*     color: var(--color);             /\* Change de couleur pour montrer le changement d'état *\/ */
/* } */

/* /\* 5. Effet au survol de la souris pour inviter au clic *\/ */
/* .spaced-list li details summary:hover::after { */
/*     opacity: 1; */
/*     text-decoration: underline;      /\* Souligne uniquement le mot détails au survol *\/ */
/* } */



/* ==========================================================================
   AJUSTEMENTS FINAUX : COLLABORATIONS & ENSEIGNEMENT
   ========================================================================== */

/* ---- 1. Style pour la liste des collaborations (Page Recherche) ---- */

ul.spaced-list {
    margin-left: 15px;    /* Décale la liste vers la droite pour l'alignement */
    margin-bottom: 20px;  /* Règle parfaitement l'espace sous la liste */
    padding-left: 10px;   /* Donne un peu de confort visuel avant le texte */
}

.spaced-list li {
    display: list-item !important;       /* Force le comportement d'une liste */
    list-style-type: disc !important;    /* FORCE la puce ronde (écrase le * du haut) */
    list-style-position: outside !important; /* Place la puce dans la marge de gauche */
    margin-bottom: 10px;                 /* Espace entre chaque élément */
    line-height: 1.4;                    /* Améliore la lisibilité */
}


/* ---- 2. Style pour les listes imbriquées (Page Enseignement - IMPA & ENS) ---- */

.spaced-list li ul.sous-liste li {
    display: list-item !important;
    list-style-type: circle !important;     /* Jolies puces creuses pour les sous-chapitres */
    list-style-position: outside !important;
    margin-left: 25px;                      /* Décale proprement le texte vers la droite */
    margin-top: 5px;                        /* Petit espace au-dessus de chaque chapitre */
    margin-bottom: 5px;                     /* Petit espace en dessous de chaque chapitre */
    font-size: 0.95rem;                     /* Taille de texte légèrement plus discrète */
}


/* ---- 3. Boutons de détails personnalisés [Mot] sans coupure de ligne ---- */

/* On force la puce ronde à rester au début de la ligne principale */
.spaced-list li:has(details) {
    list-style-type: disc !important;
}

/* On cache la flèche native du navigateur et on prépare le titre */
.spaced-list li details summary {
    display: block !important;
    list-style: none !important;
    cursor: pointer;
    outline: none;
}
summary::-webkit-details-marker {
    display: none !important; /* Cache la flèche native sur Safari (Mac/iPhone) */
}

/* Configuration du bouton entre crochets placé à la fin du texte */
.spaced-list li details summary::after {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--link-color-hover);  /* Couleur secondaire du thème */
    opacity: 0.8;
    transition: opacity 0.2s, color 0.2s;
    white-space: nowrap;             /* Empêche absolument le bouton de se couper en deux */
    display: inline-block;
}

/* Quand le menu est FERMÉ : affiche [Mot] (ex: [Chapitres] ou [Notes]) */
.spaced-list li details summary::after {
    content: ' [' attr(data-bouton) ']';
}

/* Quand le menu est OUVERT : le texte reste le même, on change juste la couleur */
.spaced-list li details[open] summary::after {
    color: var(--color);             /* Couleur principale du thème */
    opacity: 0.6;                    /* Devient un peu plus discret une fois ouvert */
}

/* Effet visuel au survol de la souris */
.spaced-list li details summary:hover::after {
    opacity: 1;
    text-decoration: underline;
}


/* ---- Remplacement des puces du 3ème niveau par des tirets ---- */

/* Cible uniquement les LI imbriqués au troisième niveau de la liste */
.spaced-list li ul.sous-liste li ul.sous-liste li {
    display: list-item !important;
    list-style-type: "- " !important;   /* Force l'affichage d'un tiret long suivi d'un espace */
    list-style-position: outside !important; /* Garde le texte proprement aligné à droite du tiret */
    margin-left: 20px;                   /* Ajuste le décalage vers la droite */
    font-size: 0.95rem;                  /* Conserve une taille légèrement plus discrète */
}

