/* ══════════════════════════════
   RESET & VARIABLES
══════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --base: #F5F0E8; --vive: #D4E842; --encre: #1A1A1A;
  --accent: #E8462A; --kraft: #C8B89A; --label: #8C7A56;
  --display: 'MomoTrust','Arial Narrow',Arial,sans-serif;
  --mono: 'Space Mono','Courier New',Courier,monospace;
  --bar: 64px;
}

html { scroll-behavior: smooth; }
body { background: var(--encre); color: var(--base); font-family: var(--mono); overflow-x: hidden; cursor: none; min-height: 100vh; }
body.page-light { background: #EDE8DC; color: var(--encre); }
/* Pas de main native au survol : on ne garde que le rond personnalisé (qui grossit) */
a, button, input, textarea, select, label, [data-cursor] { cursor: none; }

/* ══════════════════════════════
   CURSEUR
══════════════════════════════ */
#cursor {
  position: fixed; width: 10px; height: 10px; background: var(--accent); border-radius: 50%;
  pointer-events: none; z-index: 9999; transform: translate(-50%,-50%);
  transition: width 0.2s, height 0.2s, background 0.2s; mix-blend-mode: difference;
}
#cursor.big { width: 60px; height: 60px; background: var(--vive); }
#cursor-trail {
  position: fixed; width: 40px; height: 40px; border: 1px solid rgba(232,70,42,0.35); border-radius: 50%;
  pointer-events: none; z-index: 9998; transform: translate(-50%,-50%);
}

/* ══════════════════════════════
   NAV
══════════════════════════════ */
nav#site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; padding: 1.5rem 3.5rem;
  background: transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, -webkit-backdrop-filter 0.4s ease, border-color 0.4s ease;
}
.nav-logo { display: block; height: 20px; transition: filter 0.35s; }
.nav-center { display: flex; border: 1px solid rgba(255,255,255,0.2); transition: border-color 0.35s; }
.nav-center a {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-size: 0.9rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--base); text-decoration: none;
  padding: 0.65rem 1.4rem; border-right: 1px solid rgba(255,255,255,0.15);
  transition: background 0.2s, color 0.35s, border-color 0.35s;
}
.nav-center a:last-child { border-right: none; }
.nav-center a:hover { background: var(--base); color: var(--encre); }
.nav-center a .nav-num { font-size: 0.9rem; color: var(--accent); letter-spacing: 0.1em; flex-shrink: 0; }
.nav-right { display: flex; justify-content: flex-end; }
.nav-cta {
  font-family: var(--mono); font-size: 0.9rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--encre); text-decoration: none;
  background: var(--vive); border: 1px solid var(--vive); padding: 0.65rem 1.25rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s; cursor: none;
}
.nav-cta:hover { background: var(--accent); color: var(--base); border-color: var(--accent); }
.nav-burger { display: none; }

/* ── CONTRASTE ADAPTATIF ──
   Par défaut la nav est en mode clair (texte/logo blancs) pour les fonds sombres.
   .on-light est ajoutée par main.js quand la nav passe au-dessus d'un fond clair :
   le texte, les bordures et le burger passent alors en foncé. */
nav#site-nav.on-light .nav-center { border-color: rgba(26,26,26,0.18); }
nav#site-nav.on-light .nav-center a { color: var(--encre); border-right-color: rgba(26,26,26,0.12); }
nav#site-nav.on-light .nav-center a:hover { background: var(--encre); color: var(--base); }
nav#site-nav.on-light .nav-burger span { background: var(--encre); }

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
footer#site-footer {
  background: var(--encre); padding: 2rem 3.5rem;
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-logo { height: 16px; opacity: 0.4; }
.footer-services, .footer-copy { font-family: var(--mono); font-size: 0.9rem; letter-spacing: 0.1em; color: rgba(200,184,154,0.5); }
.footer-mentions {
  font-family: var(--mono); font-size: 0.9rem; letter-spacing: 0.1em;
  color: rgba(200,184,154,0.4); text-decoration: none; transition: color 0.2s;
}
.footer-mentions:hover { color: var(--vive); }
footer#site-footer.light .footer-mentions { color: rgba(26,26,26,0.35); }
footer#site-footer.light .footer-mentions:hover { color: var(--accent); }
.footer-social { display: flex; align-items: center; gap: 1.25rem; }
.footer-social-link {
  font-family: var(--mono); font-size: 0.9rem; letter-spacing: 0.18em;
  text-transform: uppercase; text-decoration: none; cursor: none;
  color: rgba(200,184,154,0.85); transition: color 0.2s;
}
.footer-social-link:hover { color: var(--vive); }

/* ══════════════════════════════
   TAB BAR MOBILE
══════════════════════════════ */
#tab-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bar);
  background: var(--encre);
  border-top: 1px solid rgba(255,255,255,0.08);
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  padding: 0 0.5rem;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 200;
}
.tab-item {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  padding: 0.5rem; text-decoration: none;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em;
  text-transform: uppercase; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background: none; border: none; color: rgba(245,240,232,0.3);
  transition: color 0.2s;
}
.tab-item.active, .tab-item:active { color: var(--vive); }
.tab-icon { font-size: 1.15rem; line-height: 1; }

/* ══════════════════════════════
   ANIMATIONS REVEAL
══════════════════════════════ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.85s cubic-bezier(0.16,1,0.3,1), transform 0.85s cubic-bezier(0.16,1,0.3,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; } .reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; } .reveal-d4 { transition-delay: 0.4s; }
.reveal-d5 { transition-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  #cursor, #cursor-trail { display: none; } body { cursor: auto; }
}

/* ══════════════════════════════
   RESPONSIVE PARTAGÉ
══════════════════════════════ */
@media (max-width: 768px) {
  /* NAV */
  nav#site-nav { padding: 1.2rem 1.5rem; grid-template-columns: 1fr auto; }
  .nav-center {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--encre); flex-direction: column; justify-content: center;
    align-items: center; gap: 0; border: none; z-index: 999;
  }
  .nav-center.open { display: flex; }
  .nav-center a {
    font-size: 0.9rem; padding: 1.5rem 2rem; border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08); width: 100%; text-align: center;
    color: var(--base); justify-content: center;
  }
  .nav-center a:last-child { border-bottom: none; }
  .nav-center a:hover { background: rgba(255,255,255,0.06); color: var(--vive); }
  .nav-right { display: none; }
  .nav-burger {
    display: flex; flex-direction: column; gap: 5px; background: none; border: none;
    cursor: pointer; padding: 4px; z-index: 1001; position: relative;
  }
  .nav-burger span {
    display: block; width: 22px; height: 1.5px; background: var(--base);
    transition: transform 0.3s, opacity 0.3s;
  }
  .nav-burger.open span:first-child { transform: translateY(6.5px) rotate(45deg); }
  .nav-burger.open span:last-child  { transform: translateY(-6.5px) rotate(-45deg); }

  /* FOOTER */
  footer#site-footer { flex-direction: column; gap: 1rem; padding: 2rem 1.5rem 6rem; text-align: center; }

  /* TAB BAR */
  #tab-bar { display: grid; }

  /* CURSEUR désactivé */
  #cursor, #cursor-trail { display: none; }
  body { cursor: auto; }
}

@media (max-width: 480px) {
  .nav-cta { display: none; }
}
