   body, html {
  overflow-x: hidden;
}

    body {
      font-family: Arial, sans-serif;
      margin: 0;
      background: #f9f9f9;
    }
    #main-content, #annonce-details {
      padding: 1rem;
    }

    #main-content {
      display: block;
    }

    #annonce-details {
      display: none;
      transform: translateY(10%);
      opacity: 0;
      transition:
      transform 0.2s ease-out, opacity 0.2s ease-out,  padding-top 0.2s ease-out;
      will-change: transform, opacity, padding-top;
      padding-top: 60px; 
      background: #fff;
      min-height: 100vh;
    }
#annonce-details.open {
  transform: translateY(0);
   opacity: 1; 
  display: block; 
}

#annonce-details.closing {
  display: block;                      
  transform: translateY(10%);          
  opacity: 0;
  transition:                         
  transform 0.2s ease-in,
  opacity   0.2s ease-in;
  will-change: transform, opacity;
}

#annonce-details.pushed {
  transform: translateX(250px); 
}
h1 {
     margin-top: 0;
}

h2 {
   margin: 1rem 0 0.5rem;
}

.category-section {
   margin-bottom: 2rem;
}
.scroll-container {
 display: flex;
 overflow-x: auto;
 scroll-behavior: smooth;
 gap: 1rem;
 padding-bottom: 0.5rem;
}

    .scroll-container::-webkit-scrollbar {
      height: 8px;
    }

    .scroll-container::-webkit-scrollbar-thumb {
      background: #ccc;
      border-radius: 4px;
    }
 
    .annonce-card {
      flex: 0 0 250px;
      background: white;
      border-radius: 8px;
      box-shadow: 0 1px 6px rgb(0 0 0 / 0.1);
      padding: 0.5rem;
      display: flex;
      flex-direction: column;
      cursor: pointer;
      opacity: 0;
      transform: translateY(20px);
      transition: opacity 0.4s ease, transform 0.4s ease;
    }
    .annonce-card.visible {
  opacity: 1;
  transform: translateY(0);
}

    .annonce-image {
       width: 100%;
     object-position: center;
     height: 140px; 
      object-fit: cover;
      border-radius: 6px;
      margin-bottom: 0.5rem;
      background: #eee; 
    }

    .annonce-title {
      font-weight: bold;
      font-size: 1rem;
      margin-bottom: 0.3rem;
      min-height: 2.4em;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .annonce-price {
      color: #2a9d8f;
      font-weight: 600;
      margin-bottom: 0.3rem;
    }

    .annonce-pseudo {
      font-size: 0.85rem;
      color: #555;
    }

    .skeleton-card {
      flex: 0 0 250px;
      background: #ddd;
      border-radius: 8px;
      padding: 0.5rem;
      animation: pulse 1.5s infinite ease-in-out;
    }

    .skeleton-image {
      width: 100%;
      height: 140px;
      background: #ccc;
      border-radius: 6px;
      margin-bottom: 0.5rem;
    }

    .skeleton-line {
      height: 16px;
      background: #ccc;
      border-radius: 4px;
      margin-bottom: 0.4rem;
    }

    .skeleton-line.short {
      width: 40%;
    }

    .skeleton-line.medium {
      width: 70%;
    }

    @keyframes pulse {
      0% { opacity: 1; }
      50% { opacity: 0.4; }
      100% { opacity: 1; }
    }

    .btn {
  background-color: #eee;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.btn:hover {
  background-color: #ddd;
}
@keyframes slide-in-right {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slide-out-left {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(-100%);opacity: 0; }
}

@keyframes slide-in-left {
  from { transform: translateX(-100%);opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slide-out-right {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}
.slide-in-right {
  animation: slide-in-right 0.31s ease-out forwards;
}
.slide-out-left {
  animation: slide-out-left 0.31s ease-in forwards;
}
.slide-in-left {
  animation: slide-in-left 0.31s ease-out forwards;
}
.slide-out-right {
  animation: slide-out-right 0.31s ease-in forwards;
}
 .user-greeting {
    display: flex;
    align-items: center;
    justify-content: space-between; 
    gap: 8px;
    padding: 6px;
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
    background: rgba(8, 8, 8, 0.03);
    border-radius: 1em;
    cursor: pointer;
    width: 100%;


  }

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: white;
  display: flex;              
  align-items: center;       
  justify-content: center;  
  border: 2px solid #ddd;


  
}

  .user-greeting svg {
    flex-shrink: 0;
    color: #444;
    stroke: #007BFF; 
  }
.profile-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;

}


.profile-image
{
   width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: #f0f0f0;
  display: flex;              
  align-items: center;       
  justify-content: center;    
 background-color: #f0f0f0;
}
.profile-image svg {
  width: 80px;
  height: 80px;
  stroke: #007BFF; 
}

#app-header {
  position: fixed; 
  top: 0;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: white;
  border-bottom: 1px solid #ddd;
  z-index: 800;
  transition: transform 0.3s ease;
}

#app-header.pushed {
  transform: translateX(250px); 
}

#menu-button {
  background: none;
  border: none;
  padding: 0;
  margin-right: 0.75rem;
  cursor: pointer;
}



