@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');

/* Default*/

:root{
  font-size: 20px; /* 1rem */

  /* Base smartphone font size (1rem) */
  @media screen and (max-width: 768px){
      font-size: 16px;
  }
}

*{
  min-width: 0;
  margin: 0;
  padding: 0;
  font: inherit;
  font-family: "Ubuntu", sans-serif;

  transition: background-color 0.2s, color 0.2s, border-color 0.2s, background-image 0.2s;
}



*, *::before, *::after{
  box-sizing: border-box;
  
}

img, video, svg{
  display: block;
  height: auto;
  max-width: 100%;
}

body{
  min-height: 100dvh;
}

p, pre, a{
  text-wrap: pretty;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6{
  text-wrap: balance;
}

h1 {
  font-size: 2rem; /* 32px */
  line-height: 1.2;
}

h2 {
  font-size: 1.5rem; /* 24px */
  line-height: 1.3;
}

h3 {
  font-size: 1.25rem; /* 20px */
  line-height: 1.4;
}

h4, h5, h6 {
  font-size: 1.125rem; /* 18px */
  line-height: 1.5;
}

/* Petits textes */
small, .caption, .note, .small {
  font-size: 0.875rem; /* 14px */
}

.tiny {
  font-size: 0.75rem; /* 12px */
}

/* Boutons */
button, select, input, textarea {
  font-size: 1rem; /* 16px */
  line-height: 1.4;
  font-family: inherit;
}

/* Responsive typo */
@media screen and (min-width: 768px) {
  body {
    font-size: 1.125rem; /* 18px */
  }

  h1 {
    font-size: 3rem; /* 48px */
  }

  h2 {
    font-size: 2.25rem; /* 36px */
  }

  h3 {
    font-size: 1.5rem; /* 24px */
  }

  h4, h5, h6 {
    font-size: 1.25rem; /* 20px */
  }
}

/* Themes */

:root 
{
  --color-bg: #11131F;
  --color-subtitle-bg: #141726;

  --color-elem: #182449;
  --color-elem-hovered: #1D2E62;
  --color-elem-selected: #253974;

  --color-subtitle-border: #304384;
  --color-elem-border: #3A4F97;
  --color-elem-border-hovered: #435DB1;

  --color-solid-bg: #3E63DD;
  --color-solid-bg-hovered: #5472E4;

  --color-text-low: #9EB1FF;
  --color-text: #D6E1FF;
}

[data-theme="light"] 
{
  --color-bg: #FDFDFE;
  --color-subtitle-bg: #F7F9FF;

  --color-elem: #EDF2FE;
  --color-elem-hovered: #E1E9FF;
  --color-elem-selected: #D2DEFF;

  --color-subtitle-border: #C1D0FF;
  --color-elem-border: #ABBDF9;
  --color-elem-border-hovered: #8DA4EF;

  --color-solid-bg: #3E63DD;
  --color-solid-bg-hovered: #3358D4;

  --color-text-low: #3A5BC7;
  --color-text: #1F2D5C;
}



/* Custom */

html{
  scroll-behavior: smooth;
  scroll-padding-top: 4.25rem;
}

body 
{
  background-color: var(--color-bg);
  color: var(--color-text);

  display: flex;
  flex-direction: column;
  justify-content: stretch;

  
}

p, pre, a{
  color: var(--color-text);
}

em{
  color: var(--color-text-low);
}

pre{
  text-wrap-mode: wrap;
}

:is(select, button, .button){
  background-color: var(--color-elem);

  border-color: var(--color-elem-border);
  border-color: transparent;
  border-style: solid;
  border-radius: 1.25rem;
  border-width: 2px;

  color: var(--color-text);

  padding: 0.5rem;

  height: 2.5rem;

  display: inline-flex;
  align-items: center;   /* centre verticalement */
  justify-content: center; /* (optionnel) centre horizontalement */
}

:is(select, button, .button):hover{
  background-color: var(--color-elem-hovered);
  border-color: var(--color-elem-border-hovered);
}

:is(select, button, .button):focus{  
  outline: none;
  background-color: var(--color-elem-selected);
  border-color: var(--color-elem-border-hovered);
}

h1{
  margin: 0px 0;
  width: auto;
}

nav{
  display: flex;
  background-color: var(--color-subtitle-bg);

  padding: 0.75rem 1rem;

  width: 100dvw;


  align-items: stretch;
  align-content: stretch;

  gap: 25px;

  height: 4.25rem;

  border-color: var(--color-subtitle-border); 
  border-width: 0;
  border-bottom-width: 2px;
  border-style: solid;

  position: fixed;
  top: 0;
  z-index: 1000;

  align-items: center;
}


nav > :nth-last-child(2) {
  margin-left: auto;
}

nav > :not(.nav-element){
  display: none !important;
}

nav
{
  box-shadow: 0 4px 16px rgba(0, 0, 0, 1);
}

[data-theme="light"] 
{
  nav
  {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  }
}

#nav-hamburger .icon{
  -webkit-mask-image: url(resources/images/menu.svg);
  mask-image: url(resources/images/menu.svg);
  mask-size: 1.125rem;
  
  width: 1.5rem;
  height: 1.5rem;
  background-color: var(--color-text);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

#nav-hamburger.open .icon{
  -webkit-mask-image: url(resources/images/close.svg);
  mask-image: url(resources/images/close.svg);
}


/* Display hamburger for small screens*/
@media screen and (max-width: 768px){
    nav{
      flex-direction: column;
      transition: height 0.2s;

      overflow: hidden;

      align-items: center;
      justify-content: start;
    }

    nav:is(.open){
      height: 100dvh;
    }

    nav > :not(.nav-element){
      display: inline-flex !important;
      margin-left: auto;
      aspect-ratio: 1;
    }

    .nav-element{
      display: none !important;
      margin: 0 !important;
    }

    .nav-element-force-visible{
      display: inline-flex !important;
    }
}



footer{
  margin-top: auto;
  min-height: 5rem;

  padding: 1rem;

  background-color: var(--color-subtitle-bg);

  border-color: var(--color-subtitle-border); 
  border-width: 0;
  border-top-width: 2px;
  border-style: solid;

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

.shadowed, button, .button, select
{
  box-shadow: 0 4px 16px rgba(0,0,0,0.8);
}

[data-theme="light"] 
{
  .shadowed, button, .button, select
  {
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  }
}