﻿/* Supprimer le rectangle de surbrillance au tap sur tous les éléments interactifs */
* {
  -webkit-tap-highlight-color: transparent !important;
}

/* Header FASE inspirÃ© de la barre de tache exemple */
.header-fase {
  background: #fff !important;
  border-radius: 0;
  margin: 0;
  max-width: 100%;
  width: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  box-shadow: none !important;
  border: none !important;
  position: relative;
  z-index: 9999999 !important;
}

/* Barre de catégories sous le header principal */
.categories-bar {
  background: #fff !important;
  padding: 15px 0 20px 0;
  box-shadow: none !important;
  border: none !important;
  border-top: none !important;
  margin-bottom: 20px;
  overflow-y: visible;
  /* overflow-x géré par le wrapper ou les media queries — pas de !important ici */
}

.categories-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
  background: #fff !important;
}

.categories-nav {
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.categories-nav a {
  color: #333;
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
  white-space: nowrap;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.categories-nav a:hover {
  background: #fff;
  color: #8d153a;
  border-color: #8d153a;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(141, 21, 58, 0.15);
}

/* Header normal - pas de compensation nÃ©cessaire */
body {
  padding-top: 0;
}

/* Ajustement pour les sections principales */
.hero, .categories, .features, .promo, .auctions {
  margin-top: 0;
}
.header-fase .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  width: 56px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  margin-right: 0;
}
.header-fase nav {
  display: flex;
  gap: 0;
  justify-content: center;
  align-items: center;
  flex: 1;
}
.header-fase nav a {
  color: #8d153a;
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.13rem;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 18px;
  transition: background 0.2s;
  letter-spacing: 0.01em;
}
.header-fase nav a:hover {
  background: #f7e6ed;
}
.header-fase .search-bar {
  display: flex;
  align-items: center;
  background: #f7f7f7;
  border-radius: 32px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.10);
  padding: 0 20px;
  height: 44px;
  flex: 1;
  max-width: 700px;
  min-width: 0; /* Was 320px - cassait le mobile portrait */
  margin: 0;
  border: 1.5px solid #ececec;
}
.header-fase .search-bar input {
  border: none;
  background: transparent;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #222;
  width: 100% !important; /* Was 520px - cassait le mobile portrait */
  min-width: 0;
  max-width: 100%;
  padding: 0 12px;
  text-align: left;
  letter-spacing: 0.01em;
  box-sizing: border-box;
}

.header-fase .search-bar input::placeholder {
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif !important;
  font-weight: 600 !important;
  font-size: 16px !important;
}

/* FORCER LA POLICE MONTSERRAT POUR LA RECHERCHE */
.search-input-container input,
#header-search-bar input[type="text"] {
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

.search-input-container input::placeholder,
#header-search-bar input[type="text"]::placeholder {
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif !important;
  font-weight: 600 !important;
  font-size: 16px !important;
}

.header-fase .header-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}
.header-fase .header-actions a {
  font-weight: 700;
  border-radius: 24px;
  padding: 10px 26px;
  font-size: 1.13rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(80,0,30,0.10);
  border: 1.5px solid #a00;
  transition: background 0.2s, color 0.2s;
}
.header-fase .header-actions .signup {
  background: #fff;
  color: #a00;
}
.header-fase .header-actions .signup:hover {
  background: #f7e6ed;
}
.header-fase .header-actions .login {
  background: #a00;
  color: #fff;
}
.header-fase .header-actions .login:hover {
  background: #8d153a;
}
.main-nav-fase {
  display: flex;
  gap: 36px;
  justify-content: center;
  align-items: center;
  margin: 0 32px;
}

.nav-icon-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #a0142f;
  font-weight: 600;
  font-size: 1.08rem;
  transition: color 0.2s;
}

.nav-icon-link:hover {
  color: #e63946;
}

.nav-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(160,20,47,0.08);
  background: #fff;
  object-fit: contain;
}

.btn-annonce-special {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  overflow: hidden;
  min-width: 140px;
  min-height: 36px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.97rem;
  color: #fff !important;
  box-shadow: 0 4px 18px rgba(160,20,47,0.10);
  background: #e63946;
  padding: 7px 18px;
  transition: filter 0.2s, box-shadow 0.2s;
}

.btn-annonce-special:hover {
  filter: brightness(1.08) saturate(1.1);
  box-shadow: 0 6px 24px rgba(160,20,47,0.18);
}

.btn-annonce-special span {
  padding: 10px 24px;
  border-radius: 28px;
  color: #fff !important;
}

.category-grid .cat {
    background: linear-gradient(135deg, #a0142f, #e63946) !important;
  color: #fff !important;
  font-weight: bold;
  font-size: 1.08rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  height: 40px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(160,20,47,0.08);
}
.category-grid .cat span {
  position: relative;
  z-index: 1;
  color: #fff !important;
}

/* Suppression de toute bordure sur le drop-area, prioritÃ© maximale */
#drop-area {
  border: none !important;
  box-shadow: none !important;
  background: none !important;
}

