@import url('https://fonts.googleapis.com/css?family=Fira+Sans:200,300,400,600');
@import url('https://fonts.googleapis.com/css?family=Fira+Mono');

/* GLOBAL ELEMENTS */
body {
	font-family: "Fira Sans";
	margin: 0;
	padding: 0;
}

#globalcontent h1 {
	margin: 0;
	padding: 0.4em 0 0.4em 1.4em;
	font: 200 1.4em "Fira Sans";
	user-select: none;
	cursor: pointer;
	background: url("icons/expand.svg") no-repeat top 0.65em left 0.3em;
	background-size: 0.8em 0.8em;
}

h2 {
	margin: 0;
	padding: 0.3em;
	font: 200 1.2em "Fira Sans";
	background-color: #0f9cd8;
	color: white;
}

h2:nth-of-type(1) {
	background: #0f9cd8 url("icons/h21.png") no-repeat right 5px top 2px;;
}

h2:nth-of-type(2) {
	background: #0f9cd8 url("icons/h22.png") no-repeat right 5px top 2px;;
}

h2:nth-of-type(3) {
	background: #0f9cd8 url("icons/h23.png") no-repeat right 5px top 2px;;
}

h2:nth-of-type(4), aside h2:nth-of-type(3) {
	background: #0f9cd8 url("icons/h24.png") no-repeat right 5px top 2px;;
}

h3 {
	margin: 0;
	padding: 0.5em 0 0.2em 0.5em;
	font: 600 1.4em "Fira Sans";
	color: #3b3b3b;
	user-select: none;
	cursor: pointer;
}

button, label {
	outline: 0;
	cursor: pointer;
}

hr {
	margin-top: 1em;
	border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
}

p, td {
	font: 300 1em "Fira Sans";
	padding: 0;
	margin: 0.5em 0;
}

td {
	padding: 0.4em;
	vertical-align: text-top;
}

td:last-child {
	width: 30%;
}

td:nth-last-child(2) {
	width: 10%;
}

p span:nth-of-type(1) {
	width: 10em;
	display: inline-block;
}

p span:nth-of-type(2) {
	width: 5em;
	display: inline-block;
}

@media screen and (max-width: 400px) {
	td {
		font: 300 0.9em "Fira Sans";
	}
}

.hiddencontent {
	display: none !important;
}

.num {
	font-family: 'Fira Mono', monospace;
	text-align: right;
}

div.flexc {
	display: flex;
	justify-content: space-between;
}

div.flexc > div:nth-of-type(1) {
	font: 300 1em "Fira Sans";
}

div.flexc > div:nth-of-type(2) {
	font: 400 1em "Fira Mono", monospace;
}

.stars {
	background: url("icons/stars.svg") no-repeat;
	background-position: 0 5px;
	width: 25px;
	max-width: 25px;
	position: relative;
	margin-left: .5em;
	margin-bottom: .2em;
}

.stars p {
	top: 5px;
	width: 100%;
	text-align: center;
	display: block;
	position: absolute;
	font: 600 9pt "Fira Sans";
}


/* GLOBAL CONTAINERS */
#globalcontent {
	display: flex;
	width: 100%;
	max-width: 1200px;
	margin: auto;
	justify-content: space-between;
}

#globalcontent > div:nth-of-type(1) {
	flex-basis: 50%;
}

#globalcontent > div:nth-of-type(2) {
	flex-basis: 48%;
}

@media screen and (max-width: 900px) {
	#globalcontent {
		flex-direction: column;
	}
}

.mainstats, .parties, .candidates, aside {
	width: 100%;
	max-width: 650px;
	border: 1px solid #ddd;
	margin: 0 auto 1em auto;
	position: relative;
	box-sizing: border-box;
	overflow: hidden;
}

.mainstats.reduce, .parties.reduce, .candidates.reduce, aside.reduce {
	max-height: 3em;
}

/* MODULE : LES ELECTIONS EN CHIFFRES */
.mainstats p span {
	margin-left: 1em;
}

.mainstats > div, .citydetails > div.flexc {
	display: flex;
	justify-content: space-between;
	padding: 0.3em 1em;
}

.mainstats > div > div:nth-of-type(1) {
	font: 300 1em "Fira Sans";
}

.mainstats > div > div:nth-of-type(2) {
	font: normal 1em "Fira Mono", monospace;
}

.mainstats a {
	display: block;
	color: #494949;
	text-decoration: none;
	text-align: center;
	font: 300 0.9em "Fira Sans";
	margin: 0.5em;
}

.mainstats a:hover {
	color: black;
	text-decoration: underline;
}

/* MODULE : SCORES DES PARTIS ET CANDIDATS */
.partiesTop {
	display: flex;
	margin-top: .4em;
	cursor: pointer;
	padding: 0.3em 1em 0 1em;
}

