@import url("fonts/fonts.css");

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

:root {
  --unit: 2rem;
  --triage-taille: calc(var(--unit) * 3.5);
  --min-project-width: 350px;

  --local-color: black;
  --button-color: #fffdd5;
}

::selection {
  background: var(--local-color);
  color: white;
}

html,
body {
  height: 100%;
  width: 100%;
}

body {
  font-family: "national_park_regular";
  padding: 0px;
  margin: 0px;
}

h1 {
  z-index: 2;
  background: white;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: normal;
}

ul li {
  list-style: none;
}

a,
a:link {
  text-decoration: none;
  border: solid black 1px;
  background: var(--button-color);
  padding: 0.3em 0.5em;
  padding-bottom: 0.2em;
  color: black;
}

a:visited {
  color: initial;
}

a:hover,
a:focus {
  color: white;
  background: black;
}

.hidden {
  display: none;
}

svg {
  pointer-events: none;
}

/* ------------------------------------------------- */
/* ABOUT */

button {
  width: calc(var(--triage-taille) / 1.5);
  height: calc(var(--triage-taille) / 1.5);
  background-color: white;
  border: 1px solid black;
  border-radius: 50%;
  color: black;
  text-align: center;
  text-decoration: none;
  font-size: calc(var(--triage-taille) / 3);
  cursor: pointer;
  position: fixed;
  z-index: 10;
  background: var(--button-color);
}

button:hover {
  background: black;
  color: white;
}

#clear {
  display: none;
  border-radius: 1em;
  padding: 0.2em 0.5em;
  height: calc(var(--triage-taille) / 2.5);
  left: calc(var(--triage-taille) / 6);
  top: calc(var(--triage-taille) / 3.5);
  font-size: calc(var(--triage-taille) / 5);
}

#showNav {
  font-size: calc(var(--triage-taille) / 3);
  top: calc(var(--triage-taille) / 6);
  left: calc(var(--triage-taille) / 6);
}

#info {
  top: calc(var(--triage-taille) / 6);
  right: calc(var(--triage-taille) / 6);
}

#showClick {
  font-size: 1.75em;
  line-height: 1.25;
  margin: var(--triage-taille);
  padding: 5%;
  background: var(--button-color);
  position: fixed;
  height: calc(100% - calc(var(--triage-taille) * 2));
  top: 0;
  overflow-y: auto;
  border: solid black 1px;
  z-index: 110;
}

#showClick > h1,
#showClick > h2,
#showClick > h3,
#showClick > h4,
#showClick > h5,
#showClick > h6,
#showClick > p {
  margin-top: 1em;
  position: relative;
  background: none;
}

#showClick > h1:first-of-type {
  margin-top: 0;
}

#showClick .closing {
    right: 2rem;
    top: 2rem;
}

/* ------------------------------------------------- */
/* SLIDER */

.slideshow-container {
  position: fixed;
  top: 0;
  left: 0;
  padding: 2rem;
  height: 100%;
  width: 100%;
  z-index: 1000;
  isolation: isolate;
  display: none;

  /* background: white; */
}

.closing {
  position: absolute;
  top: 3rem;
  right: 3rem;
  z-index: 1000;
  isolation: isolate;

  width: calc(var(--triage-taille) / 2);
  height: calc(var(--triage-taille) / 2);
  padding-top: 0.05em;
}

.closing:hover {
  background: var(--local-color);
}

[class*="mySlides"] {
  display: none;
  height: 100%;
  width: 100%;
}

[class*="mySlides"] img {
  background: white;
  border: solid black 1px;
  object-fit: contain;
}

img {
  vertical-align: middle;
  max-width: 100%;
  max-height: 100%;
}

/* Next & previous buttons */
.prev,
.next {
  position: absolute;
  top: 50%;
  /* text-align: center; */
  color: white;
  font-weight: bold;
  font-size: 2em;
  user-select: none;
  font-family: "national_park_extrabold";
  border-radius: 50%;
  color: black;
  width: calc(var(--triage-taille) / 2);
  height: calc(var(--triage-taille) / 2);
  padding-top: 0.15em;
}

/* Position the "next button" to the right */
.prev {
  left: 0.2em;
  padding-right: 0.1em;
}

.next {
  right: 0.2em;
  padding-left: 0.1em;
}

/* On hover, add a background color */
.prev:hover,
.next:hover {
  background-color: var(--local-color);
  color: white;
  border: none;
}

/* ------------------------------------------------- */
/* PROJECTSMAP */
main {
  margin: var(--triage-taille);
  padding: 5px;
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(var(--min-project-width), 1fr)
  );
  gap: 5px;
}

.shapeImage + .popup {
  display: none;
  position: absolute;
  top: 0;
  left: calc(100% + var(--unit) / 10);
  width: 100%;
  z-index: 10;
  background: white;
}

.shapeImage:nth-of-type(2n) + .popup {
  left: calc(0 - var(--unit) / 10);
}

