:root {
    --primary: #14b8a6;      /* Teal comme sur l'image */
    --dark: #1e2937;
    --darker: #0f172a;
    --card: #334155;
    --text: #e2e8f0;
    --light-text: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--darker);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: 260px;
    background: var(--dark);
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #475569;
}

.logo {
    padding: 10px 25px 25px;
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.logo span {
    color: var(--primary);
}

nav a {
    display: flex;
    align-items: center;
    padding: 13px 25px;
    color: var(--light-text);
    text-decoration: none;
    font-size: 15.5px;
    transition: all 0.3s;
}

nav a:hover,
nav a.active {
    background: rgba(20, 184, 166, 0.2);
    color: white;
    border-left: 4px solid var(--primary);
}

nav a i {
    margin-right: 12px;
    width: 20px;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    flex: 1;
    padding: 20px 30px;
    overflow-y: auto;
    background: linear-gradient(to bottom, #0f172a, #1e2937);
}

/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-bar {
    flex: 1;
    max-width: 420px;
    background: #334155;
    border-radius: 50px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #475569;
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    width: 100%;
    font-size: 15px;
}

.new-task-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

/* Greeting */
.greeting {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 35px;
    color: white;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card);
    border: 1px solid #475569;
    border-radius: 16px;
    padding: 22px 20px;
    text-align: center;
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.stat-card h3 {
    color: var(--light-text);
    font-size: 15px;
    margin-bottom: 10px;
    font-weight: 500;
}

.number {
    font-size: 42px;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
}

.stat-card small {
    color: var(--primary);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .main-content {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
/* ==================== GRAPHIQUE - VERSION PETITE ==================== */
.chart-panel {
    background: var(--card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #475569;
    height: fit-content;
    max-height: 320px;           /* Limite la hauteur totale */
}

.chart-panel h3 {
    margin-bottom: 12px;
    font-size: 17px;
    color: white;
}

/* LE GRAPH DEVENU PETIT */
#statsChart {
    width: 100% !important;
    height: 180px !important;     /* ← Taille réduite (tu peux mettre 160px ou 150px) */
    max-height: 180px;
}

/* Option encore plus petit */
@media (max-width: 768px) {
    #statsChart {
        height: 150px !important;
    }
}
/* ==================== DEVICE VIEWER (comme dans la vidéo) ==================== */
.device-viewer {
    display: flex;
    background: #1e2937;
    border: 1px solid #475569;
    border-radius: 50px;
    padding: 6px;
    gap: 4px;
}

.device-btn {
    padding: 9px 20px;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.device-btn:hover {
    color: white;
    background: rgba(255,255,255,0.05);
}

.device-btn.active {
    background: #14b8a6;
    color: white;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4);
}

/* ==================== MAIN CONTENT - CHANGEMENT DE TAILLE ==================== */
.main-content {
    flex: 1;
    padding: 25px 30px;
    transition: all 0.4s ease;
    background: #0f172a;
}

/* Vue PC (normal) */
.main-content.desktop-view {
    max-width: none;
    margin: 0;
    border: none;
    border-radius: 0;
}

/* Vue Tablette */
.main-content.tablet-view {
    max-width: 850px;
    margin: 20px auto;
    border: 16px solid #1e2937;
    border-radius: 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

/* Vue Mobile */
.main-content.mobile-view {
    max-width: 420px;
    margin: 30px auto;
    border: 18px solid #1e2937;
    border-radius: 45px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

/* Graphique toujours petit */
#statsChart {
    width: 100% !important;
    height: 190px !important;
}
.page-title {
    font-size: 28px;
    margin-bottom: 25px;
    color: white;
}

.panel {
    background: #334155;
    padding: 25px;
    border-radius: 16px;
    border: 1px solid #475569;
    margin-bottom: 20px;
}

/* Sidebar active state */
nav a.active {
    background: rgba(20, 184, 166, 0.2);
    color: white;
    border-left: 4px solid #14b8a6;
}
/* ==================== PAGE TÂCHES ==================== */
.tasks-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 25px;
    background: #1e2937;
    padding: 15px;
    border-radius: 12px;
}

.tasks-toolbar input, .tasks-toolbar select {
    padding: 10px 14px;
    border: 1px solid #475569;
    background: #334155;
    color: white;
    border-radius: 8px;
}

.view-modes button {
    padding: 10px;
    background: #334155;
    border: none;
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
}

.view-modes button.active {
    background: #14b8a6;
    color: white;
}

.export-buttons button {
    padding: 10px 16px;
    margin-left: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1e2937;
    padding: 25px;
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    color: white;
}

.modal-content input, .modal-content select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: #334155;
    border: 1px solid #475569;
    color: white;
    border-radius: 8px;
}

.modal-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.save-btn {
    background: #14b8a6;
    color: white;
}

/* Tableau */
.table-view table {
    width: 100%;
    border-collapse: collapse;
    background: #1e2937;
    border-radius: 12px;
    overflow: hidden;
}

.table-view th, .table-view td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid #475569;
}

.table-view th {
    background: #334155;
}

/* Cartes */
.task-card {
    background: #334155;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 12px;
}

/* Priorités */
.priority.urgent { color: #ef4444; font-weight: bold; }
.priority.haute { color: #f59e0b; font-weight: bold; }
.priority.moyenne { color: #eab308; }
.priority.faible { color: #22c55e; }