/* Style du site public (maquette D). L'administration garde css/style.css. */

@font-face { font-family: 'Archivo'; font-weight: 500; font-display: swap; src: url('fonts/archivo-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 700; font-display: swap; src: url('fonts/archivo-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 800; font-display: swap; src: url('fonts/archivo-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-weight: 400; font-display: swap; src: url('fonts/source-serif-4-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-weight: 600; font-display: swap; src: url('fonts/source-serif-4-latin-600-normal.woff2') format('woff2'); }

:root {
	--fond: #111316;
	--panneau: #1b1e22;
	--bordure: #33373d;
	--texte: #ece9e2;
	--secondaire: #b4b8bd;
	--accent: #e6b422;
	--accent-clair: #f4d675;
	--titres: Archivo, Arial, sans-serif;
	--corps: 'Source Serif 4', Georgia, serif;
}

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--fond);
	color: var(--texte);
	font-family: var(--corps);
	font-size: 18px;
	line-height: 1.65;
}

a {
	color: var(--accent);
}

a:hover {
	color: var(--accent-clair);
}

/* En-tete et sommaire */

.barre {
	background: var(--panneau);
}

.entete {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 64px;
	padding: 8px 10px 8px 18px;
	background: var(--fond);
	border-bottom: 1px solid var(--bordure);
}

.logo {
	color: var(--texte);
	font-family: var(--titres);
	font-size: 19px;
	font-weight: 800;
	letter-spacing: 0.3px;
	text-decoration: none;
}

.bouton-sommaire {
	flex: none;
	min-width: 104px;
	height: 46px;
	padding: 0 12px;
	background: transparent;
	border: 2px solid var(--accent);
	color: var(--accent);
	font-family: var(--titres);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 1px;
	cursor: pointer;
}

.sommaire {
	padding: 6px 18px 12px;
	border-bottom: 2px solid var(--accent);
}

.js .sommaire {
	display: none;
}

.js .sommaire.ouvert {
	display: block;
}

.sommaire-titre {
	display: none;
}

.sommaire ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sommaire a {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 46px;
	padding: 4px 8px;
	border-bottom: 1px solid var(--bordure);
	color: var(--texte);
	font-family: var(--titres);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
}

.sommaire a:hover {
	color: var(--accent);
}

.sommaire .num {
	flex: none;
	width: 24px;
	color: var(--accent);
	font-weight: 700;
}

.sommaire a[aria-current="page"], .sommaire a[aria-current="page"] .num {
	background: var(--accent);
	color: var(--fond);
}

/* Page */

.page {
	min-width: 0;
}

.page-corps {
	max-width: 860px;
	padding: 22px 18px 20px;
}

.piece {
	margin: 0;
	color: var(--accent);
	font-family: var(--titres);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 1.2px;
	text-transform: uppercase;
}

.piece:empty {
	display: none;
}

h1 {
	margin: 8px 0 18px;
	font-family: var(--titres);
	font-size: clamp(32px, 7vw, 56px);
	font-weight: 800;
	line-height: 1.08;
	overflow-wrap: break-word;
}

.hero {
	margin: 0;
}

.precedent-suivant {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-top: 28px;
}

.precedent-suivant a {
	display: block;
	min-height: 44px;
	padding: 10px 12px 12px;
	background: var(--panneau);
	color: var(--texte);
	font-family: var(--titres);
	line-height: 1.25;
	text-decoration: none;
}

.precedent-suivant .suivant {
	grid-column: 2;
	text-align: right;
}

.precedent-suivant a[href=""] {
	display: none;
}

.precedent-suivant span {
	display: block;
	color: var(--accent);
	font-size: 13px;
	font-weight: 700;
}

.precedent-suivant strong {
	display: block;
	margin-top: 3px;
	font-size: 16px;
	font-weight: 700;
}

/* Pied de page */

.pied {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 4px 22px;
	padding: 14px 18px;
	border-top: 1px solid var(--bordure);
	color: var(--secondaire);
	font-family: var(--titres);
	font-size: 14px;
}

.pied a {
	color: var(--texte);
}

.pied-liens {
	display: flex;
	flex-wrap: wrap;
	gap: 0 18px;
}

.pied-liens a {
	padding: 10px 0;
}

/* Ordinateur : sommaire en colonne */

