/* style.css - Feuille de style moderne - Thème bleu/gris */

/* Variables CSS - Palette moderne bleu/gris */
:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    min-height: 100vh;
}

/* Conteneur principal */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Header moderne */
header {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-900) 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-400), var(--primary-200));
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.025em;
}

header h1 i {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.95rem;
}

.user-info span {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    backdrop-filter: blur(10px);
}

.btn-logout {
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid transparent;
}

.btn-logout:hover {
    background: var(--danger);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Cartes modernes */
.card {
    background: white;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card h2, .card h3 {
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-100);
    font-weight: 700;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
}

.card h2 i, .card h3 i {
    color: var(--primary-600);
}

/* Layout principal */
.main-content {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Statistiques modernes */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, white 0%, var(--gray-50) 100%);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-300));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.stat-card p {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-700);
    margin: 0;
}

/* Formulaires modernes */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
    letter-spacing: 0.025em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: var(--transition);
    background: white;
    color: var(--gray-800);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Boutons modernes */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: white;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.025em;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-small {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--gray-300);
}

.btn-small:hover {
    background: var(--gray-200);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.btn-block {
    display: block;
    width: 100%;
    padding: 1rem;
}

/* Tâches - Design moderne */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.task-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.task-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--gray-300);
}

.task-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.task-card.priority-critique::before { background: linear-gradient(to bottom, #ef4444, #dc2626); }
.task-card.priority-haute::before { background: linear-gradient(to bottom, #f59e0b, #d97706); }
.task-card.priority-moyenne::before { background: linear-gradient(to bottom, #10b981, #059669); }
.task-card.priority-basse::before { background: linear-gradient(to bottom, #3b82f6, #2563eb); }

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.task-header h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    flex: 1;
    line-height: 1.4;
}

.task-priority {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.task-card.priority-critique .task-priority { 
    background: rgba(239, 68, 68, 0.1); 
    color: var(--danger); 
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.task-card.priority-haute .task-priority { 
    background: rgba(245, 158, 11, 0.1); 
    color: #d97706; 
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.task-card.priority-moyenne .task-priority { 
    background: rgba(16, 185, 129, 0.1); 
    color: var(--success); 
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.task-card.priority-basse .task-priority { 
    background: rgba(59, 130, 246, 0.1); 
    color: var(--primary-600); 
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.task-info {
    margin-bottom: 1.25rem;
}

.task-info p {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.task-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--gray-100);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
}

.task-meta i {
    font-size: 0.9rem;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    gap: 1rem;
}

.status-form {
    flex: 1;
    min-width: 150px;
}

.status-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    border: 2px solid var(--gray-300);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    background: white;
}

.status-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.status-select.status-à-faire { color: var(--gray-700); border-color: var(--gray-400); }
.status-select.status-en-cours { color: var(--primary-700); border-color: var(--primary-400); }
.status-select.status-terminé { color: var(--success); border-color: var(--success); }

.task-actions {
    display: flex;
    gap: 0.5rem;
}

/* Projets */
.projects-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-item {
    background: linear-gradient(135deg, white 0%, var(--gray-50) 100%);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-500);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.project-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-300);
}

.project-item h4 {
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.project-item p {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.project-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--gray-100);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
}

/* Page de connexion moderne */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--gray-100) 100%);
    padding: 1.5rem;
}

.login-container {
    width: 100%;
    max-width: 440px;
}

.login-card {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-300));
}

.login-card h1 {
    color: var(--gray-900);
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: -0.025em;
}

.login-card > p {
    color: var(--gray-600);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.login-info {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--gray-200);
    text-align: left;
}

.login-info p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.login-info code {
    background: var(--gray-100);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    color: var(--primary-700);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--gray-200);
    color: var(--gray-500);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Messages vides */
.empty-message {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-400);
    font-style: italic;
    font-size: 1.1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 2px dashed var(--gray-300);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: fadeIn 0.5s ease-out;
}

/* Badge de test data */
.test-data-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    transition: var(--transition);
}

.test-data-badge:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-xl);
}

/* Responsive */
@media (max-width: 1200px) {
    .container {
        padding: 1.25rem;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .user-info {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .user-info span {
        width: 100%;
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tasks-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-list {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .stats {
        grid-template-columns: 1fr;
    }
    
    .task-footer {
        flex-direction: column;
        gap: 1rem;
    }
    
    .status-form {
        width: 100%;
    }
    
    .task-actions {
        width: 100%;
        justify-content: center;
    }
}