/* ============================================================
   navbar.css — Barre de navigation Axom
   Sticky, responsive, avec menu hamburger pour mobile
   ============================================================ */

/* --- Conteneur principal de la navbar --- */
.navbar {
  position: fixed;          /* Reste en haut même en scrollant */
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;            /* Au-dessus de tout le reste */
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  background: rgba(10, 10, 10, 0);   /* Transparent au départ */
  border-bottom: 1px solid rgba(255,255,255,0);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Quand l'utilisateur scrolle, la navbar devient opaque (ajouté par JS) */
.navbar.scrolled {
  background: rgba(10, 10, 10, 0.95);
  border-bottom-color: rgba(255,255,255,0.07);
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Sur les pages sans hero (fond sombre direct), la navbar est opaque dès le début */
.navbar.opaque {
  background: rgba(10, 10, 10, 0.98);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

/* --- Layout intérieur de la navbar --- */
.navbar-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- Logo --- */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.navbar-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

/* Texte fallback si le logo ne charge pas */
.navbar-logo .logo-text {
  font-family: var(--font-titre);
  font-size: 28px;
  letter-spacing: 0.05em;
  color: var(--couleur-secondaire);
}

/* --- Liens de navigation (desktop) --- */
.navbar-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.navbar-links a {
  font-family: var(--font-sous);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  position: relative;
  transition: color 0.2s ease;
}

/* Ligne de soulignement animée au hover */
.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--couleur-accent);
  transition: width 0.25s ease;
}

.navbar-links a:hover {
  color: var(--couleur-secondaire);
}

.navbar-links a:hover::after,
.navbar-links a.actif::after {
  width: 100%;
}

.navbar-links a.actif {
  color: var(--couleur-secondaire);
}

/* --- Actions droite (panier + hamburger) --- */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* --- Bouton Panier avec compteur --- */
.btn-panier {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--couleur-gris-fonce);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-sous);
  font-size: 13px;
  font-weight: 500;
  color: var(--couleur-secondaire);
  letter-spacing: 0.05em;
}

.btn-panier:hover {
  background: var(--couleur-accent);
  color: #000;
  border-color: var(--couleur-accent);
}

/* Badge avec le nombre d'articles */
.panier-compteur {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--couleur-accent);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Animation bounce quand on ajoute un article */
.panier-compteur.bounce {
  animation: bounceCompteur 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bounceCompteur {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.6); }
  100% { transform: scale(1); }
}

.btn-panier:hover .panier-compteur {
  background: #000;
  color: var(--couleur-accent);
}

/* --- Bouton Hamburger (mobile) --- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--couleur-secondaire);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Animation hamburger → croix */
.hamburger.ouvert span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.ouvert span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.ouvert span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Menu mobile (panneau latéral) --- */
.menu-mobile {
  position: fixed;
  top: 72px;    /* Juste en dessous de la navbar */
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: 40px 24px;
  gap: 12px;
  transform: translateX(100%);
  transition: transform 0.35s ease;
}

.menu-mobile.ouvert {
  transform: translateX(0);
}

.menu-mobile a {
  font-family: var(--font-titre);
  font-size: 42px;
  color: rgba(255,255,255,0.6);
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.menu-mobile a:hover,
.menu-mobile a.actif {
  color: var(--couleur-secondaire);
  padding-left: 12px;
}

.menu-mobile a:last-child {
  border-bottom: none;
}

.menu-mobile .btn-panier-mobile {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

/* ============================================================
   RESPONSIVE NAVBAR
   ============================================================ */
@media (max-width: 768px) {
  .navbar-links {
    display: none; /* Cachés sur mobile */
  }

  .hamburger {
    display: flex;
  }

  .btn-panier .panier-texte {
    display: none; /* Cache le texte "Panier" sur mobile */
  }
}
