/* 
CODE COULEUR
marron #430C05
rouge #D46F4D
orange #FFBF66
bleu #08C5D1
noir #00353F
*/

@font-face {
	font-family: 'Segoe UI';
	src: url(‘SegoeUI.ttf’) format(‘truetype’)
}

body{
    font-family: Segoe UI;
    margin: 0;
}

/* Style par défaut : desktop */
    .content {
        display: flex;
        flex-direction: row; /* éléments côte à côte */
        gap: 20px;
        margin: 4rem 15rem;
        position: relative;
    }

    /* Marge desktop pour .environ */
    .environ {
        margin: 4rem 15rem;
    }

    /* Layout en 2 colonnes pour filter.php */
    .two-column-layout {
        display: flex;
        flex-direction: row;
        gap: 20px;
        /* margin: 4rem 15rem; */
        align-items: flex-start;
    }

    .main-column {
        max-width: 600px;
        flex: 1;
        order: 1;
    }

    .sidebar-column {
        max-width: 400px;
        order: 2;
        align-self: flex-start;
    }
  
    /* Aside à droite */
    .pub {
        max-width: 500px;
        position: fixed;
        top: 5rem;
        padding: 0;
        /* background: #fff3cd; */
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        order: 2; /* s'affiche après result */
        height: fit-content;
        max-height: 100vh;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
    }
    
    /* Styles mobile pour l'aside */
    @media screen and (max-width: 768px) {
        .pub {
            position: static !important;
            max-width: 100%;
            max-height: none !important;
            overflow-y: visible !important;
            margin: 20px 0;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        }
        
        .sidebar-column {
            order: -1; /* Mettre la sidebar avant le contenu principal sur mobile */
            margin-bottom: 20px;
        }
        
        .content {
            flex-direction: column;
            margin: 1rem;
            gap: 0;
        }
    }
    
    /* Style de la scrollbar pour WebKit (Chrome, Safari, Edge) */
    .pub::-webkit-scrollbar {
        width: 6px;
    }
    
    .pub::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .pub::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.3);
        border-radius: 3px;
    }
    
    .pub::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.5);
    }
  
    /* Contenu principal */
    #result {
        flex: 1;
        order: 1;
    }

    /* Menu trois points */
    .menu-three-dots {
        position: relative;
        display: inline-block;
    }

    .entete_annonce {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Section droite contenant quartier, ville et menu trois points */
    .right-section {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .entete_annonce .right {
        display: flex;
        align-items: center;
    }

    /* Style pour l'affichage quartier */
    .lieu-link {
        display: flex;
        align-items: center;
    }

    /* Style pour le div ville */
    .ville {
        display: flex;
        align-items: center;
    }

    .ville-label {
        background-color: #dc2626;
        color: white;
        padding: 6px 8px;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .quartier-text {
        color: white;
        font-size: 14px;
        font-weight: 500;
    }

    .three-dots-btn {
        background: none;
        border: none;
        cursor: pointer;
        padding-top : 5px; 
        border-radius: 5px;
        transition: background-color 0.2s;
    }

    .three-dots-btn:hover {
        background-color: #f0f0f0;
    }

    .menu-popup {
        position: absolute;
        top: 100%;
        right: 0;
        background: white;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        z-index: 1000;
        min-width: 160px;
        overflow: hidden;
    }

    .menu-item {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 10px 15px;
        border: none;
        background: none;
        cursor: pointer;
        text-align: left;
        font-size: 14px;
        transition: background-color 0.2s;
        gap: 8px;
    }

    .menu-item:hover {
        background-color: #f5f5f5;
    }

    .menu-item.signaler:hover {
        background-color: #fff3cd;
        color: #856404;
    }

    .menu-item.bloquer:hover {
        background-color: #f8d7da;
        color: #721c24;
    }

    .menu-item.favori-menu:hover {
        background-color: #f8d7da;
        color: #721c24;
    }

    .menu-item svg {
        flex-shrink: 0;
    }
  
  /* Responsive pour mobile et tablette */
  @media screen and (max-width: 1024px) {
    .content {
      flex-direction: column; /* empiler les éléments */
      margin : 4rem;
    }

    /* Layout en 2 colonnes responsive */
    .two-column-layout {
        flex-direction: column;
        margin: 4rem;
    }

    /* Marge tablette pour .environ */
    .environ {
        margin: 2rem 4rem;
    }

    /* Titre .nombre sur tablette */
    .nombre {
        font-size: 20px;
        word-break: break-all;
    }

    .main-column {
        order: 2; /* contenu principal en dessous */
    }

    .sidebar-column {
        order: 1; /* pub passe en haut */
        max-width: 100%;
    }
  
    .pub {
        margin-top : 20px;
        position: static;
        order: 1; /* pub passe en haut */
    }
  
    #result {
      order: 2; /* contenu principal en dessous */
    }
  }

  @media screen and (max-width: 600px) {
    /* Styles uniquement pour les mobiles */
    .content{
        margin: 0;
    }

    /* Layout en 2 colonnes pour mobile */
    .two-column-layout {
        margin: 0;
    }

    .environ {
        margin: 0!important;
    }   

    /* Titre .nombre sur mobile */
    .nombre {
        font-size: 18px;
        word-break: normal;
        margin-top: 80px; /* Espace pour éviter la barre de menu */
    }
    
    /* Titre des annonces avec style spécial */
    .nombre.annonces-title {
        background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
        border: 2px solid #4CAF50;
        border-radius: 12px;
        padding: 20px;
        margin: 20px 0;
        text-align: center;
        color: #2e7d32;
        font-weight: bold;
        box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
        margin-top: 60px; /* Espacement réduit pour les annonces */
    }
    
    /* Conteneur principal sur mobile */
    .main-column {
        margin-top: 20px;
        padding-top: 40px; /* Espacement réduit pour éviter la barre de menu */
    }
    
    /* Layout en 2 colonnes sur mobile */
    .two-column-layout {
        margin-top: 0;
    }
    
    /* Conteneur pour le message d'erreur */
    .no-annonces-container {
        margin-top: 80px; /* Espace pour éviter la barre de menu */
    }
    
    /* Message d'erreur quand aucune annonce */
    .nombre.no-annonces {
        background: #fff3cd;
        border: 1px solid #ffeaa7;
        border-radius: 8px;
        padding: 20px;
        margin: 20px 0;
        text-align: center;
        color: #856404;
        font-weight: bold;
    }
    
    /* Conteneur du visage triste */
    .sad-face-container {
        display: flex;
        justify-content: center;
        margin: 20px 0;
    }
    
    /* Icône triste */
    .sad-icon {
        width: 120px;
        height: 120px;
        color: #f39c12;
        animation: gentle-sway 3s ease-in-out infinite;
    }
    
    @keyframes gentle-sway {
        0%, 100% {
            transform: translateY(0) rotate(0deg);
        }
        25% {
            transform: translateY(-3px) rotate(-1deg);
        }
        50% {
            transform: translateY(0) rotate(0deg);
        }
        75% {
            transform: translateY(-2px) rotate(1deg);
        }
    }


    .pub{
        margin-top : 4rem;
        padding: 0;
    }

    /* Menu de navigation responsive */
    .nav-menu {
        display: none !important;
    }
    
    /* Réorganiser la navbar pour mobile */
    .navbar {
        padding: 10px 15px;
    }
    
    .icons {
        gap: 10px;
        padding-right: 5px;
    }
    
    .icon-button {
        width: 35px;
        height: 35px;
    }
    
    .logo {
        height: 35px;
    }

   
  }
  

/* Barre de menu */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    z-index: 1000;
    gap: 15px;
}

/* Sur desktop, organiser les éléments : logo | menu (centré) | ville + recherche + icons */
@media screen and (min-width: 769px) {
    .navbar {
        gap: 20px;
        justify-content: space-between;
        position: sticky;
        top: 0;
        z-index: 1000;
        background: white;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    
    .logo-container {
        order: 1;
        flex-shrink: 0;
    }
    
    .nav-menu {
        order: 2;
        flex-shrink: 0;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .ville-selector-btn {
        order: 3;
        flex-shrink: 0;
        margin-left: auto;
    }
    
    .search-container {
        order: 4;
        flex-grow: 0;
        margin-right: 10px;
    }
    
    .icons {
        order: 5;
        flex-shrink: 0;
    }
}

/* Sur mobile, cacher le bouton ville (il est dans le menu hamburger) */
@media screen and (max-width: 768px) {
    .ville-selector-btn {
        display: none!important;
    }
}

.navbar input[type="text"] {
    max-width: 240px;
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 30px;
    font-size: 16px;  /* margin-top: 15px; */
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo {
    height: 40px;
}

.logo-text {
    font-size: 18px;
    font-weight: bold;
    color: #00353F;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.logo-text:hover {
    color: #D46F4D;
}

/* Menu de navigation */
.nav-menu {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #00353F;
    font-weight: 500;
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: #f0f0f0;
    color: #D46F4D;
}

/* Menu hamburger */
.hamburger-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 4px;
    order: 10;
}

/* Afficher le hamburger sur mobile */
@media screen and (max-width: 600px) {
    .hamburger-btn {
        display: flex;
    }
}

.hamburger-btn span {
    width: 25px;
    height: 3px;
    background-color: #00353F;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Menu mobile */
.mobile-menu {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-nav-link {
    text-decoration: none;
    color: #00353F;
    font-weight: 500;
    font-size: 18px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.ville-mobile-btn {
    background-color: #ff8c00;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    padding: 15px;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ville-mobile-btn:hover {
    background-color: #e07b00;
}

.ville-mobile-icon {
    flex-shrink: 0;
}

.mobile-nav-link:hover {
    color: #D46F4D;
    padding-left: 10px;
}

.mobile-nav-link:last-child {
    border-bottom: none;
}


.icons {
    display: flex;
    gap: 15px;
    padding-right: 10px;
}

.icon-button {
    background: #f0f0f0;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.icon-button svg{  
    padding: 18px 10px 14px 18px;
}
.icon-button:hover {
    background: #e0e0e0;
}

/* Classes pour différencier mobile et desktop */
.mobile-only {
    display: none;
}

.desktop-only {
    display: flex;
}

@media screen and (max-width: 768px) {
    .mobile-only {
        display: flex;
    }
    
    .desktop-only {
        display: none;
    }
}

/* Desktop : barre de recherche toujours visible */
.search-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 290px;
    margin: 0;
}

/* Mobile : barre de recherche cachée par défaut */
@media screen and (max-width: 768px) {
    .search-container {
        display: none;
        max-width: 100%;
        margin: 0;
        flex-grow: 1;
    }
    
    .search-container.active {
        display: flex;
        flex-grow: 1;
        gap: 10px;
    }
}


#ajout{
    background-color: #4CAF50;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

#ajout:hover{
    background-color: #45a049; 
}

#pro{
    background-color: #e74c3c;
    color: white;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
    transition: background-color 0.3s ease;
}

/* Bouton de sélection de ville */
.ville-selector-btn {
    background-color: #ff8c00;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.ville-selector-btn:hover {
    background-color: #e07b00;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.ville-selector-btn .phone-icon {
    display: flex;
    align-items: center;
}

.ville-selector-btn .ville-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#pro:hover{
    background-color: #c0392b;
}

/* Badge de notification pour l'icône pro */
.pro-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    padding: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 10;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Responsive pour le badge sur mobile */
@media (max-width: 768px) {
    .pro-notification-badge {
        top: -3px;
        right: -3px;
        min-width: 18px;
        height: 18px;
        font-size: 10px;
    }
}



/* Styles d'autocomplete déplacés vers lieu_autocomplete_db.php */ 



/* PHRASE D'INCITATION */
.phrase-incitation {
    color: #65676b;
    font-size: 16px;
    font-style: italic;
    margin: 10px 0 20px 0;
    text-align: center;
    padding: 8px 0;
}

/* SECTION AJOUT ANNONCE STYLE FACEBOOK */
.ajout-annonce-section {
    background: white;
    border: 1px solid #e4e6ea;
    border-radius: 8px;
    margin: 15px 0;
    padding: 12px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ajout-annonce-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ajout-annonce-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.ajout-annonce-icon svg {
    color: white;
    width: 24px;
    height: 24px;
}

.ajout-annonce-icon:hover {
    background-color: #45a049;
}

.ajout-annonce-input {
    flex: 1;
    background: #f0f2f5;
    border-radius: 25px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ajout-annonce-input:hover {
    background: #e4e6ea;
}

.ajout-annonce-text {
    color: #65676b;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    user-select: none;
}

/* ANNONCES */

.annonce {
            border: 1px solid #ddd;
            /* padding: 5px; */
            margin: 15px 0;
            border-radius: 15px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

.annonce img {
            width: 100%;
            height: auto;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        .loading {
            text-align: center;
            display: none;
        }


/* CTA */
.CTA {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #00353F;
    color: white;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 15px 15px;
}

.entete_annonce {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    /* border-bottom: solid 1px rgba(0, 0, 0, 0.1);  */
}

.description{
    padding-left: 5px;
    padding-right: 5px;
    margin-top: 0;
    margin-bottom:0;
    text-align: start;
}

.entete_annonce .right{
    background-color: #08C5D1;
    border-radius: 5px;
    padding : 2px 10px ;
    color : white;
}

.entete_annonce a{
    text-decoration: none;
}

.entete_annonce .left{
    color: black;
    display: flex;
    align-items: center;
    gap: 5px;
}

.entete_annonce .left svg {
    flex-shrink: 0;
}

.badge-sponsorise {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
}

.left {
    font-size: 18px;
    color: white;
    font-weight: bold;
}

.right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.favori svg {
    transition: transform 0.2s ease;
}
.favori:active svg {
    transform: scale(1.2);
}

.favori:hover{
    cursor: pointer;
    transform: scale(1.1);
}

.contact-btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
}

.contact-btn:hover {
    background-color: #45a049;
}

.phone-icon {
    margin-right: 8px;
    /* color: white; */
}

.lieu-link .phone-icon{
    color: white;
}

.voir-plus-desc, .view-images-link {
    color: grey;
    text-decoration: none;
    white-space: nowrap; 
    text-overflow: ellipsis; 
    display: inline-block; 
    max-width: 100%;
}

.image-annonce {
    position: relative; /* Cela permet à la position absolue de l'élément enfant de fonctionner */
}

.nombre_image {
    position: absolute;
    bottom: 10px;  /* Ajustez cette valeur pour la position verticale */
    right: 10px; /* Ajustez cette valeur pour la position horizontale */
    background-color: rgba(0, 0, 0, 0.5); /* Fond semi-transparent pour améliorer la lisibilité */
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nombre_image a, .nombre_image span{
    color: white;
    vertical-align: super;
}

.bon_plan {
    display: inline-flex;
    align-items: center;
    gap: 6px; /* espace entre l'icône et le texte */
    background-color: #d1fae5; /* vert clair */
    color: #065f46; /* vert foncé */
    padding: 6px 12px;
    border-radius: 20px; /* coins arrondis */
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    text-decoration: none;
  }
  
  .bon_plan:hover {
    background-color: #e0e0e0; /* effet hover */
  }
  
  .bon_plan i {
    display: flex;
    align-items: center;
  }
  

/* ================= o O o ================== PUBLIER */
.header-ajout {
    max-width: 100vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.title {
    font-size: 18px;
    font-weight: bold;
}
.publish-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: bold;
    padding: 5px;
}

.publish-link:hover {
    color: white;
    background-color: #3b82f6;;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
}

/* aperçu image */
.thumbnail {
    max-width: 100px;
    max-height: 100px;
    margin-top: 10px;
    border : solid 2px grey;
    border-radius: 5px;
    margin : 2px;
}

#imagePreview img{
    max-width: 100px;
    max-height: 100px;
    margin-top: 10px;
}

.custom-file-upload {
    display: inline-block;
    cursor: pointer;
    padding: 3px;
    
}

.custom-file-upload span{
    vertical-align: super;   
}


#file-chosen{
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    color: white;
    text-align: center;
}

/* publier une annonce */
.container { 
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 100vw;
    margin: auto;
    margin-top: 15px;
}

.container form {
    display: flex;
    flex-direction: column;
    /* gap: 8px; */
}

.container input, .container textarea,.container button {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    margin-bottom: 8px;
}

input:focus, textarea:focus, button:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

input[type="radio"] {
    width: auto;
}

.radio-group {
    display: flex;
    justify-content: space-around;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
}

textarea {
    height: 150px;
}

.container button {
    background-color: #3b82f6;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.container button:hover {
    background-color: #2563eb;
}

label {
    color: #4a4a4a;
    font-weight: 500;
}

input[name="telephone"] {
    padding-left: 40px!important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"><path stroke-linecap="round" stroke-linejoin="round" d="M8.625 12a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375M21 12c0 4.556-4.03 8.25-9 8.25a9.764 9.764 0 0 1-2.555-.337A5.972 5.972 0 0 1 5.41 20.97a5.969 5.969 0 0 1-.474-.065 4.48 4.48 0 0 0 .978-2.025c.09-.457-.133-.901-.467-1.226C3.93 16.178 3 14.189 3 12c0-4.556 4.03-8.25 9-8.25s9 3.694 9 8.25Z" /></svg>');
  
    background-size: 24px;
    background-position: 5px center;
    background-repeat: no-repeat;
}

input[name="prix"] {
    padding-left: 40px; /* espace pour l'icône */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 18.75a60.07 60.07 0 0 1 15.797 2.101c.727.198 1.453-.342 1.453-1.096V18.75M3.75 4.5v.75A.75.75 0 0 1 3 6h-.75m0 0v-.375c0-.621.504-1.125 1.125-1.125H20.25M2.25 6v9m18-10.5v.75c0 .414.336.75.75.75h.75m-1.5-1.5h.375c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-.375m1.5-1.5H21a.75.75 0 0 0-.75.75v.75m0 0H3.75m0 0h-.375a1.125 1.125 0 0 1-1.125-1.125V15m1.5 1.5v-.75A.75.75 0 0 0 3 15h-.75M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm3 0h.008v.008H18V10.5Zm-12 0h.008v.008H6V10.5Z" /></svg>');
  
    background-size: 24px;
    background-position: 5px center;
    background-repeat: no-repeat;
}

input[name="lieu"] {
    padding-left: 40px; /* espace pour l'icône */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"><path stroke-linecap="round" stroke-linejoin="round" d="M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" /><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0Z" /></svg>');
  
    background-size: 24px;
    background-position: 5px center;
    background-repeat: no-repeat;
}

#info{
    text-align: center;
}

/* Styles pour l'affichage en 2 colonnes de la page de publication */
.main-container {
    display: flex;
    flex-direction: row;
    gap: 30px;
    max-width: 1200px;
    margin: 20px auto;
    /* padding: 0 20px; */
    align-items: flex-start;
}

.main-container .container {
    flex: 2;
    margin: 0;
    max-width: none;
}

.main-container #info {
    flex: 1;
    position: sticky;
    top: 20px;
    background: #f8f9fa;
    /* padding: 20px; */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.main-container #info h2 {
    color: #430C05;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.main-container #info p {
    color: #00353F;
    line-height: 1.5;
    margin: 0;
    font-size: 0.9em;
}

/* Responsive pour l'affichage en 2 colonnes */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        gap: 20px;
        padding: 0 10px;
        margin: 1rem auto;
    }
    
    .main-container .container {
        flex: none;
        width: 100%;
        padding: 15px;
    }
    
    .main-container #info {
        flex: none;
        max-width: fit-content;
        position: static;
        order: 1; /* Afficher les règles en bas sur mobile */
        /* padding: 15px; */
    }
    
    /* Mettre le div.left au-dessus sur mobile */
    .entete_annonce {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
    }
    
    .entete_annonce .left {
        order: -1;
        width: 100%;
    }
}