.partiesTop > div:nth-of-type(1) {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	flex: 0 0 170px;
}

.partiesTop > div:nth-of-type(1) > div:nth-of-type(1) {
	display: flex;
	padding: 0 0 .5em 0;
}

@media screen and (max-width: 350px) {
	.partiesTop > div:nth-of-type(1) {
		flex: 0 0 130px;
	}
	.partiesTop > div:nth-of-type(1) > div:nth-of-type(1) > p {
		font: 300 0.9em "Fira Sans";
	}
}

.partiesTop > div:nth-of-type(1) > div:nth-of-type(2), div#candidates_btn {
	padding: 0 0 .5em 1.2em;
	position: relative;
	font: 300 0.9em "Fira Sans";
}

div#candidates_btn {
	padding: 1em 0 1em 2em;
	cursor: pointer;
}

.partiesTop > div:nth-of-type(1) > div:nth-of-type(2)::before, div#candidates_btn::before {
	position: absolute;
	transform: rotate(90deg);
	left: 0.1em;
}

div#candidates_btn::before {
	left: 1em;
}

.partiesTop > div:nth-of-type(1) > div:nth-of-type(2).opendetails::before, div#candidates_btn.opendetails::before {
	content: "\232A";
}

.partiesTop > div:nth-of-type(1) > div:nth-of-type(2).closedetails::before, div#candidates_btn.closedetails::before {
	content: "\2329";
}

.partiesTop > div:nth-of-type(2) {
	padding-bottom: .5em;
	flex: 1; 
}

.partiesBottom {
	display: flex;
	justify-content: space-between;
	padding-top: 1em;
}

	
@media screen and (max-width: 550px) {
	.partiesBottom {
		flex-direction: column;
	}
}

#posright .partiesBottom {
	flex-direction: column;
}

.partiesBottom > div {
	flex-grow: 1;
	padding: 0 1em;
}

@media screen and (max-width: 450px) {
	.partiesTop {
		padding: 0.3em 0.5em 0 0.5em;
	}
	
	.partiesBottom > div {
		padding: 0 0.5em;
	}
}

.partiesBottom > div div {
	display: flex;
	justify-content: space-between;
	height: 40px;
}

.partiesBottom > div > div > div:nth-of-type(1) {
	font: 200 1em "Fira Sans";
}

.partiesBottom > div > div > div > div.stars {
	background-position: 0 0;
}


/* MODULE : CANDIDATS ELUS */
table {
	border-collapse: collapse;
	width: 100%;
}

.candidates button {
	margin: 0.5em auto;
	display: block;
	background-color: #0f9cd8;
	padding: 0.4em;
	border: 1px solid #0f9cd8;
	color: white;
	transition: background-color .4s ease-out;
}

.candidates button:hover {
	color: black;
	background-color: white;
}


/* MODULE : CARTE */
aside {
	display: none;
}

.citydetails {
	position: relative;
}

#luxmap {
	transition: max-height 0.5s cubic-bezier(0.8, 0, 0.1, 1);
	max-height: 700px;
	overflow: hidden;
	position: relative;
}

#luxmap.reduce {
	max-height: 100px;
}

#luxmap p {
	padding-left: 1em;
	font: 300 1em "Fira Sans";
}

#luxmap div.refresh {
	position: absolute;
	top: 1em;
	right: 1em;
}

#luxmap div.refresh svg {
	width: 90px;
	height: 90px;
}

#luxmap div.refresh svg text {
	font: 300 1em "Fira Sans";
	white-space: pre; 
}

#luxmap div.refresh button {
	position: absolute;
	left: 30px;
	top: 30px;
	display: block;
	border: 1px solid #0f9cd8;
	cursor: pointer;
	border-radius: 50%;
	background-color: white;
	width: 30px;
	height: 30px;
	background: url("icons/reload.png") no-repeat center center;
}

#luxmap div.refresh button:hover {
	animation: tondeuse 2s ease-out;
}

@keyframes tondeuse {
	0% {transform: rotate(0deg);}
	5% {transform: rotate(-80deg);}
	35% {transform: rotate(80deg);}
	100% {transform: rotate(0deg);}
}

#desksprogress {
	border: 1px solid #ddd;
	margin: 0.5em 1em;
	position: relative;
}

#desksprogress div:nth-of-type(1) {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	background-color: #0f9cd8;
	z-index: 2;
}

#desksprogress div:nth-of-type(2) {
	position: absolute;
	top: 0;
	right: 0.3em;
	height: 100%;
	width: 50%;
	padding: 0.1em;
	font: 200 0.9em "Fira Sans";
	text-align: right;
	z-index: 3;
}

#mapchoicescontainer {
	margin: 0 1em;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

