@import "reset.css";
/* @import 'fonts.css'; */

@font-face {
  font-family: "substitut";
  src: url("../fonts/substitut.ttf");
}

:root {
  --main-color: black;
  --bg-color: white;
  --nav-color: black;
}

/* global */

body {
  color: var(--main-color);
  background: var(--bg-color);
  font-family: monospace;
  font-size: 12px;
  line-height: 1rem;
}

a {
  color: inherit;
}

a:hover {
  text-decoration: underline wavy;
}

h1,
h2 {
  font-weight: bold;
  animation: move 1s 2s infinite ;


}

em {
  font-style: italic;
}

.hidden {
  display: none;
}

/*  nav */

nav {
  padding: 1em;
  position: fixed;
  background: var(--bg-color);
  left: 0;
  right: 0;
  padding-bottom: 0;
}

nav h1,
nav .filters details {
  border-left: 1px solid;
  border-bottom: 1px solid;
  padding-left: 0.5em;
  margin-right: 0.5em;
  flex: 1;
}

nav h1 {
  width: 25%;
  cursor: help;
}

nav .filters {
  display: flex;
  width: 75%;
}

nav .filters details {
  flex: 1;
}

nav .filters details summary:hover {
  cursor: s-resize;
  text-decoration: underline;
}

nav .filters details[open] summary {
  cursor: n-resize;
  text-decoration: underline;
}

nav .filters details ul {
  column-count: 2;
}

nav .filters details ul li:hover {
  cursor: pointer;
}

nav .filters details ul li:hover:before {
  content: "▸ ";
}

nav .filters details ul li.selected:before {
  content: "✔ ";
}

nav .filters details ul li.selected:hover:before {
  content: "✕ ";
}

/* font view */

.main-fonts {
  padding: 1em;
  padding-top: 2.5em;
	text-align: center;
	width: 80%;
	margin-left: 10%;
}

.font {
	display: inline;
	text-align: center;
}

.head-font {
  display: flex;
  width: 100%;
}

.head-font > * {
  padding-left: 0.5em;
  margin-right: 0.5em;
  border-left: 1px solid;
}

.head-font > div {
  flex: 1;
  display: flex;
  /* columns: 2; */
}

.head-font > div > * {
  width: 50%;
}

.head-font div:nth-of-type(1) {
  columns: 1;
}

.head-font div span {
  display: block;
  font-weight: bold;
}

.head-font div .title {
  font-weight: normal;
}

.sample-text {
  font-size: 5rem;
  line-height: 5rem;
  padding: 0.5em 0em 0.25em 0em;
  display: inline;
}

/* tools */

#tester {
  position: fixed;
  display: flex;
  bottom: 0.5rem;
  right: 10px;
  padding: 0.5rem 0 0.5rem 0.5rem;
  width: auto;
  text-align: right;
}

#tester input {
  padding: 0;
  margin: 0;
  width: 100%;
  border: none;
}

#tester > div {
  width: 100px;
}

#tester > div h5 {
  width: 100%;
}

#tester .size {
  padding: 0 0.5rem 0 0;
  display: none;
}

#tester .colors {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  width: 65px;
}

#tester .colors .color {
  width: 100%;
}

#tester .colors .color input {
  cursor: pointer;
}

#tester .colors .color:hover:before {
  position: absolute;
  right: 102%;
  width: 25vw;
}

#tester .colors .color:nth-of-type(1):hover:before {
  content: "Change text color ";
}

#tester .colors .color:nth-of-type(2):hover:before {
  content: "Change background color ";
}

#about {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: auto;
  padding: 1em;
  background-color: var(--bg-color);
  border-top: 1px solid;
  z-index: 10;
  max-height: 25vh;
  overflow-y: auto;
}

#about .close {
  position: absolute;
  right: 0.5em;
  font-size: 2em;
  cursor: pointer;
}

#about h2 {
  padding: 1em 0;
}

#about h2:nth-of-type(1) {
  padding-top: 0;
}

#about ul {
  margin-left: 1em;
}



@media screen and (max-width: 1000px) {
  nav .filters details ul {
    column-count: 1;
  }

  .head-font > div {
    flex-direction: column;
  }

  .head-font > div > * {
    width: 100%;
  }

  .sample-text {
    hyphens: auto;
    font-size: 4rem;
    line-height: 4rem;
  }
}



#ovale {
    width: 60px;
    height: 40px; 
    border-radius: 60px / 40px;
    background: rgb(204, 51, 153);

    animation-duration: 3s;
    animation-name: glissement;
    animation-iteration-count: infinite;
    animation-fill-mode: backwards;
    animation-delay: 5s;
    animation-direction: initial;
  }


@keyframes glissement {
  from {
    margin-left: 100%;
    width: 5%;
  }
  to {
    margin-left: 0%;
    width: 5%;
  }

}

#rond {
  width: 30px;
  height: 30px;
  border-radius: 30px / 30px;
  background: rgb(204, 51, 153);
  position: absolute;

  animation-duration: 3s;
  animation-name: bounce;
  animation-iteration-count: infinite;
  animation-fill-mode: forwards;
  animation-delay: 10s;
  animation-direction: alternate;
}


@keyframes bounce {
from {
  margin-left: 100%;
  width: 5%;
}
to {
  margin-left: 0%;
  width: 5%;
}
}






@media screen and (max-width: 600px) {

  nav .filters {
    display: none;
  }

  nav h1 {
    width: 100%;
    border-left: 0px solid;
    padding: .2em 0;
    margin-right: 0;
  }

  .main-fonts {
    padding-top: 3em;
		text-align: center;
		background: red;
		display: none;
  }

  .head-font {
    flex-direction: column;
  }
  .head-font > * {
    border-left: none;
    border-bottom: 1px dotted;
    padding-bottom: .25em;
  }

  .head-font > div {
    flex-direction: row;
  }

  .sample-text {
    font-size: 2.5rem;
    line-height: 2.5rem;
  }

}
