/* ===== RESET & VARIABLES GLOBALES ===== */
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --primary-color: #00B894;
    --pro-color: #FFD700; /* Jaune or pour le bouton Pro */
    --menu-bg-color: rgba(255, 255, 255, 0.9);
    --menu-item-color: #333333;
    --menu-hover-color: #f0f0f0;
    --search-box-bg: #ffffff;
    --search-box-border: #cccccc;
    --search-box-text: #333333;
    --card-bg-color: #f8f8f8;
    --border-color: #dddddd;
    --popup-bg-color: #ffffff;
    --popup-text-color: #666666;
    --bottom-sheet-bg: #ffffff;
    --overlay-bg: rgba(0, 0, 0, 0.5);
    --zoom-control-bg: rgba(255, 255, 255, 0.8);
    --shadow-color: rgba(0, 0, 0, 0.2);
    --match-highlight-text: #333;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #f0f0f0;
    --primary-color: #00B894;
    --pro-color: #FFB90F; /* Jaune or légèrement assombri pour le mode sombre */
    --menu-bg-color: rgba(20, 20, 20, 0.9);
    --menu-item-color: #cccccc;
    --menu-hover-color: rgba(255, 255, 255, 0.1);
    --search-box-bg: #2d2d2d;
    --search-box-border: #555555;
    --search-box-text: #f0f0f0;
    --card-bg-color: #1e1e1e;
    --border-color: #444444;
    --popup-bg-color: #2d2d2d;
    --popup-text-color: #f0f0f0;
    --bottom-sheet-bg: #1e1e1e;
    --overlay-bg: rgba(0, 0, 0, 0.7);
    --zoom-control-bg: rgba(30, 30, 30, 0.8);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --match-highlight-text: #CCC;
}


/* ===== STYLES DE BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body,
html {
    height: 100%;
    width: 100%;
    overflow: hidden;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
}

a{
    color: var(--primary-color);
}

#map {
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
}

.primary-text{
    color:var(--primary-color);
}

#price-legend{
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: white;
    padding: 8px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-size: 13px;
    z-index: 100;
    display:none;
}


/* ===== MENU PRINCIPAL ===== */
#homeLink.logo{
    color:var(--primary-color);
}
.menu {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background:var(--search-box-bg);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    display: flex;
    flex-direction: column;
    max-width: 90%;
    transition: background-color 0.3s ease;
}

/* Menu Desktop & Mobile */
/* Style pour le menu desktop */
.menu-desktop {
    display: flex;
    align-items: center;
}

/* Style pour le menu mobile */
.menu-mobile {
    display: none;
    flex-direction: column; /* Empile verticalement sur mobile */
    width: 100%;
    padding: 10px;
}

.menu-mobile-button{
    color:var(--menu-item-color);
}

.menu-mobile.show {
    display: flex;
}

.menu-mobile .search-container {
    flex-direction: row;   /* Force l'affichage en ligne même sur mobile */
    width: 100%;
    margin-bottom: 10px;   /* Espace en bas sur mobile */
}

.menu-mobile.show {
    display: flex;
}

.menu-mobile .search-box {
    width: 100%; /* Largeur maximale sur mobile */
    margin-top: 5px; /* Espace en haut si nécessaire */
}

/* Titre */
.title {
    margin-right: 10px;     /* Espace entre le titre et le champ de recherche */
    font-size: 1.5em;
    font-weight: bold;
    color: var(--text-color);
    padding: 0 20px;
}

/* Champ de recherche */
/* Conteneur pour l'icône + input */
.search-box-container {
    position: relative;
    width: fit-content;
}

/* Style de l'icône de loupe */
.search-icon {
    position: absolute;
    margin-left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    opacity: 0.7;
    pointer-events: none;
    z-index: 10;
}

/* Ajustez le padding gauche du champ pour faire de la place à l'icône */
.search-box {
    margin-right: 10px;
    padding: 8px 30px 8px 35px; /* Padding gauche augmenté (12px + 23px pour l'icône) */
    border: 1px solid var(--search-box-border);
    border-radius: 4px;
    background-color: var(--search-box-bg);
    color: var(--search-box-text);
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease;
    width: 310px;
    max-width: 100%;
    font-size: 16px;
}
.clear-icon {
    position: absolute;
    right: 20px;
    top: 13px;
    color: #999;
    cursor: pointer;
    display: none; /* Masquée par défaut */
}
/* Optionnel : Style au survol/focus pour l'icône */
.search-box:focus + .search-icon,
.search-box-container:hover .search-icon {
    opacity: 1; /* Icône plus visible au focus/survol */
}


.info-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-links a {
    display: flex;
    align-items: center;
    color: #3498db;
    text-decoration: none;
    font-size: 13px;
    padding: 6px;
    border-radius: 4px;
    transition: background 0.2s;
}

.info-links a:hover {
    background: rgba(52, 152, 219, 0.1);
}

.info-links i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* Boutons du menu */
/* ===== Style commun ===== */
/* ===== Menu ===== */
#homeLink{
    cursor:pointer;
}
.menu-container {
    display: flex;
    align-items: center;
    width: 101%;
    background: var(--menu-bg, #fff);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.menu {
    transition: all 0.3s ease;
}

/* Bouton toggle (mobile) */
.menu-toggle {
    display: none;
    position: absolute;
    top: 1px;
    left: 11px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--menu-color, #333);
    cursor: pointer;
    z-index: 1002;
    padding: 10px;
}

/* Conteneur du menu */
.menu-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* En-tête (titre + recherche) */
.menu-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
}

