/* =====================================================================
   CSS pour la gestion des fichiers GPX - manageGPXFiles.css
   ===================================================================== */

/* Overlay semi-transparent pour le formulaire GPX */
#gpx-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

/* Conteneur principal du formulaire GPX */
#gpx-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border: 2px solid #7ae95c;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    font-family: Arial, sans-serif;
}

/* En-tête du formulaire GPX */
.gpx-header {
    background: linear-gradient(135deg, #FF6B00 0%, #FF8C42 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 6px 6px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gpx-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

/* Bouton de fermeture */
.gpx-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.gpx-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Zone d'information */
.gpx-info {
    background-color: #f5f5f5;
    padding: 12px 20px;
    border-bottom: 1px solid #ddd;
    font-size: 13px;
    color: #555;
}

.gpx-info strong {
    color: #333;
}

/* Corps du formulaire */
.gpx-body {
    padding: 20px;
}

/* Groupe de champs */
.gpx-form-group {
    margin-bottom: 20px;
}

/* Conteneur flex pour les deux colonnes */
.gpx-columns-container {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    align-items: flex-start; /* Aligner en haut */
}

/* Colonne gauche - 33% */
.gpx-column-left {
    flex: 0 0 33%;
    min-width: 33%;
}

/* Colonne droite - 64% */
.gpx-column-right {
    flex: 1;
    min-width: 64%;
}

/* Ajustements pour les éléments à l'intérieur */
.gpx-file-info {
    height: auto; /* Au lieu de height: 100% */
    min-height: auto;
}

.gpx-validation {
    height: auto; /* Au lieu de height: 100% */
    min-height: auto;
}

/* Responsive : passer en colonne sur petits écrans */
@media (max-width: 768px) {
    .gpx-columns-container {
        flex-direction: column;
    }
    
    .gpx-column-left,
    .gpx-column-right {
        flex: 1 1 100%;
        min-width: 100%;
    }
}

.gpx-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.gpx-form-group label .required {
    color: #ff4444;
    font-weight: bold;
}

/* Zone de drag & drop pour fichier */
.gpx-dropzone {
    border: 2px dashed #FF6B00;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.gpx-dropzone:hover {
    background-color: #fff5f0;
    border-color: #FF8C42;
}

.gpx-dropzone.dragover {
    background-color: #ffe8dc;
    border-color: #FF6B00;
    border-style: solid;
}

.gpx-dropzone-icon {
    font-size: 48px;
    color: #FF6B00;
    margin-bottom: 10px;
}

.gpx-dropzone-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.gpx-dropzone-subtext {
    font-size: 12px;
    color: #999;
}

/* Input file caché */
#gpx-file-input {
    display: none;
}

/* Informations sur le fichier sélectionné */
.gpx-file-info {
    display: none;
    padding: 12px;
    background-color: #fff5f0;
    border: 1px solid #FFB366;
    border-radius: 5px;
}

.gpx-file-info.visible {
    display: block;
}

.gpx-file-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    word-break: break-word;
}

.gpx-file-size {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.gpx-file-remove {
    background-color: #ff4444;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
    width: 100%;
}

.gpx-file-remove:hover {
    background-color: #cc0000;
}

/* Zone de validation du fichier */
.gpx-validation {
    display: none;
    padding: 12px;
    border-radius: 5px;
    font-size: 13px;
}

.gpx-validation.visible {
    display: block;
}

.gpx-validation.success {
    background-color: #e8f5e9;
    border: 1px solid #4caf50;
    color: #2e7d32;
}

.gpx-validation.error {
    background-color: #ffebee;
    border: 1px solid #f44336;
    color: #c62828;
}

.gpx-validation-icon {
    font-size: 16px;
    margin-right: 8px;
}

.gpx-validation-message {
    font-weight: bold;
}

.gpx-validation-details {
    margin-top: 8px;
    margin-bottom: 0; /* Supprimer la marge en bas */
    font-size: 12px;
    padding-left: 24px;
}

.gpx-validation-details ul {
    margin: 5px 0 0 0; /* Supprimer la marge en bas */
    padding-left: 20px;
}

.gpx-validation-details li {
    margin: 3px 0;
}

.gpx-validation-details li:last-child {
    margin-bottom: 0; /* Supprimer la marge du dernier élément */
}

/* Configuration des features */
.gpx-features-config {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    clear: both; /* S'assurer qu'il apparaît après les colonnes */
}

.gpx-features-config h4 {
    margin: 0 0 15px 0;
    font-size: 15px;
    color: #333;
}

.gpx-feature-option {
    margin-bottom: 15px;
    padding: 10px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.gpx-feature-option:last-child {
    margin-bottom: 0;
}

.gpx-feature-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.gpx-feature-option input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.gpx-feature-help {
    margin-top: 8px;
    padding-left: 28px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.gpx-feature-warning {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 12px;
    color: #856404;
}

.gpx-feature-info {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 4px;
    font-size: 12px;
    color: #0d47a1;
}

.gpx-no-name-warning,
.gpx-no-desc-info {
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 10px;
}

/* Zone de progression */
.gpx-progress {
    display: none;
    margin-top: 15px;
}

.gpx-progress.visible {
    display: block;
}

.gpx-progress-bar-container {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}

.gpx-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FF6B00 0%, #FF8C42 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.gpx-progress-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    text-align: center;
}

/* Boutons d'action */
.gpx-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.gpx-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gpx-btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ccc;
}

.gpx-btn-secondary:hover {
    background-color: #e0e0e0;
}

.gpx-btn-primary {
    background-color: #FF6B00;
    color: white;
}

.gpx-btn-primary:hover {
    background-color: #FF8C42;
}

.gpx-btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Tooltip pour les marqueurs GPX */
.gpx-tooltip {
    background-color: rgba(255, 107, 0, 0.9) !important;
    border: 2px solid #FF6B00 !important;
    color: white !important;
    font-weight: bold !important;
    padding: 6px 10px !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.gpx-tooltip::before {
    border-top-color: #FF6B00 !important;
}

/* Responsive */
@media (max-width: 600px) {
    #gpx-container {
        width: 95%;
        max-width: none;
    }
    
    .gpx-actions {
        flex-direction: column;
    }
    
    .gpx-btn {
        width: 100%;
    }
}

/* Masquer en impression */
@media print {
    #gpx-overlay,
    #gpx-container {
        display: none !important;
    }
}