/* === FONTS === */

@font-face {
    font-family: "Alegreya";
    font-style: normal;
    font-weight: normal;
    src: url(fonts/Alegreya-VariableFont_wght.ttf) format("truetype");
}

@font-face {
    font-family: "Chubbo";
    font-style: normal;
    font-weight: normal;
    src: url(fonts/Chubbo-Regular.otf) format("opentype");
}

@font-face {
    font-family: "Chubbo";
    font-style: italic;
    font-weight: light;
    src: url(fonts/Chubbo-LightItalic.otf) format("opentype");
}

@font-face {
    font-family: "Chubbo";
    font-style: normal;
    font-weight: bold;
    src: url(fonts/Chubbo-Bold.otf) format("opentype");
}

@font-face {
    font-family: "Wingdings";
    font-style: normal;
    font-weight: normal;
    src: url(fonts/wingding.ttf) format("truetype");
}

@font-face {
    font-family: "Wingdings 2";
    font-style: normal;
    font-weight: normal;
    src: url(fonts/WINGDNG2.TTF) format("truetype");
}

/* === VARIABLES === */

:root {
	--couleur-fond: blue;
	--couleur-main: #C5CEFF;

  --couleur-fond-bis: #E1E6FF;
  --couleur-main-bis: blue;
  
	--typo-titre: "Alegreya";
  --typo-courant: "Chubbo";

  --typo-signe: "Wingdings";
  --typo-signe-bis: "Wingdings 2";
}

/* === RESPONSIVE === */

/* Très très très petits écrans */
@media (max-width: 240px) {
  html {
    font-size: 2px;

  #gallery{
    grid-template-columns: 1fr;
  }
  }
}

/* Très très petits écrans */
@media (min-width: 241px) and (max-width: 360px) {
  html {
    font-size: 4px;

  #gallery{
    grid-template-columns: 1fr;
  }
  }
}

/* Très petits écrans */
@media (min-width: 361px) and (max-width: 480px) {
  html {
    font-size: 6px;

  #gallery{
    grid-template-columns: 1fr;
  }
  }
}

/* Petits écrans */
@media (min-width: 481px) and (max-width: 640px) {
  html {
    font-size: 8px;

  #gallery{
    grid-template-columns: 1fr;
  }
  }
}

/* Écrans moyens */
@media (min-width: 641px) and (max-width: 768px) {
  html {
    font-size: 10px;
  }
}

/* Écrans larges */
@media (min-width: 769px) and (max-width: 1024px) {
  html {
    font-size: 14px;
  }
}

/* Grands écrans */
@media (min-width: 1025px) and (max-width: 1280px) {
  html {
    font-size: 18px;
  }
}

/* Très grands écrans */
@media (min-width: 1281px) {
  html {
    font-size: 20px;
  }
}

/* === GENERAL === */

* {
	margin: 0;
	padding: 0;
}

body {
	width: calc(100vw - 2 * 0.75rem);
 	height: calc(100vh - 2 * 0.75rem);

  overflow-x: hidden;

  padding: 0.75rem 0.75rem 0 0.75rem;

  font-family: var(--typo-courant);
  font-weight: normal;
  font-size: 0.75rem;

 	color: var(--couleur-main);
 	background-color: var(--couleur-fond);
}

::selection {
  color: var(--couleur-fond);
  background: var(--couleur-main);
}

nav {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;

  font-family: var(--typo-titre);
  font-size: 5rem;
  line-height: 4rem;

  user-select: none;
}

nav a {
  padding: 0.5rem 0.75rem;

  font-size: 3.5rem;
  line-height: 2.8rem;

  border-style: solid;
  border-width: 0.15rem;
  border-radius: 50px;
}

nav a:hover {
  color: var(--couleur-fond);
  border-color: var(--couleur-main);
  background-color: var(--couleur-main);
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
  cursor: pointer;
  user-select: none;
}

hr {
  height: 0;
  margin: 0.75rem 0;

	color: var(--couleur-main);
	border-style: solid;
  border-width: calc(0.15rem / 2);

}

img {
  vertical-align: middle;
  user-select: none;
}

h1, h2 {
  width: auto;

  font-family: inherit;
  font-size: inherit;  
  line-height: inherit;
  font-synthesis: none;
}

svg {
  width: 4rem;
  height: 4rem;
  fill: white;
}

/* === CLASS === */

/* Text */

.after-space {
  margin-bottom: 0.75rem;
}

