/* ========================================
   MENU DE GESTION DES ARBRES
   ======================================== */

.manage-tree-menu {
    position: fixed;
    background: transparent;
    border: none;
    z-index: 10000;
    padding: 0;
    width: 32px;
}

.manage-tree-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: opacity 0.2s ease;
    border-radius: 0;
    margin: 2px 0;
}

.manage-tree-option:hover {
    opacity: 0.7;
}

.manage-tree-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.manage-tree-icon svg {
    width: 32px;
    height: 32px;
    display: block;
}

.manage-tree-label {
    display: none;
}

.manage-tree-option:active {
    opacity: 0.5;
}

/* ========================================
   MENU DE GESTION DES GPX
   ======================================== */

.manage-gpx-menu {
    position: fixed;
    background: transparent;
    border: none;
    z-index: 10000;
    padding: 0;
    width: 32px;
}

.manage-gpx-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: opacity 0.2s ease;
    border-radius: 0;
    margin: 2px 0;
}

.manage-gpx-option:hover {
    opacity: 0.7;
}

.manage-gpx-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.manage-gpx-icon svg {
    width: 32px;
    height: 32px;
    display: block;
}

.manage-gpx-label {
    display: none;
}

.manage-gpx-option:active {
    opacity: 0.5;
}

/* ========================================
   FORMULAIRE D'AJOUT D'ARBRE
   ======================================== */

#addTree-selector {
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid #4a90e2;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 150px;
    box-sizing: border-box;
}

#addTree-selector .selector-title {
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #4a90e2;
}

#addTree-selector .form-group {
    margin-bottom: 10px;
}

#addTree-selector .form-group label {
    display: block;
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: bold;
    color: #333;
    margin-bottom: 3px;
}

#addTree-selector .form-group label .required {
    color: #e74c3c;
    margin-left: 2px;
}

#addTree-selector input[type="text"],
#addTree-selector select {
    width: 100%;
    padding: 4px 6px;
    font-size: 10px;
    font-family: Arial, sans-serif;
    color: #000;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    outline: none;
    box-sizing: border-box;
}

#addTree-selector input[type="text"]:focus,
#addTree-selector select:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 4px rgba(74, 144, 226, 0.3);
}

#addTree-selector input[type="text"]:disabled,
#addTree-selector select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

#addTree-selector .container-buttons {
    display: flex;
    flex-direction: row;
    gap: 5px;
    margin-top: 10px;
    justify-content: space-between;
}

#addTree-selector .container-buttons button {
    flex: 1;
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    padding: 5px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#addTree-selector .btn-cancel {
    background-color: #95a5a6;
    color: white;
}

#addTree-selector .btn-cancel:hover {
    background-color: #7f8c8d;
}

#addTree-selector .btn-validate {
    background-color: #27ae60;
    color: white;
}

#addTree-selector .btn-validate:hover {
    background-color: #229954;
}

#addTree-selector .btn-validate:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

#addTree-selector .error-message {
    font-family: Arial, sans-serif;
    font-size: 10px;
    color: #e74c3c;
    margin-top: 4px;
    display: none;
}

#addTree-selector .error-message.show {
    display: block;
}

.map-click-marker {
    cursor: crosshair !important;
}

.temp-marker {
    background-color: #e74c3c;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ========================================
   BOITE DE CONFIRMATION D'AJOUT
   ======================================== */

#addTree-confirmation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border: 2px solid #4a90e2;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    min-width: 300px;
    display: none;
}

#addTree-confirmation .confirmation-title {
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

#addTree-confirmation .confirmation-message {
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: #555;
    margin-bottom: 20px;
    text-align: center;
}

#addTree-confirmation .confirmation-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

#addTree-confirmation .confirmation-buttons button {
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#addTree-confirmation .btn-no {
    background-color: #95a5a6;
    color: white;
}

#addTree-confirmation .btn-no:hover {
    background-color: #7f8c8d;
}

