/*
 * TLSHOP — Mobile Header
 * Injecté via wp_head hook dans functions.php
 * Masque le header Elementor sous 480px et affiche le header mobile custom
 */

/* Cache le header mobile sur desktop par défaut */
#tlshop-mobile-header,
#tlshop-mobile-nav {
  display: none;
}

@media (max-width: 480px) {

/* Réaffiche le header mobile sous 480px */
#tlshop-mobile-header {
  display: flex;
}

#tlshop-mobile-nav {
  display: flex;
}

/* Header mobile fixé en haut */
#tlshop-mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: rgba(14,14,15,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

/* Logo */
#tlshop-mobile-header .tmh-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

#tlshop-mobile-header .tmh-logo img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

/* Actions droite */
#tlshop-mobile-header .tmh-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Boutons icônes */
#tlshop-mobile-header .tmh-icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  border-radius: 8px;
  transition: background .15s;
  text-decoration: none;
  position: relative;
}
#tlshop-mobile-header .tmh-icon-btn:hover {
  background: rgba(255,255,255,0.06);
}

#tlshop-mobile-header .tmh-icon-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Badge panier */
#tlshop-mobile-header .tmh-cart-count {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: #00C0FF;
  color: #000;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  line-height: 1;
}
#tlshop-mobile-header .tmh-cart-count[data-count="0"] {
  display: none;
}

/* Hamburger */
#tlshop-mobile-header .tmh-hamburger {
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  padding: 0;
  transition: background .15s;
}
#tlshop-mobile-header .tmh-hamburger:hover {
  background: rgba(255,255,255,0.06);
}
#tlshop-mobile-header .tmh-hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
  transform-origin: center;
}
#tlshop-mobile-header .tmh-hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
#tlshop-mobile-header .tmh-hamburger.open span:nth-child(2) {
  opacity: 0;
}
#tlshop-mobile-header .tmh-hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Menu drawer */
#tlshop-mobile-nav {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99998;
  background: rgba(14,14,15,0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  padding: 32px 24px 40px;
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
#tlshop-mobile-nav.open {
  transform: translateX(0);
}

/* Liens du menu */
#tlshop-mobile-nav .tmh-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

#tlshop-mobile-nav .tmh-nav-links li {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

#tlshop-mobile-nav .tmh-nav-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  text-decoration: none;
  transition: color .15s;
}
#tlshop-mobile-nav .tmh-nav-links a:hover {
  color: #00C0FF;
}
#tlshop-mobile-nav .tmh-nav-links a svg {
  width: 16px;
  height: 16px;
  color: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

/* Footer du menu */
#tlshop-mobile-nav .tmh-nav-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 32px;
}

#tlshop-mobile-nav .tmh-nav-footer a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  color: #7a7870;
  text-decoration: none;
  transition: color .15s;
}
#tlshop-mobile-nav .tmh-nav-footer a:hover { color: #c8ccd0; }
#tlshop-mobile-nav .tmh-nav-footer svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Compense le header fixe pour le contenu */
body.tmh-active .mh-page-wrapper,
body.tmh-active .woocommerce,
body.tmh-active .woocommerce-page {
  padding-top: 76px !important;
}

/* Empêche le scroll quand le menu est ouvert */
body.tmh-menu-open {
  overflow: hidden !important;
}

} /* END @media (max-width: 480px) */
