:root {
  --r-square: 1 / 1;
  --r-landscape: 4 / 3;
  --r-portrait: 3 / 4;
  --r-panorama: 16 / 9;
  --r-panorama_large: 20 / 9;
  --r-frise: 8 / 1;
}

html {
  background-color: #000000;
}

body {
  margin: 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 16px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

/* ------------------------------------------------------------- */

.projects {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: #181818;
}

/* Largeur */

.w-full {
  grid-column: span 6;
}

.w-three-quarter {
  grid-column: span 4;
}

.w-half {
  grid-column: span 3;
}

.w-third {
  grid-column: span 2;
}

/* ------------------------------------------------------------- */

/* Blocs */

.menu_button {
  z-index: 1;
  right: 1.5rem;
  top: 1.5rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  position: fixed;
  background-color: #47d761;
  border: 1px solid #000000;
  transition: 0.4s ease;
  cursor: pointer;
}

.menu_button a {
  color: #000000;
}

.menu_button:hover {
  background-color: #b1ff3d;
}

.project-infos {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 0 1.5rem;
}

.project-infos > h2:first-child {
  flex: 1;
  font-weight: 600;
}

.project-counter {
  flex: 0 0 auto;
  min-width: 1px;
}

.project-title {
  flex: 0 0 100%;
  font-style: italic;
}

.project-infos > h2,
.project-meta-right {
  min-width: 0;
}

.project h2,
.project p,
.project a,
.menu_button a {
  font-family: Velvelyne;
  font-size: 1em;
  font-weight: 400;
}

.project {
  display: flex;
  position: relative;
  flex-direction: column;
  background-color: var(--bg, rgb(255, 255, 255));
  color: var(--text, black);
  padding: 1.5rem 0 2rem 0;
  gap: 1rem;
}

/* ------------------------------------------------------------- */

/* Images */

.media {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.media img,
.media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.padding-img {
  height: 100%;
  padding: 0 1.5rem 0 1.5rem;
}

/* Animation Images */

.js-reveal-img {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

.js-reveal-img.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hauteur */

.r-square .media {
  aspect-ratio: 1 / 1;
}

.r-landscape .media {
  aspect-ratio: 4 / 3;
}

.r-portrait .media {
  aspect-ratio: 3 / 4;
}

.r-panorama .media {
  aspect-ratio: 16 / 9;
}

.r-panorama_large .media {
  aspect-ratio: 5 / 2;
}

.r-panorama_petit .media {
  aspect-ratio: 6 / 2;
}

.r-panorama_mini .media {
  aspect-ratio: 6 / 1;
}

.r-frise .media {
  aspect-ratio: 8 / 1;
}

/* ------------------------------------------------------------- */
/* Fullbleed */

.project-infos-fullbleed {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 1.5rem 1.5rem 0 1.5rem;
  box-sizing: border-box;
  z-index: 1;
}

.project-infos-fullbleed .project-counter {
  margin-left: auto; /* pousse le counter à droite */
  flex: 0 0 auto;
}

.project-infos-fullbleed .project-title {
  flex: 0 0 100%;
}
.project-fullbleed {
  padding: 0;
}
.padding-img-fullbleed {
  padding: 0;
}

/* menu ephemere */
a {
  text-decoration: none;
}

.projects-menu {
  display: flex;
  gap: 1rem;
  overflow: hidden;
}

/* ------------------------------------------------------------- */

/* Responsive */

@media (max-width: 900px) {
  .w-half,
  .w-three-quarter,
  .w-third,
  .w-full {
    grid-column: span 6;
  }
  .project .media {
    aspect-ratio: var(--ratio-mobile);
  }

  :root {
    --r-frise: 3 / 1; /* redéfini uniquement ici */
  }

  .hide-mobile {
    display: none;
  }
}

@media (max-width: 1100px) {
  .project h2,
  .project p,
  .project a {
    font-size: 0.8em;
  }
}

@media (max-width: 900px) {
  .project-meta-right p {
    flex-basis: 100%; /* le p passe sous le h2 */
  }
}
