@import 'reset.css';
@import 'variables.css';
/* @import 'shape.css'; */

/* --------------------- GENERAL */
html{
	scroll-behavior: smooth;
}

body {
	font-family: infraRoman;
	line-height: var(--line-Height);
	font-size: 14px;
	background: #F3F3F3; 
}

/* Works on Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: black;
}

/* Works on Chrome, Edge, and Safari */
*::-webkit-scrollbar {
  width: 3px;
	height: 3px;
}

*::-webkit-scrollbar-track {
  background: none;
}

*::-webkit-scrollbar-thumb {
  background-color: black;
}


table {
	width: 100%;
}

#content-wrapper{
	margin: var(--margin);
	padding-top:var(--margin);
}

/* --------------------- GENERAL TAGS  */

h1{
	text-transform: uppercase;
	font-weight: normal;
	line-height: 1.2em; 
	padding-bottom: 0.5em;
	letter-spacing: .05em;
}

pre {
	font-family: 'GillRegularMono';
	line-height: 1em;
	letter-spacing: .3em;
	 -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
}

li {
	cursor: pointer;
}

a {
	color: inherit;
	text-decoration: none;
}

i {
	font-family: infraItalic;
	font-style: normal; 
}

.btn {
	margin-top: 0em;
	width: 100%;
	text-align: center;
	margin-bottom: 1em;
	position: fixed;
	height: 2em;
	background: #F3F3F3;
	box-shadow: 0px 5px 5px #F3F3F3;
}

button {
	border: none;
	font-size: var(--font-size-M);
	line-height: 0em;
	background: none;
	width: 100%;
	cursor: pointer;
}

button span {
	padding:0.5em;
	line-height: 1.2em;
	font-size: var(--font-size-M);
	font-family: GillReg;
	font-weight:normal;
}

button#btn_close { display: none; }

#close{
	font-family: GillReg;
	font-size: var(--font-size-XL);
	text-align: right;
	position: absolute;
	right: calc(var(--margin)/2);  
	top: calc(var(--margin)/2);
	transform: translate(0, -0.3em);
}

section#fiche a#close{
	height: 100%;
	/* position: fixed; */
}

section#fiche a#close{
	text-decoration: none;
}

h3{
	font-family: GillReg;
	font-weight:normal;
	font-size: var(--font-size-L);
	line-height: 90%;
	font-style: normal; 
}

h4{
	font-style: normal; 
	font-weight: inherit;
	text-align: right;
	text-transform: none;
	font-size: var(--font-size-M);
	padding-bottom: var(--margin); 
}

h4 em{
	font-family: infraMedian ;
}

em{
	font-family: infraItalic;
	font-style: normal; 
}

header {
	display:grid;
	grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
	border-bottom: 1px solid;
	margin: calc(var(--margin) * -1);
	padding: var(--margin);
	position: sticky;
	/* position: sticky; */
	/* top: 4em; */
	top: 0;
}

/* --------------------- MAIN */

@media only screen and (max-width: 1000px) {
	.desktop{
		display:none;
	}
}

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

	.left{
		width: 50%;
		top: 50px;
		height: calc(100% - 50px);
		overflow-y: scroll;
		position: fixed;
	}

	.right {
		position: fixed;
		width:50%;
		left:50%;
		top:0;
		border-left:solid 1px;
		height: 100%;
		overflow-y: scroll
	}
	header {
		top: 50px;
	}
}


/* --------------------- NAV */
nav {
	padding: .5em .5em;
	outline: 1px solid;
	position: fixed;
	top: 0px;	
	width: 100%;
	z-index: 3;
	background: #F3F3F3; 
	box-sizing: border-box;
	border-bottom: 1px solid;
}

nav ul {
	padding-top: 0.5em;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}

nav ul li {
	text-align: center;
}

nav h1{
	font-family: GillReg;
	font-size: var(--font-size-M);
}

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

	nav {
		outline: 0px;
		padding: 1em;
		padding-bottom: 0em;
	}

	nav ul {
		display:none;
	}

	nav h1{
		font-size: var(--font-size-L);
	}

}

