/* Styles pour les shortcodes Elipte Apimo en frontend */

.elipte-widget-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-weight: bold;
}

/* Grid de propriétés avec images - Maximum 3 par ligne */
.elipte-apimo-properties-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
    /* Mobile : 1 colonne */
    grid-template-columns: 1fr;
}

/* Tablette : 2 colonnes */
@media (min-width: 768px) {
    .elipte-apimo-properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop : 3 colonnes maximum */
@media (min-width: 1024px) {
    .elipte-apimo-properties-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Propriété mise en avant (pleine largeur) */
.elipte-apimo-property-highlight {
    margin-bottom: 30px;
    width: 100%;
}

.elipte-property-card-highlight {
    width: 100%;
    max-width: none;
}

.elipte-property-image-highlight {
    height: 400px;
    position: relative;
}

/* Contenu centré pour la propriété mise en avant */
.elipte-property-card-highlight .elipte-property-content-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px;
}

.elipte-property-card-highlight .elipte-property-title-overlay {
    font-size: 36px;
    margin-bottom: 15px;
}

.elipte-property-card-highlight .elipte-property-price-overlay {
    font-size: 32px;
    margin-bottom: 15px;
}

.elipte-property-card-highlight .elipte-property-location-overlay {
    font-size: 16px;
    margin-bottom: 15px;
}

.elipte-property-card-highlight .elipte-property-details-overlay {
    justify-content: center;
    gap: 15px;
}

.elipte-property-card-highlight .elipte-property-details-overlay span {
    font-size: 14px;
    padding: 6px 12px;
}

/* Responsive pour la propriété mise en avant */
@media (max-width: 767px) {
    .elipte-property-image-highlight {
        height: 300px;
    }
    
    .elipte-property-card-highlight .elipte-property-content-overlay {
        padding: 25px;
    }
    
    .elipte-property-card-highlight .elipte-property-title-overlay {
        font-size: 24px;
    }
    
    .elipte-property-card-highlight .elipte-property-price-overlay {
        font-size: 24px;
    }
    
    .elipte-property-card-highlight .elipte-property-location-overlay {
        font-size: 14px;
    }
}

.elipte-property-card {
    background: white;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.elipte-property-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.elipte-property-card:hover .elipte-property-content-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* Design avec overlay sur image */
.elipte-property-image-overlay {
    position: relative;
    height: 300px;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.elipte-image-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    backdrop-filter: blur(4px);
}

.elipte-property-content-overlay {
    padding: 20px;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    transform: translateY(100%);
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
    opacity: 0;
    animation: slideUpReveal 0.8s ease-out 0.5s forwards;
}

/* Délais décalés pour les cartes */
.elipte-property-card:nth-child(1) .elipte-property-content-overlay {
    animation-delay: 0.2s;
}

.elipte-property-card:nth-child(2) .elipte-property-content-overlay {
    animation-delay: 0.4s;
}

.elipte-property-card:nth-child(3) .elipte-property-content-overlay {
    animation-delay: 0.6s;
}

.elipte-property-card:nth-child(4) .elipte-property-content-overlay {
    animation-delay: 0.8s;
}

.elipte-property-card:nth-child(5) .elipte-property-content-overlay {
    animation-delay: 1.0s;
}

.elipte-property-card:nth-child(6) .elipte-property-content-overlay {
    animation-delay: 1.2s;
}

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

.elipte-property-title-overlay {
    margin: 0 0 8px 0;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.2;
}

.elipte-property-title-overlay a {
    color: white;
    text-decoration: none;
}

.elipte-property-meta-overlay {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
}

.elipte-property-ref-overlay {
    color: rgba(255,255,255,0.8);
    font-weight: normal;
}

.elipte-property-price-overlay {
    font-size: 24px;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.7);
}

.elipte-property-location-overlay {
    color: rgba(255,255,255,0.9);
    margin-bottom: 8px;
}

.elipte-property-details-overlay {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.elipte-property-details-overlay span {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 12px;
    backdrop-filter: blur(4px);
}

/* Cas sans image */
.elipte-property-image-overlay.elipte-no-image {
    background: #1f3b46;
    display: flex;
}

/* Responsive overlay */
@media (max-width: 768px) {
    .elipte-property-image-overlay {
        height: 250px;
    }
    
    .elipte-property-content-overlay {
        padding: 15px;
    }
    
    .elipte-property-title-overlay {
        font-size: 18px;
    }
    
    .elipte-property-price-overlay {
        font-size: 20px;
    }
}

/* Styles pour les anciennes listes (rétrocompatibilité) */
.elipte-properties-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.elipte-properties-list li {
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border-radius: 3px;
    border: 1px solid #e0e0e0;
}

.elipte-property-detail {
    background: white;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

/* Messages d'erreur */
.elipte-apimo-error {
    background: #ffebee;
    border: 1px solid #f44336;
    padding: 15px;
    border-radius: 5px;
    color: #d32f2f;
    margin: 20px 0;
}

.elipte-apimo-error h4 {
    margin: 0 0 10px 0;
    color: #d32f2f;
}

/* Toggle des filtres */
.elipte-filters-toggle {
    background: #1f3b46;
    color: white;
    padding: 12px 20px;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    user-select: none;
    width: 100%;
    box-sizing: border-box;
}

.elipte-filters-toggle:hover {
    background: #15292e;
    transform: translateY(-1px);
}

.elipte-filters-toggle.active {
    background: #a28957;
}

.elipte-filters-toggle.active:hover {
    background: #8a7148;
}

/* Zone d'affichage des filtres appliqués */
.elipte-applied-filters {
    margin-bottom: 15px;
    padding: 10px 0;
}

.elipte-filters-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.elipte-filter-tag {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #495057;
    font-weight: 500;
}

.elipte-filters-content {
    overflow: hidden;
    transition: all 0.3s ease;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    grid-auto-rows: auto;
}

.elipte-filters-content[style*="display: none"] {
    display: none !important;
}

.elipte-filters-content[style*="display: block"] {
    display: grid !important;
}

.elipte-filters-content .elipte-search-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.elipte-search-field {
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box;
}

.elipte-search-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.elipte-search-field label small {
    font-weight: 400;
    color: #666;
    font-size: 12px;
}

.elipte-search-field input[type="text"],
.elipte-search-field input[type="number"],
.elipte-search-field input[type="url"],
.elipte-search-field select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
    min-height: 44px; /* Taille tactile minimum */
}

.elipte-search-field select {
    appearance: none; /* Supprime les flèches par défaut */
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zM0 3h4L2 5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
}

.elipte-search-field input:focus,
.elipte-search-field select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
    transform: translateY(-1px);
}



.elipte-search-submit,
.elipte-search-reset {
    padding: 12px 24px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.elipte-search-submit {
    background: #1f3b46;
    color: white;
}

.elipte-search-submit:hover {
    background: #15292e;
    transform: translateY(-1px);
}

.elipte-search-reset {
    background: #6c757d;
    color: white;
}

.elipte-search-reset:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Curseurs doubles (range sliders) */
.elipte-range-field {
    margin-bottom: 25px;
}

.elipte-range-container {
    width: 100%;
}

.elipte-range-wrapper {
    position: relative;
    height: 40px;
    margin-bottom: 15px;
}

.elipte-range-wrapper input[type="range"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: none;
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.elipte-range-wrapper input[type="range"]::-webkit-slider-track {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    border: none;
}

.elipte-range-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: var(--min-percent, 0%);
    width: calc(var(--max-percent, 100%) - var(--min-percent, 0%));
    height: 6px;
    background: #a28957;
    border-radius: 3px;
    transform: translateY(-50%);
    z-index: 1;
    transition: left 0.1s ease, width 0.1s ease;
}

.elipte-range-wrapper input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #2271b1;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

.elipte-range-wrapper input[type="range"]::-moz-range-track {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    border: none;
}

.elipte-range-wrapper input[type="range"]::-moz-range-thumb {
    appearance: none;
    -moz-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #2271b1;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

.elipte-range-wrapper input[type="range"]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.3);
}

.elipte-range-wrapper input[type="range"]:focus::-moz-range-thumb {
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.3);
}

