/* --- LE CORRECTIF PRINCIPAL POUR LE FOUC --- */
/* Empêche le panneau d'être visible avant que le JS ne prenne le relais */
/* Ajoute style="display: none;" directement dans ta balise HTML <div class="sl-overlay"> */
/* Une fois le JS chargé, il enlèvera ce style ou passera en display: flex */

/* Sinon, voici la version CSS renforcée */

.sl-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000000 !important;
    display: none; /* <--- CHANGEMENT ICI : On cache par défaut en CSS */
    justify-content: flex-end;
    opacity: 0;
    /* visibility: hidden; <--- Pas nécessaire si on utilise display: none */
    transition: opacity 0.3s ease;
}

/* Quand on ouvre le menu, on ajoute la classe .open ou .visible en JS */
/* Le JS devra faire : element.style.display = 'flex'; puis ajouter la classe .visible après 10ms */
.sl-overlay.visible {
    display: flex; /* <--- On force l'affichage quand c'est visible */
    opacity: 1;
    /* visibility: visible; */
}

/* --- LE RESTE DU FICHIER (Optimisé) --- */

.sl-panel {
    background: white;
    width: 100%;
    max-width: 550px;
    height: 100vh;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    
    /* On garde le transform pour l'animation */
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    
    font-family: 'Helvetica Neue', sans-serif;
}

.sl-overlay.visible .sl-panel {
    transform: translateX(0);
}

/* ... Le reste de ton CSS reste identique ... */
/* Je te remets tout le bloc en dessous pour que tu puisses copier-coller proprement */

.sl-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sl-header h2 {
    font-style: italic;
    font-weight: 800;
    font-size: 1.3rem;
    margin: 0;
    text-transform: uppercase;
}

.sl-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
}

.sl-close-btn:hover {
    background-color: transparent;
}

.sl-content {
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.sl-views-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}

.sl-search-box {
    position: relative;
    margin-bottom: 20px;
}

.sl-search-box input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid #ddd;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #333;
}

.sl-toggle-row {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.sl-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin-right: 15px;
    flex-shrink: 0;
}

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

.sl-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e0e0e0;
    transition: .4s;
    border-radius: 34px;
}

.sl-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked+.sl-slider:before {
    transform: translateX(24px);
}

.sl-toggle-label {
    font-size: 0.8rem;
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
}

.sl-tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 10px;
}

.sl-tab {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-weight: 800;
    font-style: italic;
    font-size: 1rem;
    color: #aaa;
    cursor: pointer;
    position: relative;
    text-transform: uppercase;
}

.sl-tab.active {
    color: #000;
}

.sl-tab:hover {
    background-color: transparent;
}

.sl-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #00AEEF;
}

.sl-disclaimer {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 20px;
    text-align: center;
}

.sl-list-container {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 5px;
}

.custom-scroll::-webkit-scrollbar {
    width: 5px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.sl-card {
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.hidden-item {
    display: none !important;
}

.sl-card-header h3 {
    font-style: italic;
    font-weight: 800;
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.sl-card-header {
    position: relative;
    padding-right: 70px; 
}

.sl-distance {
    position: absolute;
    top: 15px;   
    right: 15px;   
    margin: 0;
    font-size: 0.9rem;
    font-weight: bold;
    color: #666;
    background-color: #f5f5f5; 
    padding: 2px 6px;
    border-radius: 4px;
}

.sl-card-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.sl-card-info {
    flex: 1;
    padding-right: 10px;
}

.sl-stock-status {
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sl-address {
    font-weight: 500;
    font-size: 0.95rem;
    margin: 5px 0;
    color: #222;
    text-transform: uppercase;
}

.status-open {
    color: #6ec05e;
    font-weight: 800;
}

.sl-hours {
    font-size: 0.9rem;
    color: #444;
    margin: 2px 0 0 0;
}

.trigger-btn-locator {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
}

.btn-skew-black {
    background: black;
    color: white;
    border: none;
    padding: 10px 20px;
    transform: skewX(-20deg);
    cursor: pointer;
    transition: background 0.2s;
    display: block;
    border-radius: 0 !important;
}

.btn-skew-black:hover {
    background: #4a4a4a;
    transform: skewX(-20deg);
}

.btn-content {
    transform: skewX(20deg);
    display: inline-block;
    font-style: italic;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.arrow {
    font-size: 0.7rem;
    margin-right: 5px;
}