/* Responsive mobile pour publier.php */
@media screen and (max-width: 600px) {
    .main-container {
        margin: 0.5rem auto;
        padding: 5px;
        gap: 15px;
    }
    
    .main-container .container {
        max-width: 90vw;
        padding: 12px;
        margin-top: 5px;
        margin:auto;
    }
    
    .main-container #info {
        width: 100%;
        /* padding: 12px; */
        margin-top: 5px;
    }
    
    .header-ajout {
        padding: 8px 12px;
    }
    
    /* Autocomplétion mobile */
    .autocomplete-list {
        /* width: calc(100vw - 40px); */
        max-width: none;
        margin: 0;
        border-radius: 8px;
    }
    
    .liste_lieu {
        padding: 12px;
        font-size: 14px;
    }
    
    /* Bouton d'upload mobile */
    .custom-file-upload {
        padding: 15px;
        font-size: 14px;
    }
}

/* Responsive pour très petits écrans */
@media screen and (max-width: 400px) {
    .main-container {
        margin: 0.25rem auto;
        padding: 3px;
        gap: 10px;
    }
    
    .main-container .container {
        padding: 10px;
    }
    
    .main-container #info {
        /* padding: 10px; */
    }
    
    .header-ajout {
        padding: 6px 10px;
    }
    
    
    .back-button {
        padding: 6px;
    }
    
    .back-button svg {
        width: 20px;
        height: 20px;
    }
}

