/*
 * Ajouts au thème d'origine (style.css reste inchangé).
 * Chargé après style.css.
 */

/* ---------------------------------------------------------------
 * Marge sous le contenu : le texte touchait le bas de la page blanche
 * (le pseudo-élément « nettoie » aussi les colonnes flottantes)
 * ------------------------------------------------------------- */
body:not(.home) div#page::after {
	content: "";
	display: block;
	clear: both;
	height: 60px;
}

/* ---------------------------------------------------------------
 * Fiches : diffusions en liste à puces
 * (format du champ writer de Kirby : <ul><li><p>…</p></li></ul>)
 * ------------------------------------------------------------- */
#main-content.creation-page .les-decisifs-content ul {
	list-style: disc;
	margin: 6px 0 12px 0;
	padding-left: 16px;
}

#main-content.creation-page .les-decisifs-content li {
	margin-bottom: 6px;
}

#main-content.creation-page .les-decisifs-content li p {
	margin: 0;
}

/* Diaporama d'une seule image (ou vignette en attendant les photos) : pas de pagination « 1 » */
#custom-pager a:only-child {
	display: none;
}

/* ---------------------------------------------------------------
 * Survol : baisse d'opacité nette sur tous les liens et les saisons
 * repliables (le thème d'origine ne changeait que très peu la couleur)
 * ------------------------------------------------------------- */
a,
.saison-collapsed {
	transition: opacity .2s ease;
}

a:hover,
a:focus-visible,
.saison-collapsed:hover,
.saison-collapsed:focus-visible {
	opacity: .45;
}

/* la rubrique en cours (surlignée dans le menu) reste pleine */
nav .current-menu-item > a:hover,
nav .current-menu-ancestor > a:hover {
	opacity: 1;
}

.saison-collapsed:focus-visible {
	outline: none;
}

/* ---------------------------------------------------------------
 * Actualités / Transmission : graisse harmonisée
 * - colonne Diffusion : titre des entrées en gras, texte en regular
 *   (le thème mettait tout le texte en gras)
 * - colonne Transmission : titres et texte en regular
 * Le gras saisi dans le texte (dates, noms) reste affiché.
 * ------------------------------------------------------------- */
#main-content .col .actu-content.strong {
	font-weight: normal;
}

#main-content .col h3:not(.strong),
#main-content .col.residence h3:first-of-type {
	font-weight: normal;
}

/* Saisons repliables : la flèche « > » pivote quand la saison est ouverte */
.saison-fleche {
	display: inline-block;
	transition: transform .25s ease;
}

.saison-collapsed.is-open .saison-fleche {
	transform: rotate(90deg);
}

/* ---------------------------------------------------------------
 * Version mobile basique (en dessous de 1000 px)
 * Le site d'origine a une largeur fixe de 995 px : ici tout passe en
 * une colonne, texte à taille lisible, menu déplié.
 * ------------------------------------------------------------- */
