/* ============================================================
   Scriptonic Outils — nav.css
   Header et footer partagés pour tous les outils.
   Dark theme, responsive, cohérent avec le site principal.
   ============================================================ */

/* --- Header --- */
.sn-header {
  background: #0a0a0a;
  border-bottom: 1px solid #333;
  position: sticky;
  top: 0;
  z-index: 200;
}

.sn-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sn-logo img {
  display: block;
  height: 28px;
  width: auto;
}

/* --- Navigation --- */
.sn-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
  justify-content: center;
}

.sn-nav-link {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.88rem;
  color: #ccc;
  text-decoration: none;
  padding: 0.5rem 0.7rem;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.sn-nav-link:hover {
  color: #fbba32;
  background: rgba(251, 186, 50, 0.06);
}

/* --- Dropdown --- */
.sn-dropdown {
  position: relative;
}

.sn-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 0.4rem 0;
  z-index: 210;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.sn-dropdown:hover .sn-dropdown-menu {
  display: block;
}

.sn-dropdown-item {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.85rem;
  color: #ccc;
  text-decoration: none;
  padding: 0.55rem 1rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.sn-dropdown-item:hover {
  color: #fbba32;
  background: rgba(251, 186, 50, 0.06);
}

/* --- CTA --- */
.sn-cta {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1a1a;
  background: #fbba32;
  text-decoration: none;
  padding: 0.5rem 1.1rem;
  border-radius: 5px;
  white-space: nowrap;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.sn-cta:hover {
  background: #e0a520;
}

/* --- Hamburger --- */
.sn-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.sn-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #ccc;
  border-radius: 1px;
  transition: all 0.3s ease;
}

.sn-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.sn-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.sn-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Footer --- */
.sn-footer {
  background: #0a0a0a;
  border-top: 1px solid #333;
  padding: 2.5rem 1.5rem;
}

.sn-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
}

.sn-footer-brand img {
  display: block;
  height: 24px;
  width: auto;
  margin-bottom: 0.5rem;
}

.sn-footer-brand p {
  font-size: 0.8rem;
  color: #888;
}

.sn-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.2rem;
  justify-content: center;
}

.sn-footer-links a {
  font-size: 0.85rem;
  color: #888;
  text-decoration: none;
  transition: color 0.2s ease;
}

.sn-footer-links a:hover {
  color: #fbba32;
}

.sn-footer-info {
  text-align: right;
}

.sn-footer-info p {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 0.2rem;
}

.sn-footer-info a {
  color: #fbba32;
  text-decoration: none;
}

.sn-footer-info a:hover {
  text-decoration: underline;
}

/* --- Responsive mobile --- */
@media (max-width: 768px) {
  .sn-header-inner {
    height: 52px;
    padding: 0 1rem;
  }

  .sn-logo img {
    height: 24px;
  }

  .sn-nav {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: #0a0a0a;
    border-bottom: 1px solid #333;
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0;
    gap: 0;
  }

  .sn-nav.open {
    display: flex;
  }

  .sn-nav-link {
    padding: 0.7rem 1.5rem;
    border-radius: 0;
    font-size: 0.95rem;
  }

  .sn-dropdown-menu {
    position: static;
    display: none;
    border: none;
    box-shadow: none;
    padding: 0;
    min-width: 0;
    background: #111;
  }

  .sn-dropdown.open .sn-dropdown-menu {
    display: block;
  }

  .sn-dropdown-item {
    padding: 0.6rem 2.5rem;
    font-size: 0.9rem;
  }

  .sn-cta {
    display: none;
  }

  .sn-hamburger {
    display: flex;
  }

  /* Footer mobile */
  .sn-footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }

  .sn-footer-brand img {
    margin: 0 auto 0.5rem;
  }

  .sn-footer-info {
    text-align: center;
  }

  .sn-footer-links {
    justify-content: center;
  }
}
