/* @Yolia Charpentier */

/* import */
@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:ital,wght@0,900;1,900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* root ////////////////// */

:root {
    /* colors */
    --black: #242929;
    --red: #AD243F;
    --d-red: #911913;
    --blue: #4573B1;
    --d-blue: #465194;
    --green: #6F892E;
    --d-green: #3C652A;
    --yellow: #F4B62E;
    --d-yellow: #E89001;

    --detail: #68787A;
    --light: #F4F6F6;
    --comp2: #527B82;
    --comp1: #C8D4D0;

    /* font */
    --font-big: 28px;
    --font-med: 25px;
    --font-reg: 16px;
    --font-small: 12px;
    --font-smaller: 10px;

    /* other */
    --gap-huge: 120px;
    --gap-bigger: 85px;
    --gap-big: 60px;
    --gap-med: 30px;
    --gap-reg: 15px;
    --gap-small: 10px;
    --gap-smaller: 5px;

}

/* navbar /////////////////// */

nav {
    display: grid;
    grid-template-columns: 200px 1fr;
    grid-template-rows: auto 50px;
    grid-gap: var(--gap-small);
    width: 100vw;
    max-width: 100%;
    grid-template-areas:
        "logo parte"
        "logo navb"
    ;
    margin-bottom: var(--gap-med);
    margin-top: var(--gap-small);
}

#nav-main {
    grid-area: navb;
    width: 100%;
    display: flex;
    justify-content: space-around;
    margin: 0;
    padding: 0;
}

.style-none {
    list-style: none;
}


#part1 {
    grid-area: parte;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: end;
}

.imgNav-resize{
    width: 100px;
    height: auto;
}

.parent-Container {
    grid-area: logo;
    width: auto;
    height: auto;
}

#svg2 {
    margin-left: 40px;
    width: 70%;
    height: 100%;
}

.nav-li {
    font-family: "Libre Franklin", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-size: x-large;
    text-underline-offset: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

a.nav-all:link {
    color: var(--black);
}

a.nav-all:visited {
    color: var(--black);
}


/*deroulant ////////////////////*/

#green-li {
    text-decoration: underline #6F892E 5px;
}

#green-li:hover {
    color: var(--d-green);
}

#yell-li {
    text-decoration: underline #F4B62E 5px;
}

#yell-li:hover {
    color: var(--d-yellow);
    cursor: default;
}


#red-li {
    text-decoration: underline #AD243F 5px;
}

#red-li:hover {
    color: var(--d-red);
    cursor: default;
}

#blue-li {
    text-decoration: underline #4573B1 5px;
}

#blue-li:hover {
    color: var(--d-blue);
    cursor: default;
}

/*sous deroulant /////////////////*/

.sous {
    visibility: hidden;
    box-shadow: 0px 1px 2px #242929;
    background-color: white;
    width: fit-content;
    height: auto;
    z-index: 10;
    align-self: center;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--gap-smaller);
    border-radius: var(--gap-smaller);
    margin-top: var(--gap-small);
    padding: var(--gap-smaller);
}

.sous li {
    height: min-content;
    width: fit-content;
    display: flex;
    justify-content: center;
    padding-block: var(--gap-smaller);
}

.sous li a {
    font-weight: bolder;
    font-size: var(--font-small);
}

nav>ul li:hover .sous {
    visibility: initial;
}

/* pour l'accessibilité + fonctionne en tant que onClick */

nav>ul li a:focus+.sous {
    visibility: inherit;
}


.li-li {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: var(--font-smaller);
}

a.yell-li-li:hover {
    color: var(--d-yellow);
}

a.red-li-li:hover {
    color: var(--red);
}

a.blue-li-li:hover {
    color: var(--blue);
}

/* carousel @splide Naotoshi Fujita*/

.splide__slide img {
    width: 100%;
    height: auto;
}

#image-carousel {
    margin-bottom: var(--gap-big);
    position: relative;
}

.splide__toggle {
    margin: 0;
    position: absolute;
    left: 50%;
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    padding: 6px;
    border-radius: var(--gap-small);
    width: 3%;
    height: auto;
    background-color: var(--black);
    border: solid 5px rgb(255, 255, 255);
}

#svg1 {
    margin: 0;
    width: 100%;
    height: 100%;
}

/* body */

html {
    scroll-behavior: smooth;
}

a:link {
    text-decoration: none;
}

body {
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    color: var(--black);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0px;
}

