@import url("https://fonts.googleapis.com/css2?family=Geist:ital,wght@0,100..900;1,100..900&family=Google+Sans+Flex:opsz,wght@6..144,1..1000&family=Lora:ital,wght@0,400..700;1,400..700&family=Roboto:ital,wght@0,100..900;1,100..900&family=Space+Grotesk:wght@300..700&display=swap");

/* @font-face {
  font-family: "AvenirNextBold";
  src: url(/assets/font/AvenirNext-Bold.otf) format(opentype);
} */

* {
  margin: 0px;
  padding: 0px;
  box-sizing: border-box;
  font-family:
    "Google Sans Flex", "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
}
a {
  text-decoration: none;
}
ul {
  list-style: none;
}

/* Attributions nom des couleurs */
:root {
  --main-color: #fff;
  --secondary-color: #999;
  --text-color: #999;
  --hairline: rgba(255, 255, 255, 0.05);
  --bg-color: rgba(0, 0, 0, 1);
}

/* Ensemble du site */
body {
  background-color: black;
  color: var(--main-color);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   HEADER
   ============================================================ */
header {
  position: sticky;
  z-index: 100;
  top: 0px;
  border-bottom: 1px solid color(--hairline);
  background-color: var(--header-bg);
}

#header {
  position: sticky;
  top: 0px;
}

header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.1rem 1.75rem 0;
}

/* --- Menu --- */
header .menu {
  display: flex;
  align-items: start;
  gap: clamp(0.2rem, 3.5vw, 3.5rem);
}
header .menu a {
  display: inline-block;
  color: var(--secondary-color);
  font-weight: 400;
  font-size: clamp(0.4rem, 1.6vw, 1rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  /* padding: 0.4rem 0; */
}
header .menu a:hover,
header .menu a.active {
  color: var(--main-color);
  scale: 1.1;
  transition: all ease 0.3s;
}

/* --- Réseaux --- */
header .socials {
  display: flex;
  align-items: center;
  gap: clamp(0.4em, 2vw, 1rem);
}

header .socials a {
  display: block;
  color: var(--secondary-color);
  transition: color 0.35s ease;
}
header .socials a:hover {
  color: var(--main-color);
  scale: 1.1;
}
header .socials svg {
  width: clamp(13px, 3vw, 38px);
  height: auto;
  display: block;
}

/* --- Titre --- */
h1 {
  font-family: "Lora";
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 4rem);
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  text-indent: 0.28em; /*compense l'espacement après la dernière lettre */
  padding: 2.4vw 1rem 2.4vw;
}

/* --- Accessibilité --- */
header a:focus-visible {
  outline: 1px solid var(--main-color);
  outline-offset: 5px;
}

/* --- Mobile --- */
@media (max-width: 380px) {
  header .nav {
    padding: 0.9rem 1rem 0;
    gap: 1rem;
  }
  header .site-title {
    font-size: 1.35rem;
  }
  header .site-title {
    letter-spacing: 0.2em;
    text-indent: 0.2em;
    padding: 0.45rem 0.6rem 0.95rem;
  }
}

/* Menu Editor */
[data-tab-content] {
  display: none;
}
.active[data-tab-content] {
  display: block;
}

.tabs {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  /* font-size: clamp(1.6rem, 4vw, 4rem); */
  font-size: clamp(0.5rem, 1.6vw, 1.4rem);
  letter-spacing: 0.1em;
  text-indent: 0.2em;
  margin: 0 5vw;
  gap: clamp(0, 4vw, 3.5rem);
}

.tab {
  color: var(--secondary-color);
  cursor: pointer;
  padding: 15px;
}
.tab:hover {
  color: var(--main-color);
  transition: all ease 0.3s;
  scale: 1.1;
}
.tab.active {
  color: var(--main-color);
  scale: 1.1;
}

/* Grid */
main {
  margin: auto;
  max-width: 1440px;

  .grid-container {
    display: flex;
    justify-content: center;
    flex-flow: wrap-reverse row-reverse;
    gap: 0.6em;
    margin: 10px 30px 30px 30px;
    /* top right bottom left */

    div {
      aspect-ratio: 16 / 9;
      flex-grow: 1;
      flex-shrink: 1;
      flex-basis: 20%;
      min-width: 300px;
      border-radius: 10px;
      overflow: hidden;
      cursor: pointer;
    }
    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }
}

.projects:hover .video-text {
  opacity: 1;
  position: absolute;
  inset: 0;

  display: grid;
  grid-template-rows: 2;
  justify-content: stretch;
  align-content: center;
  justify-items: stretch;
  container-type: inline-size;

  color: white;
  pointer-events: none;
}

/*==================================================================
    Pages 
==================================================================== */
h2 {
  margin: 15px 0px 0px 5vw;
  font-size: clamp(0.9rem, 2.5vw, 2.5rem);
  letter-spacing: 0.02em;
}

h3 {
  text-align: center;
  align-content: center;
  font-size: 4.5cqw;
  padding: 0.3em;
}

h4 {
  text-align: center;
  align-content: center;
  opacity: 0.8;
  font-size: 3cqw;
}

p {
  margin: 10px 0px 0px 5vw;
  font-size: clamp(0.6rem, 1.5vw, 1.2rem);
  letter-spacing: 0.02em;
  opacity: 60%;
}

.pagesContainer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "a a"
    "b c";
  gap: 5vw;
  padding: 5vw;
}

/* Video : 80% de la largeur du site, ratio 16/9, centree */
.videoWrap {
  max-width: 1440px;
  grid-area: a;
  width: 80vw;
  aspect-ratio: 16 / 9;
  justify-self: center;
}
video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
}

/* Les 2 GIFs, cote a cote sur la meme ligne */

.gifs img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Mobile : tout en colonne */
@media (max-width: 700px) {
  .pagesContainer {
    grid-template-columns: 1fr;
    grid-template-areas:
      "a"
      "b"
      "c";
  }
  .videoWrap {
    width: 100%;
  }
  .gifs {
    width: 80%;
    justify-self: center;
  }
}

/*==================================================================
    Photo 
==================================================================== */

.photo-grid {
  display: grid;
  gap: 2vw;
  margin: 5vw;
  grid-template-columns: repeat(auto-fit, minmax(154px, auto));
  grid-auto-rows: 200px;
  grid-auto-flow: row dense;
}
.photo {
  background-position: center;
  background-size: cover;
}

.tall {
  grid-row: span 2 / auto;
}

.wide {
  grid-column: auto / span 2;
}

@media screen and (min-width: 600px) {
  .tall {
    grid-row: span 2 / auto;
  }

  .wide {
    grid-column: span 2 / auto;
  }
}