@media (min-width: 1024px) {
	.site {
		display: grid;
		grid-template-columns: 300px minmax(0, 1fr);
		min-height: 100vh;
	}

	.entete {
		display: block;
		padding: 28px 28px 0;
		background: none;
		border: 0;
	}

	.logo {
		font-size: 23px;
	}

	.bouton-sommaire {
		display: none;
	}

	.js .sommaire, .sommaire {
		display: block;
		padding: 0 20px 28px;
		border: 0;
	}

	.sommaire-titre {
		display: block;
		margin: 22px 0 10px;
		padding: 0 8px;
		color: var(--accent);
		font-family: var(--titres);
		font-size: 14px;
		font-weight: 700;
		letter-spacing: 1.2px;
	}

	.sommaire a {
		min-height: 0;
		gap: 12px;
		padding: 9px 8px;
		border: 0;
		font-size: 15px;
	}

	.page-corps {
		padding: 30px 56px 24px;
	}

	.pied {
		padding: 14px 28px;
	}
}

/* Sous-menus de rubrique : tables injectees par {tpl_menu_haut} et {tpl_menu_bas} */

.sous-menu {
	width: 100%;
	margin: 0 0 18px;
	border-collapse: collapse;
	font-family: var(--titres);
	font-size: 15px;
	line-height: 1.35;
}

.sous-menu:not(:has(td)) {
	display: none;
}

.sous-menu table {
	width: 100% !important;
	border: 1px solid var(--bordure) !important;
}

.sous-menu td {
	height: auto !important;
	text-align: left;
}

.sous-menu a {
	display: inline-block;
	padding: 6px 0;
}

/* Vieux contenus : tables de mise en page, largeurs et couleurs en dur */

.contenu {
	display: flow-root;
	overflow-wrap: break-word;
}

.contenu table {
	max-width: 100%;
	border-color: var(--bordure);
}

.contenu table:not(.tableau-donnees):not(#overDiv *), .sous-menu table {
	width: 100% !important;
}

.contenu td, .contenu th {
	height: auto !important;
}

.contenu img {
	max-width: 100%;
	height: auto;
	background: #ffffff;
}

.contenu iframe, .contenu embed, .contenu object, .contenu video {
	max-width: 100%;
}

.contenu iframe {
	height: auto;
	aspect-ratio: 16 / 9;
}

.contenu [bgcolor]:not(.garde-fond):not(#overDiv *), .contenu [style*="background"]:not(.garde-fond):not(#overDiv *), .sous-menu [bgcolor], .sous-menu [style*="background"] {
	background: transparent !important;
}

.contenu font:not(#overDiv *), .contenu [style*="color"]:not(#overDiv *), .sous-menu [style*="color"] {
	color: inherit !important;
}

.contenu hr {
	border: 0;
	border-top: 1px solid var(--bordure);
}

.contenu input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]), .contenu textarea, .contenu select {
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	padding: 8px 10px;
	background: var(--panneau);
	border: 1px solid var(--bordure);
	color: var(--texte);
	font-family: var(--titres);
	font-size: 16px;
}

.contenu input[type="submit"], .contenu input[type="button"], .contenu input[type="reset"], .contenu button {
	min-height: 44px;
	margin: 4px 0;
	padding: 8px 20px;
	border: 0;
	font-family: var(--titres);
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}

.contenu input[type="submit"], .contenu input[type="button"], .contenu button {
	background: var(--accent);
	color: var(--fond);
}

.contenu input[type="reset"] {
	background: var(--panneau);
	color: var(--texte);
}

/* Infobulles overlib de la page bibliographie 2004 : elles gardent leurs couleurs */

#overDiv td, #overDiv font {
	font-family: var(--titres);
	font-size: 15px;
	line-height: 1.4;
}

/* Classes des vieux contenus */

.titre, .rubrique_sous_titre, ul#liste_elections li a {
	color: var(--texte);
	font-family: var(--titres);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
}

.imgb {
	border: 1px solid var(--bordure);
}

.texte_premiere_page, .corps11, .corps12 {
	font-size: inherit;
}

.annotation, .discours {
	color: var(--secondaire);
	font-size: 15px;
}

.discour_fr {
	color: inherit;
}

a.lienbiblio:link, a.lienbiblio:visited {
	color: var(--texte);
	text-decoration: none;
}

b a.lienbiblio:link, b a.lienbiblio:visited {
	color: var(--accent);
	font-family: var(--titres);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
}

a.lienbiblio:hover {
	color: var(--accent-clair);
}

a.lienpage:link, a.lienpage:visited, a.stylemenu:link, a.stylemenu:visited, a.stylemenu2:link, a.stylemenu2:visited {
	display: inline-block;
	min-height: 44px;
	margin: 2px 0;
	padding: 10px 12px;
	background: var(--panneau);
	color: var(--texte);
	font-family: var(--titres);
	font-size: 15px;
	line-height: 1.3;
	text-decoration: none;
}

