/* ===================================================
   custom.css
   Fichier de personnalisation MANUEL, non généré par qgis2web.
   A conserver et re-uploader tel quel après chaque export QGIS.
   =================================================== */

/* --- Styles existants (fond, contrôles) --- */
html, body {
    background-color: #000000;
}
.ol-control > * {
    background-color: #f8f8f8 !important;
    color: #444444 !important;
    border-radius: 0px;
}
.ol-attribution a, .gcd-gl-input::placeholder, .search-layer-input-search::placeholder {
    color: #444444 !important;
}
.search-layer-input-search {
    background-color: #f8f8f8 !important;
}
.ol-control > *:focus, .ol-control > *:hover {
    background-color: rgba(248, 248, 248, 0.7) !important;
}
.ol-control {
    background-color: rgba(255, 255, 255, .4) !important;
    padding: 2px !important;
}

/* Lien "Légende" dans le panneau */
.legend-link-item a {
    color: #0078A8;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.legend-link-item a:hover {
    text-decoration: underline;
}

/* Overlay/modal pour afficher l'image en grand */
#legend-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}
#legend-modal-overlay.shown {
    display: flex;
}
#legend-modal-content {
    background: white;
    border-radius: 8px;
    padding: 16px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
#legend-modal-content img {
    max-width: 100%;
    height: auto;
    display: block;
}
#legend-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f0f0;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #444;
}
#legend-modal-close:hover {
    background: #ddd;
}

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

/* --- Curseur de swipe (comparaison SWISSIMAGE 2023 / 2019) --- */
#swipe-slider {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ffffff;
    cursor: ew-resize;
    z-index: 1000;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}
#swipe-slider::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: #ffffff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23444" d="M8 5l-6 7 6 7M16 5l6 7-6 7"/></svg>') center/20px no-repeat;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}
