@font-face {
  font-family: "JJannon";
  src: url("../fonts/JJannonRegular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   BASE
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
}

body {
  height: 100%;
  margin: 0;
  background: #fff;
  color: #000;
  font-family: "JJannon", serif;
  overflow-y: scroll;
  overflow-x: hidden;
}

/* ==========================================================================
   INTRO
   ========================================================================== */

.intro {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 50;
  pointer-events: none;
}

.intro-layer {
  position: absolute;
  inset: 0;
  display: flex;
  opacity: 0;
  transition: opacity 450ms ease;
}

.intro-layer.is-visible {
  opacity: 1;
}

.intro-logo {
  align-items: center;
  justify-content: center;
}

.intro-logo-img {
  max-width: 480px;
  width: 40vw;
  height: auto;
  display: block;
}

.intro-logo-fallback {
  font-size: 48px;
}

/* ==========================================================================
   HOME INTRO TEXT (scroll animation)
   ========================================================================== */

.home-intro-wrapper {
  min-height: 200vh;
}

.home-intro-text {
  position: sticky;
  top: 20px;
  left: 0;
  z-index: 10;
  padding: 20px;
  padding-top: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 450ms ease;
}

.home-intro-text.is-visible {
  opacity: 1;
}

.home-intro-text-inner {
  font-size: 40px;
  line-height: 1.1;
  text-align: left;
}

.intro-line {
  display: block;
}

.intro-word {
  display: inline-block;
  margin-right: 0.05em;
  transition: opacity 200ms ease;
}

.intro-word.is-hidden {
  opacity: 0;
}

.home-content {
  position: relative;
  background: #fff;
  min-height: 100vh;
}

/* ==========================================================================
   HOME - LAYOUT
   ========================================================================== */

.home {
  opacity: 0;
  transition: opacity 250ms ease;
}

.home[data-ready="1"] {
  opacity: 1;
}

.grid {
  --pad: 20px;
  --gap: 20px;
  --col: calc((100vw - (2 * var(--pad)) - (3 * var(--gap))) / 4);

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: var(--gap);
  padding: 20px var(--pad) 0;
}

.col {
  min-height: 60vh;
  min-width: 0;
}

/* ==========================================================================
   BRAND (Col 1)
   ========================================================================== */

.brand {
  font-size: 20px;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-link,
.brand-link:visited {
  color: inherit;
  text-decoration: none;
}

.brand-word {
  display: inline;
  white-space: nowrap;
  letter-spacing: -2.3px;
  margin-right: 5.3px;
  cursor: default;
}

.brand-letter {
  display: inline;
  padding: 0;
  margin: 0;
}

.brand-letter.is-hidden {
  visibility: hidden;
  width: 0;
  display: inline-block;
}

/* ==========================================================================
   NAVIGATION (Col 2)
   ========================================================================== */

.col-2 {
  position: relative;
}

.rooms {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-size: 20px;
  line-height: 1.15;
}

.room-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.room-link.is-active {
  text-decoration: none;
}

/* ==========================================================================
   GALERIE INLINE (dans Col 2, déborde sur Col 3)
   ========================================================================== */

.gallery-inline {
  width: calc(200% + var(--gap));
  max-width: none;

  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  opacity: 0;
  transition:
    grid-template-rows 400ms ease,
    opacity 300ms ease,
    margin 300ms ease;
  margin: 0;
}

.gallery-inline.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin: 18px 0;
}

.gallery-inline > .gallery-grid {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* ==========================================================================
   CARDS (projets dans galerie)
   ========================================================================== */

.card {
  display: block;
}

.card-media {
  display: block;
  width: 80%;
  aspect-ratio: 6 / 4;
  overflow: hidden;
  cursor: pointer;
}

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

.card-label {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.2;
}

.card-label a {
  color: inherit;
  text-decoration: none;
}

.card-label a:hover,
.card:hover .card-label a {
  text-decoration: underline;
}

/* ==========================================================================
   ABOUT (Col 4)
   ========================================================================== */

.col-4 {
  display: flex;
  justify-content: flex-end;
}

.about {
  text-decoration: none;
  color: inherit;
  font-size: 20px;
  line-height: 1.2;
}

/* ==========================================================================
   PROJECT - LAYOUT
   ========================================================================== */

.project-top-grid,
.project-grid {
  --pad: 20px;
  --gap: 20px;

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: var(--gap);
  padding: 0 var(--pad);
}

.project-top-grid {
  padding-top: 20px;
  align-items: start;
}

.project-top-left {
  grid-column: 1;
  font-size: 20px;
}

.project-top-center {
  grid-column: 2;
  font-size: 20px;
  margin-top: 2px;
}

.project-top-right {
  grid-column: 4;
  display: flex;
  justify-content: flex-end;
  font-size: 20px;
}

.project-grid {
  padding-top: 20px;
  padding-bottom: 20px;
  align-items: start;
  min-height: calc(100vh - 70px);
}

.project-media {
  grid-column: 1 / span 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
}

.project-info {
  grid-column: 4;
  font-size: 20px;
  line-height: 1.25;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 85px);
}

.project-info-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.project-info-content.is-scrollable {
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.project-info-content.is-scrollable::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* ==========================================================================
   PROJECT - SLIDER
   ========================================================================== */

.slider {
  position: relative;
  width: 100%;
}

.slide {
  margin: 0;
  padding: 0;
}

.slider-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.slider-hit-left {
  left: 0;
  cursor:
    url("../icons/cursor-left.png") 16 16,
    w-resize;
}

.slider-hit-right {
  right: 0;
  cursor:
    url("../icons/cursor-right.png") 16 16,
    e-resize;
}

.slide-media {
  user-select: none;
  width: 100%;
}

.slide-media picture {
  display: block;
  width: 100%;
}

.slide-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 90px);
  object-fit: contain;
  object-position: left top;
}

