/* ==========================================================================
   Entre-vues — feuille de style principale
   ==========================================================================
   Sommaire
   1.  Variables (couleurs, rayon, typographie)
   2.  Reset et bases
   3.  Typographie
   4.  En-tête, logo, navigations
   5.  Contenu (blocs, séparateurs, encarts, catégories)
   6.  Formulaires, boutons, newsletter
   7.  Tableaux, carte, téléchargements
   8.  Pied de page
   9.  Media queries
   ========================================================================== */


/* 1. Variables
   ========================================================================== */

:root {
	/* Rayon des angles — une seule valeur pilote tout le thème */
	--radius: 4px;

	/* Couleurs de marque — saisies en composantes RVB pour pouvoir en dériver
	   des variantes transparentes. L'hexadécimal est rappelé en commentaire :
	   c'est la seule valeur à modifier pour changer une couleur du thème. */
	--c-ressource-rgb:  154 170 26;   /* #9aaa1a — vert ressources */
	--c-agenda-rgb:     244 84 67;    /* #f45443 — rouge agenda */
	--c-text-rgb:       3 60 65;      /* #033c41 — texte */
	--c-grey-rgb:       201 193 185;  /* #c9c1b9 — neutre */

	--c-ressource:        rgb(var(--c-ressource-rgb));
	--c-ressource-light:  #e6eac6;                              /* teinte claire — voir @supports plus bas */
	--c-ressource-soft:   rgb(var(--c-ressource-rgb) / 50%);    /* soulignements au repos */
	--c-agenda:           rgb(var(--c-agenda-rgb));
	--c-agenda-light:     #fcd4d0;                              /* teinte claire — voir @supports plus bas */
	--c-agenda-soft:      rgb(var(--c-agenda-rgb) / 50%);

	/* Neutres */
	--c-grey:        rgb(var(--c-grey-rgb));
	--c-grey-soft:   rgb(var(--c-grey-rgb) / 50%);
	--c-grey-light:  rgb(238, 234, 230);
	--c-grey-dark:   rgb(193, 185, 177);
	--c-bg:          #fff;
	--c-bg-alt:      #f7f6f5;   /* fonds légers : menu mobile, lignes de tableau */
	--c-text:        rgb(var(--c-text-rgb));

	/* Typographie */
	--font-sans:  'Quicksand', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	--font-serif: 'Libre Baskerville', Georgia, Times, 'Times New Roman', serif;

	/* Échelles typographiques : une valeur par famille, 1 = taille d'origine.
	   Le Libre Baskerville ayant une hauteur d'x bien plus généreuse que le
	   Times qu'il remplace, il paraît plus gros à valeur égale — d'où un
	   --serif-scale inférieur à 1 qui rétablit la mesure. */
	--sans-scale:  1.15;
	--serif-scale: 1;

	/* Épaisseur des filets colorés */
	--rule: 5px;

	/* Hauteur maximale des logos partenaires dans le pied de page */
	--partner-logo-height: 60px;

	/* En-tête : hauteur d'affichage du logo, et place réservée au-dessus de
	   lui pour que le menu outils (qui sommes-nous, news…) ne le recouvre pas. */
	--logo-height: 90px;
	--logo-top:    70px;
}