/* --------------------- MAP */
section#map {
	top: 90px;
	display: absolute;
	background-color: var(--background-color-1);
	height: calc(100% - 120px);
	width: 100%;
	position: fixed;
	overflow: scroll;
	cursor: pointer; 
	  -webkit-overflow-scrolling: touch; /* Lets it scroll lazy */
	text-align: center;
}
section#map #map_canvas {
	position: absolute;
	/* margin: 100px; */
}
section#map #map_canvas #margin_map {
	position: absolute;
	height: 300px;
	width: 100%;
	background: red;
}

section#map #layers {
	opacity: 0;
	transition: opacity 1s ease-in-out;
}
section#map #layers.visible {
	opacity: 1;
}
section#map .layer{
	position: absolute;
}
#carte .nav_zoom {
	position: fixed;
	z-index: 8;
	top: 100px;
	left: 10px;
	width: 30px;
	height: auto;
	text-align: center;
}
#carte .nav_zoom button {
	font-size: 1.8em;
	background: #f3F3F3;
	padding: .5em .2em;
	border-radius: 50%;
	border: 1px solid;
	font-family: monospace;
	margin-bottom: .2em;
}


#carte .nav_zoom button:hover {
	background: black;
	color: #F3F3F3
}

#layer_svg {
	position:absolute;
}
#map_svg {
	margin-left: 0px;
	position: relative;
}

rect, path {
	opacity: 0;
	position: fixed;
}
main#carte #index thead {
	visibility: collapse;
}

main#carte[data-mode*='index'] #map {
	height: calc(50% - 90px);
}

main#carte[data-mode*='index'] #table_plantes,
main#plante #table_plantes,
main#article #table_plantes{
	margin-bottom: 100px;
}

main#carte[data-mode*='index'] #index {
	height: calc(60% - 90px);
	overflow-y: scroll
}

main#carte[data-mode*='index'] #index table,
#liste  .table_section:nth-of-type(1) {
	margin-bottom: 1.6em;
}
main#carte[data-mode*='index'] #index .table_section:nth-last-child(1) {
	margin-bottom: 100px;

}
main#carte:not[data-mode*='index'] #index table td {
	max-width: 0;
}

main#carte[data-mode*='index'] #index thead {
	visibility: visible;
}

main#carte[data-mode*='index'] #index tr {
	display: table-row !important;
}

main#carte[data-mode*='index'] button.btn_open { display: none; }
main#carte[data-mode*='index'] button#btn_close { display: contents; }

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

	main#carte .nav_zoom {
		top:70px;
	}


	main#carte[data-mode*='index'] #map {
		width: calc(50% - 100px);
		left:50%;
		height: calc(100% - 180px);
	}
	
	main#carte[data-mode*='galerie'] #map {
		width: calc(50% - 100px);
		left:0%;
		height: calc(100% - 180px);
	}
	
	main#carte[data-mode*='index'] #index {
		height: calc(100% - 49px);
		top:0;
	}

	main#carte[data-mode*='index'] .nav_zoom {
		left: 95%;
	}

	section#map {
		top: 50px;
		bottom: 150px;
		padding: 50px;
		height: calc(100% - 180px);
	}

	section#map.active {
		cursor: grabbing;
		cursor: -webkit-grabbing; 
	}

}


/* --------------------- INFOS DANS LA PAGE MAP */

@media only screen and (min-width: 1000px) {
	
	#carte section#infos-map {
		position: fixed;
		background: #f3f3f3;
		transition: width .3s;
		width:1px;
		visibility:hidden;
		border-right:solid 1px;
		overflow-y:scroll;
		height:100%;
	}

	main#carte[data-mode*='infos'] #infos-map {
		visibility:visible;
		width:50%;
	}

	.btn_close_infos{
		visibility:hidden;
		width: 1px;
		transition: width 2s;
	}

	main#carte[data-mode*='infos'] .btn_close_infos {
		visibility:visible;
		width:100%;

	}

	#carte section#infos {
		margin-top:0px;
	}

	section

	main#carte[data-mode*='infos'] #infos {
		padding-top: var(--margin);
	}

	#infos-bio{
		grid-column:span 2;
	}

	#infos-logo{
		grid-column:span 2;
		font-size: 10px;
	}

	#infos-logo img{
		padding-top:var(--margin);
	}

	img#logo-mn {
		width:40%;
	}

	img#logo-besac {
		width:25%;
	}

}

