/* Styles pour la carte Google Maps URPS */

/* Vue Héro - Section principale */
.annonces-hero-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 60px 0;
    margin: 20px 0;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: center;
    padding: 0 20px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--e-global-color-30c0b62);
    font-family: "UEFA", Sans-serif;
    font-weight: 600;
}

 
#localisation-hero::placeholder {
    opacity: 1;
    font-weight: normal;
    font-size: 14px;
    color: #333;
}


.hero-text p {
    font-size: 14px;
    margin-bottom: 30px;
    line-height: 1.6;
    color: var(--e-global-color-30c0b62);
    font-family: "UEFA", Sans-serif;
    font-weight: 700;
}

.hero-map {
    flex: 1;
    position: relative;
    max-width: 36%;
    /**
    Gérer le responsive
    */
}

@media (max-width: 1200px) {
    .hero-map {
        max-width: 45%;
    }
}


@media (max-width: 992px) {
    .hero-map {
        max-width: 55%;
    }
}


@media (max-width: 768px) {
    .hero-map {
        max-width: 100%;
    }
    .hero-content {
        flex-direction: column!important;
    }
}

#map-hero {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn-voir-carte {
    position: absolute;
    bottom: 20px;
    right:0px;
    transform: translateX(-7%);
    background: #ff6b35;
    color: white;
    border: none;
    padding: 12px 30px;
    /* border-radius: 25px; */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-voir-carte:hover {
    background: #e55a2b;
    /* transform: translateX(-50%) translateY(-2px); */
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

/* Formulaire de filtres en ligne */
.form-filters-inline {
    display: flex;
    gap: 15px;
    /* align-items: center; */
    align-items: baseline;
    /* flex-wrap: wrap; */
    background-color: white;
    padding:15px;
}

.form-filters-inline .form-control {
    border: 1px solid black!important;
    margin-bottom: 0!important;
    flex: 1;
    min-width: 150px;
    padding: 12px 16px;
    border: none;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    transition: all 0.3s ease;
    cursor: pointer;
}

.form-filters-inline .form-control:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.btn-recherche-hero {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 12px 24px;
    /* border-radius: 8px; */
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
    align-self: stretch;
}

.btn-recherche-hero:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

/* Vue étendue */
.annonces-extended-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    overflow: hidden;
}

.extended-overlay {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.btn-close-fullscreen {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-close-fullscreen:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.extended-container {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 250px 630px 1fr;
    gap: 20px;
    max-width: none;
    margin: 0;
    padding: 0;
}

.extended-container h4 {
    font-size:16px;
    line-height: 20px !important;
}
.extended-container .annonce-content {
    padding-top: 30px;
    padding-bottom: 30px;
}

/* Sidebar des filtres */
.filtres-sidebar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 40px);
}

.filtres-sidebar h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #ff6b35;
    padding-bottom: 10px;
}

.filter-section {
    margin-bottom: 20px;
    position: relative;
}