@media (max-width: 1000px) {

	body {
		background-image: none;
		background-color: #fff;
	}

	div#page {
		width: auto;
		min-height: 0;
	}

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

	/* En-tête : langues et réseaux en haut, logo centré */
	#lang_sel_list {
		padding: 10px 15px 0;
	}

	.social-network {
		top: 14px;
		right: 15px;
	}

	header#site-header {
		position: static;
		text-align: center;
		padding: 10px 15px 0;
	}

	header#site-header img {
		width: 320px;
		max-width: 85%;
	}

	/* Menu : une entrée par ligne. Seul le sous-menu de la rubrique en cours est ouvert ;
	   les autres s'ouvrent au toucher (focus sur « Créations » / « Transmission ») */
	nav {
		margin-top: 20px;
		border-top: 1px solid #000;
		border-bottom: 1px solid #000;
	}

	nav ul {
		margin: 0;
		padding: 10px 15px;
		text-align: left;
	}

	nav ul li {
		display: block;
		font-size: 17px;
		line-height: 2.2;
	}

	nav ul li ul.sub-menu {
		position: static;
		padding: 0 0 6px 22px;
	}

	nav ul li:focus-within > ul.sub-menu,
	nav ul li.current-menu-item > ul.sub-menu {
		display: block;
	}

	ul.sub-menu li {
		line-height: 2;
		background: none;
	}

	ul.sub-menu li a {
		font-size: 16px;
	}

	/* Bandeaux d'image */
	#carroussel,
	#mini_caroussel {
		height: auto;
	}

	#carroussel img {
		display: block;
	}

	/* Contenu : une colonne, marges latérales, texte lisible */
	#main-content,
	#main-content.page-les-uns,
	#main-content.les-decisifs,
	#main-content.creation-page,
	#main-content.types_de_creations {
		float: none;
		width: auto;
		margin: 25px 0 0;
		padding: 0 15px;
	}

	#main-content .col,
	#main-content.page-contacts .col,
	#main-content.page-contacts .col1 {
		float: none;
		width: auto;
		margin: 0 0 30px;
	}

	#main-content.page-les-uns .les-uns-content,
	#main-content.les-decisifs .les-decisifs-content,
	#main-content.creation-page .les-decisifs-content,
	#main-content .col .actu-content,
	#main-content.page-contacts p {
		width: auto;
		font-size: 16px;
		line-height: 1.55;
	}

	#main-content .col h2,
	#main-content .col h3,
	#main-content.page-contacts .col1 h2 {
		font-size: 16px;
	}

	#main-content .col.residence h3:first-of-type {
		text-indent: 0;
	}

	#main-content.creation-page hr {
		width: 100%;
	}

	/* Les uns et les autres : la liste passe au-dessus de la fiche */
	#sidebar-page-les-uns {
		float: none;
		width: auto;
		padding: 20px 15px 0;
	}

	#sidebar-page-les-uns ul {
		margin-left: 0;
	}

	#sidebar-page-les-uns ul li {
		width: auto;
		display: inline-block;
		margin: 0 6px 6px 0;
	}

	#sidebar-page-les-uns ul li a {
		font-size: 15px;
		line-height: 1.8;
	}

	/* Fiches : diaporama et liens au-dessus du texte */
	.single-transmission .col_gauche,
	.single-creation .col_gauche {
		float: none;
		width: auto;
		height: auto;
		margin: 20px 15px 0;
	}

	#carroussel-creation .diapo img {
		width: 100%;
	}

	/* la vignette (295 px) n'est pas agrandie : elle deviendrait floue */
	#carroussel-creation .diapo-vignette img {
		width: auto;
	}

	.single-transmission .col_gauche #liens,
	.single-creation .col_gauche #liens {
		text-align: left;
		font-size: 16px;
		line-height: 1.8;
	}

	/* Listes par catégorie : vignettes sur 2 colonnes, 1 sur petit écran */
	#main-content.types_de_creations {
		display: flex;
		flex-wrap: wrap;
		gap: 0 20px;
	}

	.creation {
		float: none;
		width: calc(50% - 10px);
		height: auto;
		margin: 0 0 25px;
	}

	.creation-img {
		max-height: none;
	}

	.creation h3 {
		font-size: 16px;
		margin: 8px 0 0;
	}

	/* Accueil : logo et langues centrés sur le fond */
	/* l'image elle-même est fournie, redimensionnée, par le template home.php */
	body.home {
		background-repeat: no-repeat;
		background-position: center;
		background-size: cover;
		background-attachment: scroll;
	}

	body.home div#page {
		min-height: 100vh;
	}

	body.home header#site-header {
		position: static;
		padding-top: 40px;
	}

	body.home header #lang {
		text-align: center;
		margin: 20px 0 0;
		font-size: 22px;
	}

	body.home header #lang a {
		font-size: 22px;
	}
}

@media (max-width: 560px) {
	.creation {
		width: 100%;
	}
}
