@view-transition {
  navigation: auto;
}

@keyframes move-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes move-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

html,
body {
  scrollbar-gutter: stable;
}

/* Apply the custom animation to the old and new page states */
::view-transition-old(root) {
  animation: 0.8s ease-out both move-out;
}

::view-transition-new(root) {
  animation: 0.8s 0.8s ease-out both move-in;
}

:root {
  interpolate-size: allow-keywords;
  --bm: 20px;
  --gutter: 10px;
  --easing: cubic-bezier(0.33, 1, 0.68, 1);
  --easing-d: 500ms;
  --nav-height: 56px;
}

@media (width <=968px) {
  :root {
    --nav-height: 90px;
    --bm: 10px;
    --nav-height: 76px;
  }
}

@keyframes introduction {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
    pointer-events: none;
  }
}

.introduction {
  position: fixed;

  top: 0;
  height: 100dvh;
  left: 0;
  width: 100vw;
  z-index: 500000000000000000;
  pointer-events: none;
  background-color: white;
  display: flex;

  flex-direction: column;
  justify-content: center;
  align-items: center;

  animation: introduction 0.5s ease-in-out forwards 1s;

  a {
    /* scale: 1.5; */
  }
}

.mobile {
  display: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Helvetica", sans-serif;
  color: black;
  background-color: white;
  font-size: 17px;
  padding: 0;
  height: fit-content;
}

.button.caption {
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
  position: absolute;
  top: 100%;
  left: 50%;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-content-wrapper {
  padding: 0.5em !important;
  padding-inline: var(--bm) !important;
  border-radius: 500px !important;
  box-shadow: none !important;
  background-color: white !important;

  .leaflet-popup-content {
    font-size: 17px;
    margin: 0;
  }

  a {
    font-family: "Helvetica", sans-serif;
    font-size: 100%;
    color: black !important;
  }
}

.leaflet-popup-tip-container {
  display: none;
}

strong,
.bold {
  font-weight: bold;
}

.small {
  font-size: 80%;
  line-height: 1.8;
}

nav {
  position: relative;
  height: var(--nav-height);
  transition: height var(--easing-d) var(--easing);
}

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

  &:hover {
    text-decoration: underline;
    text-decoration-thickness: .5px;
    text-underline-offset: 5px;
  }

  &.active {
    font-weight: bold;
  }
}

.top {
  position: fixed;
  background-color: white;
  width: fit-content;
  height: auto;
  bottom: var(--bm);
  padding: var(--bm);
  right: calc(var(--bm) * 3);
  z-index: 400;

  svg {
    height: 1.5lh
  }
}

.monogram {
  height: 1lh;
  object-fit: contain;
}

picture {
  opacity: 0;
  filter: blur(2px);
  display: flex;
  transition: all calc(var(--easing-d) * 1) var(--easing);

  img {
    scale: 0.96;
    transition: all calc(var(--easing-d) * 1) var(--easing);
  }
}

main,
nav {
  padding: 0 calc(var(--bm) * 2);
}

div.top-hover-zone {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 20vh;
  z-index: 1000;

  pointer-events: none;
}

nav {
  padding-block: var(--bm) !important;

  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: sticky;
  top: 0;
  z-index: 5000;
  background-color: white;
  transition: top var(--easing-d) var(--easing);
  width: 100vw;
  /* transform: translateY(var(--bm)); */

  &.hidden {
    /* background-color: red; */
    transition: top var(--easing-d) var(--easing);
    top: calc(-100% - var(--bm));
  }

  ul {
    li:first-of-type {
      grid-column: 1 / 3;
    }

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

    .bolder {
      font-weight: bold;
    }

    ul.quicknav {
      grid-column: 3 / -1;
      display: flex;
      gap: 2rem;
      align-items: end;
    }
  }

  ul.filters {
    display: block;
    transition: opacity var(--easing-d) var(--easing);

    form {
      display: flex;
      flex-direction: row;
      gap: 1rem;
      flex-wrap: nowrap;
      overflow: scroll;

      li {
        min-width: fit-content;
      }

      input {
        display: none;
      }

      label {
        opacity: 0.3;

        transition: opacity 0.3s ease;
        cursor: pointer;
      }
    }

    &.hidden {
      opacity: 0;
      pointer-events: none;
    }
  }

  input[type="radio"]~ul {
    display: none;
  }

  input[type="radio"]:checked~ul {
    display: block;
  }

  ul>form {
    display: flex;
    flex-direction: row;
    gap: 2rem;

    /* input {
            display: none;
        } */

    input[type="radio"]:checked+label {
      opacity: 1;
    }
  }
}

