
/* ==========================================================================
   FENÊTRE MODALE (INSTRUCTIONS DE MESURE)
   ========================================================================== */
/* 1. État par défaut : Caché et forcé */
.modal {
    display: none !important; /* Force le masquage au chargement */
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
}

/* 2. Le "Safety Net" : Force le centrage si JS applique display: block ou flex */
.modal[style*="display: block"], 
.modal[style*="display: flex"],
.modal.is-active {
    display: flex !important;      /* Force le flex */
    justify-content: center;      /* Centre horizontalement */
    align-items: center;          /* Centre verticalement */
}

/* Le contenu de la modale */
.modal-content {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    font-family: Arial, sans-serif;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: fadeInModal 0.25s ease-in-out;
}

/* 2. Le titre à l'intérieur de la boîte */
.modal-content h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid transparent; /* La ligne de couleur */
    padding-bottom: 8px;
    text-align: left; /* Assure que le texte est à gauche */
}





/* ==========================================================================
   STYLE DU PANNEAU DE MODIFICATION
   ========================================================================== */
.edit-panel {
    display: none; /* Masqué par défaut */
    position: fixed;
    right: -320px; /* Commence hors de l'écran pour l'animation */
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    background-color: white;
    border-radius: 10px 0 0 10px;
    box-shadow: -4px 0 10px rgba(0,0,0,0.3);
    z-index: 10001; /* Doit être au-dessus du panneau d'aide */
    transition: right 0.3s ease-out; /* Animation de glissement */
}

.edit-panel.active {
    display: block;
    right: 0; /* Apparaît sur l'écran */
}

.edit-panel-header {
    background-color: #2ecc71; /* Vert "Modification" */
    color: white;
    padding: 10px 15px;
    border-radius: 10px 0 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edit-panel-header h3 {
    margin: 0;
    font-size: 15px;
}

.close-edit-panel {
    font-size: 20px;
    cursor: pointer;
    font-weight: bold;
}

.edit-panel-content {
    padding: 15px;
}

.edit-section {
    margin-bottom: 12px;
}

.edit-section label {
    display: block;
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 4px;
    color: #555;
}

.edit-section input, .edit-section select {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.edit-buttons {
    display: flex;
    gap: 5px;
}

.edit-buttons button {
    flex: 1;
    background-color: #f1c40f; /* Couleur de base pour les boutons de méthode */
    border: none;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 11px;
    transition: background 0.1s;
}

.edit-buttons button.active {
    background-color: #e67e22 !important; /* Couleur d'activation */
    color: white;
}

.edit-buttons button:hover {
    background-color: #f39c12;
}

.hide {
    display: none !important;
}

.edit-tip {
    font-size: 10px;
    color: #7f8c8d;
    margin-top: 2px;
    font-style: italic;
}

.final-button button {
    width: 100%;
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

.final-button button:hover {
    background-color: #27ae60;
}

/* Couleur et style de base du bouton */
#finalize-add-btn {
    background-color: #aa5913; /* Remplacez par la couleur de votre choix (ex: Vert) */
    color: white;              /* Couleur du texte */
    border: none;              /* Supprime les bordures par défaut */
    padding: 10px 15px;        /* Ajuste la taille interne */
    border-radius: 4px;        /* Arrondit les angles */
    cursor: pointer;           /* Transforme le curseur en main au survol */
    font-weight: bold;
    margin-top: 20px;
    transition: background 0.2s ease; /* Transition fluide au survol */
}

/* Changement de couleur lorsque la souris passe dessus */
#finalize-add-btn:hover {
    background-color: #65350b; 
}


#btn-show-new-layer:active {
    transform: scale(0.98);
}

/* Supprimer l'espace mort entre les sections */
#edit-panel .edit-section {
    margin-bottom: 15px; /* Équilibre l'espacement */
}

/* Forcer la preview à être propre */
#symbol-preview {
    border-radius: 4px;
    background: #ffffff !important;
}

/* Style unifié pour vos boutons d'action */
.sig-action-btn {
    background-color: #eea668;
    color: white;
    border: none;
    padding: 8px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    transition: background-color 0.3s ease, transform 0.1s;
}

.sig-action-btn:hover {
    background-color: #e77e23;
}


#btn-show-new-layer {
    background-color: #aa5913;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.1s;
}

#btn-show-new-layer:hover {
    background-color: #65350b;
}

#btn-quit-draw {
    display: none !important;
    z-index: 2000 !important; /* Très important pour passer au-dessus de la carte Leaflet */
}