a.lienpage:hover, a.stylemenu:hover, a.stylemenu2:hover {
	color: var(--accent);
}

.blocvice {
	padding: 12px;
	background: var(--panneau);
	border: 1px solid var(--bordure);
}

.confirmation {
	color: var(--accent);
}

.erreur {
	color: #ff8a94;
}

.democratic_party_color {
	color: #7fb2ff !important;
}

.republican_party_color {
	color: #ff8a94 !important;
}

.contenu .democratic_party_fond {
	background: #185faf !important;
	color: #ffffff;
}

.contenu .republican_party_fond {
	background: #b8041d !important;
	color: #ffffff;
}

.header_comparaison, .body_comparaison, .body_comparaison2, .header_comparaison_value, .colortab {
	color: inherit;
}

.header_comparaison_value {
	border-right: 1px solid var(--bordure);
	text-align: right;
}

/* Vrais tableaux de donnees : defilent dans leur cadre */

.tableau-defilant {
	max-width: 100%;
	overflow-x: auto;
}

.tableau-donnees {
	max-width: none !important;
	min-width: 100%;
	border-collapse: collapse;
	font-family: var(--titres);
	font-size: 15px;
	line-height: 1.35;
}

.tableau-donnees td, .tableau-donnees th {
	padding: 6px 8px;
	border: 1px solid var(--bordure);
}

.tableau-donnees img {
	background: none;
}

.tableau-donnees .tableau-donnees, .tableau-donnees .tableau-donnees td {
	border: 0;
}

.tableau-donnees td[width="200"] {
	width: 130px;
}

/* Telephone et tablette : les tables de mise en page s'empilent */

@media (max-width: 767px) {
	.contenu table:not(.tableau-donnees):not(.pas-empile), .contenu table:not(.tableau-donnees):not(.pas-empile) > tbody, .contenu table:not(.tableau-donnees):not(.pas-empile) > tbody > tr, .contenu table:not(.tableau-donnees):not(.pas-empile) > tbody > tr > td,
	.sous-menu, .sous-menu > tbody, .sous-menu > tbody > tr, .sous-menu > tbody > tr > td, .sous-menu table, .sous-menu table > tbody, .sous-menu table > tbody > tr, .sous-menu table > tbody > tr > td {
		display: block;
		width: 100% !important;
	}

	.contenu table:not(.tableau-donnees):not(.pas-empile) > tbody > tr > td[width="40"], .contenu table:not(.tableau-donnees):not(.pas-empile) > tbody > tr > td[width="100"]:empty {
		display: none;
	}

	.contenu img[align], .contenu img[style*="float"] {
		max-width: 45%;
	}

	.contenu form td {
		text-align: left !important;
	}

	.sous-menu a {
		padding: 11px 0;
	}
}

/* Listes d'actualites et de bibliographie */

.liste-actu, .liste-livre {
	display: grid;
	gap: 6px 14px;
	padding: 18px 0;
	border-bottom: 1px solid var(--bordure);
}

.liste-actu {
	grid-template-columns: minmax(0, 1fr) 90px;
}

.liste-livre {
	grid-template-columns: 66px minmax(0, 1fr);
}

.liste-date {
	grid-column: 1 / -1;
	color: var(--accent);
	font-family: var(--titres);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
}

.liste-date:empty {
	display: none;
}

.liste-corps {
	min-width: 0;
}

.liste-corps h2 {
	margin: 0 0 6px;
	font-family: var(--titres);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.22;
}

.liste-corps h2 a:link, .liste-corps h2 a:visited {
	color: var(--texte);
	text-decoration: none;
}

.liste-corps h2 a:hover {
	color: var(--accent);
}

.liste-corps p {
	margin: 0;
	font-size: 17px;
	line-height: 1.5;
}

.liste-corps p:empty {
	display: none;
}

.liste-actu .liste-corps p {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	color: var(--secondaire);
}

.liste-lire, .liste-note summary, a.liste-amazon {
	font-family: var(--titres);
	font-size: 15px;
	font-weight: 700;
}

.liste-lire {
	display: flex;
	align-items: center;
	min-height: 44px;
}

.liste-vignette img {
	display: block;
	width: 90px;
	height: 90px;
	object-fit: cover;
}

.liste-vignette:empty {
	display: none;
}

.liste-couverture img {
	display: block;
	width: 66px;
	height: auto;
}

