/**
 * Styles frontend pour Parkings & Lockers Manager
 * Carte interactive des parkings
 * Version: 1.1.0
 */

/* ============================================================================
   CONTENEUR PRINCIPAL DE LA CARTE
   ========================================================================= */

.parking-plan {
    width: 100%;
    max-width: 1650px;
    height: 900px;
    background-color: #e8ebec;
    margin: 0 auto;
    overflow: hidden;
}

/* Conteneur pour le plan de parking avec navigation */
.parking-map-container {
    position: relative;
    width: 100%;
    max-width: 1650px;
    height: 900px;
    background-color: #b7d1b0;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.parking-map-container:active {
    cursor: grabbing;
}

/* Message si aucun SVG disponible */
.no-svg {display: flex; flex-direction:column; align-items: center; justify-content: center; height: 100%; font-size: 18px; color: #666; font-style: italic;}

/* ============================================================================
   WRAPPER SVG
   ========================================================================= */

.parking-map-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease-out;
    transform-origin: 0 0;
    touch-action: none;
}

.parking-map-wrapper svg {
    display: block;
    width: 100%;
    height: 100%;
}

.parking-map-wrapper.dragging {
    cursor: grabbing;
}

/* ============================================================================
   CONTRÔLES DE LA CARTE
   ========================================================================= */

.map-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    pointer-events: auto;
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

/* =========================================================================
   SÉLECTEUR DE PHASE
   ========================================================================= */

