/* =====================================================================
   CSS pour l'insertion des fichiers GPX - insertGPXFiles.css
   ===================================================================== */

/* Overlay semi-transparent pour le formulaire d'insertion */
#gpx-insert-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
}

/* Conteneur principal du formulaire d'insertion */
#gpx-insert-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    font-family: Arial, sans-serif;
}

/* En-tÃªte du formulaire d'insertion */
.gpx-insert-header {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 6px 6px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gpx-insert-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

/* Bouton de fermeture */
.gpx-insert-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-insert-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Indicateur d'Ã©tapes */
.gpx-insert-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #ddd;
}

.gpx-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.gpx-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.gpx-step.active .gpx-step-number {
    background-color: #4CAF50;
    color: white;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2);
}

.gpx-step.completed .gpx-step-number {
    background-color: #66BB6A;
    color: white;
}

.gpx-step-label {
    font-size: 12px;
    color: #666;
    text-align: center;
    max-width: 120px;
}

.gpx-step.active .gpx-step-label {
    color: #4CAF50;
    font-weight: bold;
}

.gpx-step-separator {
    flex: 1;
    height: 2px;
    background-color: #e0e0e0;
    margin: 0 10px 20px 10px;
}

/* Corps du formulaire */
.gpx-insert-body {
    padding: 20px 30px;
    min-height: 300px;
}

.gpx-insert-step-content h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.gpx-step-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    padding: 12px;
    background-color: #f0f8f0;
    border-left: 4px solid #4CAF50;
    border-radius: 4px;
}

/* Formulaire d'insertion */
.gpx-insert-form {
    margin-top: 20px;
}

.gpx-form-field {
    margin-bottom: 20px;
}

.gpx-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.gpx-form-field label .required {
    color: #f44336;
    font-weight: bold;
}

.gpx-form-field input[type="text"],
.gpx-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.gpx-form-field input[type="text"]:focus,
.gpx-form-field textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

.gpx-form-field textarea {
    resize: vertical;
    min-height: 80px;
}

.gpx-field-help {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    font-style: italic;
}

/* Message de validation */
.gpx-validation-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.gpx-validation-message.success {
    background-color: #e8f5e9;
    border: 1px solid #4caf50;
    color: #2e7d32;
}

.gpx-validation-message.error {
    background-color: #ffebee;
    border: 1px solid #f44336;
    color: #c62828;
}

.gpx-validation-message .validation-icon {
    font-size: 18px;
}

/* Boutons de navigation */
.gpx-insert-actions {
    display: flex;
    gap: 10px;
    padding: 15px 30px;
    border-top: 1px solid #ddd;
    background-color: #f9f9f9;
    justify-content: flex-end;
}

.gpx-insert-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gpx-insert-btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ccc;
}

.gpx-insert-btn-secondary:hover {
    background-color: #e0e0e0;
}

.gpx-insert-btn-primary {
    background-color: #4CAF50;
    color: white;
}

.gpx-insert-btn-primary:hover {
    background-color: #66BB6A;
}

.gpx-insert-btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
    #gpx-insert-container {
        width: 95%;
        max-width: none;
    }
    
    .gpx-insert-steps {
        padding: 15px 10px;
    }
    
    .gpx-step-number {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .gpx-step-label {
        font-size: 11px;
        max-width: 80px;
    }
    
    .gpx-insert-body {
        padding: 15px;
    }
    
    .gpx-insert-actions {
        padding: 10px 15px;
        flex-wrap: wrap;
    }
    
    .gpx-insert-btn {
        flex: 1;
        min-width: 120px;
    }
    
    /* Colonnes d'analyse en mode mobile */
    .gpx-analysis-columns {
        flex-direction: column;
        gap: 15px;
    }
    
    .gpx-analysis-column {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .gpx-insert-steps {
        flex-direction: column;
        gap: 15px;
    }
    
    .gpx-step {
        flex-direction: row;
        justify-content: flex-start;
        width: 100%;
    }
    
    .gpx-step-number {
        margin-bottom: 0;
        margin-right: 10px;
    }
    
    .gpx-step-label {
        text-align: left;
        max-width: none;
    }
    
    .gpx-step-separator {
        display: none;
    }
}

/* Masquer en impression */
@media print {
    #gpx-insert-overlay,
    #gpx-insert-container {
        display: none !important;
    }
}

/* Configuration sections - Ã‰tape 2 */
.gpx-analysis-columns {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: stretch; /* Les colonnes ont la mÃªme hauteur */
}

.gpx-analysis-column {
    flex: 1;
    min-width: 0; /* Pour Ã©viter le dÃ©bordement */
}

.gpx-config-section {
    margin-bottom: 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #ddd;
    height: auto; /* Au lieu de height: 100% */
}

.gpx-config-section h5 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.gpx-config-info {
    margin-bottom: 0; /* Au lieu de 15px */
}

.gpx-config-success,
.gpx-config-warning,
.gpx-config-info {
    padding: 12px;
    border-radius: 4px;
    font-size: 13px;
}

.gpx-config-success {
    background-color: #e8f5e9;
    border: 1px solid #4caf50;
    color: #2e7d32;
}

