// Variables ESTAIR
$estair-blue: #4AA8DC;
$estair-green: #8DA969;
$bg-secondary: #FFFFFF;
$border-light: #E5E7EB;
$text-primary: #111827;
$text-secondary: #6B7280;
$text-muted: #9CA3AF;

.modern-header {
  height: 64px;
  background: $bg-secondary;
  border-bottom: 1px solid $border-light;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  
  .header-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    max-width: 100%;
  }
}

// Section Gauche
.header-left {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  min-width: 0;
}

.logo-container {
  flex-shrink: 0;
  
  .logo-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    
    .logo-arrows {
      position: relative;
      width: 28px;
      height: 28px;
      
      .arrow-top {
        position: absolute;
        top: 2px;
        left: 2px;
        width: 12px;
        height: 12px;
        background: $estair-blue;
        clip-path: polygon(0 0, 100% 0, 50% 100%);
        transform: rotate(45deg);
      }
      
      .arrow-bottom {
        position: absolute;
        bottom: 2px;
        right: 2px;
        width: 12px;
        height: 12px;
        background: $estair-green;
        clip-path: polygon(0 0, 100% 0, 50% 100%);
        transform: rotate(225deg);
      }
    }
    
    .logo-text {
      font-size: 18px;
      font-weight: 700;
      color: $estair-blue;
      letter-spacing: -0.025em;
    }
  }
}

.breadcrumb-nav {
  flex: 1;
  min-width: 0;
  
  .breadcrumb-container {
    display: flex;
    align-items: center;
    gap: 4px;
    
    .breadcrumb-item {
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 4px 8px;
      border-radius: 6px;
      text-decoration: none;
      color: $text-secondary;
      font-size: 14px;
      font-weight: 500;
      transition: all 0.2s ease;
      
      &:hover {
        background: #f8f9fa;
        color: $text-primary;
      }
      
      &.active {
        color: $estair-blue;
        background: rgba(74, 168, 220, 0.1);
        font-weight: 600;
      }
      
      i {
        font-size: 16px;
      }
    }
    
    .breadcrumb-separator {
      font-size: 14px;
      color: $text-muted;
    }
  }
}

// Section Droite
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
  
  .search-icon {
    position: absolute;
    left: 8px;
    color: $text-muted;
    font-size: 18px;
  }
  
  .search-input {
    width: 280px;
    height: 36px;
    padding: 0 8px 0 36px;
    border: 1px solid $border-light;
    border-radius: 8px;
    font-size: 14px;
    background: #f8f9fa;
    transition: all 0.2s ease;
    
    &:focus {
      outline: none;
      border-color: $estair-blue;
      box-shadow: 0 0 0 3px rgba(74, 168, 220, 0.1);
    }
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;

  &:hover {
    background: #f8f9fa;
  }

  .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
  }
}

// Bouton FAQ
.faq-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: $estair-blue;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);

  &:hover {
    background: darken($estair-blue, 10%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  }

  &:active {
    transform: translateY(0);
  }

  i {
    font-size: 18px;
  }

  .btn-text {
    font-weight: 600;

    @media (max-width: 768px) {
      display: none;
    }
  }

  @media (max-width: 768px) {
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    justify-content: center;
  }
}

.user-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  
  &:hover {
    background: #f8f9fa;
  }
  
  .user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, $estair-blue, $estair-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
  }
  
  .user-name {
    font-size: 14px;
    font-weight: 500;
    color: $text-primary;
  }
  
  .user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: $bg-secondary;
    border: 1px solid $border-light;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
    
    button {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 16px;
      border: none;
      background: none;
      color: $text-primary;
      font-size: 14px;
      cursor: pointer;
      transition: all 0.2s ease;
      text-align: left;
      
      &:hover {
        background: #f8f9fa;
      }
      
      i {
        font-size: 18px;
      }
    }

    .dropdown-divider {
      height: 1px;
      background: $border-light;
      margin: 4px 0;
    }
  }
}

// Responsive
@media (max-width: 768px) {
  .header-content {
    padding: 0 16px;
  }
  
  .search-container .search-input {
    width: 200px;
  }
  
  .user-name {
    display: none;
  }
}