/* ========================================
   HEADER UNE LIGNE - CSS
   Version 2.0 - Décembre 2025
======================================== */

/* TOPBAR */
.topbar {
  background-color: #F5EFC1;
  color: #000;
  padding: 8px 20px;
  text-align: center;
  font-size: 14px;
}

.topbar a {
  color: #000;
  text-decoration: underline;
}

/* ========================================
   HEADER PRINCIPAL - UNE LIGNE
======================================== */
.main-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #e0e0e0;
}

.header-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Layout unifié - 3 zones */
.header-unified {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 30px;
}

/* Zones du header */
.header-zone {
  display: flex;
  align-items: center;
}

.header-zone-left {
  flex: 0 0 auto;
}

.header-zone-center {
  flex: 1;
  justify-content: center;
}

.header-zone-right {
  flex: 0 0 auto;
  gap: 15px;
}

/* ========================================
   LOGO
======================================== */
.logo {
  font-size: 20px;
  font-weight: bold;
  color: #000;
  text-decoration: none;
  text-align: center;
  line-height: 1.1;
  display: block;
}

.logo span {
  font-size: 10px;
  font-weight: normal;
  display: block;
  letter-spacing: 2px;
}

.logo:hover {
  color: #000;
  text-decoration: none;
}

/* ========================================
   NAVIGATION PRINCIPALE (DESKTOP)
======================================== */
.main-navigation {
  position: relative;
}

.nav-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 10px;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: #000;
  text-decoration: none;
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0.5px;
  padding: 10px 15px;
  transition: color 0.3s ease;
  display: block;
  white-space: nowrap;
}

.nav-link:hover {
  color: #666;
}

/* ========================================
   BOUTONS ICÔNES
======================================== */
.hamburger-btn,
.search-btn,
.account-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: #000;
  cursor: pointer;
  padding: 10px;
  transition: opacity 0.3s ease;
}

.hamburger-btn:hover,
.search-btn:hover,
.account-btn:hover {
  opacity: 0.7;
}

/* Hamburger masqué sur desktop */
@media (min-width: 969px) {
  .hamburger-btn {
    display: none;
  }
}

/* PANIER */
.cart-btn {
  color: #000;
  text-decoration: none;
  position: relative;
  padding: 10px;
  transition: opacity 0.3s ease;
  font-size: 18px;
}

.cart-btn:hover {
  opacity: 0.7;
}

.cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #000;
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* ========================================
   MEGA DROPDOWN - Position ajustée
======================================== */
.mega-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  pointer-events: none;
  min-width: 800px;
}

.mega-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.mega-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.mega-column h4 {
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 20px;
  color: #000;
  font-weight: bold;
}

.mega-column a {
  display: block;
  color: #666;
  text-decoration: none;
  margin-bottom: 10px;
  font-size: 14px;
  transition: color 0.3s ease;
}

.mega-column a:hover {
  color: #000;
}

/* ========================================
   SEARCH OVERLAY
======================================== */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  display: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
  display: block;
}

.search-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  width: 90%;
  max-width: 600px;
  padding: 40px;
  text-align: center;
}

.search-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.search-content h2 {
  margin-bottom: 30px;
  font-size: 24px;
  color: #000;
}

.search-content input {
  width: 100%;
  padding: 15px;
  border: 1px solid #e0e0e0;
  font-size: 16px;
  outline: none;
}

.search-content input:focus {
  border-color: #000;
}

/* ========================================
   MOBILE MENU
======================================== */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #fff;
  z-index: 2000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

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

