/* Copyright (C) 2025
 * Calmel, Blaise (1)
 * Héraut, Louis (1) <louis.heraut@inrae.fr>
 * Vidal, Jean-Philippe (1) <jean-philippe.vidal@inrae.fr>
 *
 * (1) INRAE, UR RiverLy, Villeurbanne, France.
 *
 * This file is part of MEANDRE-TRACC.
 *
 * MEANDRE-TRACC is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * MEANDRE-TRACC is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with MEANDRE-TRACC.
 * If not, see https://www.gnu.org/licenses/.
 */


body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    background-color: #F5F5F5;
    color: #060508;
    font-family: "Lato", sans-serif;
    font-size: 0.9rem;

    flex: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}


a {
    color: #060508;
    text-decoration: none;
}


p {
    margin: 0rem;
}
p.top-space {
    margin-top: 0.4rem;
}
p.top-big-space {
    margin-top: 0.8rem;
}
p.bottom-space {
    margin-bottom: 0.4rem;
}
p.bottom-big-space {
    margin-bottom: 0.8rem;
}

.chain_block {
    flex-wrap: wrap;
    flex-direction: column;
}
.chain_block_label {
    font-weight: bold;
    color: #89898a;
}

.bunch {
    display: flex;
    flex-wrap: wrap;
}
.bunch.nowrap {
    flex-wrap: nowrap;
}
.bunch.column {
    flex-direction: column;
}
.bunch.row {
    flex-direction: row;
}
.bunch.row-small-gap {
    row-gap: 0.5rem;
}
.bunch.row-gap {
    row-gap: 1rem;
}
.bunch.row-big-gap {
    row-gap: 2rem;
}
.bunch.column-small-gap {
    column-gap: 0.5rem;
}
.bunch.column-gap {
    column-gap: 1rem;
}
.bunch.column-big-gap {
    column-gap: 2rem;
}
.bunch.cross-baseline {
    align-items: last baseline;
}
.bunch.cross-center {
    align-items: center;
}
.bunch.cross-end {
    align-items: end;
}
.bunch.center {
    justify-content: center; 
}
.bunch.space-between {
    justify-content: space-between; 
}
.bunch.end {
    justify-content: end; 
}
.bunch.space {
    margin-top: 0.1rem;
    margin-bottom: 0.4rem;
}
.bunch.left-border {
    border-left: 3px solid #89898a;
}

span.top-space {
    margin-top: 0.4rem;
}
span.align-start {
    text-align: start;
}
span.align-end {
    text-align: end;
}

button {
    font: inherit;
    border: none;
    min-width: 2rem;
    padding: 0 0.4rem;
    margin: 0;
    background-color: transparent;
    cursor: pointer;
    color: #89898a;
    touch-action: manipulation;
    position: relative;
    display: inline-flex;
    flex-wrap: nowrap;
    /* align-items: center; */
}
button.selected {
    color: #060508;
    font-weight: bold; 
}

button:hover {
    font-weight: normal;
    color: #060508;
}


button.selected .notif,
button:hover .notif {
    position: absolute;
    top: 0.25rem;
    right: -0.05rem;
    transform: translateY(-50%);
    height: 0.6rem;
    width: 0.6rem;
    border-radius: 1rem/1rem;
    background: red;
    border: solid 2px #ffffff;
    color: white;
    display: inline-block;
}

button.chain_block_button {
    margin-top: 0.2rem;
    margin-bottom: 0rem;
    padding-left: 0rem;
    padding-right: 0rem;
    min-width: auto;
    white-space: nowrap;
    text-align: center;
    width: fit-content;
}
button.chain_block_button {
    font-weight: bold;
    color: #89898a;
}
button.chain_block_button:hover {
    font-weight: normal;
    color: #89898a;
}



.reduce-space {
    margin-left: -0.15rem; /* Adjust the margin as needed to reduce the space */
    margin-right: -0.15rem; /* Adjust the margin as needed to reduce the space */
}
.material-icons,
.material-icons-outlined,
.material-icons-round {
    color: #302f2f;
}

.material-icons.inline-front,
.material-icons-outlined.inline-front,
.material-icons-round.inline-front {
    font-size: 0.9rem;
    padding-right: 0.1rem;
}