/*
	Teintes claires (fonds d'encarts, étiquettes, filets) recalculées
	automatiquement à partir des couleurs de base : 25 % de la couleur pour
	75 % de blanc. Modifier --c-ressource-rgb ou --c-agenda-rgb suffit donc
	à faire suivre toute la déclinaison. Les valeurs en dur ci-dessus servent
	de repli pour les navigateurs sans color-mix() (antérieurs à 2023).
*/
@supports (color: color-mix(in srgb, red, white)) {
	:root {
		--c-ressource-light: color-mix(in srgb, var(--c-ressource) 25%, #fff);
		--c-agenda-light:    color-mix(in srgb, var(--c-agenda) 25%, #fff);
	}
}


/* 2. Reset et bases
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

ul, li, p, * {
	margin: 0;
	padding: 0;
}

body {
	background: var(--c-bg);
	color: var(--c-text);
	font-family: var(--font-serif);
	font-size: 87.5%;
	text-align: left;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img {
	max-width: 100%;
	height: auto;
}

img.alignleft {
	float: left;
	margin-right: 10px;
}

a {
	color: var(--c-text);
	cursor: pointer;
	font-weight: 700;
	text-decoration: none;
}

a:focus-visible,
input:focus-visible,
button:focus-visible {
	outline: 2px solid var(--c-text);
	outline-offset: 2px;
	border-radius: var(--radius);
}

hr {
	height: var(--rule);
	border: none;
	border-radius: var(--radius);
	background-color: var(--c-grey-light);
}

.hiddendesktop { display: none; }

div.m-box { padding: 10px; }

.container {
	position: relative;
	width: 90%;
	max-width: 1200px;
	margin: auto;
	text-align: left;
}


/* 3. Typographie
   ========================================================================== */

#main, p, li { font-size: calc(1rem * var(--serif-scale)); }

p, li {
	font-family: var(--font-serif);
	line-height: 1.4em;
}

p {
	margin: 0 0 1rem;
	font-size: calc(1rem * var(--serif-scale));
	font-weight: 500;
}

#main p {
	margin: 0.25rem 0;
	font-size: calc(0.95rem * var(--serif-scale));
}

#main p.date,
#main p.more {
	margin-top: 1rem;
	font-family: var(--font-sans);
	font-size: calc(0.8rem * var(--sans-scale));
	font-weight: 600;
}

#content.ressource p.date { font-weight: 400; }

h1, h2, h3, h4, h5, h6, a {
	font-family: var(--font-sans);
	text-align: left;
}

h1, h2, h3, h4 { font-weight: 700; }
h5, h6 { font-weight: 400; text-transform: uppercase; }

h1 { margin: 0 0 0.8rem;   font-size: calc(2rem * var(--sans-scale));   line-height: 1.2em; }
h2 { margin-bottom: 0.8rem; font-size: calc(1.4rem * var(--sans-scale)); line-height: 0.8em; }
h3 { margin: 0 0 1rem;      font-size: calc(1.2rem * var(--sans-scale)); line-height: 1em; }
h4 { margin: 0 0 1rem;      font-size: calc(1.1rem * var(--sans-scale)); line-height: 1em; }
h5 { margin: 0 0 1rem;      font-size: calc(1rem * var(--sans-scale));   line-height: 1em; }
h6 { margin: 0 0 0.5rem;    font-size: calc(0.7rem * var(--sans-scale)); line-height: 1em; }

h3.subtitle { font-size: calc(1rem * var(--sans-scale)); }

/* Liens de titre : soulignement épais qui s'épaissit au survol */
h1 a, h2 a, h3 a, h4 a,
p.more a,
a.more {
	display: inline;
	line-height: 1.5em;
	border-bottom: 3px solid var(--c-grey-soft);
	transition: border-color 0.25s;
}

h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover,
p.more a:hover,
a.more:hover {
	border-bottom-width: 5px;
	border-bottom-color: var(--c-grey);
}

h1 a span, h2 a span, h3 a span, h4 a span {
	display: inline;
	padding-bottom: 10px;
}

h4.date:first-letter { text-transform: uppercase; }

.bg-grey,
.bg-gray {
	background: var(--c-grey-light);
	border-radius: var(--radius);
}

.bg-grey a { border-color: #fff !important; }


/* 4. En-tête, logo, navigations
   ========================================================================== */

#header {
	position: relative;
	min-height: calc(var(--logo-top) + var(--logo-height) + 10px);
	margin: 0;
	z-index: 200 !important;
}

#header a { color: var(--c-text); }

#header .active a {
	font-weight: 700;
	border-bottom: 1px solid var(--c-text);
}

#header .mainnav .active a { border: none; }

#logo {
	position: relative;
	top: 0;
	left: 0;
}

/* Logo centré dans la largeur de l'en-tête, baseline calée dans le coin
   supérieur gauche : elle est sortie du flux pour que le centrage porte sur
   l'en-tête entier et non sur la place qui reste à côté du texte. */
#logo > .m-box {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: var(--logo-height);
	padding-top: 60px;
    padding-bottom: 20px;
}

#logo a {
	display: block;
	float: none;
}

#logo img {
	display: block;
	height: var(--logo-height);
	width: auto;
}

#logo p.slogan {
	position: absolute;
	top: 10px;
	left: 10px;
	float: none;
	max-width: 30%;
	margin: 0;
	font-family: var(--font-sans);
	font-size: 1.2em;
	line-height: 1.2em;
}