.mobile-menu-header {
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-search {
  position: relative;
}

.mobile-search input {
  width: 100%;
  padding: 15px 50px 15px 15px;
  border: 1px solid #e0e0e0;
  font-size: 16px;
}

.mobile-menu-close {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

.mobile-nav-list {
  list-style: none;
  padding: 20px 0;
}

.mobile-nav-list li {
  border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-list a {
  display: block;
  padding: 20px;
  color: #000;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 16px;
  transition: background 0.3s ease;
}

.mobile-nav-list a:hover {
  background: #f8f8f8;
}

/* ========================================
   ACCOUNT OVERLAY
======================================== */
.account-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  display: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.account-overlay.active {
  opacity: 1;
  visibility: visible;
  display: block;
}

.account-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  font-family: 'Libre Baskerville', serif;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.account-modal-header {
  position: relative;
  padding: 30px 30px 20px;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
}

.account-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  transition: color 0.3s ease;
}

.account-modal-close:hover {
  color: #000;
}

.account-modal-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #000;
  margin: 0;
  font-weight: 400;
}

.account-modal-subtitle {
  font-size: 24px;
  color: #000;
  margin: 15px 0 0;
  font-weight: 400;
  line-height: 1.3;
}

.account-modal-body {
  padding: 30px;
}

/* Boutons de connexion sociale */
.social-login-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.social-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #000;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.social-login-btn:hover {
  background: #f8f8f8;
  border-color: #000;
}

/* Formulaire de connexion */
.account-form {
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #000;
  margin-bottom: 8px;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid #ccc;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  color: #000;
  outline: none;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  border-bottom-color: #000;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
  margin-top: 3px;
}

.checkbox-group label {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: normal;
}

.forgot-password {
  text-align: center;
  margin-bottom: 30px;
}

.forgot-password a {
  color: #000;
  text-decoration: underline;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.login-button {
  width: 100%;
  padding: 15px;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  margin-bottom: 30px;
}

.login-button:hover {
  background: #fff;
  color: #000;
}

.divider {
  text-align: center;
  margin: 30px 0;
  position: relative;
  color: #999;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e0e0e0;
  z-index: 1;
}

.divider span {
  background: #fff;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* Section création de compte */
.create-account-section {
  background: #f8f8f8;
  padding: 30px;
  margin: -30px -30px 0;
  text-align: center;
}

.create-account-section h3 {
  font-size: 16px;
  color: #000;
  margin-bottom: 15px;
  font-weight: 400;
}

.create-account-section p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 25px;
}

.create-account-btn {
  display: inline-block;
  padding: 15px 30px;
  background: #fff;
  color: #000;
  border: 1px solid #000;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.create-account-btn:hover {
  background: #000;
  color: #fff;
}

/* Utilisateur connecté */
.logged-in-content {
  text-align: center;
}

.logged-in-content p {
  font-size: 16px;
  margin-bottom: 30px;
  color: #000;
}

.account-links {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.account-link {
  display: block;
  padding: 15px 20px;
  border: 1px solid #e0e0e0;
  color: #000;
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  text-align: center;
}

.account-link:hover {
  background: #f8f8f8;
  border-color: #000;
}

.account-link.logout-link {
  background: #000;
  color: #fff;
  border-color: #000;
}

.account-link.logout-link:hover {
  background: #fff;
  color: #000;
}

/* ========================================
   RESPONSIVE - TABLETTE
======================================== */
@media (max-width: 1200px) {
  .header-container {
    padding: 0 20px;
  }
  
  .nav-link {
    font-size: 12px;
    padding: 10px 10px;
  }
}

/* ========================================
   RESPONSIVE - MOBILE/TABLETTE
   Layout: [☰ Burger] [LOGO centre] [Icônes]
======================================== */
@media (max-width: 968px) {
  .header-unified {
    height: 60px;
    position: relative;
  }
  
  /* Masquer le menu desktop */
  .header-zone-center {
    display: none;
  }
  
  /* LOGO AU CENTRE (position absolue pour centrage parfait) */
  .header-zone-left {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 50%;
    transform: translate(-50%, -50%);
  }
  
  .logo {
    font-size: 18px;
  }
  
  .logo span {
    font-size: 9px;
  }
  
  /* BURGER À GAUCHE (position absolue) */
  .hamburger-btn {
    display: block !important;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
  }
  
  /* ICÔNES À DROITE */
  .header-zone-right {
    margin-left: auto;
    gap: 8px;
  }
  
  .search-btn,
  .account-btn,
  .cart-btn {
    padding: 8px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0 15px;
  }
  
  .header-unified {
    gap: 15px;
  }
  
  .logo {
    font-size: 16px;
  }
  
  .header-zone-right {
    gap: 5px;
  }
  
  .hamburger-btn,
  .search-btn,
  .account-btn,
  .cart-btn {
    padding: 6px;
    font-size: 14px;
  }
}