#mapchoicescontainer input {
	display: none;
}

#mapchoicescontainer label {
	border: 1px solid #0f9cd8;
	padding: 0.5em 0.1em;
	margin-top: 1em;
	font: 300 0.8em "Fira Sans";
	border-radius: 0;
	cursor: pointer;
	flex-basis: 33%;
	box-sizing: border-box;
	text-align: center;	
	display: flex;
    justify-content:center;
    align-content:center;
    flex-direction:column;
}

#mapchoicescontainer label:nth-of-type(1) {
	border-radius: 3px 0 0 3px;
	border-right-width: 0;
}

#mapchoicescontainer label:nth-of-type(3) {
	border-radius: 0 3px 3px 0;
	border-left-width: 0;
}

#mapchoicescontainer input:checked + label {
	color: white;
	background-color: #0f9cd8;
}

#mapchoicescontainer optgroup {font: 600 1em "Fira Sans";}

#mapchoicescontainer optgroup.lsap {color: rgb(194,14,26);}

#mapchoicescontainer optgroup.csv {color: rgb(238,124,0);}

#mapchoicescontainer optgroup.dp {color: rgb(0,42,84);}

#mapchoicescontainer optgroup.adr {color: rgb(96,166,217);}

#mapchoicescontainer optgroup.kpl {color: rgb(148,19,30);}

#mapchoicescontainer optgroup.piraten {color: rgb(178,120,177);}

#mapchoicescontainer optgroup.déikonservativ {color: rgb(77,113,218);}

#mapchoicescontainer optgroup.volt {color: rgb(88,44,131);}

#mapchoicescontainer optgroup.déilénk {color: rgb(112,93,70)}

#mapchoicescontainer optgroup.déigréng {color: rgb(122,186,62);}

#mapchoicescontainer div {
	display: none;
	width: 100%;
	text-align: center;
	padding-top: 1em;
}

#mapchoicescontainer div p {
	margin: 2em 1em;
	padding: 1em;
	background-color: rgba(15,156,216,.2);
	text-align: justify;
	font: 200 0.8em "Fira Sans", sans-serif;
}

#mapchoicescontainer input:checked + label:nth-of-type(1) ~ div:nth-of-type(1),
#mapchoicescontainer input:checked + label:nth-of-type(2) ~ div:nth-of-type(2),
#mapchoicescontainer input:checked + label:nth-of-type(3) ~ div:nth-of-type(3) {
	display: block;
}

@media screen and (max-width: 400px) {
	#mapchoicescontainer {
		flex-direction: column;
		margin: 0 0.4em;
	}
	
	#mapchoicescontainer label {
		border-radius: 3px;
	}

	#mapchoicescontainer label:nth-of-type(1) {
		border-radius: 3px;
		border-right-width: 1px;
	}

	#mapchoicescontainer label:nth-of-type(3) {
		border-radius: 3px;
		border-left-width: 1px;
	}
}

select#citiesselect {
	font: 200 1.4rem "Fira Sans";
	border: 1px solid white;;
	animation: blueborder 4s infinite;
	position: relative;
}

@keyframes blueborder {
	0% {border-color: white;}
	40% {border-color: white;}
	50% {border-color: #0f9cd8;}
	100% {border-color: white;}
}

select.mapchoices {
	font: 200 1em "Fira Sans";
	border: 1px solid #274450;
	height: 2em;
}

option {
	font: 200 0.9rem "Fira Sans";
}

@media screen and (max-width: 400px) {
	option {
		font: 200 0.8rem "Fira Sans";
	}
	select.mapchoices {
		width: 100%;
		max-width: 100%;
	} 
}

.Icon {
  width: 38px;
  height: 38px;
  position: absolute;
  transform: rotate(-90deg);
  transition: .5s ease-in-out;
  cursor: pointer;
  top: 5px;
  right: 5px;
}

.Icon span {
  display: block;
  position: absolute;
  left: 0;
  top: 17px;
  height: 4px;
  width: 100%;
  background: #eeeeee;
  border-radius: 2px;
  transform: rotate(0deg);
  transition: .2s ease-in-out;
}

.Icon span:nth-child(1),
.Icon span:nth-child(3) {
  width: 50%;
  transform: rotate(45deg);
}

.Icon span:nth-child(1) {
  left: 2px;
  top: 11px;
}

.Icon span:nth-child(2) {
  transform: rotate(-45deg);
}

.Icon span:nth-child(3) {
  left: 15px;
  top: 24px;
}

.Icon.open span:nth-child(1),
.Icon.open span:nth-child(3) {
    left: -1px;
}

.Icon.open span:nth-child(1) {
  top: 10px;
  transform: rotate(135deg);
}

.Icon.open span:nth-child(2) {
  transform: rotate(0deg);
}

.Icon.open span:nth-child(3) {
  top: 24px;
  transform: rotate(45deg);
}


/* TOOLTIP */
#tooltip {
	position: absolute;
	display: none;
	text-decoration: none;
	top: 0;
	left: 0;
	z-index: 20;
	min-width: 20px;
	width: auto;
	padding: 2px;
	background: rgba(74,74,74,.8);
	border-radius: 3px;  
	color: white;
	line-height: 1.4em;
	text-align: center;
	font: 300 1em "Fira Sans", Verdana, Sans-serif;
}

