/* ============================================================================
   GPS MODAL STYLES - gps-modal-styles.css
   ============================================================================ */

/* Modal GPS */
.gps-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gps-modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.gps-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gps-modal-header h2 {
    margin: 0;
    font-size: 1.8em;
    font-weight: 600;
}

.gps-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gps-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.gps-modal-body {
    padding: 30px;
}

/* Status GPS */
.gps-status {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05em;
}

.gps-status.acquiring {
    background-color: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #2196F3;
}

.gps-status.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4CAF50;
}

.gps-status.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

/* Spinner */
.spinner {
    border: 3px solid rgba(25, 118, 210, 0.2);
    border-top: 3px solid #1976d2;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Carte GPS */
#gpsMap {
    height: 400px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Indicateur de précision */
#accuracyIndicator {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
}

#accuracyIndicator.excellent {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 2px solid #4CAF50;
}

#accuracyIndicator.good {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 2px solid #2196F3;
}

#accuracyIndicator.fair {
    background-color: #fff8e1;
    color: #f57f17;
    border: 2px solid #FFC107;
}

#accuracyIndicator.poor {
    background-color: #ffebee;
    color: #c62828;
    border: 2px solid #f44336;
}

/* Grille d'informations GPS */
.gps-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.gps-info-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.gps-info-card label {
    display: block;
    font-size: 0.9em;
    color: #555;
    margin-bottom: 5px;
    font-weight: 600;
}

.gps-info-card .value {
    font-size: 1.3em;
    color: #333;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

/* Section d'input manuel */
#manualInputSection {
    display: none;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 2px dashed #dee2e6;
}

#manualInputSection.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

#manualInputSection h3 {
    margin-top: 0;
    color: #495057;
    font-size: 1.2em;
}

.manual-input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.manual-input-grid .input-group {
    display: flex;
    flex-direction: column;
}

.manual-input-grid label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #495057;
}

.manual-input-grid input {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1em;
}

/* Actions du modal */
.gps-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.gps-modal-actions button {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
    .gps-modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .gps-modal-header h2 {
        font-size: 1.4em;
    }
    
    #gpsMap {
        height: 300px;
    }
    
    .gps-info-grid {
        grid-template-columns: 1fr;
    }
    
    .manual-input-grid {
        grid-template-columns: 1fr;
    }
    
    .gps-modal-actions {
        flex-direction: column;
    }
    
    .gps-modal-actions button {
        width: 100%;
    }
}

/* Toggle button pour input manuel */
.toggle-manual-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.toggle-manual-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}