.shapeImage:hover + .popup {
  display: block;
}

.shapeImage:hover > svg text {
  /* pas sûr */
  fill: var(--local-color);
  stroke: white;
  /* display: none; */
}

/* ------- TECH -------*/
.titleProject {
  text-transform: uppercase;
  margin: 0 0 2% 0;
  padding: 2% 4%;
  color: var(--local-color);
  font-size: var(--unit);
  font-family: "national_park_bold";
}

ul.liste {
  width: 100%;
  padding: 4%;
  padding-top: 0;
  columns: 2;
  column-gap: 5px;
}

.liste {
  display: inline-block;
}

ul.liste > li {
  page-break-inside: avoid;
  margin-bottom: 0.5em;
}

.liste span.value {
  font-family: "national_park_bold";
}

.tech {
  border: 1px solid var(--local-color);
  border-top: none;
  font-size: calc(var(--unit) / 2.5);
  width: 100%;
}

.tech li {
  position: relative;
}
.tech li:empty {
  display: none;
}

.key {
  /* padding: 1.5% 5%; */
  padding: 0.2em 0.5em;
  padding-left: 0.3em;
  font-family: "national_park_regular";
}

.value {
  display: block;

  /* padding-left: 20px; */
  font-family: "national_park_medium";
}

/*ul.sous-liste > .couleurs{
  line-height: 10px;
}*/

.couleurs > span {
  display: inline-block;
}
.icone {
  font-size: 1.5em;
}

.icone[data-type="année"],
.icone[data-type="type"],
.icone[data-type="auteur·ices"] {
  font-size: 0.8em;
}

.icone[data-type="couleurs_recto"],
.icone[data-type="couleurs_verso"],
.icone[data-type="couleurs_couv"],
.icone[data-type="façonnage"] {
  font-size: 1.3em;
}

article {
  position: relative;
}

article:hover h2 {
  display: block;
}

.thumbnail,
img {
  width: 100%;
}

.thumbnail,
svg {
  cursor: pointer;
}

/* ------- NAV -------*/
nav {
  font-size: 0.65rem;
  z-index: 1000;
  position: relative;
}

#showNav {
  display: none;
}

#categories h3 {
  font-size: 0.75rem;
  line-height: 1.1;
}

.triage {
  display: flex;
  gap: calc(var(--unit) / 2);
  position: fixed;
  list-style: none;
  padding: .5rem;
  /* padding-bottom: 1rem; */
  border: solid black 1px;

  justify-content: center;
}

.triage h3 {
  margin-bottom: 0.3em;
}

.mobile {
  display: none;
}

.triage > li {
    display: block;
    min-width: 10%;
    padding-bottom: .5rem;
}

#triage-top > li,
#triage-bottom > li {
  max-height: 100%;
}

#triage-left > li,
#triage-right > li {
  max-width: 100%;
  max-height: 100%;
  overflow-y: hidden;
}

#triage-left .entries,
#triage-right .entries {
    max-height: 100%;
    overflow-y: auto;
    padding-bottom: .5rem;
}

#triage-top .entries,
#triage-bottom .entries {
  overflow-y: auto;
  max-height: calc(var(--triage-taille) - 2rem);
}

#triage-top,
#triage-bottom {
  height: calc(var(--triage-taille) + 1px);
  width: calc(100% - 2 * var(--triage-taille));
  flex-flow: row nowrap;
  left: var(--triage-taille);
  background: white;
}

#triage-left,
#triage-right {
  width: calc(var(--triage-taille) + 1px);
  height: calc(100% - 2 * var(--triage-taille));
  flex-flow: column nowrap;
  top: var(--triage-taille);
}

#triage-top {
  top: 0;
  border-top: none;
}

#triage-left {
  border-left: none;
}

#triage-bottom {
  bottom: 0;
  border-bottom: none;
}

#triage-right {
  right: 0;
  border-right: none;
}

/* ------- COULEURS ------- */
span.pastille {
  background: var(--local-color);
}

span.text-coul {
  color: var(--local-color);
}

.pastille {
  display: inline-block;
  height: 0.5em;
  width: 0.5em;
  border-radius: 100%;
}

.error {
  background: red;
  color: white;
}

.error::before {
  content: "ERREUR: couleur ";
}

.error::after {
  content: " pas reconnue !";
}

.cmjn span {
  background: linear-gradient(75deg, cyan, magenta, yellow, black);
}