#togglemenu { display: none; }

#menutoggle {
	position: absolute;
	right: 0;
	padding: 20px;
}

#menutoggle a.hamburger { display: inline; }
#menutoggle a.cross { display: none; }
#menutoggle.hide a.cross { display: inline; }
#menutoggle.hide a.hamburger { display: none; }

#navcontainer {
	margin-top: 5px;
}

/* Navigation principale */
.mainnav a {
	font-size: calc(1rem * var(--sans-scale));
	font-weight: 600;
}
.mainnav ul li { list-style: none; }

.mainnav > .m-box > ul > li {
	position: relative;
	display: inline-block;
	width: calc(50% - 30px);
	border-radius: var(--radius);
}

.mainnav > .m-box > ul > li:nth-child(2) { margin-left: 35px; }

.mainnav > .m-box > ul > li > a::after {
	content: "▼";
	position: absolute;
	right: 10px;
	top: 5px;
}

.mainnav > .m-box > ul > li.ressources {
	border: var(--rule) solid var(--c-ressource);
}

body.home .mainnav > .m-box > ul > li.ressources,
body.single-ressource .mainnav > .m-box > ul > li.ressources,
.mainnav > .m-box > ul > li.ressources:hover,
.mainnav > .m-box > ul > li.ressources.current-menu-ancestor,
.mainnav > .m-box > ul > li.ressources.current-menu-parent,
.mainnav > .m-box > ul > li.ressources.current-menu-item,
.mainnav > .m-box > ul > li.ressources > ul {
	background: var(--c-ressource-light);
}

.mainnav > .m-box > ul > li.agenda {
	border: var(--rule) solid var(--c-agenda);
}

body.home .mainnav > .m-box > ul > li.agenda,
body.single-event .mainnav > .m-box > ul > li.agenda,
.mainnav > .m-box > ul > li.agenda:hover,
.mainnav > .m-box > ul > li.agenda.current-menu-ancestor,
.mainnav > .m-box > ul > li.agenda.current-menu-parent,
.mainnav > .m-box > ul > li.agenda.current-menu-item,
.mainnav > .m-box > ul > li.agenda > ul {
	background: var(--c-agenda-light);
}

.mainnav li.current-menu-item > a { text-decoration: underline; }

.mainnav > .m-box > ul > li > a {
	display: block;
	height: auto;
	padding: 5px 10px;
}

.mainnav > .m-box > ul > li > ul {
	position: absolute;
	display: none;
	padding: 0 10px 10px;
	border-radius: 0 0 var(--radius) var(--radius);
}

.mainnav > .m-box > ul a:hover { text-decoration: underline; }

.mainnav > .m-box > ul > li:hover > ul {
	display: block;
	width: calc(100% - 20px);
	z-index: 200;
}

.mainnav > .m-box > ul > li > ul ul { padding-left: 20px; }
.mainnav > .m-box > ul > li > ul ul > li { list-style: disc; }

/* Navigation secondaire (outils) */
#toolnav {
	position: absolute;
	top: 0px;
	right: 10px;
	font-size: calc(1.1rem * var(--sans-scale));
	text-align: right;
	text-transform: uppercase;
}

#toolnav ul li {
	display: inline-block;
	margin-left: 5px;
	font-size: calc(1rem * var(--sans-scale));
	list-style: none;
}

#toolnav a {
	font-size: calc(0.8rem * var(--sans-scale));
	font-weight: 400;
}

#toolnav a:hover { text-decoration: underline; }

a.social {
	display: block;
	width: 20px;
	height: 17px;
	padding-top: 3px;
	text-align: center;
	color: #fff !important;
	background: var(--c-text);
	border-radius: var(--radius);
}

body.home a.social {
	color: var(--c-text) !important;
	background: var(--c-bg);
}


/* 5. Contenu
   ========================================================================== */

/* L'en-tête prend désormais sa hauteur naturelle (avant, sa hauteur était
   forcée à 60 px et ces 120 px absorbaient le débordement du logo et du
   menu). Il ne reste donc à régler ici que la respiration sous la nav. */
#main { margin-top: 30px; }

#main p:first-child,
#main p.more:first-child,
div.text h1:first-child { margin-top: 0; }

.mainressources li,
.monthagenda li {
	margin: 0 0 0 17px;
	padding: 0;
}