.gpx-config-warning {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.gpx-config-info {
    background-color: #e3f2fd;
    border: 1px solid #2196f3;
    color: #0d47a1;
}

.gpx-config-success small,
.gpx-config-warning small,
.gpx-config-info small {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    opacity: 0.9;
}

/* Tableau de correspondance DESC -> ESPECE */
.gpx-mapping-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background-color: white;
}

.gpx-mapping-table thead {
    background-color: #4CAF50;
    color: white;
}

.gpx-mapping-table th {
    padding: 12px;
    text-align: left;
    font-size: 13px;
    font-weight: bold;
}

.gpx-mapping-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ddd;
    font-size: 13px;
}

/* Hover uniquement sur les lignes du tbody, pas sur thead */
.gpx-mapping-table tbody tr:hover {
    background-color: #f5f5f5;
}

.gpx-desc-cell {
    font-weight: bold;
    color: #333;
    width: 40%;
}

.gpx-species-select {
    width: 100%;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: Arial, sans-serif;
    transition: border-color 0.3s ease;
}

.gpx-species-select:focus {
    outline: none;
    border-color: #4CAF50;
}

.gpx-species-select option {
    padding: 8px;
}

/* Ã‰tape 3 - RÃ©capitulatif */
.gpx-recap-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.gpx-recap-section h5 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.gpx-recap-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.gpx-recap-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
}

.gpx-recap-table tr:last-child td {
    border-bottom: none;
}

.gpx-recap-label {
    font-weight: bold;
    color: #555;
    width: 35%;
}

.gpx-recap-value {
    color: #333;
}

.gpx-badge-success {
    display: inline-block;
    padding: 4px 10px;
    background-color: #e8f5e9;
    color: #2e7d32;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.gpx-badge-info {
    display: inline-block;
    padding: 4px 10px;
    background-color: #e3f2fd;
    color: #0d47a1;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.gpx-mapping-list {
    margin: 5px 0 0 0;
    padding-left: 20px;
}

.gpx-mapping-list li {
    margin: 3px 0;
    font-size: 12px;
}

.gpx-insert-progress {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.gpx-insert-progress .gpx-progress-bar-container {
    width: 100%;
    height: 25px;
    background-color: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.gpx-insert-progress .gpx-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 100%);
    transition: width 0.5s ease;
}

.gpx-insert-progress .gpx-progress-text {
    margin-top: 10px;
    font-size: 13px;
    color: #666;
    text-align: center;
    font-weight: bold;
}
/* =====================================================================
   SÉLECTEUR DE MODE D'IMPORTATION
   ===================================================================== */

.gpx-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
}

.gpx-mode-selector {
    max-width: 600px;
    margin: 50px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.gpx-mode-selector h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #333;
}

.gpx-mode-selector > p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
}

.gpx-mode-options {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.gpx-mode-btn {
    flex: 1;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.gpx-mode-btn:hover {
    border-color: #4CAF50;
    background: #f9f9f9;
}

.mode-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

.mode-title {
    font-weight: bold;
    font-size: 16px;
    display: block;
    margin-bottom: 8px;
    color: #333;
}

.mode-desc {
    font-size: 13px;
    color: #666;
    display: block;
}

.gpx-cancel-btn {
    width: 100%;
    padding: 12px 24px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f5f5f5;
    color: #333;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.gpx-cancel-btn:hover {
    background-color: #e0e0e0;
}

/* =====================================================================
   VALIDATION DES WAYPOINTS (ÉTAPE 4)
   ===================================================================== */

.gpx-waypoint-validation {
    margin-top: 20px;
}

.gpx-waypoint-validation h5 {
    margin: 0 0 15px 0;
    font-size: 15px;
    color: #333;
    font-weight: bold;
}

.gpx-validation-summary {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.summary-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 4px;
    border: 2px solid;
}

.summary-item .count {
    display: block;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.summary-item .label {
    display: block;
    font-size: 12px;
}

.summary-ok {
    background-color: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.summary-warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.summary-error {
    background-color: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.gpx-waypoint-list-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 20px;
}

.gpx-waypoint-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.gpx-waypoint-table thead {
    background-color: #4CAF50;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.gpx-waypoint-table th {
    padding: 12px;
    text-align: left;
    font-size: 13px;
    font-weight: bold;
}

.gpx-waypoint-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
}

.gpx-waypoint-table tbody tr:hover {
    background-color: #f5f5f5;
}

.gpx-waypoint-table tbody tr.status-ok {
    background-color: #ffffff;
}

.gpx-waypoint-table tbody tr.status-arbotag-duplicate {
    background-color: #fff3cd;
}

.gpx-waypoint-table tbody tr.status-coord-duplicate {
    background-color: #ffebee;
}

.duplicate-warning {
    margin-bottom: 15px;
}

.duplicate-warning p {
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.duplicate-warning p:last-child {
    margin-bottom: 0;
}

#coords-warning {
    background-color: #ffebee;
    border: 1px solid #f44336;
    color: #c62828;
}

#arbotag-warning {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.duplicate-options {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.duplicate-options label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
}

.duplicate-options input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.integration-report {
    margin-top: 20px;
    padding: 15px;
    background-color: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 5px;
}

.integration-report h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #2e7d32;
}

.integration-report ul {
    margin: 0;
    padding-left: 20px;
}

.integration-report li {
    margin: 8px 0;
    font-size: 14px;
    color: #2e7d32;
}
