/* ==========================================
   MARCHE.CSS - STYLE DU MARCHÉ ÉLITE
   ========================================== */

.marche-header {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(to bottom, rgba(255, 215, 0, 0.05), transparent);
}

.marche-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.8rem;
    margin-bottom: 10px;
}

.marche-header p {
    color: #aaa;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- FILTRES DE RECHERCHE --- */
.marche-filters-container {
    padding: 0 20px;
    margin-bottom: 40px;
}

.marche-filters {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
    border-radius: 20px;
    align-items: center;
    background: rgba(20, 20, 25, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.marche-filters > div {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.marche-filters i {
    color: #aaa;
    margin-right: 10px;
}

.marche-filters input, .marche-filters select {
    background: transparent;
    border: none;
    color: white;
    width: 100%;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.marche-filters select option {
    background: #111;
    color: white;
}

.btn-search {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: black;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.btn-locate {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 10px;
    transition: 0.3s;
}

.btn-locate:hover { transform: scale(1.2); }

/* --- AUTOCOMPLÉTION VILLES (NOUVEAU) --- */
.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background: rgba(20, 20, 25, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 12px 12px;
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.autocomplete-list li {
    padding: 12px 15px;
    color: #ddd;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.2s;
    text-align: left;
}

.autocomplete-list li:last-child {
    border-bottom: none;
}

.autocomplete-list li:hover {
    background: rgba(0, 198, 255, 0.2);
    color: white;
}

/* --- GRILLE DES ANNONCES --- */
.marche-container {
    padding: 0 20px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.marche-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* --- CARTE ANNONCE --- */
.annonce-card {
    background: rgba(25, 25, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.annonce-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.annonce-image-container {
    position: relative;
    height: 200px;
    width: 100%;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}

.annonce-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.multi-photo-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    pointer-events: none;
}

.annonce-badge-type {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.annonce-badge-price {
    position: absolute;
    bottom: -15px;
    right: 20px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: black;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.annonce-content {
    padding: 25px 20px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.annonce-desc {
    color: #ddd;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
    white-space: pre-wrap;
}

.annonce-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #aaa;
}

.annonce-author {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: 0.3s;
}

.annonce-author:hover {
    background: rgba(0, 198, 255, 0.2);
    color: white;
}

/* --- INTERACTIONS SOCIALES --- */
.annonce-actions {
    display: flex;
    justify-content: space-around;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.annonce-btn {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.annonce-btn:hover {
    color: #ffd700;
}

.btn-delete-annonce {
    color: #ff4d4d;
}
.btn-delete-annonce:hover {
    color: white;
    text-shadow: 0 0 10px #ff4d4d;
}

/* --- ZONE PREVIEW PHOTOS (MODAL) --- */
.preview-grid {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-photo {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
}

/* COMMENTS SECTION IN MARCHE */
.annonce-comments {
    display: none;
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 10px;
}

.annonce-comments-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.annonce-comments-input-group {
    display: flex;
    gap: 5px;
}