.mainressources li a,
.monthagenda li a { font-size: calc(0.9rem * var(--sans-scale)); }

/* Séparateurs */
.separator hr,
.separator.grey hr {
	background-color: var(--c-grey-light);
}

.separator.ressource hr,
.ressources .separator hr { background-color: var(--c-ressource-light); }

.separator.agenda hr,
.agenda .separator hr { background-color: var(--c-agenda-light); }

#separator.pure-u-0 {
	width: 2px;
	margin: 0 10px;
	background: var(--c-grey-light);
	border-radius: var(--radius);
}

/* Accueil */
body.home .block .image_container {
	float: left;
	width: 35%;
	margin-right: 5%;
}

body.home .block .image_container.hor {
	float: none;
	width: 70%;
	margin-right: 5%;
	margin-bottom: 0.5rem;
}

body.home .separator.pure-u-1 { margin-top: 0.5rem; }

div.post h6 { margin-bottom: 0; }

/* Filets de séparation des blocs */
#sidecontent .block.ressource > .m-box > *:last-child,
#content .tax_children.ressources .post.ressource {
	border-bottom: var(--rule) solid var(--c-ressource-light);
	padding-bottom: 25px;
	margin-bottom: 5px;
}

#content .tax_children.ressources .post.ressource {
	padding-bottom: 15px;
	margin-bottom: 15px;
}

#sidecontent .widget_entrevues_mainressources_widget li,
#sidecontent .widget_entrevues_mainevent_widget li {
	margin-bottom: 0.5rem;
	margin-left: 15px;
}

#sidecontent p,
#sidecontent li {
	font-size: calc(0.9em * var(--serif-scale));
	line-height: 1.4em;
}

#content .block > .m-box > *:first-child,
#content .block.related .pure-u-1:first-child > .m-box > *:first-child {
	border-top: var(--rule) solid var(--c-grey-light);
	padding-top: 20px;
	margin-top: 10px;
}

#content .block.ressource > .m-box > *:first-child,
#content .block.ressource.related .pure-u-1:first-child > .m-box > *:first-child {
	border-top: var(--rule) solid var(--c-ressource-light);
	padding-top: 20px;
	margin-top: 10px;
}

#sidecontent .block.agenda > .m-box > *:last-child {
	border-bottom: var(--rule) solid var(--c-agenda-light);
	padding-bottom: 25px;
	margin-bottom: 5px;
}

#content .block.event > .m-box > *:first-child,
#content .block.event.related .pure-u-1:first-child > .m-box > *:first-child {
	border-top: var(--rule) solid var(--c-agenda-light);
	padding-top: 20px;
	margin-top: 10px;
}

#content .block.ressource:first-child > .m-box > *:first-child,
#content .block.event:first-child > .m-box > *:first-child,
#content .block.event.pure-u-1-2 > .m-box > *:first-child {
	border: none;
	padding-top: 0;
	margin-top: 0;
}

#content .block .image_container,
#sidecontent .block .image_container {
	float: left;
	width: 30%;
	margin: 0 10px 0 0;
}

#sidecontent .block .image_container { width: 38%; }

#sidecontent .pure-u-1:first-child > .m-box { padding-top: 0; }

/* Étiquettes de catégorie */
*.cat {
	display: inline-block;
	margin-bottom: 3px;
	padding: 3px 5px;
	line-height: 1em;
	text-transform: uppercase;
	border-radius: var(--radius);
}

ul .cat,
h6 .cat,
h2.cat a {
	font-family: var(--font-sans);
	font-size: calc(0.65rem * var(--sans-scale));
	font-weight: 600;
	background: var(--c-grey-light);
}

h2.cat a {
	font-size: calc(1rem * var(--sans-scale));
	border: none;
	text-decoration: none;
}

ul.ressources .cat,
.ressources h6 .cat,
h2.cat a { background: var(--c-ressource-light); }

ul.events .cat,
.events h6 .cat,
.agenda h6 .cat { background: var(--c-agenda-light); }

#sidebottom { margin-top: 40px; }

.pagination ul li {
	display: inline-block;
	width: 49%;
	list-style: none;
}

.pagination ul li.prev { text-align: right; }

/* Images de contenu */
#content.page div.image_container,
#content.ressource div.image_container {
	float: left;
	width: auto;
	max-width: 50%;
	margin: 0 10px 20px 0;
}

