/* ============================================================================
 * Components — header, nav burger, cursor, boutons, marquee, reveals
 * ============================================================================ */

/* ── Curseur custom ──────────────────────────────────────────────────── */
/* Masque la souris système (uniquement sur device avec hover précis) */
@media (hover: hover) and (pointer: fine) {
  html, body, a, button, .collection-card, .gallery__tile, [data-cursor],
  input, textarea, select, label {
    cursor: none !important;
  }
}

.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 12px; height: 12px;
  background: var(--or);
  border-radius: 1px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(10, 10, 10, 0.15);
  transition: width var(--dur-fast) var(--ease-out),
              height var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              border-radius var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out);
  mix-blend-mode: difference;
}

/* Lignes de calepinage qui n'apparaissent qu'au hover */
.cursor::before,
.cursor::after {
  content: "";
  position: absolute;
  background: rgba(244, 237, 225, 0.4);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.cursor::before { left: 50%; top: 0; bottom: 0; width: 1px; transform: translateX(-50%); }
.cursor::after  { top: 50%; left: 0; right: 0; height: 1px; transform: translateY(-50%); }

.cursor.is-hovering {
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--ivoire);
  border-radius: 2px;
  box-shadow:
    inset 0 0 0 1px rgba(244, 237, 225, 0.15),
    0 0 24px rgba(201, 165, 92, 0.25);
}
.cursor.is-hovering::before,
.cursor.is-hovering::after { opacity: 1; }

.cursor.is-hidden { opacity: 0; }
@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}

/* ── Header ──────────────────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
  color: var(--ivoire);
  transition: transform var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out),
              backdrop-filter var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
}
.header.is-scrolled {
  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.header.is-hidden {
  transform: translateY(-100%);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
}
.header__brand {
  display: inline-flex;
  align-items: center;
  height: calc(var(--header-h) - 12px);
}
.header__logo {
  height: 100%;
  width: auto;
  max-height: 64px;
  object-fit: contain;
  /* "screen" rend le noir du JPG transparent sur tout fond */
  mix-blend-mode: screen;
  filter: contrast(1.05) brightness(1.08);
  transition: transform var(--dur-base) var(--ease-out);
}
.header__brand:hover .header__logo {
  transform: scale(1.03);
}
.header__nav-trigger {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--ff-mono);
  font-size: var(--fs-xxs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.header__nav-trigger:hover .burger span:nth-child(1) { transform: translateY(-2px); }
.header__nav-trigger:hover .burger span:nth-child(2) { transform: translateY(2px); }

.burger {
  width: 28px; height: 14px;
  position: relative;
  display: inline-block;
}
.burger span {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: currentColor;
  transition: transform var(--dur-base) var(--ease-out);
}
.burger span:nth-child(1) { top: 4px; }
.burger span:nth-child(2) { bottom: 4px; }
[data-menu-open="true"] .burger span:nth-child(1) { transform: translateY(2px) rotate(45deg); }
[data-menu-open="true"] .burger span:nth-child(2) { transform: translateY(-2px) rotate(-45deg); }

/* ── Menu plein écran ────────────────────────────────────────────────── */
.fullnav {
  position: fixed;
  inset: 0;
  background: var(--noir);
  color: var(--ivoire);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-slow) var(--ease-out),
              visibility var(--dur-slow);
  overflow: auto;
}
[data-menu-open="true"] .fullnav {
  opacity: 1;
  visibility: visible;
}
.fullnav__inner {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: calc(var(--header-h) + var(--sp-5)) var(--gutter) var(--sp-5);
  gap: var(--sp-8);
}
.fullnav__primary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sp-1);
}
.fullnav__link {
  font-family: var(--ff-display);
  font-size: clamp(2.2rem, 1.6rem + 2.6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-3);
  position: relative;
  width: fit-content;
  padding-block: 0.1em;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out),
              color var(--dur-base) var(--ease-out);
}
[data-menu-open="true"] .fullnav__link {
  opacity: 1;
  transform: translateY(0);
}
.fullnav__primary .fullnav__link:nth-child(1) { transition-delay: 100ms; }
.fullnav__primary .fullnav__link:nth-child(2) { transition-delay: 180ms; }
.fullnav__primary .fullnav__link:nth-child(3) { transition-delay: 260ms; }
.fullnav__primary .fullnav__link:nth-child(4) { transition-delay: 340ms; }
.fullnav__primary .fullnav__link:nth-child(5) { transition-delay: 420ms; }

