/* Reset de base */

* { box-sizing: border-box; margin: 0; padding: 0;  }

body { background-color: #f7f8f9; padding-bottom: 80px; font-family: 'Segoe UI', sans-serif; }



/* Header Fixe */

header {

    background: white; padding: 15px; position: sticky; top: 0; z-index: 100;

    box-shadow: 0 2px 5px rgba(0,0,0,0.1);

}


/* 1. Base commune pour TOUTES les icônes */
[class^="icon-"] {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    vertical-align: middle;
}

/* 2. Variantes de tailles */
.icon-sm { width: 20px; height: 20px; }
.icon-lg { width: 28px; height: 28px; }
.icon-xl { width: 40px; height: 40px; }

/* 3. Définitions des icônes (SVG corrigés) */

/* Retour / Flèche Gauche - Gris #333 */
.icon-back, .icon-arrow-left { 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23333' d='M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z'/%3E%3C/svg%3E"); 
}

/* WhatsApp - Couleur standard #555 ou Blanc #FFF */
.icon-whatsapp { 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23555' d='M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.1 0-65.6-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18s-8.8-2.8-12.4 2.8-14.1 18-17.2 21.6-6.2 4.1-11.7 1.3c-5.5-2.8-23.2-8.5-44.2-27.1-16.4-14.6-27.4-32.6-30.6-38.1s-.3-8.5 2.5-11.2c2.5-2.4 5.5-6.4 8.2-9.6s3.7-5.5 5.5-9.1.9-6.9-.5-9.6-12.4-29.9-17-41c-4.5-10.7-9.1-9.2-12.4-9.4h-10.6c-3.7 0-9.6 1.4-14.7 6.9s-19.3 18.8-19.3 45.8 19.7 53 22.4 56.7 38.7 59.1 93.7 82.8c13.1 5.7 23.3 9.1 31.3 11.6 13.1 4.1 25.1 3.5 34.5 2.1 10.5-1.5 32.8-13.4 37.4-26.4s4.6-24.1 3.2-26.4-5.5-3.9-11-6.7z'/%3E%3C/svg%3E"); 
}
.icon-whatsapp-white { 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23FFF' d='M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.1 0-65.6-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18s-8.8-2.8-12.4 2.8-14.1 18-17.2 21.6-6.2 4.1-11.7 1.3c-5.5-2.8-23.2-8.5-44.2-27.1-16.4-14.6-27.4-32.6-30.6-38.1s-.3-8.5 2.5-11.2c2.5-2.4 5.5-6.4 8.2-9.6s3.7-5.5 5.5-9.1.9-6.9-.5-9.6-12.4-29.9-17-41c-4.5-10.7-9.1-9.2-12.4-9.4h-10.6c-3.7 0-9.6 1.4-14.7 6.9s-19.3 18.8-19.3 45.8 19.7 53 22.4 56.7 38.7 59.1 93.7 82.8c13.1 5.7 23.3 9.1 31.3 11.6 13.1 4.1 25.1 3.5 34.5 2.1 10.5-1.5 32.8-13.4 37.4-26.4s4.6-24.1 3.2-26.4-5.5-3.9-11-6.7z'/%3E%3C/svg%3E"); 
}

/* Facebook & Instagram Blanc - #FFF */
.icon-facebook-white { 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23555' d='M504 256C504 119 393 8 256 8S8 119 8 256c0 123.8 90.7 226.4 209.3 245V327.7h-63V256h63v-54.6c0-62.2 37-96.5 93.7-96.5 27.1 0 55.5 4.8 55.5 4.8v61h-31.2c-30.8 0-40.4 19.1-40.4 38.7V256h68.8l-11 71.7h-57.8V501C413.3 482.4 504 379.8 504 256z'/%3E%3C/svg%3E"); 
}
.icon-instagram-white { 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23FFF' d='M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z'/%3E%3C/svg%3E"); 
}

/* Autres icônes fonctionnelles */
.icon-camera { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23333' d='M149.1 64.8L138.7 96H64C28.7 96 0 124.7 0 160V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H373.3L362.9 64.8C356.4 45.2 338.1 32 317.4 32H194.6c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z'/%3E%3C/svg%3E"); }
.icon-user-edit { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'%3E%3Cpath fill='%2300a8ff' d='M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H320V415.4L178.3 304zM483.7 462.3l-61.3-61.4 34.1-34.1 61.3 61.4-34.1 34.1zm-151.7 43.7l9.1-9.1 47.7-47.7L330.3 388l-47.7 47.7-9.1 9.1c-12.5 12.5-12.5 32.8 0 45.3l3.8 3.8c12.5 12.5 32.8 12.5 45.3 0z'/%3E%3C/svg%3E"); }
.icon-box-open { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath fill='%2300a8ff' d='M248.4 22.7c-15.3-11-35.4-11-50.7 0L31.2 142c-13.9 10-22.1 26-22.1 43V438.5c0 17 8.2 33 22.1 43l166.5 119.3c15.3 11 35.4 11 50.7 0l166.5-119.3c13.9-10 22.1-26 22.1-43V185c0-17-8.2-33-22.1-43L248.4 22.7zM223.1 96l136 97.6L223.1 291.2l-136-97.6L223.1 96z'/%3E%3C/svg%3E"); }
.icon-edit { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%2300a8ff' d='M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z'/%3E%3C/svg%3E"); }
.icon-trash { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23e74c3c' d='M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z'/%3E%3C/svg%3E"); }
.icon-info { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23333' d='M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-144a32 32 0 1 1 0-64 32 32 0 1 1 0 64z'/%3E%3C/svg%3E"); }
.icon-user-circle { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23333' d='M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z'/%3E%3C/svg%3E"); }










.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* Évite les espaces vides */
    background: #eee; /* Couleur de fond pendant le chargement */
}

.top-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }


.logo {
    font-family: 'Poppins', sans-serif!important;
    font-weight: 700; /* Bold */
    font-size: 24px;
    letter-spacing: -0.5px; /* Rapproche un peu les lettres pour un look "App" */
    text-decoration: none;
    color: #00a8ff; /* Couleur sombre pour Ndamba */
    display: flex;
    align-items: center;

}

/* Style spécifique pour le UP */
.logo span {
    color: var(--primary); /* Ton bleu #00a8ff */
    font-weight: 900; /* Encore plus épais pour le contraste */
    margin-left: 2px;
    position: relative;
}

/* Optionnel : Un petit point après le UP pour le style */
.logo span::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #2ecc71; /* Un petit vert "connecté" */
    border-radius: 50%;
    margin-left: 2px;
}




.user-menu { font-size: 24px; color: #555; }



.search-bar { display: flex; gap: 10px; margin-bottom: 10px; }

.search-bar input { flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 20px; outline: none; }

.search-bar button { background: #00a8ff; color: white; border: none; padding: 10px 15px; border-radius: 50%; }



.distance-filter { font-size: 14px; color: #555; display: flex; align-items: center; justify-content: space-between; }

#distance-slider { width: 60%; accent-color: #00a8ff; }



/* Grille Masonry (2 colonnes sur mobile) */

.masonry-grid {

    display: grid;

    grid-template-columns: repeat(2, 1fr); /* 2 colonnes comme OfferUp */

    gap: 10px;

    padding: 10px;

}



/* Carte d'annonce */

.ad-card {

    background: white; border-radius: 8px; overflow: hidden;

    box-shadow: 0 1px 3px rgba(0,0,0,0.1);

}

.ad-image { position: relative; height: 180px; }

.ad-image img { width: 100%; height: 100%; object-fit: cover; }

.ad-image .price {

    position: absolute; bottom: 8px; left: 8px;

    background: rgba(0,0,0,0.7); color: white;

    padding: 4px 8px; border-radius: 4px; font-weight: bold; font-size: 13px;

}



.ad-info { padding: 10px; }

.ad-info h3 { font-size: 14px; color: #333; margin-bottom: 5px;  overflow: hidden; text-overflow: ellipsis; }

.ad-info .location { font-size: 11px; color: #888; }



/* Bouton Vendre */

.floating-btn {

    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);

    background: #00a8ff; color: white; padding: 12px 25px;

    border-radius: 30px; font-weight: bold; display: flex; align-items: center; gap: 8px;

    box-shadow: 0 4px 15px rgba(0,168,255,0.4); cursor: pointer;

}





/* Styles pour la page produit */

.product-page { background: white; }



.back-btn {

    position: absolute; top: 15px; left: 15px; z-index: 10;

    background: rgba(0,0,0,0.5); color: white; width: 40px; height: 40px;

    border-radius: 50%; display: flex; align-items: center; justify-content: center;

    text-decoration: none;

}



.product-slider img { width: 100%; height: 300px; object-fit: cover; }



.product-details { padding: 20px;  }





.product-slider { padding: 20px; width: 100%; height: 300px;  }

.price-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }

.product-price { font-size: 24px; color: #333; font-weight: 800; }

.product-condition { background: #eef2f3; padding: 5px 10px; border-radius: 4px; font-size: 12px; color: #666; }



.product-title { font-size: 18px; margin-bottom: 8px; color: #444; }

.product-location { color: #888; font-size: 13px; margin-bottom: 20px; }



.product-desc { line-height: 1.6; color: #555; font-size: 15px; }



hr { border: 0; border-top: 1px solid #eee; margin: 20px 0; }



.seller-min-card { display: flex; align-items: center; gap: 15px; }

.seller-min-card .avatar { border-radius: 50%; width: 50px; height: 50px; }

.seller-info strong { display: block; font-size: 15px; }

.seller-info span { font-size: 12px; color: #888; }



/* Barre d'action fixe */

.action-bar {

    position: fixed; bottom: 0; left: 0; right: 0;

    background: white; padding: 12px; display: flex; gap: 10px;

    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);

}

.btn-call, .btn-whatsapp {

    flex: 1; text-align: center; padding: 12px; border-radius: 8px;

    text-decoration: none; font-weight: bold; display: flex; align-items: center; justify-content: center; gap: 8px;

}

.btn-call { background: #f0f0f0; color: #333; }

.btn-whatsapp { background: #25D366; color: white; }



.product-header { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 12px; color: #888; }

.time-tag i { color: #00a8ff; }

.status-badge { color: #2ecc71; font-weight: bold; }

.trust-badge { font-size: 11px; color: #00a8ff; background: #e1f5fe; padding: 4px 8px; border-radius: 15px; display: flex; align-items: center; gap: 5px; }

/* --- FOOTER DESKTOP --- */
.main-footer {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 50px 0 100px 0; /* Plus d'espace en bas pour la barre mobile */
    margin-top: 40px;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.footer-logo { color: #00a8ff; font-size: 24px; font-weight: 900; margin-bottom: 15px; }
.footer-section h4 { font-size: 16px; margin-bottom: 15px; color: #333; }
.footer-section p { font-size: 14px; color: #666; line-height: 1.6; }
.footer-section ul { list-style: none; padding: 0; }
.footer-section ul li { margin-bottom: 10px; }
.footer-section ul li a { text-decoration: none; color: #666; font-size: 14px; transition: 0.3s; }
.footer-section ul li a:hover { color: #00a8ff; }

.social-links { display: flex; gap: 15px; margin-top: 15px; }
.social-links a { color: #555; font-size: 20px; transition: 0.3s; }
.social-links a:hover { color: #00a8ff; }

.footer-bottom {
    text-align: center;
    padding: 25px 20px;
    border-top: 1px solid #eee;
    margin-top: 40px;
    font-size: 13px;
    color: #999;
}

/* --- BARRE MOBILE FIXE --- */
.mobile-nav {
    display: none; /* Caché sur PC */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 2000;
    padding-bottom: env(safe-area-inset-bottom); /* Pour les iPhones récents */
}

.nav-item {
    text-decoration: none;
    color: #999;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
}

.nav-item i { font-size: 20px; margin-bottom: 4px; }
.nav-item.active { color: #00a8ff; }

/* Bouton spécial "Vendre" au milieu */
.nav-item.publish {
    position: relative;
    top: -15px; /* On le fait ressortir vers le haut */
}

.plus-icon {
    width: 50px;
    height: 50px;
    background: #00a8ff;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0,168,255,0.4);
    border: 4px solid #fff;
}

.publish span { margin-top: 18px; color: #00a8ff; }

/* Media Query pour afficher/cacher */
@media (max-width: 768px) {
    .mobile-nav { display: flex; }
    .main-footer { display: block; } /* On garde le footer texte mais on l'espace */
}

@media (min-width: 769px) {
    .mobile-nav { display: none; } /* On cache la barre mobile sur PC */
}