.title {
    font-size: 24px;
    font-weight: bold;
    color: var(--menu-color, #333);
    margin: 0;
}

.search-box {
    flex: 1;
    padding: 8px 12px 8px 40px;
    border: 1px solid #ddd;
    font-size: 14px;
    margin-left: 0px;
}

/* Liens du menu (SEO-friendly) */
.menu-items {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.menu-item {
    padding: 12px 20px;
    color: var(--menu-color, #333);
    text-decoration: none;
    text-align: left;
    font-size: 16px;
    transition: background 0.2s;
}

.menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Bouton thème */
.theme-toggle {
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--menu-color, #333);
    cursor: pointer;
    font-size: 15px;
    text-align: left;
}

/* Overlay (masqué par défaut) */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Ajoute un overlay pour le panneau (comme pour le menu mobile) */
.info-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.info-panel-overlay.active {
    opacity: 0.5;
    pointer-events: all;
}

#infoPanelTitle {
    padding: 10px 15px;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.info-panel-section {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.tabs-header,.district-tabs-header {
    display: flex;
}

.tab-button,.district-tab-button {
    flex: 1;
    padding: 12px 0;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-button.active,.district-tab-button.active {
    border-bottom-color: var(--primary-color);
}

.tab-content.active {
    display: block;
}


.district-tab-content {
    display: none;
    padding: 15px 0;
    animation: fadeIn 0.3s ease;
}


.district-tab-content.active {
    display: block;
}

.info-panel-header .fa-city {
  margin-left: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* Onglet Immobilier */
.immobilier-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.price-card {
    border-radius: 8px;
    padding: 15px 0;
}

.price-items {
    display: flex;
    gap: 15px;
}

.price-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #c4c4c417;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.price-icon {
    font-size: 1.5rem;
}

.price-info {
    flex: 1;
}

.price-label {
    font-size: 0.9rem;
    color: #666;
}

.price-value {
    font-size: 1.2rem;
    font-weight: 600;
}

.price-chart,.price-items{
    padding-bottom: 25px;
    margin-bottom: 10px;
    border-bottom:1px solid var(--search-box-border);
}

.price-chart h4 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-legend {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    font-size: 0.9rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    display: inline-block;
    width: 12px;
    height: 3px;
    border-radius: 2px;
}

.legend-color.past {
    background: #3498db;
}

.legend-color.future {
    background: #9b59b6;
}

.ai-forecast {
    padding: 15px 0;
    border-bottom:1px solid var(--search-box-border);
}

.forecast-value {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 10px 0;
}

.forecast-change {
    font-size: 1rem;
    font-weight: normal;
}

.forecast-text {
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
}

.location-section {    
    padding-top: 10px;
    padding-bottom: 25px;
    margin-bottom: 10px;
    border-bottom:1px solid var(--search-box-border);
}

.mini-map {
    height: 150px;
    width: 100%;
    border-radius: 6px;
    margin: 10px 0;
}

.coordinates {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

.similar-cities {
    padding: 15px 0;
}

.similar-cities h4 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.similar-city-card {
    background: #c4c4c417;
    border-radius: 6px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.similar-city-card:hover {
    background: var(--menu-hover-color);
    transform: translateY(-2px);
}

.city-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.city-price {
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.city-distance {
    font-size: 0.8rem;
    color: #666;
}

.loading, .no-results, .error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px;
    color: #666;
}

.error {
    color: #d32f2f;
}
.pro-teaser {
    position: relative;
    padding: 1rem;
}

.teaser-chart {
    margin-bottom: 0.5rem;
}

.pro-prompt {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

.upgrade-btn {
    background: var(--pro-color);
    color: #121212; /* Texte foncé pour contraste sur jaune */
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
    background:var(--pro-color);
}

.forecast-value span {
    display: inline-block;
    min-width: 4em;
}

/* Placeholders : premier chiffre visible, le reste masqué */
.masked-price,
.masked-change {
    display: inline-block;
    padding: 0.2em 0.5em;
    border-radius: 3px;
    background: var(--popup-bg-color);
    color: var(--text-color);
    font-weight: 600;
    letter-spacing: 0.1em;
    min-width: 4em;
    text-align: center;
}

/* Style spécifique pour le prix (ex: "3 ••• €/m²") */
.masked-price {
    min-width: 5em;
    color: var(--border-color);
}

/* Style pour le conteneur du graphique */
.price-chart {
    position: relative;
    height: 220px;
    width: 100%;
    background: var(--card-bg-color);
    border-radius: 8px;
    padding: 0.5rem;
    margin-bottom: 1rem;
}

/* Overlay "Exemple" */
.fake-data-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0); /* Fond transparent */
    pointer-events: none;
    z-index: 10;
}

.fake-data-overlay span {
    background: var(--card-bg-color);
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-color);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

/* Légende du graphique */
.chart-legend {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.legend-color {
    display: inline-block;
    width: 12px;
    height: 4px;
    border-radius: 2px;
}

.legend-color.past {
    background: #3498db;
}

.legend-color.future {
    background: #9b59b6;
}



.upgrade-btn {
    background: var(--pro-color);
    color: #2A2A2A;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}


/* Couleurs adaptées pour le mode clair */
:root {
    --masked-text-color: #999999; /* Gris foncé en mode clair */
}

[data-theme="dark"] {
    --masked-text-color: #aaaaaa; /* Gris clair en mode sombre */
}

.masked-price,
.masked-change {
    color: var(--masked-text-color) !important;
}

.modal-backdrop {
    display: none !important;
}

#subscriptionActions {
  text-align: center;
}

.center{
    text-align:center;
}

/* Onglet Outils */
.tools-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.form-group {
    margin-bottom: 15px;
}

.form-group label {
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.form-textarea {
    min-height: 60px;
    resize: vertical;
}

.loan-results {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.result-item strong {
    font-weight: 600;
}

        .tool-card {
            padding: 15px;
            border-radius: 8px;
            margin: 10px 0;
        }

        .tool-card h4 {
            margin-top: 0;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .share-container {
            display: flex;
            align-items: flex-start;
            gap: 15px;
        }

        .qr-code {
            flex: 0 0 100px;
            height: 100px;
        }

        .input-button-container {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        #share-link-input {
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
            width: 100%;
        }

        .copy-button {
            padding: 8px;
            background: #4CAF50;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }

        .copy-button:hover {
            background: #45a049;
        }

        .message {
            margin-top: 10px;
            font-size: 14px;
            text-align: center;
            color: #4CAF50;
        }

/* Onglet Informations */
.info-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-card h4 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 3px;
}

.info-value {
    font-weight: 500;
}

.useful-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #c4c4c417;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s;
}

.link-card:hover {
    background: var(--menu-hover-color);
    transform: translateX(3px);
}

.link-icon {
    color: #666;
    font-size: 0.8rem;
}

/* Boutons */
.btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.swiper {
    width: 100%;
    height: auto;
    margin-top: 10px;
}

.swiper-slide {
    width: 100%;
    height: auto;
    overflow-y: auto;
}

.swiper-pagination {
    bottom: 0;
    left: 0;
    width: 100%;
}


/* Style du bouton de fermeture */
.close-panel {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--menu-color, #333);
    padding: 0 15px;
    z-index: 1001; /* Au-dessus du contenu du panneau */
}


/* ===== Desktop (> 768px) ===== */
@media (min-width: 769px) {
    .menu-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .menu-header {
        padding: 0;
        margin-right: 20px;
    }

    .menu-items {
        flex-direction: row;
    }

    .search-box {
        width: 400px;
    }
}

.data-card {
    margin-bottom: 15px;
}

.data-card h4 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.districts-grid, .indicators-grid, .insee-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.district-card, .indicator-card, .insee-data-card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.district-card h5, .indicator-card h5, .insee-data-card h5 {
    margin-top: 0;
    color: #444;
    font-size: 16px;
}

.district-item, .indicator-item, .insee-data-item {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.district-item strong, .indicator-item strong, .insee-data-item strong {
    font-weight: bold;
    color: #555;
}


.district-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
}
.district-card {
    min-width: 150px;
    background: white;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}
.price-value .hundred{
  font-size: 18px;
}
.hundred {
  font-weight: normal;
  color: var(--fbc-secondary-text);
  font-size: 12px;
}
.price-tag {
    background: #e9ecef;
    padding: 5px 10px;
    border-radius: 20px;
    margin: 5px 0;
}
.features {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
}

.footer-links {
  right: 20px;
  position: absolute;
  font-size: 13px;
  color: var(--fbc-secondary-text);
}

.footer-links-mobile {
  bottom: 0;
  position: absolute;
  padding: 20px;
  font-size: 13px;
  color: var(--fbc-secondary-text);
  display:none;
}

.footer-links-mobile a,.footer-links a {
  font-size: 13px;
  padding: 0 3px;
  display: inline-block;
  color: var(--fbc-secondary-text);
}


/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background: var(--menu-bg-color);
    margin: 5% auto;
    border-radius: 10px;
    padding: 20px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    width: 90%;
    max-width: 800px;
    overflow: hidden;
}

/* ===== MODAL DE COMPTE ===== */
.account-modal-content {
    display: flex;
    flex-direction: column;
    /*height: 80%;*/
}

.account-modal-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 20px;
    border-bottom: 1px solid #eee;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-modal-footer {
  padding: 0 30px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar i {
    font-size: 32px;
    color: var(--primary-color);
}

.header-title h2 {
    margin: 0;
    font-size: 24px;
}

.user-pro-badge {
    align-self: flex-start;
    margin-left: 52px; /* aligné avec le titre */
}

.account-modal-body {
    /*flex: 1;*/
    padding: 10px 20px;
    overflow-y: auto;
}

.account-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.account-tabs .tab-button {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-color);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.account-tabs .tab-button.active {
    border-bottom-color: var(--primary-color);
    font-weight: bold;
}

.close-modal {
  background: none;
  border: none;
  font-size: 2.2rem;
  cursor: pointer;
  color: var(--text-color, #666666);
  padding: 5px;
  right: 12px;
  float: right;
  position: absolute;
  top:0;
}


/* Positionnement et style des toasts */
/* Positionnement et style des toasts */
#toast-container {
    z-index: 9999 !important;  /* Au-dessus de tout */
    top:0;
    left: 60% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    max-width: 90% !important;  /* Pour mobile */
}

/* Style personnalisé pour les toasts (optionnel) */
.custom-toast {
    background-color: #333;
    color: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 12px 20px;
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto 10px;
}

.toast-close,.toast-icon{
    display:none;
}

/* Bouton de fermeture */
#toast-container .toast-close-button {
    color: #fff;
    opacity: 0.7;
}

#toast-container .toast-close-button:hover {
    opacity: 1;
}

/* Barre de progression */
#toast-container .toast-progress {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    #toast-container {
        max-width: 95% !important;
    }
}



/* ===== SWIPER ===== */
.swiper {
    width: 100%;
    /*height: calc(100% - 50px);*/
    margin-top: 10px;
}

.swiper-slide {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
    overflow-x: hidden;
}

.tab-content {
    height: 100%;
    padding: 10px;
}

/* ===== MODAL DE SOUSCRIPTION ===== */
.subscription-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.subscription-tabs .tab-button {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-color);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.subscription-tabs .tab-button.active {
    border-bottom-color: var(--primary-color);
    font-weight: bold;
}

/* ===== BOUTONS ===== */
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #00997a;
}

.btn-paypal,.btn-paypal:hover{
    background:#3b7bbf;
    color:#FFF;
}
/* ===== FORMULAIRES ===== */
.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--search-box-bg);
    color: var(--search-box-text);
}

/* Pages légales */
.page-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.page-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.page-header h1 {
    margin: 0 0 15px 0;
    font-size: 2.5em;
    color: #333;
}

.back-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.95em;
}