#tooltip h1 {
	font: 300 1em "Fira Sans", Verdana, Sans-serif;
}

#tooltip p {
	font: 300 0.85em "Fira Sans", Verdana, Sans-serif;
}

#tooltip img {
	width: 100%;
	max-width: 150px;
}


/* SVG MAP */
.luxsvgmap {
	width: 100%;
	height: 600px;
}

@keyframes dash {
    0% {
      opacity: 0.75
    }

	65% {
      opacity: 0.4
    }
	
	100% {
      opacity: 0.75
    }
}

@keyframes dash2 {
    0% {
      stroke-dashoffset: 320;
	  stroke-opacity: 1;
    }

	90% {
      stroke-dashoffset: 0;
	  stroke-opacity: 1;
    }
	
	100% {
      stroke-dashoffset: 0;
	  stroke-opacity: 0;
    }
}
 
.choropleth-commune path { 
	stroke-width: 0.5px; 
	stroke: white;
	-webkit-tap-highlight-color: transparent;
	fill-opacity: 0.75;
}

.choropleth-commune path.grey {fill: #e3e3e3;}

.choropleth-commune path.partial {animation: dash 3s infinite;}

.choropleth-commune path.lsap {fill: rgba(194,14,26,1);}

.choropleth-commune path.csv {fill: rgba(238,124,0,1);}

.choropleth-commune path.dp {fill: rgba(0,42,84,1);}

.choropleth-commune path.adr {fill: rgba(96,166,217,1);}

.choropleth-commune path.kpl {fill: rgba(148,19,30,1);}

.choropleth-commune path.piraten {fill: rgba(178,120,177,1);}

.choropleth-commune path.déikonservativ {fill: rgba(77,113,218,1);}

.choropleth-commune path.volt {fill: rgba(88,44,131,1);}

.choropleth-commune path.déilénk {fill: rgba(112,93,70,1)}

.choropleth-commune path.déigréng {fill: rgba(122,186,62,1);}

.choropleth-commune path.lsap:hover, .choropleth-commune path.lsap:focus, .choropleth-commune path.csv:hover, .choropleth-commune path.csv:focus, .choropleth-commune path.dp:hover, .choropleth-commune path.dp:focus, .choropleth-commune path.adr:hover, .choropleth-commune path.adr:focus, .choropleth-commune path.kpl:hover, .choropleth-commune path.kpl:focus, .choropleth-commune path.piraten:hover, .choropleth-commune path.piraten:focus, .choropleth-commune path.déikonservativ:hover, .choropleth-commune path.déikonservativ:focus, .choropleth-commune path.volt:hover, .choropleth-commune path.volt:focus, .choropleth-commune path.déilénk:hover, .choropleth-commune path.déilénk:focus, .choropleth-commune path.déigréng:hover, .choropleth-commune path.déigréng:focus {
	fill-opacity: 1;
	stroke: white; 
	stroke-width: 2px;
	stroke-dasharray: 320;
    stroke-dashoffset: 320;
    animation: dash2 3s infinite;
	cursor: pointer;
}

@media screen and (max-width: 400px) {
	.luxsvgmap {
		height: 400px;
	}
}

/* CHARTS */
.progress > div.bar {
	position: relative;
	width: 280px;
	height: 15px;
	margin-bottom: 0.3em;
	overflow: hidden;	
}

.progress > div:last-child {
	margin: 0;
}

.parties .lsap, .citydetails .lsap {background-color: rgb(194,14,26);}

.parties .csv, .citydetails .csv {background-color: rgb(238,124,0);}

.parties .dp, .citydetails .dp {background-color: rgb(0,42,84);}

.parties .adr, .citydetails .adr {background-color: rgb(96,166,217);}

.parties .kpl, .citydetails .kpl {background-color: rgb(148,19,30);}

.parties .piraten, .citydetails .piraten {background-color: rgb(178,120,177);}

.parties .déikonservativ, .citydetails .déikonservativ {background-color: rgb(77,113,218);}

.parties .volt, .citydetails .volt {background-color: rgb(88,44,131);}

.parties .déilénk, .citydetails .déilénk {background-color: rgb(112,93,70)}

.parties .déigréng, .citydetails .déigréng {background-color: rgb(122,186,62);}