.material-icons.inline-back,
.material-icons-outlined.inline-back,
.material-icons-round.inline-back {
    font-size: 0.9rem;
    margin-left: 0.1rem;
}

.material-icons-outlined.hide_arrow {
    color: transparent;  /* couleur fixe */
}


button .material-icons,
button .material-icons-outlined {
    color: #89898a;
}
button.selected .material-icons,
button.selected .material-icons-outlined {
    color: #060508;
    font-weight: bold;
}
button:hover .material-icons,
button:hover .material-icons-outlined {
    color: #060508;
    font-weight: normal;
}

.vert {
    color: #569A71 !important;
    font-weight: 600 !important;
}
.vert.border {
    border: solid 3px #569A71;
    border-radius: 100%;
    padding: 0.05rem;
}
.jaune {
    color: #EECC66 !important;
    font-weight: 600 !important;
}
.jaune.border {
    border: solid 3px #EECC66;
    border-radius: 100%;
    padding: 0.05rem;
}
.orange {
    color: #E09B2F !important;
    font-weight: 600 !important;
}
.orange.border {
    border: solid 3px #E09B2F;
    border-radius: 100%;
    padding: 0.05rem;
}
.violet {
    color: #791F5D !important;
    font-weight: 600 !important;
}
.violet.border {
    border: solid 3px #791F5D;
    border-radius: 100%;
    padding: 0.05rem;
}


.top-section {
    margin-top: 0rem; 
}
h1 {
    font-family: "Raleway", sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    margin-top: 0rem;
    margin-bottom: 0rem;
    display: flex;
    align-items: center;
}

h2 {
    font-family: "Raleway", sans-serif;
    font-weight: 400;
    font-size: 1.4rem;
    margin-top: 1rem;
    margin-bottom: 0rem;
}

h3 {
    font-family: "Raleway", sans-serif;
    font-weight: 200;
    font-size: 1.2rem;
    margin-top: 0.7rem;
    margin-bottom: 0rem;
}


#context-gallery {
    padding: 1rem;
}

#container-gallery-map {
    height: calc(100vh - 3rem);
    width: 100vw;
    overflow-x: hidden;
    overflow-y: auto;

    transition: all 0.3s ease;

    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#container-gallery-center {
    display: flex;
    align-items: center;
    
    flex-grow: 1;
}

#container-gallery {
    padding-top: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    display: flex;
    transition: all 0.3s ease;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}


#container-map {    
    position: relative;
    overflow: hidden;
    display: flex;
    /* justify-content: start; */
    align-items: center;
    gap: 1rem;

    /* height: 100%; */
    /* width: 100%; */
    max-width: calc((100vh - 23rem) * 3);
}

.map {
    position: relative;
    aspect-ratio: 1;
    max-width: calc((100vw - 4rem - 4px) / 3);
    max-height: calc((100vw - 4rem - 4px) / 3);

    /* height: 100%; */
  
    flex-grow: 1;
}


.map-bunch {
    display: block;
    flex-grow: 1;
}




.separator {
    display: block;
    width: 2px;
    z-index: 10;
    height: 90%;
    
    background-color: #8d8d8d;
    border-radius: 1rem;

    /* flex-grow: 1; */
    max-height: calc(0.9 * ((100vw - 4rem - 4px) / 3));
}

.map-space {
    flex-grow: 1;
}


.sub-container-gallery-info {
    position: relative;
    width: calc(100% * 3 / 8);
    height: calc(95% - 2.3rem);
    top: 0.25rem; 
    padding: 0.25rem 0.25rem;
}

.map-color {
    position: absolute;
    top: 1rem;
    left: 1rem;   
}



.sub-container-lower-info {
    position: relative;
    width: calc(10vw);
    height: calc(100%);
    top: 1rem;
}