.error{
    color: #D46F4D;
    font-size: 12px;
    text-align: right;
    margin-bottom: 10px;
}

/* auto completion lieu dans ajouter */
.autocomplete-suggestions{
    margin: auto;
    width: 80vw;
    max-width: 100vw;
    border: 2px solid black;
    text-align: center;
    border-radius : 5px;
    /* barre de defilement */
    max-height: 100px;
    overflow-y: auto;
}

.liste_lieu{
    margin: 5px;
    width: 100%;
    padding: 8px;
}

.liste_lieu:hover{
    text-align: center;
    background-color: #D46F4D;
    border-radius : 5px;
    color: white;
    cursor: pointer;
}

/* Style pour le badge de ville dans l'autocomplétion */
.ville-badge {
    background-color: #dc2626;  /* Rouge vif */
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    margin-left: 5px;
}

/* FILTRE PAR LIEU */
#prix{
    height: 28px;
    vertical-align: top;
    font-size: 18px;
    margin-bottom: 3px;
}

#icon.open {
    transform: rotate(180deg); /* Rotation de 90 degrés, ou tout autre changement souhaité */
}

#filterToggle span{
    vertical-align: super;
}

#filterToggle{
    width: 160px;
    background-color: black;
    padding: 5px;
    color: white;
    border-radius: 30px;
    text-align: center;
}

