:root {
    --color-primary: #399C90;
    --color-secondary: #32A56B;
    --color-black: rgb(7, 50, 45);
    --color-white: #E0FFF3;
    --color-orange: #FFD66E;
    --margin: 16px;
    --gutter: 32px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    font-family: "Sen", sans-serif;
    margin: 0;
    color: var(--color-black);
    min-height: 100vh;
    flex-direction: column;
    position: relative;
    background-color: var(--color-white);
}

main {
    flex: 1;
}

p {
    margin: 0;
}

a {
    text-decoration: none;
    padding: 0;
    margin: 0;
    color: var(--color-black);
}

button {
    border: none;
    cursor: pointer;
}

ul,
ol {
    padding: 0;
    margin: 0;
    list-style-type: none;
}

figure {
    margin: 0;
}

h1,
h2,
h3,
h4,
h4 {
    margin: 0;
}

h1 {
    font-size: 50px;
}

h2 {
    font-size: 40px;
}

h3 {
    font-size: 32px;
}

.titre-principal,
.encart {
    font-family: "Noto Serif", serif;

}

.titre-principal,
.titre {
    font-weight: 700;
}

.titre {
    font-size: 40px;
}

.sous-titre {
    font-size: 32px;
}

.titre,
.sous-titre,
.menu,
.corps,
.legende {
    font-family: "Sen", sans-serif;
}

.sous-titre,
.encart {
    font-weight: 600;
}

.encart {
    font-size: 25px;
}


.menu {
    font-weight: 500;
    font-size: 1.25rem;
}

.corps {
    font-weight: 400;
    font-size: 1rem;
}

.legende {
    font-weight: 400;
    font-style: italic;
}

.bold {
    font-weight: 700;
}

div#site-header {
    padding: var(--margin);
    background: var(--color-black);
    color: var(--color-white);
}

#site-header .help-wrapper {
    color: var(--color-black);
    position: fixed;
    right: var(--margin);
    top: var(--margin);
    z-index: 1003;
}

.help-wrapper ol {
    list-style-type: disc;
    padding-left: var(--gutter);
}

#site-title {
    text-align: left;
    margin-top: 72px;
}

/* ------------------------------------------------------------------------------ */
/* NAV */
/* ------------------------------------------------------------------------------ */

nav {
    z-index: 1002;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    width: 50%;
    margin: auto;
    padding: 0 var(--gutter);
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);

    /* border-bottom: 3px solid rgb(255, 255, 255, .2); */
    border-radius: 40px;
    -webkit-box-shadow: 0px 0px 15px -3px rgba(13, 27, 42, 0.75);
    box-shadow: 0px 0px 15px -3px rgba(13, 27, 42, 0.75);
    background-color: var(--color-white);
    /* backdrop-filter: blur(10px); */

}


nav figure img {
    height: 36px;
    vertical-align: bottom;
}

nav ul#navLinks {
    display: flex;
    flex-direction: row;
    gap: var(--gutter);
}

nav ul#navLinks li {
    vertical-align: bottom;
}

nav ul#navLinks a {
    color: var(--color-black);
    transition: color .3s ease-in;
    padding: 5px;
}

nav ul#navLinks a:hover {
    color: var(--color-secondary);
}

.burger {
    display: none;
}

.map-container,
.carte-container,
#map-container,
#carte-container {
    position: relative;
}

.map-legend {
    position: absolute;
    z-index: 998;
    top: 120px;
    right: 12px;

    min-width: 130px;
    aspect-ratio: 3/2;
    background: white;
    border-radius: 15px;
    border: 2px solid rgba(0, 0, 0, 0.374);
    border-spacing: calc(var(--margin)/2);
    padding: calc(var(--margin)/2);

    font-size: 12px;
}

.legend-item {
    width: 100%;
}

.legend-item td:first-of-type {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 14px;
}

.legend-color {
    width: 24px;
    height: 2px;
}

