/* Variables CSS */
:root {
    /* Couleurs principales - Design épuré */
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --secondary-color: #3b82f6;
    --secondary-dark: #2563eb;
    --secondary-light: #60a5fa;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    /* Couleurs de fond */
    --white: #ffffff;
    --light-bg: #f8fafc;
    --light-gray: #e2e8f0;
    --dark-gray: #64748b;
    --text-dark: #1e293b;
    
    /* Couleurs de développement */
    --development-color: #fd7e14;
    --development-hover: #e55a00;
    --development-bg: #fff7ed;
    
    /* Effets */
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.2s ease;
}

/* Styles généraux */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Header - Design épuré */
.main-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 2rem 0;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.main-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Layout de la page avec sidebar */
.page-layout {
    display: flex;
    max-width: 1400px;
    margin: 2rem auto;
    gap: 2rem;
    padding: 0 2rem;
}

/* Sidebar */
.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--light-gray);
    height: fit-content;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
    background: var(--light-bg);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.sidebar-header h3 {
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.sidebar-content {
    padding: 1rem;
}

.sidebar-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.sidebar-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* Main Content */
.main-content {
    flex: 1;
    margin: 0;
    padding: 0;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Module Cards - Design épuré */
.module-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--light-gray);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.module-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.module-card h2 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.module-card p {
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.module-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: inline-block;
    padding: 0.75rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
}

/* Development Cards */
.module-card.development {
    border-color: var(--development-color);
    background: var(--white);
    opacity: 0.9;
    position: relative;
}

.module-card.development:hover {
    border-color: var(--development-hover);
    opacity: 1;
}

.module-card.development .module-icon {
    background: var(--development-color);
}

.module-card.development h2 {
    color: var(--development-color);
}

.development-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--development-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}

/* Footer discret */
.main-footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.main-footer .discrete {
    color: var(--dark-gray);
    font-size: 0.875rem;
    opacity: 0.6;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header h1 {
        font-size: 2rem;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .module-card {
        padding: 1rem;
    }
}

/* Module specific styles */
.module-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.module-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow);
}

/* Buttons */
.btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--secondary-color);
}

.btn-primary:hover {
    background: var(--secondary-dark);
}

.btn-secondary {
    background: var(--medium-gray);
}

.btn-secondary:hover {
    background: var(--dark-gray);
}

.btn-success {
    background: var(--success-color);
}

.btn-warning {
    background: var(--warning-color);
}

.btn-danger {
    background: var(--accent-color);
}

/* Form elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Status indicators */
.status-normal {
    background: var(--success-color);
    color: var(--white);
}

.status-anomaly {
    background: var(--accent-color);
    color: var(--white);
}

.status-warning {
    background: var(--warning-color);
    color: var(--white);
}

/* Navigation */
.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1rem;
}

.nav-back:hover {
    color: var(--secondary-color);
}

/* Results area */
.results-area {
    background: var(--light-gray);
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
    min-height: 200px;
}

.results-area:empty::before {
    content: "Aucun résultat généré";
    color: var(--dark-gray);
    font-style: italic;
}

/* History sidebar */
.history-sidebar {
    background: var(--white);
    border-left: 2px solid var(--medium-gray);
    padding: 1rem;
    max-height: 100vh;
    overflow-y: auto;
}

.history-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--light-gray);
    cursor: pointer;
    transition: var(--transition);
}

.history-item:hover {
    background: var(--light-gray);
}

.history-item:last-child {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header h1 {
        font-size: 2rem;
    }
    
    .page-layout {
        flex-direction: column;
        padding: 1rem;
    }
    
    .sidebar {
        width: 100%;
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
