/* ══════════════════════════════════════════════════════════════
   QUATRE HOME PAGE — INDEX.HTML SPECIFIC STYLES
   ═════════════════════════════════════════════════════════════ */

html {
  background: #ffffff;
}

.section {
  padding: var(--section-pad-y) 0;
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-light);
}

/* Hero */
.hero {
  /* Full-width — no container padding — so dark bg (ghost mode) covers edge-to-edge */
  width: 100%;
  padding-top: 0;
  padding-bottom: 0;
  position: relative;
  cursor: crosshair;
}

/* La grille est dessinée exclusivement par le canvas (masquée au curseur) */

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-inner {
  z-index: 3; /* au-dessus des canvases d'effets (grid z:1-2, splash z:2) */
}

/* Inner wrapper keeps content aligned to the container grid */
.hero-inner {
  /* inherits container width/padding */
}

.hero-text {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Showreel section ── */
.showreel {
  padding-bottom: 60px;
}

.showreel-media {
  /* Override: pointer cursor hidden, replaced by custom cursor */
  cursor: none;
}

/* Custom play cursor — positioned via JS translate(x, y) translate(-50%,-50%) */
.showreel-cursor {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  opacity: 0;             /* shown/hidden by JS */
  z-index: 10;
  will-change: transform;
  /* No CSS transition on transform — JS lerp handles the smoothing */
  color: white;
}

.showreel-cursor__icon {
  display: block;
  flex-shrink: 0;
}

.showreel-cursor__label {
  font-family: "GTFlexaMono", monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.80);
}

.hero-title-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 76px;
}

@keyframes heroIn {
  from { opacity: 0; transform: scale(1.08); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes lineIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-description .line {
  display: block;
  opacity: 0;
  animation: lineIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.hero-description .line:nth-child(1) { animation-delay: 0.72s; }
.hero-description .line:nth-child(2) { animation-delay: 0.87s; }
.hero-description .line:nth-child(3) { animation-delay: 1.02s; }
.hero-description .line:nth-child(4) { animation-delay: 1.17s; }

.hero-title {
  text-align: center;
  font-size: var(--headline-xl-size);
  font-weight: 400;
  line-height: var(--headline-xl-lh);
  white-space: nowrap;
  animation: heroIn 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.hero-description {
  padding-bottom: 48px;
  max-width: 40ch;
  font-size: var(--text-base-size);
  line-height: var(--text-base-lh);
  color: #2a2a2a;
}

.hero-media--full {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(130deg, #161616, #2f2f2f);
  position: relative;
  overflow: hidden;
  transform: scale(0.72);
  transform-origin: center bottom;
  will-change: transform;
}

/* Generic heading block */
.heading-wrap {
  margin-bottom: 52px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
}

.heading-wrap h2 {
  font-size: var(--headline-lg-size);
  line-height: var(--headline-lg-lh);
}

.eyebrow {
  font-size: var(--text-sm-size);
  line-height: var(--text-sm-lh);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
}

.eyebrow--light {
  color: rgba(255, 255, 255, 0.65);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 22px;
  margin-bottom: 34px;
}

.section-head-left {
  max-width: 50%;
}

.section-head h2 {
  font-size: var(--headline-lg-size);
  line-height: var(--headline-lg-lh);
}

/* Expertises */
.expert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.expert-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Case studies */
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.bg-dark-section {
  background: var(--bg-dark);
  color: var(--text-light);
}

.bg-transparent-light {
  background: transparent;
  color: var(--text-light);
}

.masonry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: start;
}

/* Zone de transition scroll-driven */
.transition-zone {
  height: 64px;
  pointer-events: none;
}

/* Shop */
.shop-card-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
}

/* Actus */
.actus-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
  .expert-columns {
    grid-template-columns: repeat(2, 1fr);
  }

  .masonry-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .shop-card-grid {
    grid-template-columns: 1fr;
  }

  .actus-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .case-grid {
    grid-template-columns: 1fr;
  }

  .hero-media--full {
    min-height: 320px;
  }

  .hero-title {
    white-space: normal;
    max-width: 14ch;
    margin-inline: auto;
  }

  .hero-text {
    min-height: 400px;
    padding-top: 60px;
  }

  .expert-columns {
    grid-template-columns: 1fr;
  }

  .expert-col {
    border-left: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  .expert-col:first-child {
    border-top: 0;
  }

  .masonry-grid {
    grid-template-columns: 1fr;
  }

  .actus-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    left: 0;
    width: 100%;
    background: inherit;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 4%;
    gap: 14px;
    transform: translateY(-130%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 560px) {
  .section {
    padding: 84px 0;
  }

  .hero {
    padding-top: 138px;
  }

  .expert-grid {
    grid-template-columns: 1fr;
  }
}