.map-title-overlay {
    position: absolute;
    top: 10px;
    left: 3%;
    background: rgba(255, 255, 255, 1);
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 20;
    font-family: "Raleway", sans-serif;
    font-weight: 500;
    font-size: 1.4rem;
    cursor: pointer;
    white-space: nowrap;
    transition: box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: visible;

    display: flex;
    /* flex-wrap: nowrap; */
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.map-title-overlay.phone {
    display: none;
    position: relative;
    top: unset;
    left: unset;
    white-space: wrap;
    margin-top: 0.5rem;
    margin-left: 1rem;
    margin-right: 1rem;
    overflow: unset;
    z-index: unset;
    align-items: start;
    justify-content: center;
    box-shadow: none;
    width: fit-content;
}
.map-title-overlay_subtitle {
    font-size: 1rem;
}

.map-title-overlay_content,
.map-title-overlay_expanded-content {
    position: relative;
    white-space: nowrap;
}
.map-title-overlay_content {
    display: block;
}
.map-title-overlay_expanded-content {
    display: none;
}
.map-title-overlay:hover .map-title-overlay_content {
    display: none;
}
.map-title-overlay:hover .map-title-overlay_expanded-content {
    display: block;
}





#action-bar {
    position: fixed;
    bottom: 0.5rem;
    left: 1rem;
    z-index: 1;
}

#action-zoom-plus {
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    z-index: 1;
}
#zoom-plus {
    border-radius: 8px;
}

#action-zoom-minus {
    position: absolute;
    top: 2rem;
    left: 1rem;
    z-index: 1;
}
#zoom-minus {
    border-radius: -8px;
}

#screenshot, #export {
    position: relative;
    color: #060508;
    font-size: 1rem;
    border: 3px solid #ffffff;
    background-color: #ffffff;
    padding: 0.2rem 0.3rem;
    overflow: hidden;
    width: fit-content;
    height: fit-content;
}
#screenshot:hover, #export:hover {
    color: #70757A;
}
#screenshot {
    border-radius: 8px 0px 0px 8px;
}
#export {
    box-shadow: 0 6px 10px 2px rgba(60, 64, 67, 0.25);
    border-radius: 8px;
}



.panel-hover {
  display: none;
  position: absolute;
  bottom: 0.5rem;
  left: 4rem;
  color: #060508;
  font-size: 1rem;
  border: 3px solid #ffffff;
  background-color: #ffffff;
  padding: 0.2rem 0.3rem;
  overflow: hidden;
  border-radius: 8px;
  width: fit-content;
  height: fit-content;
}

.panel-hover-content {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    color: #89898a;
    margin-bottom: 0.1rem;
}

#panel-hover_basin {
    bottom: 0.5rem;
    left: 0.5rem;
    background-color: transparent;
    border: 0px;

    padding-top: 0rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    padding-bottom: 0.1rem;	
    max-width: 12rem;
}
#panel-hover-content_basin {
    margin-bottom: 0rem;
}
   
#panel-hover_code {
    position: fixed;
    bottom: 4.5rem;
    left: 1rem;
}
#panel-hover_description {
    position: fixed;
    bottom: 0.5rem;
    left: 3.5rem;
}
#panel-hover_secteur {
    position: fixed;
    bottom: 2.5rem;
    left: 1rem;
}


#button-explorer_container {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

#button-explorer {
    background-color: transparent;
    transition: width 0.3s ease;

    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    background-color: transparent;
    color: #060508;
    cursor: pointer;
    height: auto;

    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    
}
#button-explorer .material-icons,
#button-explorer .material-icons-outlined {
    color: #060508;
}
#button-explorer:hover,
#button-explorer:hover .material-icons-outlined {
    color: #70757A;
}



@media (max-width: 768px) {
    #container-gallery-map {
	height: calc(100vh - 6rem);
    }
}


@media (max-width: 90rem) {

    #container-gallery-center {
	flex-grow: unset;
    }
    
    #container-gallery {
	position: relative;
    }

    .map-title-overlay.pc {
	display: none;
    }
    .map-title-overlay.phone {
	display: flex;
    }


    #container-map {
	overflow: unset;
	flex-direction: column;

	align-items: unset;
	
	/* flex-grow: 1; */
	
	/* height: unset; */
	max-width: unset;
    }

    .map {
	max-width: unset;
	max-height: unset;
	height: 70vh;
	flex-grow: unset;
	
	/* max-width: 70%; */
	/* max-height: 70%; */
    }

    .map-bunch {
	display: flex;
	flex-direction: column;
	align-items: center;
	row-gap: 1rem;
    }

    .separator {
	display: none;
    }


    
}