#container {
    margin-inline: var(--gap-huge);
}

p {
    margin: 0;
    padding: 0;
}

/* plan du site */

#plan-site {
    margin-inline: var(--gap-big);
}

ul {
    margin: 0;
    padding: 0;
}

.smal-list li {
    font-weight: 900;
    margin-bottom: var(--gap-small);
    padding: 0px;
    color: var(--detail);
}

#nav-util li {
    list-style-type: none;
    margin-bottom: var(--gap-smaller);
}

/* text colors ///////////////*/

.txt-red {
    color: var(--red);
}

.txt-blue {
    color: var(--blue);
}

.txt-green {
    color: var(--green);
}

.txt-yellow {
    color: var(--yellow);
}

.txt-comp1 {
    color: var(--comp1);
}

.txt-comp2 {
    color: var(--comp2);
}

.txt-det {
    color: var(--detail);
}

.txt-light {
    color: var(--light);
}

.green-bord {
    border-top: solid 3px var(--green);
}

.yell-bord {
    border-top: solid 3px var(--yellow);
}

.comp2-bord {
    border-top: solid 3px var(--comp2);
}

.red-bord {
    border-top: solid 3px var(--red);
}

.blue-bord {
    border-top: solid 3px var(--blue);
}

/* texte ///////////////////// */

h1{
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    margin-block: var(--gap-reg);
    font-size: x-large;
    font-weight: bold;
}

h2 {
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    padding-top: var(--gap-reg);
}

h3 {
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
}

h4 {
    margin-block: var(--gap-reg);
}

h5 {
    margin: 0;
}

.txt-tldr {
    color: var(--comp2);
    text-align: center;
    margin-top: var(--gap-small);
    margin-bottom: var(--gap-big);
}

.center {
    text-align: center;
}

/*lien dans du texte*/

a.innerLink {
    color: #4573B1;
}

/*paragraphe*/

.pSing {
    margin-block: var(--gap-med);
}

.pTop {
    margin-top: var(--gap-med);
    margin-bottom: var(--gap-small);
}

.pMid {
    margin-block: var(--gap-small);
}

.pBottom {
    margin-top: var(--gap-small);
    margin-bottom: var(--gap-med);
}

/*403 & 500*/

#error {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: var(--comp1);
}

/* utilisation */

figure {
    display: flex;
    align-items: center;
    flex-direction: column;
    margin-block: var(--gap-med);
}

figure img {
    width: 80%;
    height: auto;
}

figcaption {
    color: var(--detail);
    font-size: small;
    max-width: 100ch;
    text-align: center;
    margin-top: var(--gap-small);
}

.tutoImg{
    box-shadow: 5px 5px 5px rgba(82, 123, 130, 0.2);
}

/* formulaire */

form#pre {
    /*recherche precise + station*/
    width: 100%;
    height: auto;
    margin-bottom: var(--gap-big);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: auto auto;
    grid-template-areas:
        "label1 input1 label2 input2 subm1"
    ;
}

label {
    display: flex;
    justify-content: center;
}

.name-label {
    font-size: larger;
    font-weight: bold;
}

#labelCdo {
    grid-area: label1;
    margin: 0;
}

#nomCourdo {
    grid-area: input1;
}

#labelZoCom {
    grid-area: label2;
    margin: 0;
}

#nomZoCom {
    grid-area: input2;
}


#buttonInput1 {
    grid-area: subm1;
    width: fit-content;
    justify-self: center;
    border-radius: var(--gap-smaller);
    border-color: var(--comp1);
    background-color: var(--light);
}

/*select*/

.textInput {
    width: 100%;
    height: auto;
    border-radius: var(--gap-smaller);
    border: 2px var(--comp1) solid;
    background-color: var(--light);
    color: #242929;
}


form#gen {
    /*recherche générale*/
    width: 100%;
    height: auto;
    margin-bottom: var(--gap-big);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: auto auto;
    grid-template-areas:
        "label3 input3 label4 input4 subm2"
    ;
}

#labelSurf {
    grid-area: label3;
    margin: 0;
}

#nomSurf {
    grid-area: input3;
}

#labelPKH {
    grid-area: label4;
    margin: 0;
}

#nomPKH {
    grid-area: input4;
}


select {
    border-radius: var(--gap-smaller);
    border: 2px var(--comp1) solid;
    background-color: var(--light);
    color: #242929;
}