.cmjn .text-coul {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.white .text-coul {
  -webkit-text-stroke: 0.04em black;
  color: white;
  font-family: "national_park_extrabold";
  font-size: 1.2em;
}

.white input:checked + label {
  border: solid black 1px;
}

/* ------- LE TRI ------- */
.filtre {
  display: inline-flex;
  gap: 0.2em;
}

.filtre:last-of-type {
    margin-bottom: .5rem;
}

.filtre + .filtre {
  margin-left: 0.2em;
}

.filtre:hover * {
  cursor: pointer;
  text-decoration: underline;
}

.filtre input {
  display: none;
}

.filtre label {
  margin-top: 0.3em;
  padding: 0.4em 0.4em 0.2em 0.4em;
  border: solid var(--local-color) 0.5px;
  border-radius: 0.5em;
}

input:checked + label {
  background: var(--local-color);
  color: white;
}

input:checked + label span {
  color: white;
}

.cmjn input:checked + label {
  background: linear-gradient(75deg, cyan, magenta, yellow, black);
  border: none;
}

.cmjn input:checked + label .text-coul {
  color: white;
  background-clip: text;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: white;
  background: none;
}

/* Classe pour les filtres inutiles une fois qu'on a déjà cliqué sur un filtre */
.non-pertinent,
.non-pertinent + label {
  opacity: 0.2;
  pointer-events: none;
}

.filtre:hover .non-pertinent,
.filtre:hover .non-pertinent + label {
  text-decoration: none;
}

/* --------------------- SVG --------------------- */
.vb {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
}

text {
  text-transform: uppercase;
  fill: white;
  stroke: var(--local-color);
  stroke-width: 0.5;
  font-size: calc(var(--unit) / 1.5);
  letter-spacing: calc(var(--unit) / 8);
  font-family: "national_park_bold";
  font-weight: bold;
  width: 100%;
}

/* ------- RESPONSIVE ------- */
@media only screen and (max-width: 3000px) {
  main {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}
@media only screen and (max-width: 1648px) {
  main {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media only screen and (max-width: 1280px) {
  main {
    grid-template-columns: 1fr 1fr;
  }
}

@media only screen and (max-width: 800px) {
  :root {
    --triage-taille: calc(var(--unit) * 2);
  }

  nav {
    z-index: 100;
  }

  #showNav {
    display: block;
  }

  #clear {
    top: initial;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(var(--triage-taille) / 4);
    height: calc(var(--triage-taille) / 2);
    width: auto;
    font-size: 2em;
    padding: 0.1em 0.5em;
    padding-bottom: 0.2em;
    border-radius: 0.7em;
  }

  /* REDÉFINITION  pour le mobile relou */
  .mobile {
    gap: calc(var(--unit) / 2);
    position: fixed;
    list-style: none;
    padding: 5px;
    border: solid black 1px;
    display: block;
  }

  #top,
  #bottom {
    height: calc(var(--triage-taille) + 1px);
    width: calc(100% - 2 * var(--triage-taille));
    left: var(--triage-taille);
    background: white;
  }

  #left,
  #right {
    width: calc(var(--triage-taille) + 1px);
    height: calc(100% - 2 * var(--triage-taille));
    top: var(--triage-taille);
  }

  #top {
    top: 0;
    border-top: none;
  }

  #left {
    border-left: none;
  }

  #bottom {
    bottom: 0;
    border-bottom: none;
  }

  #right {
    right: 0;
    border-right: none;
  }

  #categories {
    font-size: 1.5em;
    background: white;
    margin: var(--triage-taille);
    padding: 0.5rem;
    position: fixed;
    height: calc(100% - calc(var(--triage-taille) * 2));
    width: calc(100% - calc(var(--triage-taille) * 2));
    top: 0;
    overflow-y: auto;
    display: none;
  }

  #categories h3 {
    font-size: 1.5em;
  }

  #categories ul,
  #categories li {
    max-height: 100% !important;
    max-width: 100%;
  }

  .triage:not(.mobile) {
    position: relative;
    border: none;
    width: auto !important;
    height: min-content !important;
  }

  .triage:not(.mobile) + .triage:not(.mobile) {
    margin-top: 2em;
  }

  .triage:not(.mobile) li + li h3 {
    margin-top: 2em;
  }

  #triage-top,
  #triage-bottom,
  #triage-left,
  #triage-right {
    display: block;
    left: 0;
    top: 0;
  }

  .thumbnail {
    display: none;
  }

  .slideshow-container {
    display: block;
    position: relative;
    border: solid var(--local-color) 1px;
    border-bottom: none;
    padding: 0rem;
    z-index: 1;
  }

  .slideshow-container img {
    background: none;
    border: none;
  }

  .closing {
    display: none;
  }

  .prev,
  .next {
    font-size: 1rem;
    width: 2rem;
    height: 2rem;
  }

  .vb {
    display: none;
  }

  main {
    grid-template-columns: 1fr;
  }
}

@media only screen and (max-width: 600px) {
  :root {
    --triage-taille: calc(var(--unit));
  }

  .tech {
    font-size: calc(var(--unit) / 3);
    line-height: auto;
  }

  #clear {
    bottom: calc(var(--triage-taille) / 6.5);
    height: calc(var(--triage-taille) / 1.5);
    font-size: 1.5em;
    padding: 0 0.4em;
    padding-bottom: 0.4em;
    border-radius: 0.7em;
    border-color: gray;
  }
}
