@import "fonts.css";
@import url("https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap");
@import "header.css";
@import "footer.css";

@font-face {
  font-family: "Monaako Script";
  src:
    url("../fonts/MonaakoScript/Monaako-Script.woff2") format("woff2"),
    url("../fonts/MonaakoScript/Monaako-Script.woff") format("woff"),
    url("../fonts/MonaakoScript/Monaako-Script.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "RockSalt";
  src: url("../fonts/RockSalt/RockSalt-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

* {
  box-sizing: border-box;
}

:root {
  --color-black: #1d1d1b;
  --color-white: #eaedf2;
  --color-orange: #f15f38;
  --color-blue: #362cc0;
  --color-light-blue: #5f76ee;
  --normal-text-size: 17px;
  --grid-gap: 10px;
  /* 14px pour les plus petits textes aside */
}

html,
body {
  padding: 0;
  margin: 0;
  font-size: var(--normal-text-size);
  color: var(--color-black);
  font-family: "Rubik", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  line-height: 1.3rem;
}

main {
  padding: 4rem 0 0 0;
}

h1,
h2 {
  font-family: "Monaako Script";
  font-weight: normal;
  text-transform: uppercase;
  margin: 0 0 1rem 0;
  font-size: 4em;
  line-height: 5rem;
}

h2 {
  font-size: 2.6em;
  line-height: 3.8rem;
}

h3 {
  font-size: 1.4em;
  line-height: 1.6rem;
  font-weight: 500;
  margin: 0 0 0.5rem 0;
}

a,
a:hover,
a:active,
a:visited {
  color: currentColor;
}

a.item {
  text-decoration: none;
}

p {
  margin: 0 0 1rem 0;
}

strong {
  font-weight: 500;
}

section {
  max-width: 1440px;
  margin: 0 auto;
}

#page-title h1 {
  font-size: clamp(2.5rem, 25vw, 22rem);
  text-align: center;
  white-space: nowrap;
  line-height: 1;
  margin: 0;
  color: var(--color-blue);
  background-color: var(--color-light-blue);
  overflow: hidden;
}

.page-description {
  font-size: 1.2em;
  line-height: 1.5rem;
  grid-template-columns: repeat(12, 1fr);
  grid-gap: var(--grid-gap);
  display: grid;
  margin: 0 auto;
  width: 100%;
  margin-bottom: 4rem;
  text-align: center;
}

.page-description > * {
  grid-column: 4 / span 6;
}

/* LAZYLOADING IMAGES */
.lazyload,
.lazyloading {
  opacity: 0;
}

.lazyloaded {
  opacity: 1;
  transition: opacity 300ms;
}

figure {
  margin: 0;
}

picture {
  display: block;
  position: relative;
}

picture img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

video {
  width: 100%;
  height: auto;
  display: block;
}

/* ------------------------------------ buttons */

.view-more__button {
  border: 1px solid var(--color-black);
  font-size: 0.8em;
  font-weight: 600;
  padding: 0.1rem 0.3rem 0rem 0.3rem;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  transition:
    background-color 0.3s,
    color 0.3s;
}

.view-more__button:hover {
  background-color: var(--color-black);
  color: var(--color-white);
}

/* ------------------------------------ filtres */
.top-page {
  margin-bottom: 4rem;
}
.filtres {
  display: flex;
  gap: 5rem;
}

.filtres p {
  margin: 0;
}

.tags {
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  display: flex;
  gap: 0.5rem;
}

.tag {
  border: 1px solid var(--color-black);
  font-size: 0.8em;
  font-weight: 600;
  padding: 0.1rem 0.3rem 0rem 0.3rem;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  transition:
    background-color 0.3s,
    color 0.3s;
}

.tag a {
  text-decoration: none;
}

.tag.active,
.tag:has(a.active),
.tag:has(a:active) {
  background-color: var(--color-black);
  color: var(--color-white);
}

.tag:hover {
  background-color: var(--color-black);
  color: var(--color-white);
}

/* ------------------------------------ Spectacles items */
.item__cover {
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.item__content {
  font-weight: 500;
}

.picto {
  height: 1rem;
  transform: translateY(0.1rem);
}

/*---------------------------------------- SWIPER */
section.gallery {
  max-width: none;
}

.swiper:not(.spectacles-swiper) {
  clip-path: polygon(0 0, 100% 5%, 100% 90%, 0 100%);
  aspect-ratio: 16/9;
  margin: 0;
  width: 100%;
}

.swiper img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swiper-button-prev,
.swiper-button-next {
  width: 36px;
  height: 36px;
  border: 2px solid var(--color-white);
  padding: 4px;
  border-radius: 6px;
}

.swiper-button-prev .arrow-svg,
.swiper-button-next .arrow-svg {
  fill: var(--color-white);
}

.swiper-button-prev {
  left: var(--swiper-navigation-sides-offset, 1rem) !important;
}

.swiper-button-next {
  right: var(--swiper-navigation-sides-offset, 1rem) !important;
}

.swiper-button-prev svg {
  transform: rotate(180deg);
}

@media screen and (max-width: 1440px) {
  header {
    padding: 0.5rem calc(calc(100vw / 12) + 25px);
  }
  section:not(.gallery) {
    padding-left: 25px !important;
    padding-right: 25px !important;
  }

  .footer-ribbon {
    padding: 1rem calc(calc(100vw / 12) + 25px) 4rem
      calc(calc(100vw / 12) + 25px);
  }
}

@media screen and (max-width: 1024px) {
  header {
    padding: 0.5rem 10px;
  }
  section:not(.gallery) {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .footer-ribbon {
    padding: 1rem 10px;
  }
}