.back-link:hover {
    text-decoration: underline;
}

.page-content {
    line-height: 1.8;
    color: #444;
}

.legal-content {
    font-size: 1em;
}

.last-updated {
    font-style: italic;
    color: #666;
    margin-bottom: 30px;
}

.legal-section, .about-section {
    margin-bottom: 40px;
}

.legal-section h2, .about-section h2 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.legal-section p, .about-section p {
    margin-bottom: 15px;
}

.legal-section ul, .about-section ul {
    margin: 15px 0;
    padding-left: 25px;
}

.legal-section li, .about-section li {
    margin-bottom: 10px;
}

.legal-section a, .about-section a {
    color: #007bff;
    text-decoration: none;
}

.legal-section a:hover, .about-section a:hover {
    text-decoration: underline;
}

.page-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
    text-align: center;
    color: #666;
}

.page-footer p {
    margin-top: 10px;
    font-size: 0.9em;
}

/* Mode sombre */
[data-theme="dark"] .page-container {
    color: #e0e0e0;
}

[data-theme="dark"] .page-header h1,
[data-theme="dark"] .legal-section h2,
[data-theme="dark"] .about-section h2 {
    color: #ffffff;
}

[data-theme="dark"] .page-content {
    color: #d0d0d0;
}

[data-theme="dark"] .page-header,
[data-theme="dark"] .legal-section h2,
[data-theme="dark"] .about-section h2,
[data-theme="dark"] .page-footer {
    border-color: #444;
}