#menu-button svg {
  width: 24px;
  height: 24px;
  color: #333;
}

.site-name {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;

}

#left-section {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 60%;
  max-width: 220px;
  background-color: #f7f7f8;
  color: #343541;
  border-right: 1px solid #e5e5e5;
  box-shadow: 2px 0 6px rgba(0,0,0,0.1); 
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 998;
  padding: 1rem;
  backdrop-filter: blur(6px); 
  -webkit-backdrop-filter: blur(6px);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #343541;
  font-size: 1rem;
  font-weight: bold;
  transition: background 0.2s ease;
  padding: 0.5rem;
  border-radius: 6px;
}

.nav-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

.nav-item svg {
  flex-shrink: 0;
  color: #555;
}
.nav-item[href="#publier"] {
  background: #e9f5ff;
  color: #2563eb;
}
.nav-item[href="#publier"] svg {
  color: #2563eb;
}

#left-section.open {
  transform: translateX(0);
}
#left-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: #343541;
}
 
#left-section p {
  font-size: 0.95rem;
  color: #6b6c7e;
  margin-bottom: 0.5rem;
}

#main-content {
  transition: transform 0.3s ease;
  will-change: transform;
  padding-top: 50px; 
}

#main-content.pushed {
  transform: translateX(250px); 
}

.pagination {
  text-align: right;
  margin-top: 1rem;
} 

#search-container {
  padding: 1rem;
  text-align: center;
}

.search-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 95%;
  max-width: 700px;
  margin: 0 auto;
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 6px 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-wrapper svg {
  margin-right: 8px;
  color: #666;
  flex-shrink: 0;
}

.first-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.05rem;
  padding: 14px 0;
  background: transparent;
}

.header-main {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 1;
  justify-content: space-between;
  margin-left: 1rem;
  flex-wrap: wrap;
}
.title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
#header-search {
   flex: 1;
   position: sticky;
  margin-left: 1rem;
  display: none;
}
#header-search .search-wrapper {
  background: #f1f1f1;
  padding: 6px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
}

#header-search input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  flex: 1;
  padding: 8px 0;
}

#header-search svg {
  margin-right: 6px;
  color: #555;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
/*bARRE de rechcher dans le heaser*/
#menu-button.hidden-on-mobile {
  display: none;
}


:focus,
:focus-visible {
  outline: none;
}


* {
  -webkit-tap-highlight-color: transparent;
  -webkit-focus-ring-color: transparent;
}
.report-section {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-report {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background-color: #ef4444;
  color: #fff;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.btn-report:hover {
  background-color: #dc2626;
}

.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  justify-content: flex-end;
  align-items: flex-end;
  z-index: 999;
}
.bottom-sheet-overlay.active {
  display: flex;
}

.bottom-sheet {
  width: 100%;
  max-height: 80%;
  background: #fff;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  animation: slide-up 0.1s ease-out forwards;
  padding: 1rem;
  overflow-y: auto;
  overflow-x: hidden;
}

@keyframes slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0%);
    opacity: 1;
  }
}

@keyframes slide-down {
  from {
    transform: translateY(0%);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}
.bottom-sheet.closing {
  animation: slide-down 0.3s ease-out forwards;
}

.report-dialog-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.report-dialog-content h3 {
  margin-top: 0;
  font-size: 1.2rem;
  font-weight: bold;
}

.report-dialog-content label {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.report-dialog-content select,
.report-dialog-content textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  resize: vertical;
}

.btn-primary {
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  width: 100%;
   margin-bottom: 5rem;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

#annonce-details.no-scroll {
  position: fixed;
  top: 0;
  left: 0;
  width: 92%;
  padding-top: 0px;
  height: 100vh;
  overflow: hidden;
}
.toast {
 bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 250px;
  max-width: 80%;
  background-color: #333;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s, bottom 0.4s;
  z-index: 1500;
  text-align: center;
  font-size: 0.95rem;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  bottom: 40px;
}

.toast.success {
  background-color: #2196f3;
}

.toast.error {
  color: #ef4444;
  color: white;
}

@media (max-width: 362px) {
    #app-header.pushed {
       transform: translateX(30px);
    }
    
}

@media (max-width: 500px) {
  .header-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 0px;
  }

  .title-group {
    flex-direction: row;
    align-items: center;
    gap: 2px;
  }

  #header-search {
    width: 90%;
  }

  .search-wrapper {
    width: 100%;
    padding: 6px 10px;
  }

  #menu-button {
    background: none;
    border: none;
    padding: 0;
  }
 
}


@media (min-width: 768px) {
  .search-wrapper {
   margin-right: 400px;
  }

   #menu-button {
    display: none; 
  }
  
  .bottom-sheet {
    position: fixed;
    width: 500px;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    bottom: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: fade-scale-up 0.2s ease-out forwards;
  }

  .bottom-sheet.closing {
    animation: fade-scale-down 0.3s ease-out forwards;
  }

  .bottom-sheet-overlay {
    justify-content: center;
    align-items: center;
  }

@keyframes fade-scale-up {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes fade-scale-down {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
}
  
}
