/**
 * HEADER AMÉLIORÉ - HELENERIU.FR
 * Optimisations UX, SEO et conversion
 */

/* === LOGO ET TAGLINE === */
.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-tagline {
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.25rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}

.logo img {
  max-width: 120px;
  height: auto;
  transition: transform 0.2s ease;
}

.logo:hover img {
  transform: scale(1.05);
}

/* === TRUST SIGNALS === */
.header-trust-signals {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.trust-signal {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: #28a745;
  font-weight: 500;
}

.trust-signal i {
  font-size: 1rem;
}

/* === HEADER ACTIONS === */
.header-actions-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.header-search-container {
  flex: 1;
}

/* === MENU OPTIMISÉ === */
.top-menu {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 0.375rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-menu > li > a {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
  position: relative;
}

.top-menu > li > a:hover {
  background-color: #007bff;
  color: white;
  transform: translateY(-1px);
}

/* Indicateur dropdown */
.top-menu > li:has(.sub-menu) > a::after {
  content: "▼";
  font-size: 0.7rem;
  margin-left: 0.5rem;
  transition: transform 0.2s ease;
}

.top-menu > li:hover:has(.sub-menu) > a::after {
  transform: rotate(180deg);
}

/* === SOUS-MENUS AMÉLIORÉS === */
.sub-menu {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  min-width: 220px;
  z-index: 1000;
}

.sub-menu .dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.sub-menu .dropdown-item:hover {
  background-color: #f8f9fa;
  border-left-color: #007bff;
  padding-left: 1.25rem;
}

/* === RECHERCHE AMÉLIORÉE === */
#search_widget {
  position: relative;
  margin-bottom: 0.5rem;
}

#search_widget form {
  position: relative;
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 2rem;
  padding: 0.375rem 1rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#search_widget form:focus-within {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

#search_widget input[type="text"] {
  border: none;
  outline: none;
  flex: 1;
  font-size: 0.9rem;
  background: transparent;
}

#search_widget input[type="text"]::placeholder {
  color: #6c757d;
  font-style: italic;
}

#search_widget .material-icons.search {
  color: #007bff;
  cursor: pointer;
  transition: color 0.2s ease;
}

#search_widget .material-icons.search:hover {
  color: #0056b3;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .logo-tagline {
    display: none;
  }

  .header-trust-signals {
    display: none;
  }

  .header-actions-wrapper {
    flex-direction: column;
  }
}

@media (min-width: 1200px) {
  .logo img {
    max-width: 140px;
  }

  .trust-signal {
    font-size: 0.85rem;
  }

  .trust-signal i {
    font-size: 1.1rem;
  }
}

/* === ANIMATIONS === */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sub-menu.show {
  animation: slideDown 0.3s ease-out;
}

/* === CATÉGORIES HIGHLIGHTS === */
.category[id*="katia"] > a {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  color: white;
}

.category[id*="cheval"] > a {
  background: linear-gradient(135deg, #4ecdc4, #44a08d);
  color: white;
}

.category[id*="phildar"] > a {
  background: linear-gradient(135deg, #45b7d1, #96c93d);
  color: white;
}

.category[id*="promotion"] > a {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  color: white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* === ACCESSIBILITÉ === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible pour navigation clavier */
.top-menu a:focus,
.sub-menu a:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* === HEADER STICKY (OPTIONNEL) === */
.header-top.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.header-top.sticky .logo img {
  max-width: 80px;
}

.header-top.sticky .trust-signal {
  font-size: 0.7rem;
}
