/* =========================================================
   IWWO – Annonce Immobilière
   Feuille de style principale du plugin
   Chaque section est commentée pour faciliter la maintenance
   ========================================================= */


/* ---------------------------------------------------------
   1. RESET LOCAL
   Applique un box-sizing cohérent à tous les éléments
   uniquement à l’intérieur du plugin.
   --------------------------------------------------------- */
.iwwo-annonce * {
    box-sizing: border-box;
}


/* ---------------------------------------------------------
   2. CONTAINER PRINCIPAL
   Conteneur global qui englobe toute l’annonce.
   Permet d’éviter les conflits avec le thème.
   --------------------------------------------------------- */
.iwwo-annonce {
    max-width: 900px;        /* largeur max de l’annonce */
    margin: 0 auto;          /* centre le contenu */
    padding: 20px;           /* espace intérieur */
    font-family: Arial, sans-serif; /* police neutre */
}


/* ---------------------------------------------------------
   3. TITRES
   Style des titres internes à l’annonce.
   --------------------------------------------------------- */
.iwwo-annonce h1,
.iwwo-annonce h2,
.iwwo-annonce h3 {
    margin-bottom: 10px;
    font-weight: 600;
}


/* ---------------------------------------------------------
   4. SECTIONS
   Chaque bloc d’information (DPE, copro, description…)
   est présenté dans une "carte" visuelle.
   --------------------------------------------------------- */
.iwwo-annonce-section {
    margin-bottom: 30px;     /* espace entre sections */
    padding: 20px;           /* espace intérieur */
    background: #f7f7f7;     /* fond gris clair */
    border-radius: 6px;      /* coins arrondis */
}

.iwwo-text-honoraires{
    font-size: 14px;     /* Réduit la taille du texte */
    font-style: italic;  /* Met le texte en italique */
}


/* ---------------------------------------------------------
   5. GRILLES / LAYOUT
   Mise en page en colonnes pour les infos structurées.
   --------------------------------------------------------- */
.iwwo-annonce-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 colonnes */
    gap: 20px;                      /* espace entre colonnes */
    border: 1px solid orange;
    border-radius: 20px;
    box-shadow:0px 0px 5px 1px grey;
    padding: 15px;
}

/* ---------------------------------------------------------
   6. PHOTOS
  Mise en forme de la photos principal
   --------------------------------------------------------- */
.iwwo-annonce-photos-principal{
    display: flex;
    justify-content: center; /* centre horizontalement */
    margin-bottom: 20px;
}

.iwwo-photos-principal img {
    max-width: 600px; /* limite la taille */
    width: 100%;
    border-radius: 6px;
}

/* ---------------------------------------------------------
   
   Mise en forme de la galerie de photos.
   --------------------------------------------------------- */
.iwwo-photos {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;         /* retour à la ligne automatique */
}

.iwwo-photos img {
    width: 100%;
    max-width: 200px;        /* limite la taille des photos */
    border-radius: 4px;      /* coins arrondis */
}
 
/* ---------------------------------------------------------
   GALERIE MINIATURES
   --------------------------------------------------------- */
.iwwo-gallery {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
    justify-content: center; /* centre horizontalement */
}

.iwwo-gallery .iwwo-thumb {
    width: 140px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* Zoom au survol */
.iwwo-gallery .iwwo-thumb:hover {
    transform: scale(1.08);
}


/* ---------------------------------------------------------
   LIGHTBOX (plein écran)
   --------------------------------------------------------- */
.iwwo-lightbox {
    display: none; /* caché par défaut */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
}

.iwwo-lightbox-img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 6px;
}

/* Bouton fermer */
.iwwo-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

/* Flèches navigation */
.iwwo-lightbox-prev,
.iwwo-lightbox-next {
    position: absolute;
    top: 50%;
    font-size: 50px;
    color: white;
    cursor: pointer;
    padding: 10px;
    user-select: none;
}

.iwwo-lightbox-prev { left: 30px; }
.iwwo-lightbox-next { right: 30px; }

.iwwo-lightbox-prev:hover,
.iwwo-lightbox-next:hover {
    color: #ffcc00;
}


/* ---------------------------------------------------------
   7. ICONES (Font Awesome)
   Style appliqué aux icônes FA utilisées dans les titres.
   --------------------------------------------------------- */
.iwwo-icon {
    color: #444;
    margin-right: 8px;       /* espace entre icône et texte */
}


/* ---------------------------------------------------------
   8. BOUTONS
   Style des boutons d’action (contact, visite, etc.)
   --------------------------------------------------------- */