/* Responsive */
@media (max-width: 768px) {
    .page-container {
        padding: 15px;
    }
    
    .page-header h1 {
        font-size: 1.8em;
    }
    
    .legal-section h2, .about-section h2 {
        font-size: 1.3em;
    }
}
/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        height: 90vh;
        margin: 2% auto;
    }

    .account-tabs, .subscription-tabs {
        flex-direction: column;
    }

    .tab-button {
        margin: 5px 0;
    }
}

/* Style pour la popup simulée comme tooltip */
.custom-tooltip-popup .leaflet-popup-content-wrapper {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px;
    border-radius: 4px;
    box-shadow: none;
    font-size: 12px;
    pointer-events: auto !important;
}

.custom-tooltip-popup .leaflet-popup-content {
    margin: 0;
    width: auto;
    max-width: none;
}

.custom-tooltip-popup .leaflet-popup-tip {
    width: 10px;
    height: 6px;
}

/* Assurez-vous que les liens sont cliquables */
.custom-tooltip-popup a {
    color: #0078A8;
    text-decoration: underline;
    cursor: pointer;
    pointer-events: auto !important;
}

.custom-popup-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.close-popup {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    margin-left: 10px;
    padding: 0;
    line-height: 1;
}

.leaflet-popup-content-wrapper {
    padding: 10px;
}

.leaflet-container a.leaflet-popup-close-button{
    top:5px;
    right:5px;
}


#filtersPanel {
    position: absolute;
    bottom: 90px;
    left: 20px;
    z-index: 1000;
    background: var(--popup-bg-color);
    padding: 15px;
    border-radius: 8px;
    transform: translateX(-110%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    width: 260px;
    max-height: 80vh;
    overflow-y: auto;
    font-family: Arial, sans-serif;
}

#filtersPanel.active {
    transform: translateX(0);
}

#filtersPanel h5{
    font-size:15px;
}
#filtersPanel h4{
    margin:5px 3px 21px;
    font-size:14px;
}
/* Overlay pour le panneau de filtres */
#filtersOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

#filtersOverlay.active {
    opacity: 1;
    visibility: visible;
}

#filtersPanel.active {
    transform: translateX(120);
}

/* Overlay pour le panneau de filtres */
#filtersOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

#filtersOverlay.active {
    opacity: 1;
    visibility: visible;
}

/* Bouton pour ouvrir le panneau de filtres */
#filtersToggle {
  position: fixed;
  left: 20px;
  bottom: 100px;
  z-index: 99;
  width: 45px;
  height: 45px;
  background-color: var(--primary-color);
  border-radius: 15%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  color: #FFFFFF;
  transition: all 0.3s ease;
  border: 0;
}

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

.filter-section h3 {
    margin-bottom: 10px;
}

.filter-options {
    display: flex;
    flex-direction: column;
}

.filter-options label {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.filter-options input[type="checkbox"] {
    margin-right: 8px;
}

/* Bouton pour fermer le panneau de filtres */
#closeFiltersPanel {
    position: absolute;
    top: 10px;
    right: 20px;
    padding: 10px;
    cursor: pointer;
}

.accordion {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.accordion-item {
    margin-bottom: 8px;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    background-color: #f8f9fa;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    transition: background-color 0.3s;
}

.accordion-header:hover {
    background-color: #e9ecef;
}

.accordion-header.active {
    background-color: #e9ecef;
}

.accordion-header i {
    margin-right: 10px;
}

.accordion-content {
    display: none;
    padding: 16px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.service-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

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


/* Style des ronds de couleur */
.color-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    border:1px solid #FFF;
}

/* Couleurs spécifiques pour chaque catégorie */
.school-dot {
    background-color: #4CAF50; /* Vert pour les écoles */
}

.bus-dot {
    background-color: #2196F3; /* Bleu pour les arrêts de bus */
}

.restaurant-dot {
    background-color: #FF5722; /* Orange pour les restaurants */
}

.commerce-dot {
    background-color: #9C27B0; /* Violet pour les commerces */
}

/* Alignement des éléments */
.checkbox-container {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
}

/* Style de la case à cocher (optionnel) */
.checkbox-container input {
    margin-right: 8px;
}

/* Style du texte */
.checkbox-container span:not(.checkmark) {
    font-size: 14px;
}


/* Thème sombre */
/*[data-theme="dark"] .menu-container{
    --menu-bg: #2b2b2b;
    --menu-color: #f0f0f0;
}

[data-theme="dark"] .search-box {
    background: #444;
    color: #f0f0f0;
    border-color: #555;
}

[data-theme="dark"] .menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}*/

[data-theme="dark"] .menu-item {
    color: var(--popup-text-color);
}

/* ===== POPUPS LEAFLET ===== */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    background: var(--popup-bg-color);
    color: var(--popup-text-color);
    box-shadow: 0 2px 10px var(--shadow-color);
}

.leaflet-popup-content {
    margin: 5px 18px 5px 5px;
}

.leaflet-popup-content h3 {
    margin-top: 0;
    color: var(--popup-text-color);
}

.leaflet-popup-tip {
    background: var(--popup-bg-color);
}

/* Tooltips Leaflet */
/* Thème clair (par défaut) */
.leaflet-popup-content-wrapper {
    background: white;
    color: #333;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.leaflet-popup-tip {
    background: white;
}

/* Couleur de fond des clusters */
.marker-cluster-small {
    background-color: transparent; /* Rouge transparent */
}
.marker-cluster-medium {
    background-color: transparent; /* Orange transparent */
}
.marker-cluster-large {
    background-color: transparent;   /* Rouge vif transparent */
}

/* Couleur du texte (nombre) dans les clusters */
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    color: white; /* Texte blanc pour un meilleur contraste */
}

/* Couleur de la bordure */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    border: 0; /* Bordure blanche */
}