.phase-selector {pointer-events: auto; position: relative; display: inline-flex; align-items: center; gap: 8px;}
.phase-select {background: white url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 10px center/12px; border: 2px solid #ddd; border-radius: 8px; padding: 10px 35px 10px 15px; font-size: 14px; font-weight: 600; color: #454444; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); transition: all 0.2s ease; min-width: 140px; pointer-events: auto; position: relative; z-index: 1002; -webkit-appearance: none; -moz-appearance: none; appearance: none;}
.phase-select:hover {border-color: #f1861e;}
.phase-select:focus {outline: none; border-color: #f1861e;}
.phase-select option {padding: 8px; font-weight: 500;}


/* =========================================================================
   BOUTON RESET
   ========================================================================= */

.phase-reset-btn {background: white; border: 2px solid #ddd; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 24px; line-height: 1; color: #454444; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); transition: all 0.2s ease; pointer-events: auto; padding: 0;}
.phase-reset-btn:hover {border-color: #454444;}

.phase-reset-btn:active {
    transform: scale(0.95);
}

/* =========================================================================
   SÉLECTEUR DE NIVEAU (Extérieur / Intérieur)
   ========================================================================= */

.level-selector {pointer-events: auto;}
.level-select {background: white url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 10px center/12px; border: 2px solid #ddd; border-radius: 8px; padding: 10px 35px 10px 15px; font-size: 14px; font-weight: 600; color: #454444; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); transition: all 0.2s ease; min-width: 120px; pointer-events: auto; position: relative; z-index: 1001; -webkit-appearance: none; -moz-appearance: none; appearance: none;}
.level-select:hover {border-color: #f1861e;}
.level-select:focus {outline: none; border-color: #f1861e;}
.level-select option {padding: 8px; font-weight: 500;}


/* =========================================================================
   CONTRÔLES EN HAUT À DROITE (Bornes électriques + Accès staff)
   ========================================================================= */

.top-right-controls {
    position: absolute; 
    top: 20px; 
    right: 20px; 
    z-index: 10; 
    pointer-events: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.electric-btn {
    background: white; 
    border: 2px solid #ddd; 
    border-radius: 8px; 
    padding: 10px 15px; 
    font-size: 14px; 
    font-weight: 600; 
    color: #7daabc; 
    cursor: pointer; 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); 
    transition: all 0.2s ease; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    pointer-events: auto; 
    position: relative; 
    z-index: 1001;
}

.electric-btn:hover {border-color: #7daabc; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);}
.electric-btn:active {box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); transform: scale(0.98);}
.electric-btn.active {background: #7daabc; color: #ffffff; border-color: #7daabc;}

.electric-icon {
    line-height:0;
    svg {width: 20px; height: 20px;}
    path {fill:#7daabc !important;}
}

.active .electric-icon path {fill:#ffffff !important;}

/* Bouton accès staff */
.staff-login-btn {
    background: white; 
    border: 2px solid #ddd; 
    border-radius: 8px; 
    padding: 10px; 
    color: #666; 
    cursor: pointer; 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); 
    transition: all 0.2s ease; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    width: 42px;
    height: 42px;
    pointer-events: auto;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.staff-login-btn:hover {
    border-color: #f1861e; 
    color: #f1861e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.staff-login-btn:active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); 
    transform: scale(0.98);
}

.staff-login-btn.staff-authenticated {
    background: #f1861e; 
    color: white; 
    border-color: #f1861e;
}

.staff-login-btn.staff-authenticated:hover {
    background: #d97419;
    border-color: #d97419;
}


/* =========================================================================
   CONTRÔLES DE ZOOM
   ========================================================================= */

.zoom-controls {position: absolute; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 10; pointer-events: auto;}
.zoom-btn {width: 40px; height: 40px; background: #fff; border: 2px solid #ddd; border-radius: 50%; font-size: 24px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); transition: all 0.2s ease; pointer-events: auto; touch-action: manipulation; user-select: none; -webkit-tap-highlight-color: transparent;}
.zoom-btn:active {transform: scale(0.95);}
.zoom-btn:hover {background: #f8f9fa;}

.zoom-in {
    color: #f1861e;
    &:hover {border-color:#f1861e;}
}

.zoom-out {
    color: #454444;
    &:hover {border-color:#454444;}
}

/* =========================================================================
   TOOLTIP AU SURVOL
   ========================================================================= */

.zone-tooltip {position: fixed; background: rgba(0, 0, 0, 0.85); color: white; padding: 2px 6px; border-radius: 3px; font-size: 13px; font-weight: 600; pointer-events: none; z-index: 10000; opacity: 0; transition: opacity 0.2s ease; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);}
.zone-tooltip.show {opacity: 1;}

.zone-tooltip.tooltip-available {background: #f1861e; color: #fff;}
.zone-tooltip.tooltip-reserved {background: #454444; color: #fff;}
.zone-tooltip.tooltip-disabled {background: #b2b2b2;color: #454444;}



/* ============================================================================
   ZONES INTERACTIVES SVG
   ========================================================================= */

.parking-zone {
    cursor: pointer;
    transition: all 0.3s ease;
    /*stroke: #333;
    stroke-width: 2;*/
    pointer-events: auto;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

/* Types de zones */
.parking-zone.zone-locker {
    stroke-width: 1.5;
    opacity: 0.9;
}

.parking-zone [id*="shape"], .parking-zone [id*="text"], .parking-zone [id*="icons"] {
    transition: all 0.3s ease;
    path {
        transition: all 0.3s ease;
    }
}

.parking-zone [id*="text"], .parking-zone [id*="icons"] {
    pointer-events: none;
}

/* États des zones */
.parking-zone.available [id*="shape"] {
    fill: #fbd0b3 !important; /* Vert pour disponible */
}

.parking-zone.available [id*="text"], .parking-zone.available [id*="icons"] {
    path {
        fill: #f1861e !important;
        transition: all 0.3s ease;
    }
}

.parking-zone.reserved {
    fill: #ffc107 !important; /* Jaune pour réservé */
}


.parking-zone.reserved [id*="shape"] {
    fill: #fff9e6 !important; /* Jaune clair pour réservé */
    opacity: 1;

}

.parking-zone.reserved [id*="text"], .parking-zone.reserved [id*="icons"] {
    fill: #f57c00 !important;
    opacity: 1;

    path {fill: #f57c00 !important;}
    &[style*="stroke-dasharray"], &[style*="stroke-miterlimit"], path[style*="stroke-dasharray"], path[style*="stroke-miterlimit"] {
        stroke: #f57c00 !important;
        fill: none !important;
    }
}

.parking-zone.rented {
    fill: #fd7e14 !important; /* Orange pour loué */
}

.parking-zone.rented [id*="shape"] {
    fill: #454444 !important; /* Gris foncé pour loué */
    opacity: 1;

}

.parking-zone.rented [id*="text"], .parking-zone.rented [id*="icons"] {
    fill: #8e8e8e !important;
    opacity: 1;

    path {fill: #8e8e8e !important;}
    &[style*="stroke-dasharray"], &[style*="stroke-miterlimit"], path[style*="stroke-dasharray"], path[style*="stroke-miterlimit"] {
        stroke: #8e8e8e !important;
        fill: none !important;
    }
}

.parking-zone.disabled [id*="shape"] {
    fill: #dadada !important; /* Gris pour désactivé */
    opacity: 1;
    cursor: default;
    pointer-events: none; /* Désactive complètement les interactions */
}

.parking-zone.disabled [id*="text"], .parking-zone.disabled [id*="icons"] {
    opacity: 1;
    cursor: default;
    pointer-events: none; /* Désactive complètement les interactions */
    path {fill: #b2b2b2 !important;}
    line, polyline {stroke: #b2b2b2 !important;}

    &[style*="stroke-dasharray"], &[style*="stroke-miterlimit"], path[style*="stroke-dasharray"], path[style*="stroke-miterlimit"] {
        stroke: #b2b2b2 !important;
        fill: none !important;
    }
}

/* Effet de survol */

.parking-zone.available:hover [id*="shape"] {
    stroke: #f1861e !important;
    stroke-width: 0.5px !important;
}

.parking-zone.reserved:hover [id*="shape"] {
    stroke: #f57c00 !important;
    stroke-width: 0.5px !important;
}

.parking-zone.rented:hover [id*="shape"] {
    stroke: #1d1d1b !important;
    stroke-width: 0.5px !important;
}

.parking-zone.electric-highlight:hover [id*="shape"] {
    stroke: #49768c !important;
    stroke-width: 0.5px !important;
}

.parking-zone.reserved.selected [id*="shape"] {
    fill:#f57c00 !important;
    stroke: #f57c00 !important;
}

.parking-zone.reserved.selected [id*="text"], .parking-zone.reserved.selected [id*="icons"] {
    path {fill: #fff !important;}
}

.parking-zone.rented.selected [id*="shape"] {
    fill:#1d1d1b !important;
    stroke: #1d1d1b !important;
}

.parking-zone.rented.selected [id*="text"], .parking-zone.rented.selected [id*="icons"] {
    path {fill: #8e8e8e !important;}
}

/* Zone assombrie (phase non sélectionnée) */
.parking-zone.phase-dimmed {
    opacity: 0.3;
    pointer-events: none;
    cursor: default;
    transition: opacity 0.3s ease;
}

.parking-zone.phase-dimmed:hover {
    fill: inherit !important;
    stroke: inherit;
    stroke-width: 2;
    filter: none;
}

/* Zone sélectionnée */
.parking-zone.selected [id*="shape"] {
    fill: #f1861e !important;
    stroke: #f1861e !important;
    stroke-width: 0.5px !important;
    
}

.parking-zone.selected [id*="text"], .parking-zone.selected [id*="icons"] {
    path {fill: #fbd0b3 !important;}

    &[style*="stroke-dasharray"], &[style*="stroke-miterlimit"], path[style*="stroke-dasharray"], path[style*="stroke-miterlimit"] {
        stroke: #fbd0b3 !important;
        fill: none !important;
    }
}


/* Effets de surbrillance pour les zones électriques */
.parking-zone.electric-highlight.available [id*="shape"] {
    fill: #7daabc !important;
}

.parking-zone.electric-highlight.available [id*="text"], .parking-zone.electric-highlight.available [id*="icons"] {
    path {fill: #fff !important;}

    &[style*="stroke-dasharray"], &[style*="stroke-miterlimit"], path[style*="stroke-dasharray"], path[style*="stroke-miterlimit"] {
        stroke: #fff !important;
        fill: none !important;
    }
}

.parking-zone.electric-highlight.reserved [id*="shape"] {
    fill: #7daabc !important;
}

.parking-zone.electric-highlight.reserved [id*="text"], .parking-zone.electric-highlight.reserved [id*="icons"] {
    path {fill: #fff !important;}

    &[style*="stroke-dasharray"], &[style*="stroke-miterlimit"], path[style*="stroke-dasharray"], path[style*="stroke-miterlimit"] {
        stroke: #fff !important;
        fill: none !important;
    }
}

.parking-zone.electric-highlight.rented [id*="shape"] {
    fill: #7daabc !important;
}

.parking-zone.electric-highlight.rented [id*="text"], .parking-zone.electric-highlight.rented [id*="icons"] {
    path {fill: #fff !important;}

    &[style*="stroke-dasharray"], &[style*="stroke-miterlimit"], path[style*="stroke-dasharray"], path[style*="stroke-miterlimit"] {
        stroke: #fff !important;
        fill: none !important;
    }
}

.parking-zone.electric-highlight.disabled [id*="text"], .parking-zone.electric-highlight.disabled [id*="icons"] {
    path {fill: #49768c !important;}
}


/* =========================================================================
   BOUTON EXPORT CSV
   ========================================================================= */

.export-controls {position: absolute; bottom: 20px; left: 20px; z-index: 10; pointer-events: auto;}
.export-btn {background: white; border: 2px solid #ddd; border-radius: 8px; padding: 10px 15px; font-size: 14px; font-weight: 600; color: #454444; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); transition: all 0.2s ease; display: flex; align-items: center; gap: 8px;}
.export-btn:hover {background: #f8f9fa; border-color: #454444; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);}
.export-btn:active {box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); transform: scale(0.98);}


/* =========================================================================
   LÉGENDE DES STATUTS
   ========================================================================= */

.status-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 10;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 12px 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.legend-available {
    background-color: #fbd0b3;
}

.legend-reserved {
    background-color: #fff9e6;
    border-color: #f57c00;
}

.legend-rented {
    background-color: #454444;
}

.legend-disabled {
    background-color: #dadada;
}

.legend-label {
    font-size: 13px;
    color: #454444;
    font-weight: 500;
}

/* Ajuster la position du bouton export CSV quand la légende est présente */
.export-controls {
    bottom: 160px;
}


/* ============================================================================
   MODALE D'INFORMATIONS
   ========================================================================= */

/* Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.modal-overlay.show {
    display: block;
    animation: overlayFadeIn 0.3s ease-out;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Fenêtre modale */
.zone-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    display: none;
}

.zone-modal.show {
    display: block;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes staffModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Header de la modale */
.modal-header {padding: 15px 20px 10px; border-bottom: 1px solid #eee; position: relative;}
.modal-close {position: absolute; top: 14px; right: 15px; background: none; border: none; font-size: 24px; cursor: pointer; color: #454444; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.2s ease;}
.modal-close:hover {color:#f1861e;}
.modal-edit-btn {position: absolute; top: 20px; right: 55px; background: none; border: none; font-size: 12px; cursor: pointer; color: #454444; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; text-decoration: none;}
.modal-edit-btn:hover {color:#f1861e;}
.modal-title {font-size: 18px; font-weight: bold; color: #454444; margin: 0;}

/* Corps de la modale */
.modal-body {
    padding: 20px;
}

.zone-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
}

/* Placeholder pour le chargement lazy des images */
.zone-photo-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 8px;
    margin-bottom: 15px;
    color: #999;
    font-size: 14px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Lignes d'informations */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-row:last-child {
    border-bottom: none;
}

/* Message d'information pour les items désactivés */
.info-disabled-message {
    background-color: #f8f9fa;
    border-left: 3px solid #6c757d;
    padding: 12px !important;
    margin: 8px 0;
    border-radius: 4px;
    border-bottom: none !important;
}

.info-disabled-message .info-label {
    font-weight: 600;
    color: #6c757d;
}

.info-disabled-message .info-value {
    color: #495057;
    font-style: italic;
}

/* Première ligne : Prix + Statut + Locker */
.info-header {
    font-size: 18px;
    font-weight: 700;
    padding: 12px 0;
    margin-bottom: 12px;
}

.info-left {
    color: #333;
}

.info-right-group {display: flex; align-items: center; gap: 5px;}

/* Badge de statut */
.status-badge {padding: 4px 10px; border-radius: 4px; font-size: 13px; font-weight: 600; color: white;}
.status-badge-available {background-color: #f1861e;}
.status-badge-reserved {background-color: #ffc107;}
.status-badge-rented {background-color: #454444;}
.status-badge-disabled {background-color: #dadada;}

/* Ligne prix avec badge locker */
.info-price-row {padding: 12px 0; border-bottom: 2px solid #e9ecef; margin-bottom: 12px;}
.info-price {font-size: 18px; font-weight: 700; color: #454444;}

/* Badge locker */
.locker-badge {padding: 4px 10px; border-radius: 4px; font-size: 13px; font-weight: 600;}
.locker-included {background-color: #fbd0b3; color: #f1861e;}

.no-locker {background-color: #f8f9fa; color: #6c757d; border: 1px solid #dee2e6;}

.info-label {font-size:15px; font-weight: 400; color: #84848e;}
.info-value {font-size:15px; color: #454444; font-weight: 600; text-align: right; flex: 1;}

.admin-only {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    color: #856404;
    font-weight: 400;
}

/* Caractéristiques */
.characteristics {
    display: flex; 
    flex-direction:row;
    justify-content: flex-end;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: 5px; 
    gap:5px;
}

.characteristic {
    background: #e9ecef; padding: 4px 10px;  border-radius: 4px;  font-size: 12px;  color: #495057;  line-height: 1.2em; width: auto; max-width: 100%;}

/* ============================================================================
   MODAL DE CONNEXION STAFF
   ========================================================================= */

.staff-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.staff-modal.show {
    display: flex;
    animation: overlayFadeIn 0.25s ease-out;
}

.staff-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    animation: staffModalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: auto;
    position: relative;
}

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

.staff-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #454444;
}

.staff-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.staff-modal-close:hover {
    color: #454444;
}

.staff-modal-body {
    padding: 20px;
}

.staff-modal-description {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.staff-form-group {
    margin-bottom: 15px;
}

.staff-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.staff-input:focus {
    outline: none;
    border-color: #f1861e;
}

.staff-error-message {
    color: #dc3545;
    font-size: 13px;
    margin-bottom: 15px;
    min-height: 20px;
}

.staff-form-actions {
    display: flex;
    gap: 10px;
}

.staff-btn-primary,
.staff-btn-secondary {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.staff-btn-primary {
    background: #f1861e;
    color: white;
}

.staff-btn-primary:hover {
    background: #d97419;
}

.staff-btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #ddd;
}

.staff-btn-secondary:hover {
    background: #e9ecef;
}

.staff-logged-message {
    display: none;
    text-align: center;
    padding: 20px 0;
}

.staff-logged-message.show {
    display: block;
}

.staff-success-icon {
    width: 60px;
    height: 60px;
    background: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    margin: 0 auto 15px;
    font-weight: bold;
}

.staff-logged-message p {
    margin: 0 0 20px 0;
    color: #454444;
    font-weight: 600;
}

.staff-btn-logout {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.staff-btn-logout:hover {
    background: #c82333;
}

/* ============================================================================
   INDICATEURS
   ========================================================================= */

.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 16px;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
}

/* ============================================================================
   RESPONSIVE MOBILE
   ========================================================================= */

@media (max-width: 768px) {
    .parking-map-container {
        height: 600px;
    }
    
    .map-controls {
        top: 15px;
        left: 15px;
        gap: 8px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .phase-select {
        padding: 8px 30px 8px 12px;
        font-size: 13px;
        min-width: 120px;
        background-size: 10px;
        background-position: right 8px center;
    }
    
    .phase-reset-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .level-select {
        padding: 8px 30px 8px 12px;
        font-size: 13px;
        min-width: 100px;
        background-size: 10px;
        background-position: right 8px center;
    }
    
    .top-right-controls {
        top: 15px; 
        right: 15px;
        gap: 6px;
    }
    
    .electric-btn {
        padding: 8px 12px; 
        font-size: 13px;
    }
    
    .electric-icon {
        font-size: 14px;
    }
    
    .staff-login-btn {
        width: 38px;
        height: 38px;
        padding: 8px;
    }
    
    .staff-login-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .staff-modal-content {
        width: 95%;
        max-width: 350px;
    }
    
    .status-legend {
        bottom: 15px;
        left: 15px;
        padding: 10px 12px;
    }
        
    .legend-items {
        gap: 5px;
    }
    
    .legend-color {
        width: 18px;
        height: 18px;
    }
    
    .legend-label {
        font-size: 12px;
    }
    
    .export-controls {
        bottom: 155px; /* Au-dessus de la légende sur mobile */
        left: 15px;
    }
    
    .export-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .export-icon {
        font-size: 14px;
    }
    
    .zoom-controls {
        bottom: 15px;
        right: 15px;
    }
    
    .zoom-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .zone-modal {
        max-width: 95%;
        /*margin: 20px;*/
    }
    
    .modal-body {
        padding: 15px;
    }
}