/* --------------------- INDEX DANS LA PAGE MAP */


#carte section#index {
	bottom: 0px;
	position: fixed;
	background: #f3f3f3;
	transition: height 2s;
	min-height: 1.7em;
	z-index: 2;
}


#carte section#index tbody tr,
#carte .plant
{
	display: none;
	width: 100%;
}
#carte tbody .plant.visible,
#carte tbody .texte.visible,
#carte tbody .legende.visible
{
	width: 100%;
	display: table-row !important;
	position: relative;
	z-index: 11;
}
#carte tbody .plant.hover,
#carte tbody .texte.hover,
#carte tbody .legende.hover
{
	position: relative;
	z-index: 11;
	outline: 1px solid;
}



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

	#carte section#index {
		bottom: 0px;
		width:50%;
	}

	.btn {
		width: 50%;
		z-index:10;
	}

	#carte thead {
		visibility: collapse;
}

}


/* --------------------- GALERIE DANS LA PAGE MAP */


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

	.galerie{
		border-top: 1px solid;
		border-left: 1px solid;
	}

	#galerie-content {
		overflow: hidden;
	}

	section#galerie {
		height: 100%;
		position: fixed !important;
		overflow-y: scroll;
		width: 50vw !important;
	}

	.image-container {
		width: 50% !important;
	}

	#carte .galerie{
		bottom: 0;
		right:0px;
		width:50%;
		position: fixed;
		background: #f3f3f3;
		transition: height 1s;
		height:1.7em;
		min-height: 1.6em;

	}


	main#carte[data-mode*='galerie'] #galerie.focus .image-container {
		filter: grayscale(1);
	}
	main#carte[data-mode*='galerie'] #galerie.focus .image-container.active {
		filter: grayscale(0);
	}

	main#carte[data-mode*='galerie'] .galerie {
		height:100%;
		top:0;
		overflow-y: scroll;
	}

	main#carte[data-mode*='galerie'] section#galerie {
		margin-top:2em;
	}

	/* main#carte[data-mode*='galerie'] section#map { */
	/* 	width:50%; */
	/* } */


	button.btn_close_right { display: none; }

	main#carte[data-mode*='galerie'] button.btn_open_right { display: none; }
	main#carte[data-mode*='galerie'] button.btn_close_right { display: contents; }

	.caption {
		display: none;
	}	


}




/* --------------------- INDEX */
#index {
	border-top: 1px solid;
	border-right: 1px solid;
}
#index table{
	width: 100%;
}

.table_title {
	text-align: left;
	padding-left: .5em;
	border-top: 1px solid;
	border-bottom: 1px solid;
	font-weight: bold;
	letter-spacing: .2em;
	line-height: 1.6em;
	display: none;
	width: 100%;
	position: relative
}



main[data-mode*="index"] .table_title,
main#article .table_title,
main#plante .table_title
{
	display: block;
}


#index, tr {
	width: 100%;
}
#liste #index {
	position: absolute;
	overflow-y: scroll;
	height: calc(100% - 64px);
}

#liste .plant {
	transition: opacity 0.5s ease-in-out;
	opacity: 0 
}

#liste .plant.visible {
	transition: opacity 0.3s ease-in-out;
	opacity: 1 
}	

#list .tableText {
	margin-bottom: calc(var(--margin) * 2);
}

.tableText tbody tr:hover,
.tableText tbody tr.hover {
	background: lightgrey;
}

.layer.texte.active {
	color: lightgrey;
}

table .hover {
	transition: background 0.5s, visibility 0.5s;
}
table:hover .hover {
	visibility: visible;
	opacity: 1;
	transition: opacity 0.5s, visibility 0.5s;
}
.table_title:nth-of-type(1) {
	margin-top: 1.6em;
}
td:nth-of-type(5){
	width: 11vw;
}
td:last-child {
	width: auto;
}

th:first-child {
	width: 2vw;
}

th:nth-of-type(5){
	width: 11vw;
}

th,td {
	overflow: hidden;
	width: 25vw;
	text-align:left;
	line-height: 1.6em;
	cursor: pointer;
	white-space: nowrap;
	text-overflow: ellipsis;
	border-bottom: 1px solid;
	padding: 0 .5em;
	max-width: 0;
}