#buttonInput2 {
    grid-area: subm2;
    width: fit-content;
    justify-self: center;
    border-radius: var(--gap-smaller);
    border-color: var(--comp1);
    background-color: var(--light);
}


/* résultat station */

.affichStat {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--gap-big);
}

article {
    padding-inline: var(--gap-reg);
    border: 2px solid var(--comp1);
    background-color: white;
    border-radius: var(--gap-smaller);
    width: min-content;
}

div.contArticle {
    display: grid;
    grid-template-columns: 150px 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "comm btn"
        "cdhy btn"
    ;
    column-gap: var(--gap-med);
    padding-block: var(--gap-reg);
}

.commuStat {
    grid-area: comm;
    white-space: nowrap;
    align-self: center;
}

.cdHyStat {
    grid-area: cdhy;
    align-self: center;
}

.lienHydro {
    grid-area: btn;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}


.btnHydro {
    padding-inline: var(--gap-reg);
    padding-block: var(--gap-small);
    border-color: var(--comp2);
    background-color: var(--comp2);
    border-radius: var(--gap-smaller);
    color: white;
}

@media (hover: hover) {

    /* hover seulement sur les non-touch screens */

    article:hover {
        box-shadow: 5px 5px 2px 1px rgba(82, 123, 130, 0.2)
    }

    article:hover>.cataMap {
        box-shadow: 0px 0px 0px 2px var(--comp2);
        border-radius: 5px;
    }

    .btnHydro:hover {
        background-color: #3a575c;
        border-color: black;
        cursor: pointer;
    }

    .show-more-btn:hover {
        color: var(--red);
    }

    #buttonInput1:hover {
        border-color: var(--comp1);
        background-color: var(--comp1);
    }

    #buttonInput2:hover {
        border-color: var(--comp1);
        background-color: var(--comp1);
    }

    a.innerLink:hover {
        color: var(--d-yellow);
    }
}

/* résultat débit caractéristiques */

/* bouton afficher +/-*/

.show-more-btn {
    display: flex;
    justify-content: center;
    margin: auto;
    padding-block: var(--font-med);
    cursor: pointer;
    color: var(--comp2);
    white-space: nowrap;
    transition: color 200ms ease-in-out;
    border: 0;
    font-size: medium;
    font-weight: bold;
    background: transparent;
}


.hidden {
    display: none;
}

/*table resultat*/

.table-vide {
    display: none;
}

table {
    table-layout: auto;
    border-spacing: 0;
    width: 100%;
}

th {
    color: var(--comp2);
    font-family: "Montserrat", sans-serif;
    border-bottom: var(--light) solid 2px;
    padding: var(--gap-small);
}

td {
    text-align: center;
}

td.idPoint {
    padding: 10px;
}

.titreCard {
    width: 300px;
}

.overScroll {
    margin-top: var(--gap-med);
    margin-bottom: var(--gap-big);
    border: var(--light) 2px solid;
}

article ul {
    margin-top: var(--gap-reg);
}

.qmna2 {
    background-color: #DB4437;
    color: white;
}

.qmna5 {
    background-color: #4285F4;
    color: white;
}

.qmna10 {
    background-color: #F4B400;
    color: white;
}

/* map @leaflet*/

#map {
    width: 100%;
    height: 600px;
    z-index: 10;
}

.cataMap {
    height: 200px;
    width: 100%;
}

.leaflet-popup-content {
    width: 100%;
    height: auto;
    margin: var(--gap-small);
    display: flex;
    flex-direction: column;
}

.leaflet-popup-content h4, .leaflet-popup-content p {
    margin-block: var(--gap-smaller);
    margin-inline: var(--gap-small);
}

.leaflet-popup-content button{
    width: 100%;
}

/* footer */

footer {
    width: 100%;
    margin-top: auto;
    padding-top: var(--gap-huge);
    display: grid;
    gap: var(--gap-reg);
    grid-template-columns: 300px 225px 1fr 375px;
    grid-template-rows: auto 40px;
    grid-template-areas:
        "imgbot partner navbot plus "
        "at at at at"
    ;
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-size: var(--font-small);
}

.nav-bot {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0px;
}

a.nav-hov:hover {
    color: var(--detail);
}

a.green-li-btm:hover {
    color: var(--d-green);
}


#part2 {
    grid-area: imgbot;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

#nav-bot-img {
    width: 80%;
    height: auto;
}

#nav-bot-part {
    grid-area: partner;
    width: fit-content;
    margin: var(--gap-reg);
    white-space: nowrap;
}