/* Suppression de toute bordure, ombre et outline sur le drop-area et l'image d'aperÃ§u */
#drop-area, #drop-area img {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: none !important;
}

/* Forcer la suppression de toute bordure et ombre sur le drop-area, mÃªme hÃ©ritÃ©e */
.no-border-drop-area, #drop-area {
  border: none !important;
  box-shadow: none !important;
  background: none !important;
  outline: none !important;
}

.annonce-item img {
  width: 300px;
  height: 200px;
  object-fit: cover;
  border: 1px solid #ccc;
  display: block;
  margin: 0 auto;
}

#header-search-bar input[type="text"] {
    border: none !important; /* Supprimer l'encadrement avec prioritÃ© Ã©levÃ©e */
    box-shadow: none !important;
}

@media (max-width: 1024px) {
  .categories-container {
    max-width: 100%;
    padding: 0 20px;
  }
  
  .categories-nav {
    gap: 25px;
  }
}

@media (max-width: 900px) {
  .header-fase {
    flex-direction: row;
    align-items: center;
    padding: 5px 10px;
    min-height: 50px;
    position: relative;
    gap: 10px;
  }
  
  .header-inner {
    flex-direction: row;
    gap: 8px;
    flex: 1;
    align-items: center;
  }
  
  .header-fase nav {
    display: none; /* Cacher navigation sur mobile pour gagner de la place */
  }
  
  .header-fase .search-bar {
    flex: 1;
    margin: 0;
    max-width: 100%;
  }
  
  .header-fase .search-bar input {
    padding: 6px 10px;
    font-size: 13px;
  }
  
  .header-fase .header-actions {
    margin: 0;
    gap: 5px;
    display: flex;
    align-items: center;
  }
  
  .header-fase .header-actions a,
  .header-fase .header-actions button {
    padding: 4px 8px;
    font-size: 11px;
  }
  
  .categories-bar {
    padding: 6px 0;
    margin-bottom: 10px;
  }
  
  .categories-container {
    padding: 0 10px;
  }
  
  .categories-nav {
    gap: 12px;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  
  .categories-nav::-webkit-scrollbar {
    display: none;
  }
  
  .categories-nav a {
    font-size: 0.85rem;
    padding: 6px 12px;
    flex-shrink: 0;
    white-space: nowrap;
  }

}

/* Cacher les icÃ´nes desktop uniquement en portrait mobile */
@media (max-width: 900px) and (orientation: portrait) {
  .header-favoris-btn,
  .header-notifications-dropdown,
  .header-messages-btn {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .header-fase {
    padding: 4px 8px;
    min-height: 45px;
  }
  
  .header-fase .search-bar input {
    padding: 5px 8px;
    font-size: 12px;
  }
  
  .header-fase .header-actions {
    gap: 4px;
  }
  
  .header-fase .header-actions a,
  .header-fase .header-actions button {
    padding: 3px 6px;
    font-size: 10px;
  }
  
  .categories-bar {
    padding: 5px 0;
    margin-bottom: 8px;
  }
  
  .categories-nav a {
    font-size: 0.75rem;
    padding: 4px 8px;
  }
}

/* =====================================================
   MOBILE LANDSCAPE : afficher header desktop, cacher bottom nav
   ===================================================== */
@media (max-width: 900px) and (orientation: landscape) {

  /* Cacher la bottom nav */
  .mobile-bottom-nav {
    display: none !important;
  }

  /* Retirer le padding-bottom ajoutÃ© pour la bottom nav */
  body {
    padding-bottom: 0 !important;
  }

  /* RÃ©afficher les Ã©lÃ©ments desktop masquÃ©s en portrait */
  .header-favoris-btn,
  .header-notifications-dropdown,
  .header-messages-btn {
    display: flex !important;
  }

  /* Afficher le bouton Déposer une annonce */
  .btn-annonce-special {
    display: inline-flex !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  /* Réduire la barre de recherche pour laisser la place aux boutons */
  .header-fase .search-bar {
    flex: 1;
    min-width: 0;
    max-width: 160px;
  }

  .header-fase .search-bar input {
    padding: 4px 6px;
    font-size: 11px;
  }

  /* Compacter les boutons header */
  .header-fase .header-actions {
    gap: 4px;
    flex-shrink: 0;
  }

  .header-fase .header-actions a,
  .header-fase .header-actions button {
    padding: 4px 8px;
    font-size: 11px;
  }

  /* IcÃ´nes header : taille rÃ©duite */
  .header-favoris-btn,
  .header-messages-btn {
    padding: 4px 6px !important;
    font-size: 14px !important;
  }

  .header-notifications-dropdown .notif-btn {
    padding: 4px 6px !important;
    font-size: 14px !important;
  }

  /* Cacher le lien DÃ©connexion direct (accessible via le dropdown profil) */
  a.login[href="/deconnexion"] {
    display: none !important;
  }
}
