* {
  margin: 0;
  padding: 0;
  font-size: 16px;
  box-sizing: border-box;
  scroll-behavior: auto;
  overscroll-behavior: none;
  -ms-overflow-style: none;
  scrollbar-width: none;
  list-style: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-overflow-scrolling: auto;
  font-synthesis: none;
  text-rendering: optimizeLegibility;

  font-family: "DM Sans", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  color: var(--black);
  text-decoration: none;
}

:root {
  --white: rgb(240, 240, 240);
  --black: rgb(15, 15, 15);
  --grey: #808080;

  --padding: 1.25rem;
  --sidePadding: 1.25rem;
  --whiteBandHeight: 6rem;
  --whiteBandPadding: 5rem;

  --workPageHeight: 100vh;

  --homeHeight: 100vh;
}

/* ************* FONT *************** */

.white {
  color: var(--white);
}

.black {
  color: var(--black);
}

.grey {
  color: var(--grey);
}

.small {
  font-size: 1rem;
}

.big {
  font-size: 2rem;
}

.bold {
  font-weight: 700;
  line-height: 1;
}

.light {
  font-weight: 300;
}

.capital {
  text-transform: uppercase;
}

/* ************* GENERAL *************** */

body {
  background-color: var(--white);
}

a,
button,
svg,
.navigation-icon {
  -webkit-tap-highlight-color: transparent;
}

p {
  line-height: 1.2;
}

img {
  border: none;
  all: unset;
  display: block;
}

::selection {
  background-color: var(--black);
  color: var(--white);
}

.unselectable {
  user-select: none;
  pointer-events: none;
}

.invisible {
  opacity: 0;
}

.visible {
  opacity: 1 !important;
}

.hidden {
  display: none !important;
}

.undiplayed {
  display: none;
}

.animated {
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}

.opacity-transition {
  transition: opacity 0.25s ease-in-out;
}

.external-link {
  text-decoration: underline;
}

.external-link:hover {
  cursor: pointer;
  color: var(--grey);
}

.section {
  width: 100%;
  display: flex;
}

/* ************* NAV *************** */

.nav-container {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--padding) var(--sidePadding);
  z-index: 10;
}

.nav-elt:hover * {
  cursor: pointer;
  color: var(--grey);
}

.white-band {
  display: none;
}

.section-home.desktop > .white-band {
  display: block;
  position: fixed;
  left: 0;
  width: 15%;
  height: 100%;
  z-index: 9;
  background: linear-gradient(
    to left,
    rgba(240, 240, 240, 0) 0%,
    rgb(240, 240, 240) 100%
  );
}

.section-home.desktop > .white-band.bottom {
  right: 0;
  left: unset;
  background: linear-gradient(
    to right,
    rgba(240, 240, 240, 0) 0%,
    rgb(240, 240, 240) 100%
  );
}

.logo {
  display: block;
  position: fixed;
  left: 50%;
  transform: translateX(-50%) scale(0.75);
  padding-top: calc(var(--padding) * 2);
  z-index: 15;
}

.logo:hover {
  cursor: pointer;
}

/* ************* INDEX *************** */

.section-index {
  height: 100vh;
  justify-content: center;
  align-items: center;
}

.index-container {
  text-align: center;
}

.index-elt {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: baseline;
  gap: 0.1rem;
}

.index-elt:hover > * {
  cursor: pointer;
  color: var(--grey);
}

/* ************* ABOUT *************** */

.section-about {
  height: 100vh;
  justify-content: center;
}

.about-greater-container {
  height: 100%;
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 var(--sidePadding);
  gap: 1rem;
}

.about-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.about-container p {
  text-align: center;
  padding-bottom: 1rem;
}

.contact-container p {
  padding-bottom: 0rem;
}

.contact-container:first-child {
  gap: 1rem;
}

.social-elt {
  display: flex;
  gap: 0.25rem;
}

.index-image {
  position: fixed;
  top: 0;
  left: 0;
  contain: paint;
  will-change: transform, scale;
  width: 400px;
  object-fit: cover;
  transition: scale 0.25s ease-in-out;
  transform-origin: top left;
  scale: 0;
}

.grown {
  scale: 1;
}

.front {
  z-index: 5;
}

/* ************* HOME *************** */

* {
  /* box-sizing: border-box; */
}

.section-home {
  position: absolute;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.section-home.mobile {
  display: none;
}

.desktop-cards {
  position: absolute;
  height: 50vh; /* s’adapte à la hauteur écran */
  width: calc(50vh * 16 / 9); /* 👈 largeur = hauteur * ratio */
  max-width: 90vw; /* pour éviter de dépasser sur petits écrans */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ✅ largeur fixe = xPercent stable */
.desktop-cards li {
  list-style: none;
  position: absolute;
  inset: 0; /* top/right/bottom/left:0 */
}

/* ✅ image centrée dans le li */
.desktop-cards li img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* ici cover ne croppe plus “de plus en plus” */
  transform: none;
  scale: 0.8;
  transition: scale 0.1s ease-in-out;
}

.desktop-cards li img:hover {
  cursor: pointer;
}

.card-info-container {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  bottom: 15%;
  width: 100%;
  gap: 0.1rem;
  align-items: baseline;
  transform: translate(0, 50%);
}

/************* WORK *************** */

.section-work {
  height: var(--workPageHeight);
  width: 100vw;
  display: flex;
  flex-direction: column;
}

.section-work.mobile {
  display: none;
}

.sticky-container {
  position: fixed;
  display: flex;
  height: 25vh;
  width: 100vw;
}

.sticky-container.up {
  top: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--padding);
}