.button,
.leaflet-control-zoom-in,
.leaflet-control-zoom-out,
.move {
  align-items: center;
  min-width: fit-content;
  background-position-x: 0%;
  background-position-y: 0%;
  background-repeat: repeat;
  background-image: none;
  background-color: white;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 300px;
  display: flex;
  padding-inline: calc(var(--gutter));
  padding-block: 0.6rem 0.4rem;
  border-radius: 50px;


  &:hover {
    text-decoration: none;
  }

  user-select: none;

  &.translucent {
    background: #e9e9e97c;
    backdrop-filter: blur(4px);
  }

  &.chip {
    transform: translate(-50%, -100%);
  }
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  align-content: center;
  align-items: center;
  justify-content: space-around;
  font-size: 17px !important;
  font-family: "Helvetica", sans-serif !important;
  line-height: 0 !important;
  background: #e9e9e97c !important;
  backdrop-filter: blur(4px);
}

figcaption {
  font-size: 80%;
  margin-block: var(--gutter);
  /* text-align: center; */
}

footer {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
  padding: var(--bm);
  position: relative;
  bottom: 0;
  left: 0;
  width: calc(100vw);

  &.mini {
    position: fixed;
  }

  h4 {
    grid-column: 1 / span 2;
  }

  section.contacts {
    display: flex;
    flex-direction: column;
    grid-column: 3 / span 2;
  }

  section.socials {
    flex-direction: column;
    rid-column: 5 / span 1;
  }

  section.bureaux {
    flex-direction: column;
    grid-column: 7 / span 5;

    a {
      display: flex;
      flex-direction: row;
      gap: 1rem;
    }
  }
}

footer.mini {
  h4 {
    display: none;
  }

  section.contacts,
  section.socials,
  section.bureaux {
    display: flex;
    flex-direction: row;
    gap: 1rem;
  }

  section.contacts {
    grid-column: 1 / span 4;
  }

  section.socials {
    grid-column: 5 / span 2;
  }

  section.bureaux {
    grid-column: 7 / span 6;
  }
}

@media (width <=1200px) {
  nav {
    ul {
      li {
        grid-column: 1/4;
      }

      ul.quicknav {
        grid-column: 4 / -1;
      }
    }
  }
}

@media (width <=968px) {
  /*nav {
  }*/

  .mobile-hidden {
    display: none !important;
  }

  nav li.logotype {
    text-align: center;
  }

  nav>ul {
    gap: var(--gutter);
    display: flex;
    flex-direction: column;

    ul.quicknav {
      justify-content: space-between;
    }
  }

  nav>ul.filters {
    display: none !important;
  }

  footer,
  footer.mini {
    padding: var(--bm);
    gap: var(--gutter);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;

    h4 {
      width: 100%;
      font-weight: bold;
      display: block !important;
    }

    section.contacts,
    section.socials {
      display: flex;
      gap: var(--gutter);
      width: calc(45%);
      flex-direction: column;
    }

    section.bureaux {
      margin-top: 2lh;
      display: flex;
      gap: var(--gutter);
      width: 100%;
      flex-direction: column;

      h3 {
        display: flex;
        flex-direction: column;
        gap: var(--gutter);
      }
    }
  }
}