/* Thème sombre */
[data-theme="dark"] .leaflet-popup-content-wrapper, [data-theme="dark"] #price-legend,[data-theme="dark"] .iframe-header {
    background: #2d2d2d;
    color: #f0f0f0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .leaflet-popup-tip {
    background: #2d2d2d;
}

/* Liens dans les popups */
.leaflet-popup-content a {
    color: var(--primary-color);
    text-decoration:none;
}

/* Thème clair pour les tooltips */
.leaflet-tooltip {
    background: white;
    color: #333;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    border: 1px solid #ddd;
}

/* Thème sombre pour les tooltips */
[data-theme="dark"] .leaflet-tooltip {
    background: #2d2d2d;
    color: #f0f0f0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
}

/* Correction du décalage */
.leaflet-tooltip-top:before {
    border-top-color: #2d2d2d; /* Couleur de la flèche en mode sombre */
}

[data-theme="light"] .leaflet-tooltip-top:before {
    border-top-color:#FFFFFF;
    opacity: 0.8;
    bottom: 1px;
}

[data-theme="light"] .region-tooltip:before,[data-theme="light"] .department-tooltip:before {
    border-top-color:var(--primary-color);
    opacity: 0.8;
    bottom: 1px;
}

.leaflet-tooltip.leaflet-clickable{
    border-radius:8px;
}


/* Style de base pour les tooltips */
.leaflet-tooltip.custom-tooltip {
    background:var(--primary-color);
    opacity:0.6;
    color: #FFF;
    border:0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    margin-left: -50%; /* Centre le tooltip */
    transform: translateX(50%); /* Ajuste la position */
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.leaflet-tooltip.custom-tooltip:before{
    border-top-color:var(--primary-color);
}

/* Thème sombre */
[data-theme="dark"] .leaflet-tooltip.custom-tooltip {
    background: #2d2d2d;
    color: #f0f0f0;
    border: 1px solid #444;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Flèche du tooltip (pour le thème clair) */
.leaflet-tooltip-top:before {
    border-top-color: white;
}

/* Flèche du tooltip (pour le thème sombre) */
[data-theme="dark"] .leaflet-tooltip-top:before {
    border-top-color: #2d2d2d;
}


/* Thème clair */
.custom-tooltip {
    background: white;
    color: #333;
    border: 1px solid #ddd;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Thème sombre */
[data-theme="dark"] .custom-tooltip {
    background: #2d2d2d;
    color: #f0f0f0;
    border: 1px solid #444;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Correction du décalage */
.custom-tooltip {
    margin-left: -50%;  /* Centre le tooltip par rapport au marqueur */
    transform: translateX(50%);
}


.leaflet-tooltip {
    cursor: pointer !important;
}

/* Contrôle de zoom Leaflet */
.leaflet-control-zoom {
    bottom: 30px;
    right: 20px;
    background-color: var(--zoom-control-bg);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--shadow-color);
}

/* Structure de base */
.tool-section {
    margin-bottom: 25px;
}

.tool-section h3 {
    margin-bottom: 10px;
    font-size: 16px;
}

.form-row {
    margin-bottom: 10px;
}

.form-row label {
    display: block;
    margin-bottom: 3px;
    font-weight: normal;
}

.form-row input,
.form-row select {
    width: 100%;
    max-width: 300px;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

 #subscriptionModal .modal-content {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }
  #subscriptionModal .modal-header {
    border-bottom: none;
    padding-bottom: 0;
    padding: 0 20px;
  }
  #subscriptionModal .modal-body {
    padding: 1rem 1.5rem;
    overflow:auto;
  }
  #card-element {
    border: 1px solid #ced4da !important;
    border-radius: 5px !important;
    padding: 10px !important;
    background:var(--bg-color);
  }
  .modal-body .bg-light {
    transition: transform 0.2s;
    background:transparent!important;
  }
  .bg-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  }
  
.tab-button[aria-selected="true"] {
    border-bottom-color: var(--primary-color);
    font-weight: bold;
}

.tab-button[aria-selected="false"] {
    color: #666;
}
.alert-light {
  border: 0 !important;
  background: var(--menu-bg-color);
  padding: 2px;
  margin: 10px !important;
}

[data-tabs] {
    position: relative;
    isolation: isolate; /* Crée un nouveau contexte d'empilement */
    contain: layout style; /* Optimisation de performance */
}

/* Les boutons d'onglets ne doivent réagir qu'aux clics directs */
.tab-button {
    pointer-events: auto;
    position: relative;
    z-index: 1;
    user-select: none;
}

/* Les modals créent leur propre contexte */
.modal {
    isolation: isolate;
    contain: layout style paint;
}

/* Empêche les interactions avec le contenu en arrière-plan quand une modal est ouverte */
.modal[style*="display: block"] ~ * {
    pointer-events: none;
}

/* Mais réactive les éléments dans la modal active */
.modal[style*="display: block"] * {
    pointer-events: auto;
}


/* Boutons */
.simulate-button,
.copy-button,
.send-button {
    padding: 6px 12px;
    margin-top: 8px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    border-radius: 3px;
    cursor: pointer;
}

.simulate-button:hover,
.copy-button:hover,
.send-button:hover {
    background: #e9e9e9;
}

/* Messages */
.message {
    margin-top: 8px;
    font-size: 14px;
    color: green;
    display: none;
}

/* Thème sombre (optionnel) */
[data-theme="dark"] .form-row input,
[data-theme="dark"] .form-row select {
    background: #333;
    color: #fff;
    border-color: #555;
}

[data-theme="dark"] .simulate-button,
[data-theme="dark"] .copy-button,
[data-theme="dark"] .send-button {
    background: #444;
    color: #fff;
    border-color: #555;
}

[data-theme="dark"] .tab-button,[data-theme="dark"] .district-tab-button {
    color:#fff;
}

/* ===== EFFETS ===== */
.blur-active #map,
.blur-active .menu-desktop {
    filter: blur(2px);
}


/* ===== DATA CARD ===== */
.data-card {
    font-family: Arial, sans-serif;
    color: var(--text-color);
}

.indicator {
    margin: 8px 0;
}

.indicator-value {
    font-weight: bold;
}