#addTree-confirmation .btn-yes {
    background-color: #27ae60;
    color: white;
}

#addTree-confirmation .btn-yes:hover {
    background-color: #229954;
}

/* ========================================
   BOITE DE CONFIRMATION DE DEPLACEMENT
   ======================================== */

#moveTree-confirmation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border: 2px solid #4a90e2;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    min-width: 350px;
    max-width: 500px;
    display: none;
}

#moveTree-confirmation .confirmation-title {
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

#moveTree-confirmation .confirmation-message {
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.5;
}

#moveTree-confirmation .confirmation-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

#moveTree-confirmation .confirmation-buttons button {
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#moveTree-confirmation .btn-no {
    background-color: #95a5a6;
    color: white;
}

#moveTree-confirmation .btn-no:hover {
    background-color: #7f8c8d;
}

#moveTree-confirmation .btn-yes {
    background-color: #27ae60;
    color: white;
}

#moveTree-confirmation .btn-yes:hover {
    background-color: #229954;
}

/* ========================================
   BOITE DE CONFIRMATION GENERIQUES
   ======================================== */

.confirmation-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 20px;
    z-index: 10001;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-width: 300px;
    max-width: 500px;
    display: none;
}

.confirmation-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.confirmation-message {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.5;
}

.confirmation-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.confirmation-buttons .btn-no,
.confirmation-buttons .btn-yes {
    padding: 10px 20px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.confirmation-buttons .btn-no {
    background-color: #95a5a6;
    color: white;
}

.confirmation-buttons .btn-no:hover {
    background-color: #7f8c8d;
}

.confirmation-buttons .btn-yes {
    background-color: #e74c3c;
    color: white;
}

.confirmation-buttons .btn-yes:hover {
    background-color: #c0392b;
}

/* ========================================
   FORMULAIRE D'EDITION D'ARBRE
   ======================================== */

#editTree-selector {
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid #4a90e2;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 250px;
    box-sizing: border-box;
}

#editTree-selector .selector-title {
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #4a90e2;
}

#editTree-selector .form-group {
    margin-bottom: 10px;
}

#editTree-selector .form-group label {
    display: block;
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: bold;
    color: #333;
    margin-bottom: 3px;
}

#editTree-selector input[type="text"],
#editTree-selector select {
    width: 100%;
    padding: 4px 6px;
    font-size: 10px;
    font-family: Arial, sans-serif;
    color: #000;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    outline: none;
    box-sizing: border-box;
}

#editTree-selector input[type="text"]:focus,
#editTree-selector select:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 4px rgba(74, 144, 226, 0.3);
}

#editTree-selector .container-buttons {
    display: flex;
    flex-direction: row;
    gap: 5px;
    margin-top: 10px;
    justify-content: space-between;
}

#editTree-selector .container-buttons button {
    flex: 1;
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    padding: 5px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#editTree-selector .btn-cancel {
    background-color: #95a5a6;
    color: white;
}

#editTree-selector .btn-cancel:hover {
    background-color: #7f8c8d;
}

#editTree-selector .btn-validate {
    background-color: #27ae60;
    color: white;
}

#editTree-selector .btn-validate:hover {
    background-color: #229954;
}

#editTree-validation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border: 2px solid #4a90e2;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2001;
    min-width: 300px;
    max-width: 500px;
    display: none;
}

#editTree-validation .confirmation-title {
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

#editTree-validation .confirmation-message {
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: #555;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.5;
}

#editTree-validation .confirmation-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

#editTree-validation .confirmation-buttons button {
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#editTree-validation .btn-no {
    background-color: #95a5a6;
    color: white;
}

#editTree-validation .btn-no:hover {
    background-color: #7f8c8d;
}

#editTree-validation .btn-yes {
    background-color: #27ae60;
    color: white;
}

#editTree-validation .btn-yes:hover {
    background-color: #229954;
}

@media print {
    .confirmation-dialog {
        display: none !important;
    }
}