#filterToggle:hover{
    background-color: blue;
}

#filtreForm {
    padding: 10px;
    border: black 2px solid;
    margin: 5px 0;
    border-radius: 10px;
}

#filtreForm button {
    display: inline-flex;       /* Utilise inline-flex pour ne pas faire passer l'input à la ligne */
    justify-content: center;    /* Centre le texte horizontalement */
    align-items: center;        /* Centre le texte verticalement */
    text-align: center;         /* Assure que le texte est centré */
}

/* ENVIRON */
.environ {
    margin: 4rem 15rem;
}

/* Titre avec nombre d'annonces */
.nombre {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.4;
}

/* Style pour le titre des annonces (desktop) */
.nombre.annonces-title {
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    border: 2px solid #4CAF50;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    color: #2e7d32;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
}

/* Style des liens comme des boutons */
.lien_environ {
    display: inline-block;
    padding: 5px 10px;
    color: black;
    border : 1px black solid;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    margin: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Effet au survol */
.lien_environ:hover {
    background-color: black;
    color: white;
    transform: scale(1.05);
}

/* MODE PRO */
.input-container {
    display: flex;
    justify-content: center;
}
.input-container input {
    width: 40px;
    height: 40px;
    text-align: center;
    font-size: 20px;
    margin-right: 5px;
}
.input-container input.invalid {
    border: 2px solid red;
}
.input-container input.valid {
    border: 2px solid green;
}
input.invalid {
    border: 2px solid red;
}
input.valid {
    border: 2px solid green;
}

.invalide {
    background-color: #d3d3d3;
    cursor: not-allowed!important;
    opacity: 0.7;
}

.logo img {
    display: block;
    margin: 0 auto;
    width: 200px;
    margin-top : 60px;
}

#container-connexion{
    max-width: 70vw;
    text-align: center;
}

