/* css/navbar.css - Barre de navigation inférieure & Menu "Plus" */

/* ============================================
   BOTTOM NAVIGATION
============================================ */
.bottom-nav {
  /* FIXED : toujours visible quelle que soit la hauteur du container */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  /* Safe-area iOS : espace pour la barre home iPhone */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding-top: 4px;
  padding-left: 4px;
  padding-right: 4px;
  z-index: 9000;
}

/* Desktop : dans le flux du container, plus fixed */
@media (min-width: 768px) {
  .bottom-nav {
    position: static;
    height: var(--nav-height);
    padding-bottom: 0;
    align-items: center;
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.6rem;
  font-weight: 500;
  width: 16.66%;
  transition: var(--transition);
  position: relative;
  padding: 4px 0;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.nav-item i {
  font-size: 1.1rem;
  transition: var(--transition);
}

.nav-item span {
  transition: var(--transition);
  font-size: 0.55rem;
  letter-spacing: 0.2px;
}

.nav-item.active i,
.nav-item.active,
.nav-item:hover {
  color: var(--primary);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* Hamburger dans la navbar */
.nav-item .hamburger-icon {
  position: relative;
  width: 16px;
  height: 11px;
  margin-bottom: 2px;
}

.nav-item .hamburger-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-secondary);
  position: absolute;
  left: 0;
  transition: var(--transition-dropdown);
}

.nav-item .hamburger-icon span:nth-child(1) {
  top: 0px;
}
.nav-item .hamburger-icon span:nth-child(2) {
  top: 4.5px;
}
.nav-item .hamburger-icon span:nth-child(3) {
  top: 9px;
}

.nav-item.active .hamburger-icon span {
  background-color: var(--primary);
}

/* ============================================
   MENU "PLUS" (DROITE) - DESIGN AMÉLIORÉ
============================================ */
#plusMenu {
  position: absolute;
  top: calc(var(--header-height) + var(--banner-height));
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  right: 0;
  width: 85%;
  max-width: 380px;
  z-index: 1100;
  transform: translateX(100%);
  transition: var(--transition-dropdown);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  border-radius: 16px 0 0 0;
}

#plusMenu.active {
  transform: translateX(0);
  animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================================
   PLUS HEADER
============================================ */
.plus-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.plus-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.close-plus-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
  padding: 4px 8px;
  border-radius: 8px;
}

.close-plus-btn:hover {
  color: var(--primary);
  transform: scale(1.1);
  background: var(--accordion-bg);
}

/* ============================================
   PLUS CONTENT - DESIGN AMÉLIORÉ
============================================ */
.plus-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 16px 16px 8px;
}

/* Scroll personnalisé pour le menu plus */
.plus-content::-webkit-scrollbar {
  width: 3px;
}
.plus-content::-webkit-scrollbar-track {
  background: transparent;
}
.plus-content::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 10px;
}

/* ============================================
   SEARCH BOX
============================================ */
.search-box-plus {
  display: flex;
  align-items: center;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 20px;
  transition: var(--transition);
}

.search-box-plus:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.search-box-plus i {
  color: var(--text-secondary);
  margin-right: 10px;
  font-size: 0.9rem;
}

.search-box-plus input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: inherit;
}

.search-box-plus input::placeholder {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ============================================
   PLUS SECTIONS - DESIGN AMÉLIORÉ
============================================ */
.plus-section {
  margin-bottom: 18px;
}

.plus-section-title {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
  margin-left: 4px;
  font-weight: 700;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.plus-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.plus-list {
  background: var(--bg-main);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.plus-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  gap: 12px;
}

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

.plus-item:hover {
  background: var(--surface);
  padding-left: 20px;
}

.plus-item:active {
  background: var(--accordion-bg);
  transform: scale(0.98);
}

.plus-item i:first-child {
  width: 22px;
  text-align: center;
  color: var(--primary);
  font-size: 1rem;
  flex-shrink: 0;
}

.plus-item.accent-icon i:first-child {
  color: #f59e0b;
}

.plus-item .plus-value {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.plus-item .flag-icon {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ============================================
   FORMULAIRE D'AVIS - DESIGN AMÉLIORÉ
============================================ */
.plus-section_form {
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.plus-section_form-textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text-main);
  font-size: 0.88rem;
  font-family: inherit;
  resize: vertical;
  outline: none;
}

.plus-section_form-textarea::placeholder {
  color: var(--text-secondary);
}

.plus-section_form-textarea:focus {
  background: var(--surface);
}

.plus-section_form-btn {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.plus-section_form-btn > input {
  flex: 1;
  min-width: 100px;
  padding: 10px 14px;
  border: none;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--text-main);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
}

.plus-section_form-btn > input:last-of-type {
  border-right: none;
}

.plus-section_form-btn > input::placeholder {
  color: var(--text-secondary);
}

.plus-section_form-btn > input:focus {
  background: var(--surface);
}

.plus-section_form-btn > button[type="submit"] {
  width: 100%;
  padding: 12px;
  border: none;
  background: var(--primary);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  border-top: 1px solid var(--border);
}

.plus-section_form-btn > button[type="submit"]:hover {
  opacity: 0.9;
  background: var(--primary);
}

/* ============================================
   PLUS FOOTER - DESIGN AMÉLIORÉ
============================================ */
.plus-footer {
  padding: 14px 16px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.plus-footer-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  border: none;
}

.plus-footer-btn:hover {
  transform: scale(1.02);
}

.plus-theme-toggle {
  background: var(--bg-main);
  border: 1px solid var(--border);
  color: var(--text-main);
}

.plus-theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--accordion-bg);
}

.plus-login-btn {
  background: var(--primary);
  border: none;
  color: white;
}

.plus-login-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.plus-login-btn i {
  font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE - PLUS MENU
============================================ */
@media (max-width: 430px) {
  #plusMenu {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
  }
  
  .plus-section_form-btn > input {
    min-width: 80px;
    padding: 10px 12px;
    font-size: 0.8rem;
  }
}

@media (max-width: 360px) {
  .plus-item {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
  
  .plus-item i:first-child {
    width: 18px;
    font-size: 0.85rem;
  }
  
  .plus-footer {
    flex-direction: column;
    gap: 8px;
  }
  
  .plus-footer-btn {
    padding: 10px;
  }
}