#content div.image_container.topimage.ver img {
	width: auto;
	height: auto;
	max-height: 360px;
}

/* Corps de texte */
#content div.text.main { margin-bottom: 40px; }

#content div.text,
#content div.text p,
#content div.text li {
	font-family: var(--font-serif);
	font-size: calc(1.1rem * var(--serif-scale));
	line-height: 1.4em;
}

div.text h1 {
	clear: both;
	margin-top: 20px;
}

#main div.text ul,
.textwidget ul { margin-left: 1rem; }

#main div.text a {
	font-size: calc(0.85em * var(--sans-scale));
	border-bottom: 4px solid var(--c-grey-light);
}

#main div.text a:hover { border-color: var(--c-grey); }

#main div.text h2,
#main div.text h3,
#main div.text h4,
#main div.text h5,
#main div.text h6 { margin-top: 1.5em; }

#main div.text h2:first-child,
#main div.text h3:first-child,
#main div.text h4:first-child,
#main div.text h5:first-child,
#main div.text h6:first-child { margin-top: 0; }

/* Déclinaisons ressources / agenda */
body.single-ressource #main div.text a,
#main .block.ressource div.text a { border-color: var(--c-ressource-light); }

body.single-ressource #main div.text a:hover,
#main .block.ressource div.text a:hover { border-color: var(--c-ressource); }

body.single-event #main div.text a,
#main .block.event div.text a { border-color: var(--c-agenda-light); }

body.single-event #main div.text a:hover,
#main .block.event div.text a:hover { border-color: var(--c-agenda); }

body.single-event .summary .m-box { padding-top: 0; }

body.single-event .summary h4,
body.single-event .summary p { margin-bottom: 10px !important; }

body.single-event .summary a { border-bottom: 1px solid var(--c-agenda-light); }
body.single-event .summary a:hover { border-bottom: 3px solid var(--c-agenda); }

#content .fields > * {
	border-top: 3px solid var(--c-grey-light);
	margin-top: 20px;
	padding-top: 20px;
}

.ressource h1 a,
.ressource h2 a,
.ressource h3 a,
.tax-ressources h3 a,
.ressource h4 a,
.ressource p.more a,
.ressource a.more,
.block.ressource h3 a,
.single-ressource #content .fields > * {
	border-color: var(--c-ressource-soft);
}

.ressource h1 a:hover,
.ressource h2 a:hover,
.ressource h3 a:hover,
.tax-ressources h3 a:hover,
.ressource h4 a:hover,
.ressource p.more a:hover,
.ressource a.more:hover,
.block.ressource h3 a:hover {
	border-color: var(--c-ressource);
}

.agenda h1 a,
.agenda h2 a,
.agenda h3 a,
.agenda h4 a,
.agenda p.more a,
.agenda a.more,
.block.agenda h3 a,
.single-event #content .fields > * {
	border-color: var(--c-agenda-soft);
}

.agenda h1 a:hover,
.agenda h2 a:hover,
.agenda h3 a:hover,
.agenda h4 a:hover,
.agenda p.more a:hover,
.agenda a.more:hover,
.block.agenda h3 a:hover {
	border-color: var(--c-agenda);
	transition: border-color 0.5s;
}

/* Encarts */
div.encart {
	background: var(--c-grey-light);
	border-radius: var(--radius);
}

.ressources div.encart {
	border: var(--rule) solid var(--c-ressource-light);
}

.events div.encart {
	background: var(--c-agenda-light);
}

div.encart ul { margin-left: 20px; }
div.encart .text { margin-bottom: 20px; }


/* 6. Formulaires, boutons, newsletter
   ========================================================================== */

input {
	padding: 5px;
	font-family: var(--font-sans);
	font-size: calc(12px * var(--sans-scale));
	background: var(--c-grey-light);
	border: none;
	border-radius: var(--radius);
}

#searchform input[type="submit"] {
	padding: 5px 12.5px;
	background: var(--c-grey);
	cursor: pointer;
}

#ressourceform {
	height: 100px;
	background: var(--c-grey-light);
	border-radius: var(--radius);
}

#newslettercall {
	margin-top: 40px;
	padding: 40px 20px;
	text-align: center;
	background: var(--c-grey-light);
	border: none !important;
	border-radius: var(--radius);
}

#sidebottom #newslettercall { width: calc(100% - 40px); }