#nav-bot-main {
    grid-area: navbot;
    display: flex;
    flex-direction: row;
    display: flex;
    justify-content: space-around;
    align-self: center;
    list-style: none;
    gap: var(--gap-med);
}

#nav-bot-plus {
    grid-area: plus;
}

a#nav-botm-green:link {
    color: var(--comp2);
}

a#nav-botm-green:visited {
    color: var(--comp2);
}

a#nav-botm-green:hover {
    color: var(--d-blue);
}

#nav-bot-p {
    width: 100%;
    font-weight: 300;
    grid-area: at;
    background-color: var(--black);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0px;
}

.small-list li {
    font-weight: 300;
    font-size: var(--font-small);
    list-style: none;
    margin-top: var(--gap-small);
    padding: 0px;
    color: var(--detail);
}

/* display none */

#nav-bot-main-exp {
    display: none;
}

#nav-main-exp {
    display: none;
}

#titre {
    display: none;
}

/* media queries */
/* pour écrans plus petits que 1140px (jusqu'à 880px) */

@media screen and (max-width: 1440px) {

    nav {
        grid-template-columns: 100px 1fr;
        grid-template-rows: auto 50px;
        margin-bottom: var(--gap-reg);
    }

    /*body*/

    #container {
        margin-inline: var(--gap-bigger);
    }

    #svg2 {
        margin-left: 20px;
        width: 100%;
    }

    .imgNav-resize{
        width: 65px;
    }

    /**/

    #g50,
    #g54,
    #g58,
    #g62,
    #g66,
    #g70,
    #g74,
    #g78,
    #g82,
    #g86,
    #g90,
    #g94,
    #g98,
    #g102,
    #g106,
    #path110,
    #g112,
    #g116,
    #g120,
    #g124,
    #g128,
    #g132,
    #path136,
    #g138,
    #g142,
    #g146{
        display: none;
    }

    /**/

    nav li a{
        font-size: large;
    }

    h1{
        font-size: var(--font-reg);
        font-weight: 900;
    }

    /*formulaire*/
    form {
        display: flex !important;
        justify-content: space-around;
        align-items: center;
    }

    label {
        font-size: small;
    }

    select {
        width: 22%;
    }

    /*carousel*/

    .splide__toggle {
        width: 3.8%;
    }

    /*utilisation*/

    figcaption {
        max-width: 80ch;
    }

    /* debits caracteristiques */

    table {
        width: 150%;
    }

    /*station*/

    article:focus {
        box-shadow: 0;
    }

    article:focus>.cataMap {
        box-shadow: 0;
        border-radius: 0;
    }

    /*footeer*/

    footer {
        grid-template-columns: 300px 1fr 1fr;
        grid-template-rows: auto auto 50px;
        grid-template-areas:
            "imgbot navbot navbot"
            "imgbot partner plus"
            "at at at"
        ;
    }

    .small-list {
        padding-left: var(--gap-smaller);
    }

    #nav-bot-img {
        width: 90%;
        height: auto;
    }

    #nav-bot-plus {
        margin-inline-end: var(--gap-small);
    }

    #nav-bot-main {
        padding-inline: 0;
        padding-bottom: 10px;
        margin-right: var(--gap-reg);
    }
}

/* pour écrans plus petits que 890px (jusqu'à 600px) */