/* TARIF OFFRE */
.offers-container {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.offer {
    border: 2px solid #ddd;
    padding: 5px;
    margin: 5px;
    border-radius: 15px;
    width: 200px;
    text-align: center;
    background-color: #f9f9f9;
    cursor: pointer;
}
.offer.selected {
    border-color: #007bff;
    background-color: #e3f2fd;
}
.offer input {
    display: none;
}
.description-container {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    background-color: #fff;
}

#offer-description{
    margin-bottom: 150px;
}

/* METHODE DE PAYEMENT */
.purchase-box {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 5px;
    background-color: black;
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    border-radius : 15px 15px 0 0;
}

.purchase-box p{
    margin: 5px;
}

 /* Conteneur des logos */
.payment-options {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
}

.payment-logo {
    cursor: pointer;
    padding: 2px;
    border: 2px solid transparent;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.payment-logo img {
    width: 30vw;
    height: auto;
    border-radius: 10px;
}


.payment-logo.selected img {
    border: 3px solid white; 
    transform: scale(1.05);
    transition: all 0.1s ease-in-out; /* Animation fluide */
}

.purchase-box .description {
    display: none;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
}

#mvola-desc{
    background-color: #ffde00;
}

#mvola-desc:hover {
    background-color: rgba(255, 222, 0, 0.9);
}

.purchase-box .button-container {
    display: flex;
    gap: 10px;
    justify-content: center;
}

#buy-link, #show-text {
    text-decoration: none;
    padding : 5px;
    border : solid 1px black;
    border-radius: 30px;
    color : black;
    margin: 10px;
}

 #buy-link:hover, #show-text:hover {
   background-color: black;
   color: white;
}


.purchase-box input {
    width: 80vw;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}


.purchase-box #hidden-text {
    margin-top: 10px;
    padding: 10px;
    display: none;
    color: white;
    background-color: black;
}

#airtel-money-desc{
    background-color: #ee1b24;
}

#orange-money-desc{
    background-color: #ff7900;
}



/* FOOTER */
footer{
    text-align: center;
}

