
/*Filtre*/
#Zone_filtre{
    padding-top: 0;
}
.filter-form{
    padding: 0;
    margin: 5px 0;
}
#niveau,
#theme{
    margin-top: -15px;
}
.slider-container {
    padding: 5px;
}
#slider {
    margin: 15px 0;
}
/*Téléchargement*/
#zone_download{
    position: relative;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%; 
    padding: 0;
    margin: 2px 0;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

#download_options{
    width: 100%;
    box-shadow: none;
    padding: 0%;
}

#body_download{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
#zone_btn_filter{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
#btn-filter{
    position: relative;
    overflow: hidden;
    width: 150px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    box-shadow: 0 0 3px rgba(90, 89, 87, 0.5);
    font-weight: 500;
}

#btn-filter::after{
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 100%
    );
    filter: blur(1px);
    animation: lightSweep 4s infinite;
}

#btn-filter i{
    margin-right: 8px;
    font-size: 18px;
}

#btn-filter span{
    font-size: 14px;
    font-weight: 500;
}

#btn-recap,
#export-excel,
#export-pdf,
#export-img{
    position: relative;
    overflow: hidden;
    margin: 5px 0;
    width: 150px;
    padding: 8px 5px;
    border-radius: 10px;
    border: 1px solid rgb(204, 203, 201);
    box-shadow: 0 0 3px rgba(90, 89, 87, 0.5);
}
#btn-recap ::after,
#export-excel::after,
#export-pdf::after,
#export-img::after{
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255,255,255,0.15) 40%,
        rgba(255,255,255,0.6) 50%,
        rgba(255,255,255,0.15) 60%,
        transparent 100%
    );
    filter: blur(1px);
    animation: lightSweep 4s infinite;
}
#export-pdf,
#export-img{
    display: none;
}
/*Aides*/
#btn_aides{
    position: relative;
    overflow: hidden;
    background-color: #fff;
    color: #333;
    border-radius: 10px;
    border: 1px solid rgb(224, 200, 150);
    box-shadow: 0 0 3px rgba(90, 89, 87, 0.5);
    width: 150px;
    margin: 5px 0;
}
#btn_aides::after{
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(224, 201, 150, 0.178) 50%,
        transparent 100%
    );
    transform: skewX(-20deg);
    animation: lightSweep 2.2s infinite;
}
@keyframes lightSweep {
  0% {
    left: -75%;
  }
  100% {
    left: 130%;
  }
}
.faq-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left; padding: 10px 14px;
  background: #fff; border: 1px solid #dee2e6;
  border-radius: 8px; color: #212529; font-size: 0.875rem;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
  margin-bottom: 8px;
}
.faq-btn:hover  { background: #f8f9fa; border-color: #adb5bd; }
.faq-btn.active { background: #f0f4ff; border-color: #6c8ebf; }

.faq-num {
  min-width: 22px; height: 22px; border-radius: 50%;
  background: #f1f3f5; border: 1px solid #dee2e6;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}
.faq-btn.active .faq-num { background: #185FA5; color: #fff; border-color: #185FA5; }

#header_download{
    height: 30px;
    width: 100% ;
    justify-content: center;
    align-items: center;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}
#header_download .card-title{
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-align: center;
    line-height: 10px;
}
.card-body{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
}

.form-label{
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 5px 0;
}

/*Map*/
#div-map{
    height: 100vh;
    padding: 0;
    background-color: rgb(255, 255, 255);
    display: flex;
    justify-content: center;
    align-items: center;
    page-break-before: always;
    border:1px dashed rgba(0, 0, 0, 0.397);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}
#map{
    height: 100%;
    width: 100%;
    background-color: rgb(250, 250, 250);
}
#export-page {
    width: 210mm;
    height: 297mm;
    background: white;
    position: relative;
    overflow: hidden;
    display: none;
}

#export-map {
    position: absolute;
    top: 20mm;
    left: 10mm;
    right: 10mm;
    bottom: 40mm;
}
/*orientation*/
.orientation{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    width: 50px;
    left: -5px;
    border: none;
    overflow: hidden;
}
.orientation img{
    position: relative;
    width: 100%;
    height: 100%;
    background-position: center;
}
/*Contrôle aire*/
.control-aire{
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    border: none;
    display: flex;
    flex-direction: column;
}
.control-aire::before{
    content: "Couches";
    display: block;
    text-align: center;
    text-decoration: underline;
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 1px;
    color: #333;
}

.leaflet-control.leaflet-control-layers ,
.control-aire.leaflet-control{
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    border: none;
    border-radius: 5px;
    width: 97px;
    display: flex;
    flex-direction: column;
    padding: 2px 4px;
    font-weight: lighter;
    font-size: 12px;
    text-transform: capitalize !important;
}

.leaflet-control.leaflet-control-layers .ctrl-item,
.control-aire.leaflet-control .ctrl-item{
    display: flex;
    align-items: center;
}