.column_n{
	width: 5vw;
	max-width: 30px;
}

th.nom_commun, th.nom_scientifique {
	width: 30%;
	max-width: 100px;
}

th.zone {
	width: 20%;
}

th.column_n {
	width: 5%;
}

th.column_cote {
	font-family: 'GillRegularMono';
	width: 10%;
}
td.column_cote {
	font-family: 'GillRegularMono';
}

td.nom_commun span, td.nom_scientifique span {
	width: 40px; 
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
td.column_n {
	font-family: GillBubble;
}

/* LEGENDE */
[data-mode*="galerie"] .table_section_legende,
main#article .table_section_legende,
main#plante .table_section_legende,
main#liste .table_section_legende
{
	display: none;
}

[data-mode*="galerie"] table.table_plantes {
	margin-bottom: 100px !important;
}

table.tableLegende .ruche:hover,
table.tableLegende .ruche.hover {
	background: orange
}
#layer300.active{ color: orange }

table.tableLegende .limites:hover,
table.tableLegende .limites.hover {
	background: green;
	color: white;
}
#layer200.active{ color: green }

table.tableLegende .chemin:hover,
table.tableLegende .chemin.hover {
	background: brown;
	color: white;
}
#layer101.active{ color: brown }
/* --------------------- GALERIE */
section#galerie{
	height:100%;
	width:100%;
	display: flex;
	flex-wrap: wrap;
	/* width: 50vw; */
	width: 100vw;
	margin-top: 90px;
}

section#galerie img{
	width: 100%;
	height: calc(50vh);
	object-fit: cover;
	border: solid 1px;
}

.image-container {
	position: relative;
	width: 50%;
	margin-bottom: -5px;
}


/* -- Captions -- */

.caption {
	position: absolute;
	bottom: 10px;
	left: 0;
	right: 0;
	text-align: center;
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
}

.image-container:hover .caption {
	opacity: 1;
}

.caption-hover{
	opacity: 1;
}


/* -- Text items -- */

.image-container.text {
	background: lightgrey;
	display: flex;
	justify-content: center;
	align-items: center;
	display: none;
}

.text-box{
	padding:var(--margin);
	text-align: center;
}

.text-box .number{
	font-family: GillBubble;
	font-size: var(--font-size-L);
}

.text-box h1{
	border: none;
	text-transform: none;
	font-weight: normal;
	font-style:normal;
	font-size: var(--font-size-M);
}



/* --------------------- FICHES */
section#plante {
	 overflow-y:scroll;
}
#plante #navElement,
#article #navElement {
	display: none;
}

.content-fiche {
	margin-top:calc(var(--margin)*1); 
}

.number{
	display: grid;
	line-height:90%;
	grid-column-start: 1;
	grid-column-end: 2;
	letter-spacing: -0.1em;
	padding-right: 20px;
}

.names{
	display: grid;
	grid-column-start: 2;
	grid-column-end: 6;
}

.specs{
	margin-top: calc(var(--margin) * 2);
	display:grid;
	grid-template-columns: 1fr 1fr 1fr;
	grid-gap:1em;
}

.desc{
	margin-top: calc(var(--margin) * 2);
}
section#fiche h1{
	text-transform: none;
	border-bottom: 0px; 
	font-size: var(--font-size-L);
	line-height:90%;
}

section#fiche h2{
	font-family: GillBubble;
	font-size: var(--font-size-XXL);
}

section#fiche h3 {
	font-family: GillReg;
	font-weight: normal;
	font-size: var(--font-size-L);
	line-height: 90%;
	font-style: normal; 
	text-decoration: underline;
}

section#fiche .desc h3 {
	padding-top: var(--margin);
}

section#fiche a {
	text-decoration:underline;
}

section#fiche h4 {
	/* font-size: var(--font-size-S); */

	font-size: 1.2em;
	font-weight: normal;
	text-align:left;
	padding-bottom: 0em;
	text-decoration: underline;
}

section#fiche .specs > div {
	margin-bottom: 1em;
}

section#fiche .specs p {
	text-align:left;
}

section#fiche p{
	word-break: keep-all;
	font-size: 1.2em;
}

