/* Styles pour l'intégration Aegis CRM dans WordPress */

.aegis-crm-container {
    position: relative;
    width: 100%;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.aegis-crm-container iframe {
    display: block;
    border: none;
    width: 100%;
    height: 100%;
}

.aegis-crm-login-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.aegis-crm-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: white;
    text-decoration: none;
}

.aegis-dashboard-container {
    position: relative;
    width: 100%;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.aegis-dashboard-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aegis-dashboard-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.aegis-fullscreen-btn {
    background: #007cba;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.3s ease;
}

.aegis-fullscreen-btn:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

.aegis-dashboard-container iframe {
    display: block;
    border: none;
    width: 100%;
    height: 100%;
}

/* Styles pour les widgets WordPress */
.widget_aegis_crm {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.widget_aegis_crm h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

/* Styles responsifs */
@media (max-width: 768px) {
    .aegis-crm-container,
    .aegis-dashboard-container {
        margin: 10px 0;
        border-radius: 4px;
    }
    
    .aegis-dashboard-header {
        padding: 10px 15px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .aegis-crm-login-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Animation de chargement */
.aegis-loading {
    position: relative;
    min-height: 200px;
}

.aegis-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: aegis-spin 1s linear infinite;
}

@keyframes aegis-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Styles pour les notifications */
.aegis-notification {
    background: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin: 10px 0;
}

.aegis-notification.error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.aegis-notification.warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

/* Styles pour les statistiques */
.aegis-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.aegis-stat-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.aegis-stat-card h4 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.aegis-stat-card .value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.aegis-stat-card .change {
    font-size: 12px;
    margin-top: 5px;
}

.aegis-stat-card .change.positive {
    color: #28a745;
}

.aegis-stat-card .change.negative {
    color: #dc3545;
}