.leaflet-control.leaflet-control-layers label,
.control-aire.leaflet-control label{
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 1px 0;
    height: 18px;
    padding-left: 1px;
}
.leaflet-control.leaflet-control-layers input,
.control-aire.leaflet-control input{
    margin-right: 5px;
}
.leaflet-control.leaflet-control-layers label span,
.control-aire.leaflet-control label span{
    font-size: 12px;
    line-height: 15px;
    letter-spacing: normal;
    font-weight: lighter;
    text-transform: capitalize !important;
}
.ctrl_shp{
    margin-right: 5px;
}
#ctrl-item-commune:not("d-none"),
#ctrl-item-etab:not("d-none"){
    display: block;
}

.ctrl-item.d-none,
.ctrl-item.d-none{
    display: none;
}

/*Context Menu*/
.contextualJs{
    background-color: #fff;
    width: 100%;
}
.contextualMenu {
    position: fixed;
    z-index: 999999;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    border-radius: 5px;
    padding: 5px;
    width: 150px;
}
.contextualMenu .contextualMenuItem {
    list-style: none;
    padding: 5px 3px;
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    transition: background 0.2s;
}
.contextualMenuItem:hover {
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease-in-out;
}
.contextualMenuItem:hover .contextualMenuItemTitle{
    background: transparent !important;
    color: #fff !important;
}
.contextualMenuItem:hover .contextualMenuItemTitle span{
    font-weight: 600;
}
.contextualJs.contextualMenuItemTitle{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    cursor: pointer;
    padding: 0 5px;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0%;
    color: #333 !important;
    background: transparent !important;
}

.contextualJs.contextualMenuItemTitle i{
    margin-right: 8px;
    font-size: 18px;
}
.contextualJs.contextualMenuItemTitle span{
    font-size: 13px;
    font-weight: lighter;
}
.contextualJs.contextualMenuItemTip,
.contextualJs.contextualMenuItemIcon{
    display: none;
}

/* Animation */
@keyframes fadeIn {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* DARK MODE */
@media (prefers-color-scheme: dark) {
    .ContextMenus {
        background: rgba(30, 30, 30, 0.85);
        color: white;
    }

    .ContextMenus div:hover {
        background: rgba(255,255,255,0.08);
    }
}

#ContextMenus_Commune,
#ContextMenus_Etab{
    display: flex;
    flex-direction: row;
    height: 100%;
    width: 100%;
    color : #fff;
    font-size: 15px;
    align-items: flex-start;
}
#ContextMenus_Commune i,
#ContextMenus_Etab i{
    color: #fff;
    font-size: 18px;
    font-weight: 500;
}
/*Echell*/
.leaflet-control-scale {
    background: rgba(255,255,255,0.95);
    padding: 8px 10px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    border: 1px solid rgba(0,0,0,.15);
}

.leaflet-control-scale::before {
    content: "Echelle";
    display: block;
    text-align: center;
    text-decoration: underline;
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 4px;
    color: #333;
}

.leaflet-control-scale-line {
    border-color: #000;
    color: #000;
    font-size: 11px;
    font-weight: 600;
}
/*Legende*/
.legend {
    background: rgba(255, 255, 255, 0.95); /* fond blanc */
    border-radius: 5px;
    color: #222121; /* texte */
    display: flex;
    flex-direction: column;
    min-width: 120px;
    padding: 6px 7px;
    font: 12px / 14px Roboto, Helvetica, sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);/* ombre */
}
.map-titre,
.couche-titre,
.legend-titre{
    margin-bottom: -10px;
    font-size: 15px;
    font-weight: bold;
    text-decoration: underline;
}
.map-titre{
    text-align: center;
    margin-bottom: -18px;
}
.couche-titre{
    margin-bottom: -25px;
}
.legend-item{
    display: flex;
    flex-direction: row;
    line-height: 1.6;
}
.legend-icon{
    position: relative;
    top: 2px;
    width: 15px;
    height: 15px;
    margin-right: 5px;
    border: 1px solid #333;
    /*box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); *//* ombre */
}
.legend-text{
    font-size: 14px;
}
/* =========================
   NOTIFICATION EXPORT
========================= */

.zone-notification{
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;

    display: flex;
    align-items: center;
    gap: 12px;

    background: rgba(30,30,30,0.95);
    color: white;

    padding: 14px 18px;

    border-radius: 12px;

    box-shadow: 0 4px 20px rgba(0,0,0,0.3);

    min-width: 260px;

    animation: slideIn .25s ease;

    transition:
        background .25s ease,
        transform .25s ease,
        opacity .25s ease;
}

/* =========================
   LOADER
========================= */

.notification-loader{
    width: 18px;
    height: 18px;

    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: white;

    border-radius: 50%;

    animation: spin 1s linear infinite;

    flex-shrink: 0;

    position: relative;
}

/* =========================
   SUCCESS ICON
========================= */

.notification-loader.success{
    animation: none;
    border: none;
    width: 20px;
    height: 20px;
}

.notification-loader.success::before{
    content: "✓";

    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    color: white;
    font-size: 18px;
    font-weight: bold;
}

/* =========================
   ERROR ICON
========================= */

.notification-loader.error{
    animation: none;
    border: none;
    width: 20px;
    height: 20px;
}

.notification-loader.error::before{
    content: "✕";

    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    color: white;
    font-size: 18px;
    font-weight: bold;
}

/* =========================
   TEXT
========================= */

.notification-text{
    font-size: 14px;
    font-weight: 500;
}

/* =========================
   STATES
========================= */

.zone-notification.success{
    background:#198754;
}

.zone-notification.error{
    background:#dc3545;
}

/* =========================
   UTIL
========================= */

.d-none{
    display:none !important;
}

/* =========================
   ANIMATIONS
========================= */

@keyframes spin{
    to{
        transform: rotate(360deg);
    }
}

@keyframes slideIn{
    from{
        transform: translateX(30px);
        opacity:0;
    }

    to{
        transform: translateX(0);
        opacity:1;
    }
}
/* =====================================
   RECAP ETABLISSEMENT
===================================== */

/* =========================================
   GLASSMORPHISM RECAP
========================================= */
#zone-filter,
#zone-recap-etab{
    position: relative;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.18),
        inset 0 1px 0 rgba(255,255,255,0.15);

    border-radius: 18px;
    overflow: hidden;
    transition: all .3s ease;
}

/* reflet haut */
#zone-filter::before,
#zone-recap-etab::before{
    content: "";
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background:
        linear-gradient(
            120deg,
            transparent 20%,
            rgba(255,255,255,0.12) 50%,
            transparent 80%
        );

    transform: skewX(-25deg);
    pointer-events: none;
}

/* =======================
   HEADER
======================= */
.filter-header,
.recap-header{
    height: 30px;
    background:
        linear-gradient(
            135deg,
            rgba(179, 182, 185, 0.55),
            rgba(164, 166, 168, 0.253)
        );
    color: #333;
    font-weight: 600;
    border-bottom:1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    text-shadow:0 1px 2px rgba(241, 240, 240, 0.3);
    letter-spacing: .5px;
    text-align: center;
}

/* =======================
   BODY
======================= */
.filter-body,
.recap-body{
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 5px;
    background: rgba(201, 199, 199, 0.178);
    --glass-blur : blur(20px);
}

/* =======================
   ITEMS
======================= */
#niveau,
#theme,
.recap-item{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 8px;
    border-radius: 14px;
    background: rgba(250, 248, 248, 0.137);
    border:1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    transition:
        transform .25s ease,
        box-shadow .25s ease,
        background .25s ease;
    overflow: hidden;
    width: 100%;
}

/* reflet item */
#niveau::before,
#theme::before,
.recap-item::before{
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background:
        linear-gradient(
            120deg,
            transparent,
            rgba(255,255,255,0.18),
            transparent
        );
    transition: left .6s ease;
}
#niveau:hover::before,
#theme:hover::before,
.recap-item:hover::before{
    left: 140%;
}

#btn-filter:hover,
#niveau:hover,
#theme:hover,
.recap-item:hover{
    transform: translateY(-2px);
    background:
        rgba(255,255,255,0.12);
    box-shadow:
        0 6px 18px rgba(0,0,0,0.18);
}

/* =======================
   LEFT
======================= */

.recap-left{
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1f2937;
    font-size: 13px;
    font-weight: 600;
}

/* =======================
   CHECKBOX
======================= */

.recap-left input[type=\"checkbox\"]{
    width: 16px;
    height: 16px;
    accent-color: #132f4b;
    cursor: pointer;
}

/* =======================
   BADGES
======================= */

.recap-item .badge{
    min-width: 30px;
    width: auto;
    padding: 2px 3px;
    margin-left: 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.2),
        0 2px 6px rgba(0,0,0,0.15);
}
#count-low-etab{
    color: #333;
}
/* =======================
   COULEURS
======================= */

.recap-low{
    border-left: 4px solid rgb(255, 255, 255);
}

.recap-medium{
    border-left: 4px solid rgba(40,167,69,0.85);
}

.recap-high{
    border-left: 4px solid rgba(220,53,69,0.85);
}

/* =======================
   DARK MODE
======================= */

@media (prefers-color-scheme: dark){

    .recap-left{
        color: #f1f5f9;
    }

    .recap-item{

        background:
            rgba(255,255,255,0.05);

        border:
            1px solid rgba(255,255,255,0.06);
    }

    .recap-item:hover{

        background:
            rgba(255,255,255,0.08);
    }
}