#newslettercall p {
	margin-bottom: 20px;
	font-family: var(--font-sans);
	font-size: calc(1.1em * var(--sans-scale));
	font-weight: 700;
}

#newslettercall a.button,
a.button {
	display: inline-block;
	padding: 10px 30px;
	text-align: center;
	background: var(--c-ressource-light);
	border-radius: var(--radius);
	transition: background-color 0.25s;
}

#newslettercall a.button:hover,
a.button:hover { background: var(--c-ressource); }

/* Bloc newsletter inséré dans les contenus */
.newsletter_container {
	padding: 10px;
	background: var(--c-ressource-light);
	border-radius: var(--radius);
}


/* 7. Tableaux, carte, téléchargements
   ========================================================================== */

.main.text table {
	width: 100%;
	margin: 1.5em 0;
	font-size: calc(0.95em * var(--serif-scale));
	line-height: 1.4em;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid #d9d9d9;
	border-radius: var(--radius);
	overflow: hidden;
}

.main.text th,
.main.text td {
	padding: 0.75em 1em;
	border-bottom: 1px solid #d9d9d9;
	border-right: 1px solid #d9d9d9;
	text-align: left;
	vertical-align: top;
}

.main.text th:last-child,
.main.text td:last-child { border-right: none; }

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

.main.text th {
	font-weight: 600;
	background: var(--c-bg-alt);
}

.main.text tbody tr:nth-child(even) { background: #fafafa; }
.main.text tbody tr:hover { background: #f2f2f2; }

.main.text caption {
	margin-bottom: 0.75em;
	font-weight: 600;
	text-align: left;
}

.main.text table a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.acf-map {
	width: 100%;
	height: 400px;
	margin: 20px 0;
	border: 1px solid #ccc;
	border-radius: var(--radius);
}

div.downloads ul { margin-left: 15px; }
div.downloads ul a { font-weight: normal; }

#main div.downloads .ressource p,
#main div.downloads .ressource ul li { font-size: calc(0.8em * var(--serif-scale)); }

#main div.downloads .ressource p a {
	clear: both;
	display: inline-block;
}

#main div.downloads .ressource p span { display: none; }

body.page-template-page-downloads .downloads div.m-box { padding: 10px 0; }
body.page-template-page-downloads .ressource { margin-bottom: 20px; }
body.page-template-page-downloads .ressource h4 { margin-bottom: 5px; }

body.page-template-page-downloads .ressource p a {
	font-weight: 500;
	border-bottom: 3px solid var(--c-ressource-light);
}

body.page-template-page-downloads .ressource p a:hover { border-color: var(--c-ressource); }
body.page-template-page-downloads .ressource ul a:hover { text-decoration: underline; }

body.page-template-page-downloads .subnav li,
#term_subnav li { list-style: none; }

#term_subnav li {
	display: inline-block;
	margin: 0 5px 5px 0;
}

#term_subnav li a {
	display: inline-block;
	padding: 3px 6px;
	background-color: var(--c-ressource-light);
	border-radius: var(--radius);
}

div.share { margin-bottom: 20px; }

div.share > * {
	display: inline-block;
	min-height: 20px;
	height: 20px;
	font-size: 0.8em;
	z-index: 100;
}

div.share .inerCnt { z-index: 50 !important; }


/* 8. Pied de page
   ========================================================================== */

footer p,
footer li {
	font-family: var(--font-sans);
	font-size: calc(0.85rem * var(--sans-scale));
	line-height: 1.3em;
}

#footernav,
#footernav li,
#footernav li a,
#footer p.credits,
#footer p.credits a,
#footer ul.menu a {
	color: var(--c-grey-dark) !important;
	font-size: calc(0.85rem * var(--sans-scale));
	font-weight: normal;
}

#footernav li a:hover,
#footer p.credits a:hover,
#footer ul.menu a:hover {
	color: rgb(var(--c-text-rgb) / 60%) !important;
}

#footernav > .m-box,
#footer ul.menu { padding-left: 0; }

.credits > .m-box { padding-right: 0; }

#footernav li,
#footer ul.menu li {
	display: inline-block;
	margin: 0 20px 0 0;
	list-style: none;
}

#footer p.credits { text-align: right; }


/* Contenu éditorial du pied de page (champs « Options du site ») */
#footercontent {
	margin-bottom: 20px;
}

#footertext > .m-box {
	padding-left: 0;
}