@media screen and (max-width: 890px) {

    nav {
        display: flex;
        margin-top: 0;
        padding-block: var(--gap-smaller);
    }


    .nav-li {
        font-weight: 500;
        font-size: medium;
    }

    .sous {
        padding-inline: var(--gap-smaller);
        padding-bottom: var(--gap-smaller);
    }

    .li-li {
        font-size: var(--font-smaller) !important;
    }

    #svg2 {
        margin-right: 20px;
        width: 80%;
        float: left;
    }

    /*body*/

    .parent-Container {
        max-width: 120px;
        height: auto;
    }

    body {
        font-optical-sizing: auto;
        font-weight: 500;
        font-size: var(--font-small);
        font-style: normal;
    }

    #container {
        margin-inline: var(--gap-med);
    }

    .name-label {
        font-size: medium;
        font-weight: normal;
    }

    #plan-site {
        margin-inline: 0;
    }

    #part1 {
        display: none;
    }

    /*utilisation*/

    figure img {
        width: 100%;
        height: auto;
    }

    #nav-util {
        display: none;
    }

    /* debits caracteristiques */

    table {
        width: 200%;
    }

    /*station*/

    article ul {
        grid-template-columns: 100px 1fr;
        column-gap: var(--gap-small);
    }

    .lienHydro {
        width: min-content;
        justify-self: end
    }

    /*footer*/

    footer {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto 40px;
        gap: var(--gap-small);
        grid-template-areas:
            "navbot navbot"
            "imgbot partner"
            "plus plus"
            "at at"
        ;
    }

    .nav-bot {
        font-weight: 500;
        font-size: smaller;
    }

    #nav-bot-img {
        width: 60%;
        height: auto;
    }

    #nav-bot-plus {
        text-align: center;
    }

    #nav-bot-main {
        display: none;
    }

    #nav-bot-part {
        margin-top: var(--gap-reg);
        padding: 0;
        width: auto;
        height: auto;

        display: flex;
        align-items: center;
    }

    #nav-bot-plus {
        padding: 0;
    }

    #image-carousel {
        display: none;
    }

    /*///////////////// déroulant footer*/

    #nav-bot-main-exp {
        grid-area: navbot;
        display: block;
    }

    #expand-toggle {
        display: none;
    }

    .expandable {
        visibility: collapse;
        background: #ddd;
        position: absolute;
        z-index: 50;
    }

    .expandable li {
        padding-block: var(--gap-small);
        padding-left: var(--gap-small);
        font-weight: bold;
        font-size: smaller;
    }

    i {
        margin-inline-start: var(--gap-small);
    }

    #expand-btn {
        display: flex;
        padding: 10px var(--gap-med);
        background-color: var(--light);
        border-top: 1px solid var(--comp1);
    }

    #expand-btn:hover {
        cursor: pointer;
    }

    #expand-toggle:checked~.expandable {
        visibility: visible;
        position: relative;
    }

    /*///////////////// fin déroulant footer*/

}

/* pour écrans plus petits que 600px */

@media screen and (max-width: 600px) {

    h1{
        font-size: medium;
    }

    #titre {
        display: flex;
        flex-direction: column;
        justify-content: end;
        align-items: center;
    }

    #titre>* {
        margin: 0;
        padding: 0;
    }

    #titre p {
        font-size: smaller;
    }

    nav {
        justify-content: space-around;
        align-items: center;
        margin-bottom: var(--gap-med);
    }

    /*///////////////// déroulant header*/

    #nav-main {
        display: none;
    }

    #nav-main-exp {
        display: block;
    }

    #main-expand-toggle {
        display: none;
    }

    #exp-top {
        margin-top: calc(var(--gap-med) - var(--gap-smaller));
        display: none;
    }

    nav li a{
        font-size: smaller;
    }

    #main-expand-btn {
        display: flex;
        padding: 0;
    }

    #main-expand-btn:hover {
        cursor: pointer;
    }

    #main-expand-toggle:checked~.expandable {
        display: block;
        visibility: visible;
        position: absolute;
        right: 0;
        width: 100%;
    }

    /*///////////////// fin déroulant header*/
    /* vecteur à enlever */

    #g150,
    #g154,
    #g158,
    #g162,
    #g166,
    #g170{
        display: none;
    }

    /*body*/

    .parent-Container {
        max-width: 70px;
        height: auto;
    }

    #svg2 {
        margin-left: var(--gap-smaller);
        width: 80%;
    }

    body {
        font-weight: 500;
        font-size: small;
    }

    /*utilisation*/

    figure {
        display: none;
    }

    /*formulaires*/

    form {
        display: flex !important;
        flex-direction: column;
        gap: var(--gap-reg);
        align-items: start;
    }

    select {
        width: 100%;
    }

    table {
        width: 250%;
    }

    /*cartes*/

    .cataMap {
        height: 200px;
        width: 300px;
    }

    .leaflet-popup-content {
        width: 50%;
    }

    /*footer*/

    #nav-bot-img {
        width: 90%;
        height: auto;
    }

    #svg1 {
        margin-left: 20;
        width: 100%;
        height: auto;
    }

    footer {
        grid-template-rows: auto auto auto 30px;
    }

    .nav-bot li {
        padding-block: var(--gap-small);
    }

    #nav-bot-part {
        margin-top: var(--gap-smaller);
    }

    #nav-bot-plus {
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: space-evenly;
        flex-wrap: wrap;
    }

    #nav-bot-plus li {
        padding-inline: var(--gap-med);
    }

    #nav-bot-p {
        font-size: smaller;
    }
}