/* ===== INFO PANEL ===== */
/* ===== Structure du panneau ===== */
.info-panel {
    position: fixed;
    top: 20px;
    right: -530px; /* Masqué par défaut */
    width: 530px; /* Largeur fixe en desktop */
    height: calc(100% - 40px);
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease, background 0.3s, color 0.3s, box-shadow 0.3s;
    z-index: 1000;
    overflow-y: auto;
    border-radius: 10px;
    border-left: 1px solid #e0e0e0;
    color: #333;
}

/* Position visible */
.info-panel.visible {
    right: 0;
}


.dark-mode .info-panel {
    background: #2b2b2b;
    color: #f0f0f0;
    border-left: 1px solid #444;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.4);
}

/* ===== Header du panneau ===== */
.info-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.dark-mode .info-panel-header {
    border-bottom-color: #444;
}

/* Bouton de fermeture */
.close-panel {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px;
    margin-left: auto;
    line-height: 1;
    transition: color 0.2s;
}

.dark-mode .close-panel {
    color: #aaa;
}

.close-panel:hover {
    color: #333;
}

.dark-mode .close-panel:hover {
    color: #f0f0f0;
}

/* Titre du header */
.info-panel-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
    flex: 1;
}

.dark-mode .info-panel-header h3 {
    color: #f0f0f0;
}

/* ===== Sections du panneau ===== */
.info-panel-section {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.dark-mode .info-panel-section {
    border-bottom-color: #444;
}

.info-panel-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-top: 5px;
}

.info-panel-section h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 14px;
    align-items: center;
}

.dark-mode .info-panel-section h4 {
    color: #f0f0f0;
}

.info-panel-section h4 i {
    margin-right: 8px;
    color: #7f8c8d;
    font-size: 17px;
}

.dark-mode .info-panel-section h4 i {
    color: #bbb;
}

/* ===== Grille d'informations ===== */
.dark-mode .info-grid {
    border-bottom-color: #444;
}

.info-item {
    display: flex;
    align-items: flex-start;
}

.info-item-icon {
    font-size: 16px;
    margin-right: 10px;
    margin-top: 2px;
    transition: color 0.2s;
}

.info-item-content {
    flex: 1;
}

.info-item-label {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 2px;
}

.dark-mode .info-item-label {
    color: #bbb;
}

.info-item-value {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.dark-mode .info-item-value {
    color: #f0f0f0;
}

/* Paragraphes dans les sections */
.info-panel-section p {
    margin: 13px 0;
    font-size: 13px;
}

.dark-mode .info-panel-section strong {
    color: #f0f0f0;
}

/* ===== Classes pour les prix (optionnel) ===== */
.price-high {
    color: #e74c3c;
}

.price-medium {
    color: #f39c12;
}

.price-low {
    color: #27ae60;
}

/* Style de la liste des sites */
.sites-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 10px 0;
}

.site-card {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.site-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.site-card img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* Style de l'iframe container */
.iframe-container {
    position: fixed;
    top: 0;
    right: -100%; /* Caché par défaut */
    width: 85%;
    max-width: 1000px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.iframe-container.active {
    right: 0; /* Affiché en glissant depuis la droite */
}

.iframe-header {
    padding: 8px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.iframe-controls {
    display: flex;
    gap: 8px;
}

.iframe-btn {
    width: 32px;
    height: 32px;
    border: none;
    font-size: 20px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: transparent;
    color: var(--primary-color);
}

#siteIframe {
    flex: 1;
    border: none;
    width: 100%;
}

.site-card.site-blocked {
    position: relative;
    opacity: 0.85;
    cursor: pointer; /* Changé de "not-allowed" à "pointer" car on ouvre dans un nouvel onglet */
}

.site-card.site-blocked .blocked-overlay {
    position: absolute;
    top: 5px;
    right: 5px;
    color: #6c757d;
    font-size: 14px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-card.site-blocked:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-color: #adb5bd;
}

/* Style pour mobile */
@media (max-width: 768px) {
    .iframe-container {
        width: 100%; /* Plein écran sur mobile */
        max-width: none;
        right: -100%; /* Caché par défaut */
    }

    .iframe-container.active {
        right: 0; /* Plein écran quand actif */
    }

    .iframe-header {
        padding: 10px;
    }

    .iframe-btn {
        width: 36px;
        height: 36px;
    }
    
    #price-legend div{
        font-size: 11px;
        vertical-align: middle;
    }
}

#weather-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

#weather-table th, #weather-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

#weather-table th {
  background-color: #f2f2f2;
}

#weather-table tr:nth-child(even) {
  background-color: #f9f9f9;
}


 .schools-panel,#districtsData {
    padding-top: 15px;
    border-radius: 5px;
    max-height: 400px;
    overflow-y: auto;
  }
  .school-item {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
  }
  .school-item h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
  }
  
  .school-item a{
      color:var(--primary-color);
  }

.district-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 10px;
    border-bottom: 1px solid #eeeeee1a;
    font-weight: bold;
}

.district-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 10px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.header-item, .detail-item {
    padding: 5px;
}

.detail-item.district-name {
    font-weight: bold;
}

.map-link {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.map-link:hover {
    text-decoration: underline;
}

.no-coords {
    color: #6c757d;
    font-style: italic;
}

.no-data {
    padding: 15px;
    text-align: center;
    color: #6c757d;
}

.header-label {
    margin-left: 5px;
    font-size: 0.9em;
}

.fa-building, .fa-home, .fa-chart-line, .fa-map-marker-alt {
    margin-right: 5px;
}


#closeIframe {
    margin-left: 13px;
}

#closeIframe i{
    font-size:25px;
}

#siteIframe {
    flex: 1;
    border: none;
    width: 100%;
}

/* Overlay pour fermer l'iframe en cliquant à côté */
.iframe-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.iframe-overlay.active {
    opacity: 1;
    pointer-events: all;
}

#floating-accordion {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--menu-bg-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 8px;
    display: flex;
    gap: 5px;
    z-index: 99;
    font-size: 13px;
    align-items: center;
}

#floating-accordion .accordion-item{
 margin-bottom:0;   
}    

.accordion-item {
    text-transform: capitalize;
    padding: 5px 0 5px 0;
    border-radius: 4px;
    cursor: pointer;
    background: #f8f8f817;
    transition: all 0.2s;
}