.elipte-range-wrapper input[type="range"]:active::-webkit-slider-thumb {
    transform: scale(1.1);
}

.elipte-range-wrapper input[type="range"]:active::-moz-range-thumb {
    transform: scale(1.1);
}

.elipte-range-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding: 0 10px;
}

.elipte-range-values span:first-child,
.elipte-range-values span:last-child {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    min-width: 60px;
    text-align: center;
}

.elipte-range-values span:nth-child(2) {
    color: #666;
    font-weight: normal;
}

/* Design en grille pour les champs sur desktop */
@media (min-width: 768px) {
    .elipte-filters-content[style*="display: block"] {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
        grid-auto-rows: auto;
    }
    
    .elipte-filters-content .elipte-search-actions {
        justify-content: center;
        margin-top: 10px;
    }
}

/* Responsive */
@media (max-width: 767px) {
    .elipte-apimo-properties-grid {
        gap: 15px;
        margin: 15px 0;
    }

    
    .elipte-shortcode-widget {
        margin: 10px 0;
        padding: 10px;
    }
    
    .elipte-property-detail {
        padding: 15px;
    }
    
    .elipte-filters-content[style*="display: block"] {
        display: block !important;
        grid-template-columns: none !important;
    }
    
    .elipte-search-field {
        margin-bottom: 18px;
    }
    
    .elipte-search-field label {
        font-size: 15px;
        margin-bottom: 8px;
        color: #444;
    }
    
    .elipte-search-field label small {
        font-size: 13px;
        color: #777;
    }
    
    .elipte-filters-content .elipte-search-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
    }
    
    .elipte-search-submit,
    .elipte-search-reset {
        width: 100%;
        padding: 16px 24px;
        font-size: 16px;
        min-height: 48px;
    }
    
    /* Curseurs responsive sur mobile */
    .elipte-range-field {
        margin-bottom: 30px;
    }
    
    .elipte-range-wrapper {
        height: 50px;
        margin-bottom: 20px;
    }
    
    .elipte-range-wrapper input[type="range"] {
        height: 50px;
    }
    
    .elipte-range-wrapper input[type="range"]::-webkit-slider-thumb {
        height: 24px;
        width: 24px;
    }
    
    .elipte-range-wrapper input[type="range"]::-moz-range-thumb {
        height: 24px;
        width: 24px;
    }
    
    .elipte-range-values {
        font-size: 15px;
        padding: 0 5px;
    }
    
    .elipte-range-values span:first-child,
    .elipte-range-values span:last-child {
        min-width: 70px;
        padding: 6px 10px;
    }
    
    /* Toggle des filtres sur mobile */
    .elipte-filters-toggle {
        padding: 16px 24px;
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    /* Filtres appliqués sur mobile */
    .elipte-applied-filters {
        margin-bottom: 10px;
        padding: 8px 0;
    }
    
    .elipte-filter-tag {
        font-size: 11px;
        padding: 3px 6px;
    }
} 