.filter-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.filter-section .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.btn-recherche-extended {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.btn-reset-extended {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.btn-recherche-extended:hover {
    background: #e55a2b;
    transform: translateY(-1px);
}

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

/* Liste des annonces */
.annonces-list {
    background: white;
    /* border-radius: 12px; */
    /* box-shadow: 0 2px 10px rgba(0,0,0,0.1); */
    overflow: hidden;
    overflow-y: auto;
    /* max-height: calc(100vh - 40px); */
}

.annonce-card {
    display: flex;
    gap: 20px;
    /* padding: 20px; */
    border-bottom: 1px solid #eee;
    /* border-left: 4px solid #ff6b35; */
    border-left: none !important;
    transition: background-color 0.3s ease;
}

.annonce-card:hover {
    background-color: #f8f9fa;
}

.annonce-image {
    width: 145px;
    max-width: 145px;
    height: 100%;
    background: #e9ecef;
    /* border-radius: 8px; */
    /* margin-right: 20px; */
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

/* Galerie d'images */
.annonce-gallery {
    width: 145px;
    /* height: 100%; */
    /* margin-right: 20px; */
    flex-shrink: 0;
    position: relative;
}

.gallery-preview {
    width: 100%;
    height: 100%;
    /* border-radius: 8px; */
    overflow: hidden;
    position: relative;
}

.gallery-preview .main-image {
    width: 100%;
    height: 100%;
    max-height: 200px;
    max-width: 145px;
    object-fit: cover;
    display: block;
}

.gallery-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

/* Icône du type d'annonce */
.annonce-type-icon {
    width: 145px;
    max-width: 145px;
    height: 90px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    /* background: #f8f9fa; */
    /* border-radius: 8px; */
    /* border: 2px dashed #dee2e6; */
}

/* Champ Images du formulaire de dépôt */
.depot-annonce-images {
    margin-bottom: 20px;
}

.depot-annonce-images .description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

.depot-annonce-images .file-info {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.depot-annonce-images .featured-info {
    font-size: 12px;
    color: #666;
    margin-top: 15px;
    font-style: italic;
}

.images-preview {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.preview-image {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #ddd;
}

.image-controls {
    margin-top: 8px;
}

.featured-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
}

.featured-checkbox input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.remove-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.remove-image-btn:hover {
    background: rgba(255, 0, 0, 1);
}

.image-preview-item {
    position: relative;
    width: 120px;
    text-align: center;
}

.annonce-type-icon .type-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    opacity: 0.7;
}

/* Pièce jointe */
.piece-jointe-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
}

.piece-jointe-icon {
    font-size: 16px;
}

.piece-jointe-text {
    font-weight: 500;
}

.annonce-content {
    flex: 1;
}

.annonce-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.annonce-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.annonce-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.btn-consulter {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-consulter:hover {
    background: #e55a2b;
    transform: translateY(-1px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.pagination span {
    font-size: 14px;
    color: #666;
}

.pagination-controls {
    display: flex;
    gap: 10px;
}

.btn-prev, .btn-next {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-prev:hover, .btn-next:hover {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

/* Carte étendue */
.carte-extended {
    /* border-radius: 12px; */
    overflow: hidden;
    /* box-shadow: 0 2px 10px rgba(0,0,0,0.1); */
    height: 100%;
}

#map-extended {
    /* border-radius: 12px; */
    height: 100% !important;
}

/* Boutons */
.btn-geocode {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

.btn-geocode:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

/* Responsive */
@media (max-width: 1200px) {
    .extended-container {
        grid-template-columns: 220px 280px 1fr;
        gap: 15px;
    }
}

@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .extended-container {
        grid-template-columns: 1fr;
        gap: 20px;
        height: auto;
        overflow-y: auto;
    }
    
    .filtres-sidebar {
        position: static;
        order: 1;
        height: auto;
    }
    
    .annonces-list {
        order: 2;
        height: auto;
    }
    
    .carte-extended {
        order: 3;
        height: 400px;
    }
    
    .btn-close-fullscreen {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 768px) {
    .form-filters-inline {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-filters-inline .form-control {
        min-width: auto;
        width: 100%;
    }
    
    .form-filters-inline .btn-recherche-hero {
        width: 100%;
    }
    
    .annonce-card {
        flex-direction: column;
    }
    
    /* .annonce-image {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 15px;
    } */
}

/* Animation de chargement */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages d'état */
.status-message {
    padding: 10px 15px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 14px;
}

.status-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Styles pour l'autocomplétion */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.suggestions-dropdown.show {
    display: block;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item .suggestion-name {
    font-weight: 500;
    color: #333;
}

.suggestion-item .suggestion-details {
    font-size: 0.85em;
    color: #666;
    margin-top: 2px;
}

/* Position relative pour les champs avec autocomplétion */
.form-control[autocomplete="off"] {
    position: relative;
}

/* Styles pour les champs de localisation */
#localisation-hero, #localisation-extended {
    position: relative;
} 

.localisation-hero-suggestions {
    position: absolute;
    top:78px;
}

.form-filters-inline {
    position: relative;
}

/* Media queries pour mobile */
@media screen and (max-width: 767px) {
    /* Cacher le bouton "Voir la carte en plein écran" sur mobile */
    .btn-voir-carte {
        display: none !important;
    }
}


/**
Pour la popup mobile
*/
.info-window {
    background-color: white;
    color:black;
}