.accordion-item.parent {
    height: 33px;
    display: flex;
    align-items: center;
}

.hierarchy {
    display: flex;
    align-items: center;
    gap: 3px;
}

.hierarchy-item {
    padding: 2px 5px;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;        /* empêche le passage à la ligne */
  overflow: hidden;           /* cache le débordement */
  text-overflow: ellipsis; 
}

.hierarchy-item[data-type=country]{
    padding-right:10px;
}

.hierarchy-item:hover {
    text-decoration:underline;
}

.accordion-item.current{
    text-transform: capitalize;
    cursor:auto;
    background:transparent
}

.accordion-item.current:hover{
    cursor:auto;
    background:transparent
}


.hierarchy-separator {
    color: #999;
    font-size: 12px;
}

.zoom-controls {
    display: inline-flex;
    margin-right: 8px;
}

.zoom-controls button {
     background:var(--primary-color);
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: #FFFFFF;
    transition: background 0.2s;
}

.zoom-controls i {
    font-size: 10px;
}

.zoom-controls button.zoom-in{
    margin-right:7px;
    margin-left:7px;
}

.hidden {
    display: none;
}

.weather-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.weather-item {
    display: flex;
    align-items: center;
    padding: 8px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.weather-item i {
    margin-right: 10px;
    color: #3498db;
}

.weather-label {
    font-weight: bold;
    margin-right: 5px;
}


/* Thème sombre (basé sur data-theme="dark") */
[data-theme="dark"] .info-panel,[data-theme="dark"] .filter-panel,[data-theme="dark"] .side-panel ,[data-theme="dark"] .site-card  {
    background: #131313;
    color: #f0f0f0;
    border: 1px solid #4f4f4f1a;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
}

/* Header du panneau */
[data-theme="dark"] .info-panel-header {
    border-bottom-color: #444;
}

/* Titre et texte */
[data-theme="dark"] .info-panel h3,
[data-theme="dark"] .info-panel-section h4 {
    color: #f0f0f0;
}

/* Icônes et labels */
[data-theme="dark"] .info-panel-section h4 i {
    color: #bbb;
}

[data-theme="dark"] .info-item-label {
    color: #bbb;
}

[data-theme="dark"] .info-item-value {
    color: #f0f0f0;
}

/* Bouton de fermeture */
[data-theme="dark"] .close-panel {
    color: #aaa;
}

[data-theme="dark"] .close-panel:hover {
    color: #f0f0f0;
}

/* Couleurs des prix */
[data-theme="dark"] .price-high {
    color: #ff6b6b;
}

[data-theme="dark"] .price-medium {
    color: #feca57;
}

[data-theme="dark"] .price-low {
    color: #54a0ff;
}

.close-panel-button {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 5px;
    width: 50px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 30px;
}

.close-panel-button:hover {
    color: #333;
}

/****************Filters pannel*******/
/* Panneau de filtres */
.filter-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 350px;
    height: 100vh;
    padding: 20px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transform: translateX(-100%); /* Cache le panneau à gauche par défaut */
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-right: 1px solid #eee;
}

/* Affiche le panneau quand la classe "visible" est ajoutée */
.filter-panel.visible {
    transform: translateX(0); /* Déplace le panneau vers la droite pour l'afficher */
}

/* Header du panneau */
.filter-panel .panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.filter-panel .panel-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
}

