html,
body,
#viewDiv {
    padding: 0;
    margin: 0;
    height: 100%;
    width: 100%;
}

/* Esri Popups et Widgets */
.esri-features__container {
    color: white;
    font-size: 0.85rem;
}

.esri-features__content-container {
    background-color: black !important;
    color: white;
    font-size: 0.75rem;
}

.esri-popup__header-title {
    font-size: 0.85rem !important;
}

.esri-popup__content {
    font-size: 0.75rem !important;
}

/*.esri-view-width-xlarge .esri-popup__main-container {
    width: 300px !important;
}

.esri-ui-manual-container > .esri-component {
    margin-top: 15px;
    margin-left: 55px;
}

.esri-popup--aligned-top-center .esri-popup__pointer {
    margin: 0 0 0 -6px;
    top: 100%;
    
}*/

.esri-search,
.esri-search__container,
.esri-search__input {
    width: 90% !important;
    box-sizing: border-box;
}

.esri-search,
.esri-search__container {
    border-radius: 0 !important;
}

/* Panneau custom */
#customDiv {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #fff;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 8px 8px 10px rgba(0, 0, 0, 0.3);
    width: 400px;
    transition: height 0.3s;
}
#customDiv * {
    box-sizing: border-box;
    max-width: 100%;
}

.custom-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1px;
    
}

#toggleCustomContent.toggle-btn {
    margin-left: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 1.6rem;
    background: #fff;
    border: none;
    box-shadow: none;
    padding: 0 8px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

    #toggleCustomContent.toggle-btn svg {
        display: block;
    }

#customContent > * {
    width: 100%;
    box-sizing: border-box;
}

#customDiv.collapsed #customContent {
    display: none;
}
#customDiv.collapsed #searchContainer {
    margin-bottom: 0px;
}

/* Recherche */
#searchContainer {
    width: 90%;
    margin-bottom: 10px;
}

/* Info panneau */
#infoDiv {
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
}

/* Responsive */
/*@media (max-width: 900px) {
    #customDiv {
        width: 70vw;
        min-width: 180px;
        max-width: 95vw;
    } 
}*/
@media (max-width: 900px) {
    #customDiv{
        position: fixed;
        right: 1vw;
        left: auto;
        top: 5px;
        width: 75vw;
        min-width: 0;
        max-width: 95vw;
        max-height: 90vh;
        overflow-y: auto;
        
            }
    #customDiv * {
        font-size: 0.65rem !important;
        max-width: 100%;
    }
    #infoDiv {
        position: static;
        left: auto;
        right: 0;
        width: 100%;
        min-width: 0;
        max-width: 100vw;
        font-size: 0.65rem !important;
        right: auto;
        left: auto;
        display: block; /* s'assurer qu'il est affiché */
    }
    .info-circle {
        width: 14px;
        height: 14px;
        font-size: 0.7rem;
    }
    .button {
        font-size: 0.8em;
        padding: 8px;
    }
    .esri-features__container {
        max-height: 60px; /* ou la hauteur souhaitée */
        overflow-y: auto;
    }
}

/* Boutons et header */
.header {
    display: flex;
    width: 100%;
    box-sizing: border-box;
}

.button {
    flex: 1;
    padding: 10px;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    color: #fff;
    background-color: #3498db;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    font-size: 1em
    };

    .button.active {
        background-color: #2980b9;
    }

.body {
    margin-top: 8px;
}

.dropdown-content {
    display: none;
}

.sub-button {
    display: block;
    padding: 6px;
    text-align: left;
    color: #333;
    border: none;
    background-color: transparent;
    width: 100%;
    cursor: pointer;
}

/* Couleurs couverture */
.couv-5g {
    background: #00263C;
    color: #fff;
}

.couv-4g {
    background: #109DB9;
    color: #fff;
}

.couv-3g {
    background: #C3F1FC;
    color: #fff;
}

.couv-2g-3g {
    background: #109DB9;
    color: #fff;
}

.couv-2g {
    background: #177CB2;
    color: #fff;
}

/* Internet */
.internet {
    display: flex;
    border-radius: 5px;
    border: 1px solid;
    width: 70%;
    margin-left: auto;
    margin-right: auto;
}

/* Header text */
.header-text {
    display: flex;
    justify-content: center;
    font-size: 1rem;
    grid-column-start: 1;
    grid-column-end: 13;
}

    .header-text hr {
        border: solid;
        border-width: 1px 0 0;
        width: 100%;
        margin: auto 0;
    }

    .header-text span {
        margin: 0 0.5rem;
        font-size: 1rem;
        white-space: nowrap;
    }

/* Sous-couverture */
.sous-couv {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    margin-top: 10px;
    overflow: visible;
}

.sous-couv-3g {
    margin-top: 15px;
    justify-content: center;
}

.carre {
    width: 18px;
    height: 18px;
}

.item {
    display: flex;
    align-items: center;
    justify-content: center;
}

    .item p {
        font-family: "Inter", sans-serif;
        font-weight: 600;
        color: rgb(91, 91, 91);
        font-size: 0.7rem;
    }

/* Switch */
.switch {
    margin: 10px;
    position: relative;
    display: inline-block;
    width: 70px;
    height: 17px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgb(238, 238, 238);
    box-shadow: inset 0px 2px 6px rgba(0, 0, 0, 0.334);
    transition: 0.15s;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 17px;
        width: 17px;
        right: 0;
        bottom: 0;
        box-shadow: 0 0 3px rgba(0, 0, 0, 0.697);
        background-color: #004874;
        transition: 0.15s;
    }

input:checked + .slider:before {
    transform: translateX(-36px);
    background-color: #fff;
}

.slider.round {
    border-radius: 34px;
    width: 55px;
}

    .slider.round:before {
        border-radius: 50%;
    }

/* Info */
.info-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    width: 18px;
    height: 18px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 1px solid #00263C;
    background: #fff;
    color: #00263C;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

    .info-circle:hover {
        background: #e6f0fa;
    }

.info-container {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

/* Tooltip */
.tooltip-5g {
    position: absolute;
    top: 130%;
    right: -10px;
    left: auto;
    transform: none;
    z-index: 1000;
    background: #fff;
    color: #00263C;
    border: 1px solid #00263C;
    border-radius: 5px;
    padding: 8px 12px;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    max-width: 260px;
    white-space: normal;
    text-align: left;
    pointer-events: auto;
}

    .tooltip-5g::after {
        content: "";
        position: absolute;
        top: -8px;
        right: 10px;
        transform: none;
        border-width: 0 8px 8px 8px;
        border-style: solid;
        border-color: transparent transparent #fff transparent;
        filter: drop-shadow(0 -1px 0 #00263C);
        width: 0;
        height: 0;
        pointer-events: none;
    }
