/* Styles spécifiques pour la page des opérateurs */

/* Grille des opérateurs */
.operators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.operator-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 4px solid #667eea;
    position: relative;
    overflow: hidden;
}

.operator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.operator-card h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.operator-card .operator-symbol {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.9rem;
}

.operator-card .category {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 600;
}

.operator-card .description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.operator-card .syntax-preview {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #333;
    margin-bottom: 10px;
}

.operator-card .precedence {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Couleurs par catégorie */
.operator-card.category-arithmetic { border-left-color: #e74c3c; }
.operator-card.category-comparison { border-left-color: #3498db; }
.operator-card.category-logical { border-left-color: #2ecc71; }
.operator-card.category-string { border-left-color: #f39c12; }
.operator-card.category-bitwise { border-left-color: #9b59b6; }
.operator-card.category-pattern { border-left-color: #1abc9c; }
.operator-card.category-array { border-left-color: #e67e22; }
.operator-card.category-json { border-left-color: #34495e; }
.operator-card.category-range { border-left-color: #16a085; }
.operator-card.category-network { border-left-color: #8e44ad; }
.operator-card.category-geometric { border-left-color: #27ae60; }

.operator-card.category-arithmetic .operator-symbol { background: #e74c3c; }
.operator-card.category-comparison .operator-symbol { background: #3498db; }
.operator-card.category-logical .operator-symbol { background: #2ecc71; }
.operator-card.category-string .operator-symbol { background: #f39c12; }
.operator-card.category-bitwise .operator-symbol { background: #9b59b6; }
.operator-card.category-pattern .operator-symbol { background: #1abc9c; }
.operator-card.category-array .operator-symbol { background: #e67e22; }
.operator-card.category-json .operator-symbol { background: #34495e; }
.operator-card.category-range .operator-symbol { background: #16a085; }
.operator-card.category-network .operator-symbol { background: #8e44ad; }
.operator-card.category-geometric .operator-symbol { background: #27ae60; }

/* Modal spécifique aux opérateurs */
.modal-body .operator-info h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body .operator-info h3 i {
    font-size: 1rem;
}

.syntax-section pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    margin-bottom: 20px;
}

.syntax-section .syntax-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.syntax-section .syntax-item h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1rem;
}

.syntax-section .syntax-item pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    overflow-x: auto;
    margin: 0;
}

.description-section {
    margin-bottom: 25px;
}

.description-section p {
    color: #666;
    line-height: 1.6;
}

.examples-section {
    margin-bottom: 25px;
}

.example {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 0 8px 8px 0;
}

.example h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1rem;
}

.example pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    overflow-x: auto;
    margin: 0;
}

.example .result {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #0066cc;
}

.notes-section ul {
    list-style: none;
    padding: 0;
}

.notes-section li {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    color: #856404;
    position: relative;
    padding-left: 35px;
}

.notes-section li:before {
    content: "⚠️";
    position: absolute;
    left: 12px;
    top: 12px;
}

.precedence-section {
    margin-bottom: 25px;
}

.precedence-section p {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 15px;
    color: #0066cc;
    font-weight: 500;
}

/* Section d'aide spécifique */
.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) {
    .operators-grid {
        grid-template-columns: 1fr;
    }
    
    .operator-card {
        padding: 15px;
    }
    
    .operator-card h3 {
        font-size: 1.1rem;
    }
    
    .help-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-body {
        padding: 20px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.operator-card {
    animation: fadeInUp 0.3s ease;
}

/* Styles pour les symboles d'opérateurs */
.operator-symbol {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    display: inline-block;
    min-width: 30px;
    text-align: center;
}

/* Styles pour les exemples de résultats */
.example-result {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #155724;
}

.example-result::before {
    content: "→ ";
    font-weight: bold;
}

/* Styles pour les types de données */
.data-type {
    background: #e9ecef;
    color: #495057;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Styles pour les paramètres */
.parameter {
    background: #fff3cd;
    color: #856404;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Styles pour les valeurs de retour */
.return-type {
    background: #d1ecf1;
    color: #0c5460;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 500;
}
