/* ============================================================
   nav-base.css — Styles communs navbar + drawer
   twins3d.digital
   ============================================================ */

/* ── Base reset & tokens partagés ── */
:root {
  --void:        #111318;
  --void2:       #0d0f14;
  --space:       #1a2744;
  --cyan:        #00d4ff;
  --cyan-dim:    #00afd4;
  --spark:       #ff6f00;
  --spark-hover: #e06200;
  --white:       #ffffff;
  --grey-100:    #f4f6f8;
  --grey-200:    #e2e8f0;
  --grey-400:    #94a3b8;
  --grey-600:    #64748b;
  --nav-h:       72px;
  --radius:      10px;
  --radius-lg:   20px;
}

/* ── Navbar ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: var(--void2);
  display: flex;
  align-items: center;
  padding: 0 40px;
  gap: 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-right: 24px;
  text-decoration: none;
}
.nav-logo-icon {
  width: 44px; height: 44px;
  filter: drop-shadow(0 0 10px rgba(0,212,255,0.55));
}
.nav-logo-text {
  font-size: 23px; font-weight: 900;
  color: var(--white);
  letter-spacing: -1.5px;
  text-shadow: 0 0 28px rgba(0,212,255,0.28);
}
.nav-logo-text span { color: var(--cyan); text-shadow: 0 0 14px rgba(0,212,255,0.55); }

/* ── Lang switcher ── */
.nav-lang {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: 10px;
}
.nav-lang-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--grey-400);
  font-size: 11px; font-weight: 700;
  padding: 4px 8px; border-radius: 5px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.5px;
}
.nav-lang-btn:hover  { color: var(--white); background: rgba(255,255,255,0.08); }
.nav-lang-btn.active { color: var(--cyan); border-color: rgba(0,212,255,0.4); }

/* ── Nav links ── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  list-style: none;
}
.nav-links a, .nav-links li > a {
  color: var(--grey-200);
  font-size: 14px; font-weight: 500;
  padding: 7px 9px; border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.nav-links a:hover      { color: var(--white); background: rgba(255,255,255,0.07); }
.nav-links a.active-page { color: var(--cyan); }

/* ── CTA buttons ── */
.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}
.btn-nav-login,
.btn-nav-demo {
  background: var(--spark);
  color: var(--white);
  font-size: 14px; font-weight: 700;
  padding: 9px 18px; border-radius: 50px;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn-nav-login:hover,
.btn-nav-demo:hover { background: var(--spark-hover); transform: translateY(-1px); }

/* ── Menu « Se connecter » ── */
.nav-login { position: relative; flex-shrink: 0; margin-left: 4px; }
.nav-login-btn {
  display: flex; align-items: center; gap: 7px;
  background: transparent; border: 1px solid rgba(255,255,255,0.22);
  color: var(--white); font-size: 14px; font-weight: 600;
  padding: 8px 16px; border-radius: 50px; cursor: pointer;
  white-space: nowrap; transition: border-color 0.2s, color 0.2s;
}
.nav-login-btn svg { width: 12px; height: 12px; transition: transform 0.2s; }
.nav-login-btn:hover,
.nav-login:focus-within .nav-login-btn { border-color: var(--cyan); color: var(--cyan); }
.nav-login:hover .nav-login-btn svg,
.nav-login:focus-within .nav-login-btn svg { transform: rotate(180deg); }
.nav-login-menu {
  position: absolute; top: calc(100% + 12px); right: 0;
  min-width: 230px; background: var(--void2);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  padding: 8px; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s; z-index: 1001;
}
.nav-login-menu::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.nav-login:hover .nav-login-menu,
.nav-login:focus-within .nav-login-menu {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0s;
}
.nav-login-menu a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 8px; text-decoration: none;
  color: var(--grey-200); transition: background 0.15s;
}
.nav-login-menu a:hover { background: rgba(0,212,255,0.1); }
.nav-login-menu a .ic { font-size: 17px; flex-shrink: 0; }
.nav-login-menu a b { display: block; font-size: 14px; font-weight: 600; color: var(--white); }
.nav-login-menu a small { display: block; font-size: 11.5px; color: var(--grey-400); }
html[dir=rtl] .nav-login-menu { right: auto; left: 0; }
.drawer-sep { height: 1px; background: rgba(255,255,255,0.08); margin: 10px 0; }