.fullnav__link em { color: var(--or); font-style: italic; }
.fullnav__link .num {
  font-family: var(--ff-mono);
  font-size: var(--fs-xxs);
  font-style: normal;
  letter-spacing: 0.1em;
  color: var(--or);
  align-self: flex-start;
  margin-top: 0.8em;
}
.fullnav__link:hover { color: var(--or); }

.fullnav__secondary {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--sp-7);
}
.fullnav__secondary-block h6 {
  font-family: var(--ff-mono);
  font-size: var(--fs-xxs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(244, 237, 225, 0.5);
  margin-bottom: var(--sp-4);
}
.fullnav__secondary-block ul li {
  font-family: var(--ff-display);
  font-size: var(--fs-md);
  line-height: 1.5;
  font-style: italic;
}
.fullnav__secondary-block ul li a { transition: color var(--dur-fast); }
.fullnav__secondary-block ul li a:hover { color: var(--or); }

.fullnav__contact {
  font-family: var(--ff-display);
  font-size: var(--fs-lg);
  line-height: 1.3;
}
.fullnav__contact .label { display: block; margin-bottom: var(--sp-2); color: rgba(244, 237, 225, 0.5); }

@media (max-width: 768px) {
  .fullnav__inner { grid-template-columns: 1fr; gap: var(--sp-6); }
  .fullnav__link { font-size: clamp(1.8rem, 1.3rem + 3vw, 2.6rem); }
}

/* ── Bouton CTA ──────────────────────────────────────────────────────── */
.cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  font-family: var(--ff-mono);
  font-size: var(--fs-xxs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  border: 1px solid currentColor;
  color: var(--fg);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--dur-base) var(--ease-out);
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fg);
  transform: translateY(101%);
  transition: transform var(--dur-base) var(--ease-expo);
  z-index: -1;
}
.cta:hover { color: var(--bg); }
.cta:hover::before { transform: translateY(0); }
.cta .arrow {
  width: 16px; height: 1px;
  background: currentColor;
  position: relative;
  transition: width var(--dur-base) var(--ease-out);
}
.cta .arrow::after {
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 6px; height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}
.cta:hover .arrow { width: 24px; }

.cta--ghost {
  border-color: rgba(244, 237, 225, 0.3);
  color: var(--ivoire);
}
.cta--ghost::before { background: var(--ivoire); }
.cta--ghost:hover { color: var(--noir); }

/* ── Marquee ─────────────────────────────────────────────────────────── */
.marquee {
  display: flex;
  overflow: hidden;
  border-block: 1px solid var(--rule);
  padding: var(--sp-5) 0;
  gap: var(--sp-7);
  white-space: nowrap;
}
.marquee__track {
  display: flex;
  gap: var(--sp-7);
  animation: marquee 45s linear infinite;
  font-family: var(--ff-display);
  font-size: var(--fs-2xl);
  font-style: italic;
  font-weight: 300;
  color: var(--fg-soft);
}
.marquee__track span { display: inline-flex; align-items: center; gap: var(--sp-7); }
.marquee__track .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Reveals ─────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--dur-xslow) var(--ease-expo),
              transform var(--dur-xslow) var(--ease-expo);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

.reveal-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.reveal-mask > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform var(--dur-xslow) var(--ease-expo);
}
.reveal-mask.is-in > span {
  transform: translateY(0);
}

/* ── Theme toggle ────────────────────────────────────────────────────── */
.theme-toggle {
  position: fixed;
  bottom: var(--sp-5);
  right: var(--sp-5);
  z-index: 80;
  width: 44px; height: 44px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--bg);
  color: var(--fg);
  display: grid;
  place-items: center;
  transition: transform var(--dur-base) var(--ease-out);
}
.theme-toggle:hover { transform: rotate(180deg); }
.theme-toggle svg { width: 18px; height: 18px; }

/* ── Scroll progress (top) ───────────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--or);
  z-index: 200;
  width: 0%;
  transition: width 80ms linear;
}
