/* ================================
   BASE PAGE LOCALISATION
================================ */

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #131237, #384e80);  
    color: #ffffff;
    margin: 0;
    padding: 0;
}

/* ================================
   MAIN / HERO
================================ */

.hero {
    width: 100%;
    padding: 80px 20px 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 15px;
    font-weight: 700;
}

.subtitle {
    font-size: 16px;
    opacity: 0.85;
    max-width: 600px;
    margin-bottom: 40px;
}

/* ================================
   BARRE DE RECHERCHE AVEC AUTOCOMPLÉTION
================================ */

.search-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.search-wrapper {
    flex: 1;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: none;
    outline: none;
    font-size: 15px;
    color: #333;
}

.search-container input:focus {
    box-shadow: 0 0 0 3px rgba(0, 255, 204, 0.3);
}

.search-container button {
    padding: 14px 22px;
    border-radius: 10px;
    border: none;
    background: #00ffcc;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* ================================
   AUTOCOMPLÉTION
================================ */

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    margin-top: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.autocomplete-results.active {
    display: block;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    color: #333;
    text-align: left;
}

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

.autocomplete-item:hover {
    background: #f5f5f5;
}

.autocomplete-item-label {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.autocomplete-item-sublabel {
    font-size: 13px;
    color: #666;
}

.autocomplete-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.autocomplete-type.site {
    background: #e3f2fd;
    color: #1976d2;
}

.autocomplete-type.ville {
    background: #f3e5f5;
    color: #7b1fa2;
}

.autocomplete-no-results {
    padding: 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ================================
   MAP
================================ */

#map {
    width: 100%;
    max-width: 1200px;
    height: 600px;
    margin-top: 20px;

    border-radius: 14px;
    overflow: hidden;

    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

/* ================================
   LEAFLET POPUPS - TAILLE FIXE ET UNIFORME
================================ */

.leaflet-popup-content-wrapper {
    border-radius: 8px;
    background: #1f1f33;
    color: white;
    min-width: 250px !important;
    max-width: 250px !important;
    width: 250px !important;
}

.leaflet-popup-content {
    font-size: 14px;
    margin: 12px 14px !important;
    width: 222px !important; /* 250 - (14*2) pour tenir compte du padding */
    min-height: 60px;
    max-height: 150px;
    overflow-y: auto;
    text-align: center;
}

/* Scrollbar pour le contenu du popup si nécessaire */
.leaflet-popup-content::-webkit-scrollbar {
    width: 6px;
}

.leaflet-popup-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.leaflet-popup-content::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 204, 0.5);
    border-radius: 3px;
}

.leaflet-popup-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 204, 0.7);
}

.leaflet-popup-tip {
    background: #1f1f33;
}

/* Empêcher les popups de redimensionner */
.leaflet-popup {
    margin-bottom: 20px;
}

/* ================================
   PANNEAU DÉCHÈTERIE - DÉSACTIVÉ
   (Remplacé par style-panel-grand.css)
================================ */

/* Ce fichier est désactivé car style-panel-grand.css contient la version améliorée */

/* ================================
   LISTE DES CONTENEURS
================================ */

.container-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.container-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 12px;
    border-left: 4px solid #00ffcc;
    transition: all 0.2s ease;
}

.container-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

/* 4 NIVEAUX DE REMPLISSAGE */
.container-item.low {
    border-left-color: #00ffcc;  /* VERT : 0-33% */
}

.container-item.low-medium {
    border-left-color: #fcff5f;  /* JAUNE : 33-66% */
}

.container-item.medium-high {
    border-left-color: #ffa500;  /* ORANGE : 66-95% */
}

.container-item.high {
    border-left-color: #ff4444;  /* ROUGE : 95-100% */
}

.container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.container-header strong {
    font-size: 16px;
    font-weight: 600;
}

.percentage {
    font-size: 18px;
    font-weight: 700;
    color: #00ffcc;
}

.container-item.low .percentage {
    color: #00ffcc;  /* VERT */
}

.container-item.low-medium .percentage {
    color: #fcff5f;  /* JAUNE */
}

.container-item.medium-high .percentage {
    color: #ffa500;  /* ORANGE */
}

.container-item.high .percentage {
    color: #ff4444;  /* ROUGE */
}

/* Barre de progression */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffcc, #00ccaa);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.container-item.low .progress-fill {
    background: linear-gradient(90deg, #00ffcc, #00ccaa);  /* VERT */
}

.container-item.low-medium .progress-fill {
    background: linear-gradient(90deg, #fcff5f, #ffeb3b);  /* JAUNE */
}

.container-item.medium-high .progress-fill {
    background: linear-gradient(90deg, #ffa500, #ff8800);  /* ORANGE */
}

.container-item.high .progress-fill {
    background: linear-gradient(90deg, #ff4444, #cc0000);  /* ROUGE */
}

.container-info {
    font-size: 12px;
    opacity: 0.7;
}

.no-data {
    opacity: 0.6;
    font-style: italic;
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

/* ================================
   BOUTONS D'ACTION DU PANNEAU
================================ */

.panel-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-actions button {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #00ffcc, #00ccaa);
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 255, 204, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 768px) {

    .hero h1 {
        font-size: 32px;
    }

    .search-container {
        flex-direction: column;
    }

    .search-container button {
        width: 100%;
    }

    #map {
        height: 400px;
    }

    #info-panel {
        width: 100%;
        right: -100%;
    }

    #info-panel.active {
        right: 0;
    }

    #panel-content {
        padding: 20px;
        padding-top: 60px;
    }
}