.za {
    background: #8B0000;
}

.ses {
    background: #08891e;
}

.legend-item .site {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: blue;
}


@media screen and (max-width: 1280px) {
    nav ul#navLinks {
        gap: calc(var(--margin) / 2);
        font-size: 0.9rem;
    }

    nav figure img {
        height: 24px;
    }
}

@media screen and (max-width: 970px) {
    nav {
        width: 65%;
    }
}

@media screen and (max-width: 760px) {
    nav.nav {
        border-radius: 15px;
        max-height: 300px;
        min-height: 200px;
        width: 200px;

        transform: translateX(0);

        z-index: 1002;

        position: absolute;
        top: var(--margin);
        left: 72px;
        opacity: 0;
        display: none;

        transition: opacity .3s ease-in;
    }

    nav.active {
        display: flex;
        opacity: 1;
    }

    nav a#logo {
        display: none;
    }

    nav ul#navLinks {
        flex-direction: column;
        font-size: 1rem;
    }

    /* Burger */
    .burger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;

        z-index: 1002;
    }

    .burger span {
        width: 48px;
        height: 6px;
        margin-bottom: 2px;
        background: var(--color-white);
        transition: 0.3s ease;
        border-radius: 25px;
        -webkit-box-shadow: 0px 0px 15px -3px rgba(13, 27, 42, 0.75);
        box-shadow: 0px 0px 15px -3px rgba(13, 27, 42, 0.75);
    }

    #header {
        display: flex;
        align-items: center;
        background: var(--color-black);
        background: linear-gradient(180deg, rgb(7, 50, 45, 1) 10%, rgb(7, 50, 45, .6) 60%, rgb(7, 50, 45, 0) 100%);
        position: fixed;
        top: 0;
        left: 0;
        height: 72px;
        width: 100%;
        z-index: 1002;
        padding: var(--gutter) var(--margin);
    }

    /* Overlay */
    .overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    /* Actif */
    .overlay.active {
        opacity: 1;
        pointer-events: all;
    }

}


.button {
    min-width: 200px;
    padding: var(--margin) calc(var(--gutter) + var(--margin));
    border-radius: 30px;

    -webkit-box-shadow: 0px 0px 15px -3px rgba(13, 27, 42, 0.75);
    box-shadow: 0px 0px 15px -3px rgba(13, 27, 42, 0.75);

    transition: all .3s ease-in;
}

.button:hover {
    transform: scale(1.05) translateY(-2px);
}

footer {
    padding: var(--gutter) var(--margin);
    height: 300px;

    display: flex;
    justify-content: center;
    align-items: center;

    background-color: var(--color-black);

    color: var(--color-white);

    flex-shrink: 0;

}

footer p {
    margin: 0;
}

.leaflet-control-layers {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* HELP */

.help-wrapper {
    position: absolute;
    top: 16px;
    right: 16px;

    display: flex;
    gap: 8px;
    align-items: center;
}

.help-icon {
    background: var(--color-secondary);
    color: var(--color-white);
    font-size: 24px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.help-container {
    position: absolute;
    top: 40px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    display: none;
    z-index: 1001;
    font-family: Arial, sans-serif;
}

.help-header {
    background: var(--color-secondary);
    color: var(--color-white);
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.help-header button {
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.help-header .help-close {
    background: rgb(255, 104, 104);
    padding: 2px 4px;
}

.help-content {
    padding: 15px;
}

.help-content h2,
.help-content h3 {
    margin-top: 10px;
    margin-bottom: 8px;
}

.help-content ul {
    margin-left: 20px;
    margin-bottom: 10px;
}

.help-content a {
    text-decoration: underline;
    color: steelblue;

    display: flex;
    align-items: center;
    margin: 4px 0;
}

.screen-btn {
    width: 64px;
    height: 60px;
}

.screen-btn svg {
    width: 100%;
    height: 100%;
}