/* Menu paramètres */
.settings-menu-container {
  position: relative;
  display: inline-block;
}

.settings-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  min-width: 250px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow: visible;
}

.settings-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.settings-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.2s;
  color: #333;
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  position: relative;
  overflow: visible !important;
}

.settings-item:hover {
  background: #f5f5f5;
}

.settings-item i {
  font-size: 18px;
  color: #eab308;
  width: 20px;
}

.settings-item .arrow {
  margin-left: auto;
  font-size: 14px;
  color: #999;
}

/* Item profil + déconnexion */
.profile-disconnect-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: default;
  border-bottom: 1px solid #f0f0f0;
}

.profile-disconnect-item:hover {
  background: transparent;
}

.dropdown-profile-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e0e0e0;
  flex-shrink: 0;
}

.settings-item-clickable {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.settings-item-clickable:hover {
  background: #f5f5f5;
}

.settings-item-clickable i {
  font-size: 18px;
  color: #eab308;
  width: 20px;
}

.settings-item-clickable span {
  font-size: 15px;
  color: #333;
  font-family: 'Poppins', sans-serif;
}

/* Sous-menu langue */
.language-item {
  position: relative;
}

.language-submenu {
  position: absolute;
  left: 100%;
  top: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  border: 1px solid #e0e0e0;
  min-width: 200px;
  display: none;
  margin-left: 8px;
  z-index: 9999 !important;
}

.language-submenu.active {
  display: block !important;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.2s;
  color: #333;
  font-size: 15px;
}

.language-option:hover {
  background: #f5f5f5;
}

.language-option i {
  font-size: 18px;
  color: #eab308;
}

/* Barre de recherche globale */
.search-container {
  position: relative;
  flex: 1;
  max-width: 500px;
  margin: 0 20px;
}

.search-input {
  width: 100%;
  padding: 10px 45px 10px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  background: #f8f8f8;
}

.search-input:focus {
  outline: none;
  border-color: #eab308;
  background: white;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.2);
}

.search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: #eab308;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
}

.search-btn:hover {
  background: #ca8a04;
  transform: translateY(-50%) scale(1.1);
}

.search-btn i {
  font-size: 14px;
}

/* Résultats de recherche */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 10px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
}

.search-results-content {
  padding: 10px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid #f0f0f0;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: #f8f8f8;
}

.search-result-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.search-result-info {
  flex: 1;
}

.search-result-title {
  font-weight: 600;
  color: #333;
  font-size: 14px;
  margin-bottom: 2px;
}

.search-result-subtitle {
  color: #666;
  font-size: 12px;
}

.search-result-type {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.search-result-type.author {
  background: #eab30820;
  color: #eab308;
}

.search-result-type.book {
  background: #3b82f620;
  color: #3b82f6;
}

.search-result-type.genre {
  background: #10b98120;
  color: #10b981;
}

.search-empty {
  text-align: center;
  padding: 30px;
  color: #999;
}

.search-empty i {
  font-size: 40px;
  margin-bottom: 10px;
  color: #ddd;
}

/* Barre de recherche auteurs */
.search-auteurs-container {
  position: relative;
  flex: 1;
  max-width: 450px;
  margin: 0 20px;
}

.search-auteurs-wrapper {
  position: relative;
  width: 100%;
}

.search-auteurs-wrapper i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 14px;
}

#searchAuteurs {
  width: 100%;
  padding: 10px 15px 10px 40px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  background: #f8f8f8;
}

#searchAuteurs:focus {
  outline: none;
  border-color: #eab308;
  background: white;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.2);
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  padding: 8px;
}

.search-no-results {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 14px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: #f8f8f8;
}

.search-result-photo {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #e0e0e0;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-name {
  font-weight: 600;
  color: #333;
  font-size: 14px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.search-result-role {
  color: #666;
  font-size: 12px;
}

.verified-badge-small {
  font-size: 14px;
}

.btn-follow-search,
.btn-unfollow-search {
  padding: 6px 16px;
  border: none;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-follow-search {
  background: #eab308;
  color: white;
}

.btn-follow-search:hover {
  background: #ca8a04;
  transform: scale(1.05);
}

.btn-unfollow-search {
  background: #e5e7eb;
  color: #666;
}

.btn-unfollow-search:hover {
  background: #d1d5db;
}

/* Notifications de suivi */
.notification-item {
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

.notification-item:hover {
  background: #f8f8f8;
}

.notification-item.unread {
  background: #fef3c7;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
  float: left;
}

.notification-content {
  overflow: hidden;
}

.notification-message {
  font-size: 14px;
  color: #333;
  margin: 0 0 4px 0;
}

.notification-time {
  font-size: 12px;
  color: #999;
}

.notification-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-follow-back,
.btn-ignore {
  padding: 6px 14px;
  border: none;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-follow-back {
  background: #eab308;
  color: white;
}

.btn-follow-back:hover {
  background: #ca8a04;
}

.btn-ignore {
  background: #e5e7eb;
  color: #666;
}

.btn-ignore:hover {
  background: #d1d5db;
}

.notification-done {
  padding: 6px 12px;
  background: #d1fae5;
  color: #065f46;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Notifications toast */
.notification-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10000;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.4s ease;
  min-width: 300px;
}

.notification-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.notification-toast.notification-success {
  border-left: 4px solid #10b981;
}

.notification-toast.notification-error {
  border-left: 4px solid #ef4444;
}

.notification-toast i {
  font-size: 20px;
}

.notification-toast.notification-success i {
  color: #10b981;
}

.notification-toast.notification-error i {
  color: #ef4444;
}

.notification-toast span {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .settings-dropdown {
    right: -10px;
    min-width: 220px;
  }
  
  .language-submenu {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 5px;
  }
  
  .language-submenu.active {
    transform: translateX(0);
  }
  
  .language-item .arrow {
    transform: rotate(180deg);
  }
  
  .search-container {
    max-width: 300px;
    margin: 0 10px;
  }
  
  .search-input {
    font-size: 13px;
    padding: 8px 40px 8px 12px;
  }
  
  .search-btn {
    width: 30px;
    height: 30px;
  }
  
  .search-auteurs-container {
    max-width: 250px;
    margin: 0 10px;
  }
  
  #searchAuteurs {
    font-size: 13px;
    padding: 8px 12px 8px 35px;
  }
  
  .search-auteurs-wrapper i {
    left: 12px;
    font-size: 13px;
  }
  
  .notification-toast {
    min-width: 250px;
    right: 10px;
  }
}
