/* ================= BASE ================= */
:root{
  --bg: rgba(255,255,255,0.92);
  --line: #eaeaea;
  --text: #111;
  --muted: #6b7280;
  --shadow: 0 12px 40px rgba(0,0,0,0.10);
  --radius: 14px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: hsl(0, 0%, 100%);
  padding-top: 80px; /* IMPORTANT: topbar fixed */
}

a{ color: inherit; }

/* ================= TOPBAR ================= */
.topbar{
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 80px;
  background: var(--bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 9999;
}

.topbar-inner{
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  overflow: visible;
}

/* ================= LOGO ANIMÉ ================= */
.logo-container{
  position: relative;
  width: fit-content;
  min-width: 260px;
  height: 60px;
  padding-right: 1px;
  overflow: hidden;
}

/* TITRE */
.mask{
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  overflow: hidden;
  z-index: 1;
}

.titre{
  height: 42px;
  display: block;
}

/* IMPRIMANTE */
.printer{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 58px;
  z-index: 5;
  pointer-events: none;
}

/* PLINTHE */
.plinthe{
  position: absolute;
  bottom: 0px;
  left: 0;
  width: 100%;
  height: 6px;
  background: #000;
  z-index: 2;
}

.plinthe-cut{
  position: absolute;
  top: 0;
  left: 0;
  width: 37px;
  height: 100%;
  background: #fff;
  z-index: 3;
}

/* ================= MENU DESKTOP ================= */
.nav{
  display: flex;
  gap: 26px;
  align-items: center;
}

.nav a{
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.1px;
  position: relative;
  padding: 8px 2px;
}

.nav a::after{
  content: "";
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 0%;
  height: 2px;
  background: #000;
  transition: width .25s ease;
}

.nav a:hover::after{ width: 100%; }

/* ================= BURGER ================= */
.burger{
  display: none;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 10px;
  border-radius: 12px;
}

.burger:hover{
  background: rgba(0,0,0,0.04);
}

.burger span{
  width: 26px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}

/* Anim burger -> croix */
.topbar.menu-open .burger span:nth-child(1){
  transform: translateY(8px) rotate(45deg);
}
.topbar.menu-open .burger span:nth-child(2){
  opacity: 0;
}
.topbar.menu-open .burger span:nth-child(3){
  transform: translateY(-8px) rotate(-45deg);
}

/* ================= MOBILE DRAWER ================= */
.mobile-overlay{
  position: fixed;
  inset: 80px 0 0 0; /* sous la topbar */
  background: rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 9998;
}

.mobile-menu{
  position: fixed;
  top: 80px;
  right: 0;
  height: calc(100dvh - 80px);
  width: min(360px, 88vw);
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(110%);
  transition: transform .28s ease;
  z-index: 9999;

  display: flex;
  flex-direction: column;
  padding: 14px;
  gap: 6px;
}

.mobile-menu a{
  text-decoration: none;
  font-weight: 700;
  padding: 14px 14px;
  border-radius: 12px;
}

.mobile-menu a:hover{
  background: rgba(0,0,0,0.04);
}

/* OUVERT */
.topbar.menu-open .mobile-overlay{
  opacity: 1;
  pointer-events: auto;
}
.topbar.menu-open .mobile-menu{
  transform: translateX(0);
}

/* ================= MOBILE RULES ================= */
@media (max-width: 900px){
  .nav{ display: none; }
  .burger{ display: flex; }

  body{ padding-top: 80px; }

  .logo-container{
    min-width: 200px;
    height: 50px;
    padding-right: 222px;  /* <-- FIX */
  }

  .titre{ height: 36px; }
  .printer{ height: 50px; }
}

/* ================= PAGE CONTENT (optionnel) ================= */
.page{
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* ================= TRANSITION "PAINT CURTAIN" ================= */
:root{ --curtain: #00FFFF; }

.transition{
  position: fixed;
  left: 0;
  top: 80px; /* recalé en JS */
  width: 100vw;
  height: calc(100vh - 80px);
  z-index: 9990;
  pointer-events: none;
  display: none;
  transform: translateZ(0);
}

.transition.on{ display: block; }

.transition canvas{
  width: 100%;
  height: 100%;
  display: block;
}