/* ── Hamburger ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: all 0.3s;
}

/* ── Mobile overlay ── */
.mobile-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1100;
  display: none;
}
.mobile-overlay.open { display: block; }

/* ── Mobile drawer ── */
.mobile-drawer {
  position: fixed;
  top: 0; right: -300px; bottom: 0;
  width: 280px;
  background: var(--void2);
  z-index: 1200;
  padding: 24px 20px;
  display: flex; flex-direction: column; gap: 4px;
  transition: right 0.3s ease;
  overflow-y: auto;
}
.mobile-drawer.open { right: 0; }

.mobile-drawer > a {
  color: var(--grey-200);
  font-size: 16px; font-weight: 500;
  padding: 12px 16px; border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}
.mobile-drawer > a:hover      { color: var(--white); background: rgba(255,255,255,0.07); }
.mobile-drawer > a.active-page { color: var(--cyan); }

.drawer-close {
  background: none; border: none;
  color: var(--grey-400);
  font-size: 28px; cursor: pointer;
  align-self: flex-end; margin-bottom: 16px;
  line-height: 1;
}

.btn-spark-mob {
  background: var(--spark); color: var(--white);
  font-size: 15px; font-weight: 700;
  padding: 12px 24px; border-radius: 50px;
  text-align: center;
  transition: background 0.2s;
  text-decoration: none;
  margin-top: 12px;
}
.btn-spark-mob:hover { background: var(--spark-hover); }

/* ── Fade-up animations (partagées) ── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible   { opacity: 1; transform: none; }
.fade-up-delay-1   { transition-delay: 0.1s; }
.fade-up-delay-2   { transition-delay: 0.2s; }
.fade-up-delay-3   { transition-delay: 0.3s; }
.fade-up-delay-4   { transition-delay: 0.4s; }

/* ── Footer base ── */
.footer {
  background: var(--void2);
  padding: 64px 0 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.footer-grid  {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 56px;
}
.footer-logo      { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-logo-icon { width: 36px; height: 36px; filter: drop-shadow(0 0 6px rgba(0,212,255,0.4)); }
.footer-logo-text { font-size: 20px; font-weight: 900; color: var(--white); letter-spacing: -1px; }
.footer-logo-text span { color: var(--cyan); }
.footer-desc { font-size: 14px; color: var(--grey-400); line-height: 1.7; max-width: 280px; margin-bottom: 24px; }
.footer-col h4 { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--grey-400); margin-bottom: 18px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 14px; color: var(--grey-600); transition: color 0.2s; text-decoration: none; }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 24px 0;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-copyright { font-size: 13px; color: var(--grey-600); }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { font-size: 13px; color: var(--grey-600); transition: color 0.2s; text-decoration: none; }
.footer-legal a:hover { color: var(--grey-400); }

/* ── RTL ── */
html[dir=rtl] .nav-logo   { margin-right: 0; margin-left: 40px; }
html[dir=rtl] .nav-lang   { margin-right: 0; margin-left: 10px; }
html[dir=rtl] .nav-cta    { margin-left: 0; margin-right: auto; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
/* Sous ~1180px : la nav desktop ne tient plus → hamburger */
@media (max-width: 1180px) {
  .nav-links, .nav-cta, .nav-login { display: none; }
  .nav-hamburger { display: flex; }
  .nav-lang { margin-left: auto; margin-right: 10px; }
}
@media (max-width: 768px) {
  .nav { padding: 0 16px; }
  .nav-links, .nav-cta, .nav-login { display: none; }
  .nav-hamburger { display: flex; }

  /* Logo compact sur mobile */
  .nav-logo { margin-right: 0; }
  .nav-logo-text { font-size: 20px; }
  .nav-logo-icon { width: 36px; height: 36px; }

  /* Lang switcher visible entre logo et hamburger */
  .nav-lang {
    display: flex;
    margin-left: auto;   /* pousse les boutons vers la droite */
    margin-right: 10px;  /* espace avant le hamburger */
    gap: 1px;
  }
  .nav-lang-btn {
    font-size: 10px;
    padding: 5px 7px;
    border-radius: 4px;
  }

  .footer-inner  { padding: 0 20px; }
  .footer-grid   { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