.liste-meta {
	margin-bottom: 8px;
	color: var(--secondaire);
	font-family: var(--titres);
	font-size: 14px;
}

.liste-isbn {
	display: none;
}

.liste-note {
	margin-top: 6px;
}

.liste-note summary {
	display: flex;
	align-items: center;
	min-height: 44px;
	color: var(--accent);
	cursor: pointer;
}

.liste-note p {
	margin-bottom: 8px;
	color: var(--secondaire);
	font-size: 16px;
}

a.liste-amazon {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin-top: 4px;
	padding: 0 14px;
	background: var(--panneau);
	color: var(--texte);
	text-decoration: none;
}

a.liste-amazon:hover {
	color: var(--accent);
}

@media (min-width: 768px) {
	.liste-actu {
		grid-template-columns: 110px minmax(0, 1fr) 90px;
		gap: 24px;
		padding: 24px 0;
	}

	.liste-date {
		grid-column: auto;
		font-size: 15px;
	}

	.liste-actu:has(.liste-date:empty) {
		grid-template-columns: minmax(0, 1fr) 90px;
	}

	.liste-livre {
		grid-template-columns: 88px minmax(0, 1fr);
		gap: 22px;
		padding: 22px 0;
	}

	.liste-couverture img {
		width: 88px;
	}

	.liste-corps h2 {
		font-size: 22px;
	}

	.liste-isbn {
		display: inline;
	}

	.liste-lire, .liste-note summary {
		min-height: 32px;
	}

	a.liste-amazon {
		min-height: 0;
		padding: 0;
		background: none;
		color: var(--accent);
	}
}

/* Candidats : le ticket, puis les primaires */

.candidats-rubrique {
	margin: 22px 0 10px;
	color: var(--accent);
	font-family: var(--titres);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 1.2px;
	text-transform: uppercase;
}

.candidats-ticket {
	display: grid;
	gap: 14px;
}

.candidat, .candidat-ligne {
	display: grid;
	align-items: start;
	min-width: 0;
}

.candidat {
	background: var(--panneau);
	border-top: 4px solid #7fb2ff;
}

.candidat > div {
	padding: 14px 14px 6px;
}

.candidat.republicain {
	border-top-color: #ff8a94;
}

.candidat > img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: 50% 15%;
}

.candidat-ligne {
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--bordure);
}

.candidat-ligne > img {
	display: block;
	width: 64px;
	height: 76px;
	object-fit: cover;
	object-position: 50% 15%;
}

.candidat-credit {
	margin-top: 6px;
	color: var(--secondaire);
	font-family: var(--titres);
	font-size: 13px;
}

.candidat-role {
	font-family: var(--titres);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
}

.democrate .candidat-role {
	color: #7fb2ff;
}

.republicain .candidat-role {
	color: #ff8a94;
}

.candidat h2, .candidat-ligne h3 {
	margin: 3px 0 6px;
	font-family: var(--titres);
	font-weight: 700;
	line-height: 1.2;
}

.candidat h2 {
	font-size: 22px;
}

.candidat-ligne h3 {
	font-size: 19px;
}

.candidat h2 a:link, .candidat h2 a:visited, .candidat-ligne h3 a:link, .candidat-ligne h3 a:visited {
	color: var(--texte);
	text-decoration: none;
}

.candidat h2 a:hover, .candidat-ligne h3 a:hover {
	color: var(--accent);
}

.candidat p, .candidat-ligne p {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
}

.candidats-rubrique + .candidats-ticket .candidat p {
	margin-bottom: 2px;
}

@media (min-width: 768px) {
	.candidats-ticket {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 18px;
	}

	.candidat-ligne {
		gap: 18px;
	}
}

/* Grande photo de haut de page */

.hero img {
	display: block;
	width: 100%;
	height: 240px;
	object-fit: cover;
	filter: grayscale(1) contrast(1.05);
}

.hero figcaption {
	padding: 6px 18px 0;
	color: var(--secondaire);
	font-family: var(--titres);
	font-size: 14px;
}

.contenu .portrait {
	float: right;
	max-width: 280px;
	height: auto;
	margin: 4px 0 12px 20px;
}

@media (max-width: 479px) {
	.contenu .portrait {
		float: none;
		display: block;
		width: 100%;
		max-width: 100%;
		margin: 0 0 14px;
	}
}

@media (min-width: 768px) {
	.hero img {
		height: 340px;
	}
}

@media (min-width: 1024px) {
	.hero figcaption {
		padding: 6px 56px 0;
	}
}

.tableau-donnees .tableau-donnees td {
	white-space: nowrap;
}
