<template>
  <NuxtLayout>
    <v-app>
      <a id="top" />

      <div class="body">
        <header>
          <Topbar />
        </header>

        <NuxtPage />

        <BackToTheTop />
      </div>

      <Footer />
    </v-app>
  </NuxtLayout>
</template>

<script setup lang="ts">
const route = useRoute()

useHead(() => ({
  link: [
    {
      rel: 'canonical',
      href: 'https://olivier-massot.ogene.fr' + route.path,
    },
  ],
}))
</script>

<style lang="scss">
html {
  scroll-behavior: smooth;
}

.v-application {
  background: rgb(var(--v-theme-background));
  color: rgb(var(--v-theme-on-background));
  font-family: Inter, sans-serif;
}

.body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 0 15%;

  @media (max-width: 1600px) {
    margin: 0 6%;
  }

  @media (max-width: 600px) {
    margin: 0 3%;
  }
}

.topbar-container {
  padding: 32px 0;
  border-bottom: solid 1px rgba(var(--v-theme-on-background), 0.2);
  margin-bottom: 3rem;
  position: sticky;
  top: 0;
  background: rgb(var(--v-theme-background));
  z-index: 1000;
}

:deep(h2) {
  margin: 48px 0 24px 0;
  padding-bottom: 9px;
  border-bottom: solid 1px rgba(var(--v-theme-on-background), 0.2);

  @media (max-width: 600px) {
    margin: 24px 0;
  }
}

.v-footer {
  max-height: 36px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  border-top: rgb(var(--v-theme-on-surface));
  font-size: 12px;

  a {
    color: rgb(var(--v-theme-on-background));
  }

  span {
    margin: 0 24px;
  }
}

</style>