/* ---------- Fonts ---------- */
/* Si vous fournissez le fichier de police, décommentez et adaptez : */
/*
@font-face {
  font-family: "Neue Haas Grotesk Light";
  src: url("assets/NeueHaasGrotesk-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
*/

/* ---------- Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: #05261D;
}

body {
  position: relative;
  width: 100%;
  height: 100dvh;
  height: 100vh; /* fallback */
  background-color: #05261D;
  transition: background-color 0.4s ease;
  font-family: "Neue Haas Grotesk Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  cursor: none;
}

/* ---------- Stage / Logo ---------- */
.stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-link {
  display: inline-block;
  line-height: 0;
  cursor: none;
}

.logo-wrap {
  position: relative;
  display: block;
  width: clamp(140px, 22vw, 320px);
  aspect-ratio: 1 / 1;
}

.logo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.logo--base {
  opacity: 1;
  transition: opacity 0.4s ease;
}

.logo--hover {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.stage:has(.logo-link:hover) .logo--base,
body.logo-hover .logo--base {
  opacity: 0;
}

.stage:has(.logo-link:hover) .logo--hover,
body.logo-hover .logo--hover {
  opacity: 1;
}

/* ---------- Hover state (background + text) ---------- */
body.logo-hover {
  background-color: #F5F5F5;
}

body.logo-hover .contact,
body.logo-hover .contact a {
  color: #05261D;
}

/* ---------- Footer / contact ---------- */
.contact {
  position: absolute;
  left: 50%;
  bottom: clamp(16px, 4vh, 40px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.6em;
  white-space: nowrap;
  font-size: clamp(11px, 1.4vw, 14px);
  letter-spacing: 0.02em;
  color: #F5F5F5;
  transition: color 0.4s ease;
  max-width: 92vw;
}

.contact a {
  color: inherit;
  text-decoration: none;
  cursor: none;
}

.contact .sep {
  opacity: 0.6;
}

/* ---------- Custom cursor ---------- */
:root {
  /* Ajustez cette valeur pour changer la taille du curseur */
  --cursor-size: 16px;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--cursor-size);
  height: var(--cursor-size);
  pointer-events: none;
  background-image: url("assets/PICTO_CARRE_2026_FAKEWHITE.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transform: translate(-50%, -50%);
  will-change: transform;
  z-index: 9999;
  opacity: 0;
}

body.cursor-ready .custom-cursor {
  opacity: 1;
}

/* Hide custom cursor + restore system cursor on touch devices */
@media (hover: none), (pointer: coarse) {
  body {
    cursor: auto;
  }
  .logo-link,
  .contact a {
    cursor: pointer;
  }
  .custom-cursor {
    display: none;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  body,
  .logo--base,
  .logo--hover,
  .contact {
    transition: none;
  }
}