.sticky-container.down {
  top: 75vh;
  justify-content: center;
  padding-bottom: var(--padding);
}

.work-info-container.up {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.1rem;
}
.work-info-container.down {
  display: flex;
  flex-direction: column;
  max-width: 30%;
  justify-content: center;
}

.work-info-container.down p,
.work-info-container.down h2 {
  text-align: center;
  width: 100%;
}

.block-video {
  position: relative;
}

/************* GLIDER *************** */

iframe {
  all: unset;
  width: 100%;
  height: 100%;
  position: absolute;
}

.block-video {
  position: relative;
}

.video-thumbnail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.glider-container {
  position: sticky;
  top: 25%;
  height: 50vh;
  display: flex;
  justify-content: flex-start;
  will-change: transform;
  align-items: center;
  gap: 4px;
}

.glider-elt {
  height: 100%;
}

.glider-media {
  height: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
}

.content-block {
  height: 100%;
}

.video,
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/************* MEDIA QUERIES *************** */

/* Desktop: max 1280px */
@media (max-width: 1280px) {
  :root {
    /* --white: hsl(150, 25%, 35%); */
  }

  * {
    font-size: 14px;
  }
}

/* Laptop: max 1024px */
@media (max-width: 1024px) {
  :root {
    /* --white: hsl(100, 25%, 35%); */
  }
  * {
    font-size: 13px;
  }
}

/* Tablet: max 768px */
@media (max-width: 900px) {
  :root {
    /* --white: hsl(50, 25%, 35%); */
  }

  .about-container {
    max-width: 90%;
  }
}

/* Mobile: max 480px */
@media (max-aspect-ratio: 3/5) {
  :root {
    /* --white: hsl(0, 25%, 35%); */
    --normal: 0.85rem;
    --big: 2rem;
    --padding: 1rem;
    --sidePadding: 0.9rem;
  }

  * {
    font-size: 16px;
    overscroll-behavior: unset;
  }

  .small {
    font-size: 1rem;
  }

  .big {
    font-size: 2rem;
  }

  .nav-container {
    height: var(--whiteBandHeight);
    top: unset;
    bottom: 0;
    align-items: end;
  }

  .white-band {
    display: block;
    position: fixed;
    left: 0;
    width: 100%;
    z-index: 9;
    height: var(--whiteBandHeight);
    background: linear-gradient(
      to top,
      rgba(240, 240, 240, 0) 0%,
      rgba(240, 240, 240, 1) 100%
    );
  }

  .white-band.bottom {
    top: unset;
    bottom: 0;
    transform: rotate(180deg);
  }

  /* ********HOME************ */

  .section-home.desktop {
    display: none;
  }

  .section-home.mobile {
    display: flex;
    overflow: scroll;
    flex-direction: column;
    height: unset;
    position: relative;
  }

  .mobile-cards {
    width: 100%;
    height: auto;
    padding: 0 var(--sidePadding);
  }

  .mobile-cards > a > img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  /* ********INDEX************ */

  .section-index {
    height: auto;
    padding: var(--whiteBandPadding) var(--sidePadding);
  }

  .index-container {
    display: flex;
    flex-direction: column;
    gap: var(--padding);
  }

  .index-date {
    display: none;
  }

  .index-elt {
    flex-direction: column;
    align-items: center;
    gap: unset;
  }

  .index-image {
    display: none;
  }

  /* ********ABOUT************ */

  .section-about {
    height: auto;
    padding: var(--whiteBandPadding) var(--sidePadding);
  }

  .about-greater-container {
    flex-direction: column-reverse;
    justify-content: center;
    gap: calc(var(--padding) * 2);
  }

  .about-container {
    max-width: 90%;
  }

  /* ********WORK************ */

  .section-work.desktop {
    display: none;
  }

  .section-work.mobile {
    position: relative;
    display: flex;
    overflow: scroll;
    flex-direction: column;
    height: unset;
    gap: calc(var(--padding) * 2);
    padding: var(--whiteBandPadding) var(--sidePadding);
  }

  .work-info-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .mobile-media-container {
    display: flex;
    flex-direction: column;
    gap: calc(var(--padding) / 4);
  }

  .content-block {
    height: auto;
  }

  .content-block img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .work-info-greater-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: calc(var(--padding) * 1.5);
  }

  .work-info-container.up {
    align-items: center !important;
    gap: unset !important;
  }
  .work-info-container.up * {
    line-height: 1;
  }

  .work-info-container.down {
    max-width: 90%;
    padding-top: unset;
  }
}

@media (max-height: 800px) and (min-aspect-ratio: 2/3) {
  * {
    font-size: 13px;
  }
}

@media (max-height: 600px) and (min-aspect-ratio: 2/3) {
  * {
    font-size: 12px;
  }
}