/* Contenu du panneau */
.filter-panel .panel-content {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

/* Bouton de fermeture */
.filter-panel .close-panel-button {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #666;
    cursor: pointer;
    padding: 5px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-panel .close-panel-button:hover {
    background: #e9ecef;
    color: #333;
}

/* Styles spécifiques aux éléments du panneau de filtres */
.filter-section {
    margin-bottom: 16px;
}

.filter-section h4 {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-select {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Icône de filtres flottante */
.floating-icon {
  position: fixed;
  left: 20px;
  bottom: 100px;
  z-index: 1000;
  width: 45px;
  height: 45px;
  background-color: var(--menu-bg-color);
  border-radius: 15%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.floating-icon:hover {
    background-color: var(--search-box-bg);
}

/* Fenêtre latérale */
.side-panel {
    position: fixed;
    bottom: 20px;
    left: -50%; /* Masquée par défaut */
    width: 350px;
    height: auto;
    background:var(--menu-bg-color);
    border-radius:15px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1100;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.side-panel.active {
    left: 0;
}

.side-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.side-panel-header h3 {
    margin: 0;
    font-size: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #777;
}

.side-panel-content {
    padding: 10px;
}

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

.filter-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Cases à cocher personnalisées */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 13px;
    user-select: none;
    margin:10px;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}


#applyFiltersBtn {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    margin: auto;
    display: block;
    border-radius: 5px;
    cursor: pointer;
}

#applyFiltersBtn:hover {
    background-color: var(--primary-color);
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #eee;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #ddd;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #4CAF50;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-icon {
    margin-right: 10px;
    font-size: 18px;
    color: #555;
}

/* Bouton Appliquer */
.apply-btn {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.apply-btn:hover {
    background-color: #45a049;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.overlay.active {
    opacity: 1;
    pointer-events: all;
}


.price-range-container {
    margin: 8px 0;
}

.price-range {
    width: 100%;
}

.price-value {
    display: block;
    text-align: right;
    letter-spacing: 1px;
    color: var(--text-secondary-color);
}

/* Style de base pour le conteneur */
.checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
}

/* Style pour le checkmark/spinner */
.checkbox-container .checkmark {
content: "✓";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 5px;
}

/* Checkmark normal (✓) */
.checkbox-container input[type="checkbox"]:checked ~ .checkmark {
  position: absolute;
  opacity: 1;
}
.checkbox-container input[type="checkbox"]:checked ~ .checkmark::after {
  position: absolute;
  opacity: 1;
  left:5px;
  top:0;
}

/* Afficher le checkmark lorsque la checkbox est cochée */
.checkbox-container input[type="checkbox"]:checked + span::after {
  opacity: 1;
}

/* Spinner pendant le chargement */
.checkbox-container.loading-filter .checkmark {
  background: transparent !important;
}
.checkbox-container.loading-filter .checkmark::after {
  content: "";
  display: block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: #3498db;
  animation: spin 1s ease-in-out infinite;
  opacity: 1 !important; /* Forcer l'affichage pendant le chargement */
  margin-top: -4px;
  margin-left: -9px
}

/* Animation du spinner */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Masquer le checkmark pendant le chargement */
.checkbox-container.loading-filter input[type="checkbox"]:checked + span::after {
  content: "";
}

.filter-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: white;
    color: var(--primary-color); /* Couleur du texte pour un bon contraste */
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid var(--primary-color); /* Bordure pour un meilleur rendu */
    box-shadow: 0 0 0 1px white; /* Ombre pour éviter que le badge ne se fonde avec l'arrière-plan */
}



/* ===== AWESOMPLETE (THÈME ADAPTÉ) ===== */
.awesomplete {
    display: block;
    position: relative;
    width: 100%;
}

.awesomplete > input {
    padding: 10px 40px;
    border: 1px solid var(--search-box-border);
    border-radius: 4px;
    background-color: var(--search-box-bg);
    color: var(--search-box-text);
    font-size: 16px;
}

.awesomplete > ul {
    position: absolute;
    z-index: 10000;
    background: var(--popup-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin: 0;
    padding: 0;
    list-style-type: none;
    max-height: 300px;
    overflow-y: auto;
    width: calc(100% - 2px);
    box-shadow: 0 2px 10px var(--shadow-color);
    margin-top: 2px;
}

.awesomplete > ul > li {
    padding: 8px 12px;
    cursor: pointer;
    color: var(--popup-text-color);
    background-color: var(--popup-bg-color);
    border-bottom: 1px solid var(--border-color);
}

.awesomplete > ul > li:last-child {
    border-bottom: none;
}

.awesomplete > ul > li[aria-selected="true"] {
    background: #0078d7;
    color: white;
}

.awesomplete > ul > li mark {
    background-color: #ffeb3b;
    color: inherit;
    font-weight: bold;
    padding-right:0;
}

.awesomplete[data-open] > input {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: #0078d7;
}

.awesomplete > ul > li:hover,
.awesomplete > ul > li[aria-selected="true"] {
    background-color: var(--menu-hover-color, #f0f0f0);
    color: var(--text-color, #fff);
}

.awesomplete > ul > li mark {
    background-color: transparent!important; /* Fond jaune par défaut */
    color: var(--match-highlight-text, #ccc); /* Texte noir par défaut */
    font-weight: bold; /* Texte en gras pour plus de visibilité */
    border-radius: 2px; /* Bordure légèrement arrondie */
}

.awesomplete li[aria-selected="true"] mark{
    background:transparent!important;
}
.awesomplete > ul:before{
    display:none;
}

/* Conteneur commun pour le burger et la recherche en mobile */
.menu-bar-mobile {
    /*position: absolute;
    top: 20px;
    left: 20px;*/
    display: none;
    background: var(--menu-bg-color);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 10px var(--shadow-color);
    z-index: 1001;
    align-items: center;
    gap: 0;
}

/* Bouton burger dans le bloc arrondi */
.menu-bar-mobile .menu-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--menu-item-color);
    cursor: pointer;
    padding: 8px 12px;
    margin: 0;
}

/* Champ de recherche dans le bloc arrondi (mobile) */
.menu-bar-mobile .search-box-container {
    display: none;
    position: relative;
    width: 100%;
    margin-left: 50px;
}

.menu-bar-mobile .search-box {
    width: 100%;
    padding: 8px 30px 8px 15px;
    border: none;
    border-radius: 18px;
    background: transparent;
    color: var(--search-box-text);
    font-size: 14px;
    outline: none;
    margin: 0;
}

/* Icône de recherche dans le bloc arrondi */
.menu-bar-mobile .search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    opacity: 0.7;
    pointer-events: none;
}

/* Icône de suppression dans le bloc arrondi */
.menu-bar-mobile .clear-icon {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: pointer;
    display: none;
}

.text-muted {
  --bs-text-opacity: 1;
  color: rgba(108, 108, 108, 0.75) !important;
}

/* ===== Mobile (≤ 768px) ===== */
@media (max-width: 768px) {
    .menu{
        width: 51px;
    }
    .menu-toggle {
        display: block;
    }

    .menu-content {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-color, #fff);
        transition: left 0.3s ease;
        z-index: 1002;
    }

    .menu-content.active {
        left: 0;
    }
    
    #homeLink.logo {
        margin-bottom:15px;
    }

    .menu-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .menu-items {
        padding: 0 20px;
    }
    
    .footer-links{
        display:none;
    }
    
    .footer-links-mobile{
        display:none;
    }
    
    #floating-accordion{
        width:92%;
    }

    .overlay {
       /*display: block;*/
    }
    
    .awesomplete > input {
        width:260px;
    }

    .overlay.active {
        opacity: 1;
    }
     .info-panel {
        width: 100%; /* Prend toute la largeur */
        right: 0; /* Colle au bord droit */
        border-radius: 0; /* Supprime les coins arrondis si nécessaire */
        margin: 0; /* Supprime les marges */
        padding: 0; /* Supprime les padding (ajuste si besoin) */
    }

    .info-panel.visible {
        right: 0; /* Assure que le panneau est bien collé à droite */
    }

  .info-panel {
        width: 100%!important; /* Pleine largeur en mobile */
        right: -100%; /* Masqué par défaut */
        border-radius: 0;
    }
    
  .menu-toggle,
    .hamburger {
        display: block;
        margin-top: -11px;
        margin-left: -9px;
    }
       .menu-bar-mobile {
        display: flex;
    }
    .menu-bar-mobile .search-box-container {
        display: block;
    }
    .menu {
        width: 100%;
        background: transparent;
        padding: 0;
    }
    .menu-header .search-box-container {
        display: none;
    }
    .menu-content {
        left: -100%;
        transition: left 0.3s ease;
    }
    .menu-content.active {
        left: 0;
    }
    .search-box {
        width: 200px;
    }
    }

    .menu-desktop {
        display: none;
    }

    .menu-mobile {
        display: flex;
    }

    .menu-mobile.active {
        display: flex !important;
    }