.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
    border-radius: 16px;
}

/* Header global */
.top-header {
    position: fixed;
    top: 15px;
    left: 15px;
    width: calc(100% - 30px);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    border-radius: 32px;
}

.logo { font-size: 1.5rem; font-weight: bold; color: var(--accent); }

.main-nav { display: flex; gap: 20px; align-items: center; }
.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}
.main-nav a.active { color: var(--accent); border-bottom: 2px solid var(--accent); }

.glass-btn {
    background: var(--glass-bg);
    border: 1px solid var(--accent);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: 0.3s;
}

.glass-btn.primary { background: var(--accent); color: #fff; font-weight: bold; }
.glass-btn:hover { background: var(--accent-hover); color: #fff; }

.glass-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

.fab {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    font-size: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
}

/* Modales */
.modal {
    position: absolute;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal-content {
    padding: 30px;
    width: 90%;
    max-width: 500px;
    position: relative;
}
.close-btn, .close-btn-add {
    position: absolute; top: 15px; right: 20px;
    font-size: 24px; cursor: pointer; color: var(--accent);
}

.indicator {
    background: rgba(218, 165, 32, 0.2);
    color: var(--accent);
    padding: 5px 10px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 10px;
}

.tag-badge {
    background: var(--glass-border);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-right: 5px;
}

/* Sidebar verticale gauche */
.sidebar {
    position: fixed;
    top: 90px; /* Sous le header */
    left: 20px;
    width: 320px;
    z-index: 1000;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filters-vertical { display: flex; flex-direction: column; gap: 10px; }

/* Boutons et Inputs... inchangés */
.glass-btn.danger { background: rgba(220, 53, 69, 0.2); border-color: #dc3545; color: #ff6b6b; }
.glass-btn.danger:hover { background: #dc3545; color: white; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }

/* ANIMATION D'OUVERTURE MODALE */
@keyframes popIn {
    0% { opacity: 0; transform: scale(0.85) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.modal:not(.hidden) .modal-content {
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.glass-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    /* Un fond semi-transparent noir (Light mode) ou blanc (Dark mode) selon le texte */
    background: rgba(128, 128, 128, 0.4); 
    border-radius: 4px;
    outline: none;
    margin-top: 5px;
    /* Optionnel : petite ombre interne pour le relief */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2); 
}
.glass-slider::-webkit-slider-thumb {
    -webkit-appearance: none; 
    appearance: none;
    width: 18px; 
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0,0,0,0.5); /* Ombre pour le faire ressortir */
}

/* Style jaune pour les checkbox */
input[type="checkbox"] { accent-color: var(--accent); }

/* --- VUE LISTE (Cards) --- */
.bar-card {
    width: calc(33.333% - 20px);
    min-width: 250px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.25);
    border-color: var(--accent);
}

.bar-card h3 { margin: 0; color: var(--text-color); display: flex; justify-content: space-between; align-items: center; }
.bar-card p { margin: 0; font-size: 0.9em; color: var(--text-color); opacity: 0.8; }
.bar-card img { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; }
.bar-card .tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }

/* Ajustement pour les petits écrans */
@media (max-width: 1200px) { .bar-card { width: calc(50% - 20px); } }
@media (max-width: 800px) { 
    .bar-card { width: 100%; }
    #list-container { padding-left: 20px !important; }
}

/* --- RESPONSIVE DESIGN (MOBILE) --- */
@media (max-width: 800px) {
    /* Header plus compact */
    .top-header { 
        top: 10px; 
        left: 10px; 
        width: calc(100% - 20px); 
        padding: 10px 15px; 
        flex-direction: column; 
        gap: 10px; 
    }

    .main-nav { width: 100%; justify-content: space-between; font-size: 0.9em; }
    
    /* Bouton thème en haut à droite */
    #theme-toggle { position: absolute; top: 10px; right: 15px; padding: 4px 8px; }

    /* La sidebar devient un panneau coulissant invisible par défaut */
    .sidebar {
        top: auto;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        transition: transform 0.3s ease-in-out;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
    }
    
    /* Classe ajoutée via JS pour ouvrir la sidebar */
    .sidebar.open { transform: translateY(0); }
    
    /* Bouton filtre mobile visible */
    #mobile-filter-btn { display: block !important; }
    
    /* Ajustement des modales */
    .modal-content { padding: 20px; width: 95%; max-height: 90vh; overflow-y: auto; }
}

/* Cache le bouton filtre sur PC */
#mobile-filter-btn { display: none; }