#footertext p,
#footertext li {
	font-family: var(--font-sans);
	font-size: calc(0.9rem * var(--sans-scale));
	line-height: 1.45em;
}

#footertext p:last-child { margin-bottom: 0; }

#footertext ul { margin-left: 1rem; }

#footerpartners > .m-box {
	padding-right: 0;
}

#footerpartners .surtitle {
	margin-bottom: 12px;
	color: var(--c-grey-dark);
}

ul.partners {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

ul.partners li.partner {
	display: flex;
	align-items: center;
	height: var(--partner-logo-height);
	margin: 0;
	list-style: none;
}

ul.partners a {
	display: flex;
	align-items: center;
	height: 100%;
	border: none;
}

ul.partners img {
	max-height: var(--partner-logo-height);
	width: auto;
	max-width: 220px;
	object-fit: contain;
}

ul.partners .partner-name {
	font-family: var(--font-sans);
	font-size: calc(0.85rem * var(--sans-scale));
	font-weight: 600;
}


/* 9. Media queries
   ========================================================================== */

@media only screen and (min-width: 768px) {

	body.home #ressources .pure-u-md-1-2:nth-child(1),
	body.home #ressources .pure-u-md-1-2:nth-child(3) {
		width: calc(50% - 1px);
		border-right: 1px solid var(--c-ressource-light);
	}

	body.home #ressources .pure-u-md-1-2:nth-child(3) > .m-box > *:first-child,
	body.home #ressources .pure-u-md-1-2:nth-child(4) > .m-box > *:first-child {
		border-top: var(--rule) solid var(--c-ressource-light);
		padding-top: 20px;
	}

	body.home #agenda .pure-u-md-1-2:nth-child(2) {
		width: calc(50% - 1px);
		border-right: 1px solid var(--c-agenda-light);
	}
}

@media only screen and (max-width: 767px) {

	body.home #ressources .pure-u-md-1-2:nth-child(1) > .m-box > *:last-child,
	body.home #ressources .pure-u-md-1-2:nth-child(5) > .m-box > *:last-child {
		border-bottom: var(--rule) solid var(--c-ressource-light);
		padding-bottom: 20px;
	}

	body.home #agenda .pure-u-md-1-2:nth-child(3) > .m-box > *:last-child {
		border-bottom: var(--rule) solid var(--c-agenda-light);
		padding-bottom: 20px;
	}

	.mainnav > .m-box > ul > li > a { padding: 2px 10px; }
}

@media only screen and (min-width: 568px) {

	body.home #agenda.pure-u-sm-1-2,
	body.home #ressources.pure-u-sm-1-2 { width: calc(50% - 12px); }

	#main > #content > .m-box {
		padding: 0 60px 0 0;
		border-right: 2px solid var(--c-grey-light);
	}

	body.page #main > #content > .m-box,
	body.single-ressource #main > #content > .m-box,
	body.single-event #main > #content > .m-box { padding-left: 10px; }

	#main > #sidecontent > .m-box { padding: 0 2px 0 45px; }
}