.italic-text {
  font-style: italic;
  font-weight: light;
}

.bold-text {
  font-weight: bold;
}

.wingdings {
  font-family: var(--typo-signe);
}

.wingdings2 {
  font-family: var(--typo-signe-bis);
}

/* Index */

.image-color-filter img {
  mix-blend-mode: lighten;
  filter: grayscale(100%) contrast(100%);
}

.image-color-filter img:hover {
  mix-blend-mode: normal;
  filter: none;
}

.image-invert-filter img {
  filter: grayscale(100%) contrast(100%) invert(1);
}

.image-in-gallery {
  width: 100%;
  height: auto;
}

.to-project.hidden{
  display: none;
}

.active-project-filter {
  text-decoration: underline;
  text-decoration-thickness: 0.15rem;
}

.active-project-filter::before {
  content:"S ";

  font-family: var(--typo-signe-bis);
  font-size: 1rem;
  vertical-align: middle;
}

/* Project */

.project-page {
  color: var(--couleur-main-bis);
  background-color: var(--couleur-fond-bis);
}

.project-menu {
  color: var(--couleur-main-bis);
}

.project-menu a:hover {
  color: var(--couleur-fond-bis);
  border-color: var(--couleur-main-bis);
  background-color: var(--couleur-main-bis);
}

.project-icon {
  fill: var(--couleur-main-bis);;
}

.project-line {
  color: var(--couleur-main-bis);
}

.project-container {
  padding-bottom: 0.75rem;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.75rem;
}

.project-text p {
  position: sticky;
  top: 0.75rem;
}

.project-text h2 {
  position: fixed;
  -webkit-backface-visibility: hidden;
  bottom: 0.75rem;
  z-index: 5;

  font-family: var(--typo-titre);
  font-size: 5rem;
  line-height: 5rem;
}

.project-link {
  padding: 0.1rem 0.25rem;

  border-style: solid;
  border-width: 0.075rem;
  border-radius: 50px;
}

.project-link:hover {
  color: var(--couleur-fond-bis);
  border-color: var(--couleur-main-bis);
  background-color: var(--couleur-main-bis);
}

.project-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.project-image-1 {
  width: auto;
  max-width: calc((100% - 0.75rem) / 2);
  height: auto;

  display: block;
}

.project-image-2 {
  width: auto;
  max-width: 100%;
  height: auto;

  display: block;
}

.project-image-3 {
  width: auto;
  max-width: 74%;
  height: auto;

  display: block;
}

/* Infos */

.infos-link:hover {
  text-decoration: underline wavy;
  text-decoration-thickness: 0.025rem;
}


/* === ID === */

/* Index */

#marquee {
  width: calc(100vw - (2 * 0.75rem));

  display: flex;
  overflow: hidden;

  user-select: none;
}

#marquee ul { 
  min-width: 100%;

  --gap: 0.75rem;
  gap: var(--gap);
  padding: 0 calc(var(--gap) / 2);

  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-shrink: 0;

  font-weight: normal;
  font-size: 1rem;
  line-height: 1.2rem;

  list-style: none;

  animation: scroll 20s linear infinite;
}

@keyframes scroll {
    to{
        transform:translateX(calc(-100%));
    }
}

#gallery-and-filters-container {
  padding-bottom: 0.75rem;
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 0.75rem;
}

#gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

#project-filters {
  position: fixed;
  -webkit-backface-visibility: hidden;
  bottom: 0.75rem;

  display: flex;
  flex-direction: column;
  gap: 0.75rem;

  font-family: var(--typo-titre);
  font-size: 2rem;
  line-height: 1.6rem;

  user-select: none;
}

#project-filters a:hover {
  font-family: var(--typo-titre);
  text-decoration: underline;
  text-decoration-thickness: 0.15rem;
}

/* Infos */

#infos-container {
  padding-bottom: 0.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

#infos-container h2 {
  margin-bottom: 0.75rem;

  font-family: var(--typo-titre);
  font-size: 2rem;
  line-height: 1.6rem;
}

#outside-links {
  width: 100%;

  position: fixed;
  bottom: 0.75rem;
  -webkit-backface-visibility: hidden;

  display: flex;
  flex-direction: row;
  gap: 0.75rem;

  line-height: 0.75rem;
}

#footer {
  position: fixed;
  bottom: 0.75rem;
  -webkit-backface-visibility: hidden;

  line-height: 0.75rem;
}