.slider-counter {
  margin-top: auto;
  padding-top: 20px;
  font-size: 20px;
  line-height: 1.25;
  flex-shrink: 0;
}

/* ==========================================================================
   PROJECT - INFO
   ========================================================================== */

.project-line,
.project-line-services {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
  padding: 0;
}

.project-bullet {
  font-size: 1.8em;
  vertical-align: middle;
  line-height: 1;
}

.project-read-btn {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  margin: 20px 0 0;
  font-family: inherit;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.25;
  color: inherit;
  cursor: pointer;
}

.read-letter {
  display: inline-block;
}

.read-letter.is-down {
  transform: translateY(3px);
}

.project-description {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  opacity: 0;
  transition:
    grid-template-rows 400ms ease,
    opacity 300ms ease,
    margin 300ms ease;
  margin: 0;
}

.project-description.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 20px;
}

.project-description-inner {
  min-height: 0;
  overflow: hidden;
}

.project-description-inner p {
  margin: 0;
}

/* ==========================================================================
   ABOUT PAGE
   ========================================================================== */

.about-page {
  --pad: 20px;
  padding: var(--pad);
}

.about-header {
  width: 70vw;
}

.brand-eponime {
  font-size: 20px;
  line-height: 1.25;
  margin-left: 60px;
}

.about-intro {
  font-size: 20px;
  line-height: 1.25;
}

.about-intro p {
  display: inline;
  margin: 0;
}

.about-columns {
  margin-top: 20vh;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--pad);
  width: 70vw;
}

.about-col-title {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
}

.about-col-text {
  font-size: 20px;
  line-height: 1.25;
}

.about-col-text p {
  margin: 0;
}

.about-footer-image {
  position: fixed;
  bottom: 20px;
  right: 20px;
}

.about-footer-image img {
  width: 10vw;
  height: auto;
  display: block;
}

