/* Variables CSS - Charte Inodesign */
:root {
    --primary-blue: #1e3d59;
    --accent-orange: #f5a623;
    --tech-cyan: #00bcd4;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --dark-gray: #343a40;
    --white: #ffffff;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--tech-cyan) 100%);
    min-height: 100vh;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* Page de connexion */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 40px;
    animation: fadeIn 0.8s ease-out;
}

.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo-text {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 2rem;
}

.logo-accent {
    color: var(--accent-orange);
    font-weight: 300;
    font-size: 2rem;
}

.logo-section h2 {
    color: var(--tech-cyan);
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 10px;
}

.tagline {
    color: var(--medium-gray);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Onglets d'authentification */
.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--light-gray);
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--medium-gray);
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--primary-blue);
    border-bottom-color: var(--accent-orange);
}

.tab-btn:hover {
    color: var(--primary-blue);
}

/* Formulaires */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark-gray);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--tech-cyan);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--tech-cyan));
    color: var(--white);
    width: 100%;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(30, 61, 89, 0.3);
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--dark-gray);
    border: 2px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: var(--tech-cyan);
    color: var(--primary-blue);
}

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

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

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

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Messages */
.message {
    padding: 12px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Section d'informations */
.info-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.info-section h3 {
    color: var(--primary-blue);
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-section p {
    color: var(--medium-gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* Layout principal */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: var(--white);
    box-shadow: var(--box-shadow);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.header-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background: var(--light-gray);
    color: var(--primary-blue);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--medium-gray);
    font-size: 0.9rem;
}

/* Contenu principal */
.main-content {
    flex: 1;
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.page-header {
    margin-bottom: 30px;
}

.page-title {
    color: var(--primary-blue);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.page-subtitle {
    color: var(--medium-gray);
    font-size: 1.1rem;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.stat-icon.projects { color: var(--primary-blue); }
.stat-icon.ideas { color: var(--accent-orange); }
.stat-icon.progress { color: var(--tech-cyan); }
.stat-icon.deadline { color: var(--warning); }

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--medium-gray);
    font-size: 1rem;
    font-weight: 500;
}

/* Cartes de projet */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.project-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-blue), var(--tech-cyan));
    color: var(--white);
}

.project-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.project-category {
    font-size: 0.9rem;
    opacity: 0.9;
}

.project-body {
    padding: 20px;
}

.project-description {
    color: var(--medium-gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.project-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-draft {
    background: #fff3cd;
    color: #856404;
}

.status-submitted {
    background: #d1ecf1;
    color: #0c5460;
}

.status-reviewed {
    background: #d4edda;
    color: #155724;
}

.project-date {
    color: var(--medium-gray);
    font-size: 0.8rem;
}

.project-actions {
    display: flex;
    gap: 10px;
}

/* Formulaire multi-étapes */
.form-wizard {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.wizard-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--tech-cyan));
    color: var(--white);
    padding: 20px;
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.wizard-step {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.wizard-step.active {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.wizard-step.completed {
    background: rgba(245, 166, 35, 0.3);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    margin-bottom: 5px;
    font-weight: 600;
}

.step-number.active {
    background: var(--accent-orange);
}

.step-number.completed {
    background: var(--success);
}

.wizard-content {
    padding: 30px;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.step-title {
    color: var(--primary-blue);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.step-description {
    color: var(--medium-gray);
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-section {
    background: var(--light-gray);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.form-section h4 {
    color: var(--primary-blue);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-top: 1px solid #dee2e6;
    background: var(--light-gray);
}

.auto-save-status {
    color: var(--medium-gray);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.save-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Tables */
.data-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.data-table th {
    background: var(--light-gray);
    font-weight: 600;
    color: var(--dark-gray);
}

.data-table tr:hover {
    background: var(--light-gray);
}

/* Livret imprimable */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .no-print {
        display: none !important;
    }
    
    .livret-container {
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
    }
    
    .page-break {
        page-break-before: always;
    }
}

.livret-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.livret-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--tech-cyan));
    color: var(--white);
    padding: 40px;
    text-align: center;
}

.livret-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.livret-header h2 {
    font-size: 1.5rem;
    opacity: 0.9;
    font-weight: 300;
}

.livret-content {
    padding: 40px;
}

.livret-section {
    margin-bottom: 30px;
}

.livret-section h3 {
    color: var(--primary-blue);
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--accent-orange);
}

.criteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.criteria-item {
    background: var(--light-gray);
    padding: 20px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--tech-cyan);
}

.criteria-item h4 {
    color: var(--primary-blue);
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 15px;
    }
    
    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .wizard-steps {
        flex-direction: column;
        gap: 10px;
    }
    
    .wizard-navigation {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .criteria-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo-text,
    .logo-accent {
        font-size: 1.5rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .wizard-content {
        padding: 20px;
    }
}

/* Loading states */
.loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

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

.notification.error {
    background: var(--danger);
    color: var(--white);
}

.notification.warning {
    background: var(--warning);
    color: var(--dark-gray);
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue), var(--tech-cyan));
    transition: width 0.3s ease;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.gap-20 { gap: 20px; }
.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }