
/* =========================================================
   DESIGN TOKENS (GLOBAL SYSTEM)
========================================================= */
:root{
    --glass-bg: rgba(255,255,255,0.12);
    --glass-bg-strong: rgba(212, 211, 211, 0.18);
    --glass-header: rgba(121, 118, 118, 0.548);
    --text: #1f2937;
    --text-white: #fff;
    --primary: #185FA5;
    --success: #198754;
    --danger: #dc3545;
    --fond:rgba(255, 255, 255, 0.25);
    --radius: 18px;
    --radius-sm: 12px;
    --blur: 14px;
    --shadow: 0 8px 32px rgba(0,0,0,0.18);
    --space: 10px;
    --transition: .25s ease;
}

/* =========================================================
   GLASS BASE (APPLIED TO ALL CARDS)
========================================================= */
#zone-filter,
#zone-recap-etab,
#zone_aides,
#div-map,
.zone-notification{
    background: var(--glass-bg-strong);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

/* =========================================================
   HEADER SYSTEM (FILTER + RECAP + ACTIONS)
========================================================= */
.filter-header,
.recap-header,
.glass-header{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-white);
    background: var(--glass-header);
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
/* =========================================================
   BODY SYSTEM
========================================================= */
.filter-body,
.recap-body,
.glass-body{
    display: flex;
    flex-direction: column;
    gap: var(--space);
    padding: 5px 10px;
    background: var(--fond);
    color: var(--text);
}

/* =========================================================
   FILTER COMPONENTS
========================================================= */
#niveau,
#theme{
    width: 100%;
    padding: 6px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,0,0,0.1);
    transition: var(--transition);
    opacity: 1;
    color: var(--text);
}
#theme:disabled{
    background: dimgray;
    color: var(--text-white);
    opacity: .2;
}

#niveau:hover,
#theme:hover{
    transform: translateY(-2px);
}
.filter-body .form-label{
    text-align: left;
    width: calc(100% - 10px);
    left: 10px;
}

/* =========================================================
   RECAP ITEMS
========================================================= */
#recap-zone-label{
    font-size:12px;
    width: 100%;
    height: 100%;
    padding: 5px;
    overflow:hidden; 
    text-transform: uppercase;
    text-overflow:ellipsis; 
    white-space:nowrap;
    color: #333 !important;
    border-radius: var(--radius-sm);
    background: transparent !important;
    border: 1px solid rgba(245, 243, 243, 0.74);
    backdrop-filter: blur(10px);
    cursor: default;
}

.recap-item{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.08);
    transition: var(--transition);
    cursor: default;
    color: #fff !important;
}

.recap-item:hover{
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.recap-left{
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

/* checkbox */
.recap-left input{
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

/* BADGES */
.recap-item .badge{
    border-radius: 999px;
}

/* COLORS */
.recap-low{ border-left: 4px solid #fff; }
.recap-medium{ border-left: 4px solid var(--success); }
.recap-high{ border-left: 4px solid var(--danger); }

/* =========================================================
   ACTIONS (zone_aides)
========================================================= */
#zone_aides .glass-body{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}
#zone_aides .btn{
    width: 100%;
    height: auto;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

#zone_aides .btn:hover{
    transform: translateY(-2px);
}

/* =========================================================
   BUTTON SYSTEM GLOBAL (SAFE FOR BOOTSTRAP)
========================================================= */
.btn-success{ background: var(--success); }
.btn-primary{ background: var(--primary); }
.btn-info{ background: #0dcaf0; }

/* =========================================================
   MAP
========================================================= */
#div-map{
    height: 100vh;
    background: white;
}

/* =========================================================
   CONTEXT MENU / LEGEND
========================================================= */
.contextualMenu,
.legend{
    padding: 6px;
}


/* =========================
   NOTIFICATION (FIX VISIBILITÉ)
========================= */
.zone-notification{
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    min-width: 260px;
    border-radius: 12px;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(0,0,0,0.35);
    backdrop-filter: blur(10px); /* IMPORTANT: on désactive glass ici */
    -webkit-backdrop-filter: none;
    animation: slideIn .25s ease;
}

/* =========================
   STATES (HIGH CONTRAST)
========================= */

.zone-notification.success{
    background: #16a34a;
}

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

.zone-notification.info{
    background: #2563eb;
}

.zone-notification.warning{
    background: #f59e0b;
    color: #111;
}

/* =========================
   LOADER
========================= */
.notification-loader{
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.25);
    border-top-color: #333;
    animation: spin 1s linear infinite;
}

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

.notification-text{
    font-size: 14px;
    color: #111;
}
.zone-notification.success .notification-text,
.zone-notification.error .notification-text,
.zone-notification.info .notification-text{
    color: #fff;
}

/* =========================================================
   ANIMATIONS
========================================================= */
@keyframes spin{
    to{ transform: rotate(360deg); }
}

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

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

/* MOBILE */
@media (max-width: 576px){

    #zone-filter,
    #zone-recap-etab,
    #zone_aides{
        margin: 5px 0;
    }

    .recap-item{
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    #zone_aides .btn{
        width: 100%;
    }
}

/* TABLET */
@media (max-width: 768px){

    #zone_aides .btn{
        width: 100%;
    }

    .recap-item{
        flex-direction: column;
        align-items: flex-start;
    }
}

/* SMALL DESKTOP */
@media (max-width: 992px){

    .filter-header,
    .recap-header{
        font-size: 13px;
    }
}

/* DARK MODE */
@media (prefers-color-scheme: dark){

    .recap-left{
        color: #f1f5f9;
    }

    .recap-item{
        background: rgba(255,255,255,0.05);
    }
}