.about-credits {
  position: fixed;
  bottom: 20px;
  left: 20px;
  font-size: 14px;
  line-height: 1;
  opacity: 0.5;
}

.about-credits-title {
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  margin: 0 0 0.25em 0;
}

.about-credits-link {
  margin: 0;
}

.about-credits a {
  color: inherit;
  text-decoration: none;
}

.about-credits a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE - MOBILE
   ========================================================================== */

@media (max-width: 768px) {
  /* Base mobile font size */
  :root {
    --font-size-mobile: 20px;
  }

  /* HOME */
  .grid {
    --pad: 15px;
    --gap: 10px;
    display: flex;
    flex-direction: column;
    padding: 15px var(--pad) 0;
  }

  .col {
    min-height: auto;
  }

  .col-1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
  }

  .col-3 {
    display: none;
  }

  .col-4 {
    position: absolute;
    top: 15px;
    right: 15px;
  }

  .brand {
    font-size: var(--font-size-mobile);
  }

  .about {
    font-size: var(--font-size-mobile);
  }

  .rooms {
    font-size: var(--font-size-mobile);
  }

  /* Galerie inline mobile */
  .gallery-inline {
    width: 100%;
  }

  .gallery-inline > .gallery-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .card-media {
    width: 100%;
  }

  .card-label {
    font-size: 14px;
  }

  /* Désactiver hover sur mobile */
  .card-label a:hover,
  .card:hover .card-label a {
    text-decoration: none;
  }

  /* INTRO */
  .intro-logo-img {
    width: 60vw;
  }

  /* HOME INTRO TEXT */
  .home-intro-text {
    padding: 15px;
    top: 5px;
  }

  .home-intro-text-inner {
    font-size: 32px;
    line-height: 1.1;
  }

  .intro-word {
    margin-right: 0;
  }

  .home-intro-wrapper {
    min-height: 180vh;
  }

  /* PROJECT */
  .project-top-grid {
    --pad: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px var(--pad) 0;
  }

  .project-top-left {
    font-size: var(--font-size-mobile);
  }

  .project-top-center {
    display: none;
  }

  .project-top-right {
    font-size: var(--font-size-mobile);
  }

  .project {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  .project-grid {
    --pad: 15px;
    display: flex;
    flex-direction: column;
    padding: 20px var(--pad) 0;
    min-height: auto;
  }

  .project-media {
    width: 100%;
    margin-bottom: 20px;
  }

  .slider {
    width: 100%;
  }

  .slide-media img {
    max-height: none;
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .project-info {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 15px;
    font-size: var(--font-size-mobile);
    z-index: 10;
    height: auto;
    max-height: 50vh;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
  }

  .project-info-content {
    flex: 1;
    min-width: 0;
  }

  .slider-counter {
    font-size: var(--font-size-mobile);
    margin-top: 0;
    padding-top: 0;
    flex-shrink: 0;
  }

  .project-line,
  .project-line-services {
    font-size: var(--font-size-mobile);
  }

  .project-read-btn {
    font-size: var(--font-size-mobile);
  }

  /* Désactiver animation lettres sur mobile */
  .read-letter.is-down {
    transform: none;
  }

  /* ABOUT PAGE */
  .about-page {
    --pad: 15px;
  }

  .about-header {
    width: 100%;
  }

  .brand-eponime {
    font-size: var(--font-size-mobile);
    margin-left: 50px;
  }

  .about-intro {
    font-size: var(--font-size-mobile);
  }

  .about-columns {
    width: 100%;
    grid-template-columns: 1fr;
    margin-top: 10vh;
    gap: 30px;
  }

  .about-col-title {
    font-size: var(--font-size-mobile);
  }

  .about-col-text {
    font-size: var(--font-size-mobile);
  }

  .about-footer-image {
    bottom: 15px;
    right: 15px;
  }

  .about-footer-image img {
    width: 15vw;
  }
}