section#fiche sup {
	font-size: 0.8vw;;
	vertical-align: super;
	position: relative;
	top: -0.01em;
	line-height:100%;
	z-index:-10;
}

.credits{
	font-size: var(--font-size-XS);
	font-size: 1em;
}

section#fiche .credits p {
	font-size: var(--font-size-XS);
}


section#fiche img{
	width: calc(100vw - var(--margin) * 2);
	margin-top:var(--margin);
	grid-column-start: 1;
	grid-column-end: 7;
}

section#fiche .desc img{
	margin-top:0;
	width:50%;
	border: solid black 10px;
}


@media only screen and (min-width: 1000px) {
	#plante #navElement,
	#article #navElement
	{
		display: block;
	}

	section#fiche img{
		width: calc(50vw - var(--margin) * 2);
		margin-top:var(--margin);
		grid-column-start: 1;
		grid-column-end: 7;
	}

	section#fiche p,
	section#fiche h4,
	section#fiche h1
	{

		word-break: keep-all;
		font-size: 1.2vw;
	}
	section#fiche h3{
		word-break: keep-all;
		font-size: 1.4vw;
	}
	section#fiche h3,
	section#fiche h4{
		margin-top: 1em;}
}

/*--------------------- ARTICLE ---------------------*/

section#fiche .footnote-ref{
	text-decoration:none;
}

section#fiche .footnote-back{
	text-decoration:none;
}

.content-article p  {
	padding-bottom:  calc(var(--margin)/2);
}

section.articles .names em{
	padding-bottom: calc(var(--margin)/2);
}

section#footnotes p {
	padding:0;
	margin:0;
	font-size: 1vw;
}


span.citation {
	text-align:right;
}

.citation p {
	padding-bottom: 0;
}

.content-article sup {
	font-size: 0.8vw;
	vertical-align: super;
	position: relative;
	top: -0.01em;
	line-height:100%;
	z-index:-10;
  }

.content-article blockquote {
	padding-left:calc(var(--margin)*2);
}

.content-article blockquote p+p {
	text-indent: 0;
}

.content-article {
	margin-top:calc(var(--margin)*2); 
}

section.articles{
	background: lightgrey;
}

section.articles header{
	background: lightgrey;
}

.content-article sub {
	padding-right:var(--margin);
}

.content-article #footnotes {
	border-top: solid 1px;
	font-size: var(--font-size-XS)
  }

  .content-article  #footnotes li {
	margin-top: var(--margin);
  }

  section#extras{
	padding-top: calc(var(--margin) * 2);
  }

  section#extras .titre{
	text-transform: uppercase;
  }

  section#extras .sous-titre{
	font-family: GillReg;
	font-weight: normal;
	font-size: 1.6vw;
	padding-top: var(--margin);
  }


  @media (min-width: 1000px) {
	#link-list {
	  pointer-events: none;
	  cursor: default;
	}

	section#fiche a#link-list{
		text-decoration: none;
	}
  }


@media (max-width: 1000px) {

	section#footnotes p {
		padding:0;
		margin:0;
		font-size: 11px;
	}
	
  }


/* --------------------- INFO -----------------------*/

section#infos{
	height:100%;
	width:100%;
	position:relative;	
	padding-top: calc(var(--margin) / 2);
}

section#infos h3 {
	margin-bottom: .5em;
}

section#infos h3+h3{
	text-indent: 1em;
}

#infos div{
	margin: var(--margin);
}

.infos-generales i{
	font-family: GillReg ;
	font-style: italic;
}

#infos-logo p{
	margin-bottom: var(--margin);
	font-size:11px;
}

#infos-logo img#logo-mn{
	width:30%;
}

#infos-logo img#logo-besac{
	width:20%;
}


@media (min-width: 1000px) {

section#infos{

	display: grid; 
	grid-template-columns: repeat(2, 1fr);
}

#infos .infos-generales{
	display:grid;
	grid-column:span 2;
	margin-top: 2em;
}


}


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

	/* -- Structure-- */
	.specs{
		grid-template-columns: 1fr 1fr;
	}

}


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

	/* -- Structure-- */
	.specs{
		grid-template-columns: 1fr;
	}
}

* {-webkit-tap-highlight-color: transparent;}