@media only screen and (max-width: 567px) {

	.container { width: 100%; }

	#separator.pure-u-0 { display: none; }

	#main, p, li { font-size: calc(1rem * var(--serif-scale)); }

	/* Le tiroir de navigation est en position fixe sous un en-tête de 60 px,
	   et le menu outils y est rangé : plus rien à dégager au-dessus du logo. */
	:root {
		--logo-height: 40px;
		--logo-top: 0px;
	}

	#header { min-height: 60px; }
	#logo p.slogan { display: none; }

	#navcontainer {
		position: fixed;
		top: 60px;
		left: 100%;
		z-index: 400;
		height: calc(100vh - 25px);
		background: var(--c-bg-alt);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		transition: left 0.6s ease-out;
	}

	#navcontainer.show { left: 0; }

	#navcontainer > nav > .m-box { padding: 10px 0 10px 10px; }

	.mainnav { margin-top: 0; }

	.mainnav > .m-box > ul > li {
		display: block;
		width: calc(100% - 20px);
		position: relative;
		margin: 0 0 20px !important;
	}

	.mainnav > .m-box > ul > li > ul {
		position: relative;
		display: block;
	}

	#toolnav {
		position: relative;
		top: 0;
		right: auto;
		margin: 0;
		text-align: left;
	}

	#toolnav ul li {
		display: inline-block;
		width: 45%;
	}

	#toolnav ul li.search {
		width: 90%;
		margin-top: 10px;
	}

	#toolnav #searchform #s { width: 70%; }

	#togglemenu {
		display: block;
		position: absolute;
		top: 0;
		right: 0;
		font-size: 1.3rem;
		text-decoration: none;
	}

	#header #togglemenu a {
		display: flex;
		align-items: center;
		justify-content: center;
		height: 50px;
		width: 50px;
	}

	#header #togglemenu i {
		height: 50px;
		width: 50px;
		text-align: center;
		line-height: 50px;
		vertical-align: bottom;
	}


	#header #togglemenu a:hover { border: none !important; }

	#header #togglemenu.active .icon-bars,
	#header #togglemenu .icon-times,
	#header #togglemenu.active i.fa-bars,
	#header #togglemenu i.fa-times { display: none; }

	#header #togglemenu .icon-bars,
	#header #togglemenu.active .icon-times,
	#header #togglemenu i.fa-bars,
	#header #togglemenu.active i.fa-times { display: block; }

	.hiddendesktop { display: block; }

	#main { margin-top: 0; }

	/* Défilement horizontal des blocs sur mobile */
	.phoneslider { overflow: auto; }

	.phoneslider .block > .m-box > *:last-child { border-bottom: none !important; }

	#agenda .phoneslider .block { border-right: 1px solid var(--c-agenda-light); }
	#ressources .phoneslider .block { border-right: 1px solid var(--c-ressource-light); }
	.phonslider .block:last-child { border-right: none !important; }

	.phoneslider.items_2 .pure-u-1  { width: calc(50% - 1px); }
	.phoneslider.items_3 .pure-u-1  { width: calc(33% - 1px); }
	.phoneslider.items_4 .pure-u-1  { width: calc(25% - 1px); }
	.phoneslider.items_5 .pure-u-1  { width: calc(20% - 1px); }
	.phoneslider.items_6 .pure-u-1  { width: calc(16% - 1px); }
	.phoneslider.items_7 .pure-u-1  { width: calc(14% - 1px); }
	.phoneslider.items_8 .pure-u-1  { width: calc(12% - 1px); }
	.phoneslider.items_9 .pure-u-1  { width: calc(11% - 1px); }
	.phoneslider.items_10 .pure-u-1 { width: calc(10% - 1px); }

	.items_2 > .pure-g  { width: 160%; }
	.items_3 > .pure-g  { width: 240%; }
	.items_4 > .pure-g  { width: 320%; }
	.items_5 > .pure-g  { width: 400%; }
	.items_6 > .pure-g  { width: 480%; }
	.items_7 > .pure-g  { width: 560%; }
	.items_8 > .pure-g  { width: 640%; }
	.items_9 > .pure-g  { width: 720%; }
	.items_10 > .pure-g { width: 800%; }

	.phoneslider .separator { display: none; }

	#main .agendanav > .m-box { padding-top: 0; }

	#main .agendanav .m-box p.more {
		margin: 0;
		line-height: 2em;
	}

	.agendanav .m-box p:last-child {
		border-bottom: var(--rule) solid var(--c-agenda-light);
		padding-bottom: 10px;
	}

	#sidecontent div.block:first-child > .m-box > *:first-child {
		border-top: var(--rule) solid var(--c-grey);
		padding-top: 20px;
	}

	#content > .m-box,
	#sidecontent > .m-box { padding: 0; }

	#content.ressource > .m-box,
	#content.agenda > .m-box,
	#content.page > .m-box { padding: 10px; }

	#sidecontent { margin-top: 40px; }

	#sidebottom .separator { display: none; }

	#footer .credits .m-box { padding: 0; }
	#footer p.credits { text-align: left; }

	body.page-template-page-downloads .downloads { display: none; }
	body.page-template-page-downloads .downloads:first-child { display: block; }

	#dl_subnav {
		margin-bottom: 10px;
		padding-bottom: 10px;
		border-bottom: 1px solid var(--c-ressource-light);
	}

	#dl_subnav li {
		display: inline-block;
		margin-bottom: 5px;
	}

	#dl_subnav a.active {
		display: inline-block;
		padding: 2px 6px;
		background: var(--c-ressource-light);
		border-radius: var(--radius);
	}
}

/* Respect des préférences système d'animation */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
