/* Navigation */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Container principal */
.checker-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Sections */
.input-section,
.results-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    color: #667eea;
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Toolbar */
.toolbar {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
    color: #333;
}

/* Éditeur */
.editor-container {
    margin-bottom: 25px;
}

#sqlEditor {
    width: 100%;
    height: 300px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#sqlEditor:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* CodeMirror */
.CodeMirror {
    height: 300px !important;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.CodeMirror:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.CodeMirror-focused .CodeMirror-cursor {
    border-left: 2px solid #667eea;
}

/* Exemples */
.examples-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.example-btn {
    padding: 10px 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    text-align: center;
    transition: all 0.3s ease;
    color: #666;
}

.example-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
}

/* Indicateur de statut */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-indicator.waiting {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e9ecef;
}

.status-indicator.checking {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-indicator.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-indicator.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Contenu des résultats */
.results-content {
    min-height: 300px;
}

.welcome-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.welcome-message i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.welcome-message h3 {
    color: #333;
    margin-bottom: 15px;
}

.welcome-message ul {
    text-align: left;
    max-width: 400px;
    margin: 20px auto 0;
}

.welcome-message li {
    margin-bottom: 8px;
}

/* Résultats de vérification */
.check-result {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.check-result.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.check-result.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.check-result h4 {
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-details {
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.error-details h5 {
    margin: 0 0 10px 0;
    color: #721c24;
}

.error-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(114, 28, 36, 0.1);
}

.error-list li:last-child {
    border-bottom: none;
}

.error-position {
    font-weight: bold;
    color: #dc3545;
}

.suggestions {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.suggestions h5 {
    margin: 0 0 10px 0;
    color: #0066cc;
}

.suggestion-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestion-list li {
    padding: 5px 0;
    color: #0066cc;
}

/* Section d'aide */
.help-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.help-section h3 {
    color: #667eea;
    margin-bottom: 25px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.help-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.help-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.help-card i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 15px;
}

.help-card h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.help-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .checker-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .main-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-link {
        width: 200px;
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .toolbar {
        width: 100%;
        justify-content: center;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .help-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.checking .fa-spinner {
    animation: pulse 1s infinite;
}

/* Syntaxe colorée */
.sql-keyword {
    color: #0066cc;
    font-weight: bold;
}

.sql-string {
    color: #008000;
}

.sql-comment {
    color: #808080;
    font-style: italic;
}

.sql-function {
    color: #800080;
}

.sql-operator {
    color: #ff6600;
}