.iwwo-annonce-btn {
    display: inline-block;
    padding: 10px 16px;
    background: #0073aa;     /* bleu WordPress */
    color: white;
    border-radius: 4px;
    text-decoration: none;
}

.iwwo-annonce-btn:hover {
    background: black;     /* application nouvelle couleur */
}

/* ---------------------------------------------------------
   9. PLAN
   Style du plan de localisation de l'adresse du biens
   --------------------------------------------------------- */
.iwwo-localisation {
    text-align: center;
}

.iwwo-map-container {
    margin: 15px 0;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.iwwo-adresse-texte {
    margin-top: 10px;
    font-size: 14px;
    color: #555;
}

/* ---------------------------------------------------------
   10. listes annonces
   Style des listes des affichages des annonces
   --------------------------------------------------------- */
.iwwo-liste-annonces {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.iwwo-annonce-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.iwwo-annonce-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
/* ---------------------------------------------------------
   10. apparence du filtre 
   Style des élements du filtre pour la reherche d'annonce
   --------------------------------------------------------- */
/* Conteneur global */
.iwwo-filtres-annonces {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #ddd;
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    align-items: flex-start;
}

/* Ligne de filtres */
.iwwo-filtre-row {
    display: flex; 
    gap: 20px; 
    margin-bottom: 15px;
}

/* Élément individuel */
.iwwo-filtre-item {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.iwwo-filtre-item label {
    font-weight: 600;
    margin-bottom: 6px;
}

/* Inputs */
.iwwo-filtre-item input[type="text"],
.iwwo-filtre-item select {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 15px;
}

.iwwo-filtre-items select,
.iwwo-filtre-item input,
.iwwo-filtre-btn {
    white-space: nowrap;
}


/* Slider */
.iwwo-filtre-item input[type="range"] {
    width: 100%;
    margin-top: 10px;
}

#minPrixValue,
#maxPrixValue {
    font-weight: bold;
    margin-top: 5px;
    display: inline-block;
}

/* Bouton */
.iwwo-filtre-btn {
    background: #0073aa;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
}

.iwwo-filtre-btn:hover {
    background: #005f8d;
}

/* Container */
.iwwo-range-container {
    position: relative;
    width: 100%;
    height: 40px;
    margin: 10px 0 5px 0;
}

/* Track */
.iwwo-slider-track {
    position: absolute;
    height: 6px;
    background: #0073aa;
    border-radius: 5px;
    top: 50%;
    transform: translateY(-50%);
}

/* Inputs */
.iwwo-range-container input[type="range"] {
    position: absolute;
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
}

.iwwo-range-container input[type="range"]::-webkit-slider-thumb {
    pointer-events: all;
    width: 18px;
    height: 18px;
    background: #0073aa;
    border-radius: 50%;
    cursor: pointer;
    -webkit-appearance: none;
}

.iwwo-range-values {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-top: 5px;
}

/* Tous les éléments du formulaire */
.iwwo-filtres-annonces > * {
    flex-shrink: 0; /* empêche les éléments de se compresser */
}

/* Le select "Type" plus court */
.iwwo-filtres-annonces select {
    width: 140px;
}

/* Le champ Ville plus court */
.iwwo-filtres-annonces input[type="text"] {
    width: 160px;
}

/* Le bouton compact */
.iwwo-filtres-annonces button {
    width: auto;
    padding: 10px 18px;
    white-space: nowrap;
}

.iwwo-filtre-item label i {
    margin-right: 6px;
    color: #0073aa;
}

.iwwo-filtre-btn i {
    margin-right: 6px;
}


/* ================================
   ICÔNE VILLE
   ================================ */
.iwwo-filtres-annonces input[name="ville"] {
    background-image: url("data:image/svg+xml,%3Csvg fill='gray' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath d='M168 0C75.1 0 0 75.1 0 168c0 87.3 144 312 168 344 24-32 168-256.7 168-344C336 75.1 260.9 0 168 0zm0 240c-39.8 0-72-32.2-72-72s32.2-72 72-72 72 32.2 72 72-32.2 72-72 72z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 16px;
    background-position: 8px center;
    padding-left: 32px;
}


/* ---------------------------------------------------------
   11. RESPONSIVE
   Adaptation automatique sur mobile.
   --------------------------------------------------------- */
@media (max-width: 768px) {
    .iwwo-annonce-grid {
        grid-template-columns: 1fr; /* 1 colonne sur mobile */
    }
    .iwwo-filtre-row {
        flex-direction: column;
    }
    .iwwo-filtres-annonces{
        flex-wrap:wrap;
    }
    .iwwo-filtre-item {
        flex-direction: column;
        align-items: flex-start;
    }

}


