/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8fafc; /* Changé en clair pour cohérence */
    color: #1e293b;
    line-height: 1.6;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin: 12px 0;
    font-size: 14px;
}

.alert-success {
    background: #e6f7ec;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.alert-error {
    background: #fde8e8;
    color: #842029;
    border: 1px solid #f5c2c7;
}

/* Bandeau de simulation */
.simulation-alert {
    background: linear-gradient(90deg, #fef3c7 0%, #fef08a 100%);
    color: #92400e;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid #f59e0b;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.simulation-alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.simulation-alert-content {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Variables CSS */
:root {
    /* Couleurs */
    --color-primary: #8b5cf6;
    --color-primary-hover: #7c3aed;
    --color-secondary: #64748b;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;
   
    /* Backgrounds */
    --bg-primary: #f8fafc; /* Clair pour cohérence */
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-hover: #e2e8f0;
   
    /* Text */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
   
    /* Borders */
    --border-color: #e2e8f0;
    --border-radius: 8px;
    --border-radius-lg: 12px;
   
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
   
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Layout principal */
.app-layout {
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.page-content {
    flex: 1;
    padding: var(--spacing-xl);
    overflow-y: auto;
}

/* Layout d'authentification */
.auth-layout {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: var(--spacing-xl);
}

/* Header de page */
.page-header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-lg) var(--spacing-xl);
}

.page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Grilles et layouts */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 { gap: var(--spacing-sm); }
.gap-4 { gap: var(--spacing-md); }
.gap-6 { gap: var(--spacing-lg); }

/* Utilitaires */
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-4 { margin-bottom: var(--spacing-md); }
.mb-6 { margin-bottom: var(--spacing-lg); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-4 { margin-top: var(--spacing-md); }
.mt-6 { margin-top: var(--spacing-lg); }

/* Responsive */
@media (max-width: 992px) {
    .page-content {
        padding: var(--spacing-md);
    }
    
    .page-header-content {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .grid-cols-3, .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .col-lg-5, .col-lg-7 {
        width: 100% !important;
    }
    
    .card-summary {
        position: static;
    }
}

@media (max-width: 576px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .page-content {
        padding: var(--spacing-sm);
    }
}

/* Améliorations accessibilité */
a:focus, button:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 6px;
}

.form-check-input:checked {
    background-color: var(--color-success);
    border-color: var(--color-success);
}

.form-check-input:focus {
    border-color: var(--color-success);
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.25);
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.25rem rgba(139, 92, 246, 0.25);
}