/* Global */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    margin: 0;
}

/* Header */
.topbar {
    background: #1e293b;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar .logo {
    display: flex;
    align-items: center;
}
.topbar .logo img {
    height: 35px;
    margin-right: 10px;
}
.topbar nav a {
    color: #e2e8f0;
    margin-left: 20px;
    text-decoration: none;
    font-weight: 500;
}
.topbar nav a:hover {
    color: #38bdf8;
}
.btn-logout {
    color: #f87171 !important;
}
.btn-logout:hover {
    color: #ef4444 !important;
}

/* Login page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80vh;
}
.login-card {
    background: #1e293b;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    text-align: center;
    width: 350px;
}
.login-card .login-logo {
    height: 60px;
    margin-bottom: 15px;
}
.login-card h2 {
    margin-bottom: 20px;
    color: #38bdf8;
}
.login-card input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: #0f172a;
    border: 1px solid #475569;
    border-radius: 8px;
    color: white;
}
.login-card input:focus {
    border-color: #38bdf8;
    outline: none;
}
.btn-primary {
    background: #38bdf8;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    width: 100%;
    font-size: 1em;
    cursor: pointer;
}
.btn-primary:hover {
    background: #0ea5e9;
}

/* Dashboard */
.dashboard {
    padding: 40px;
}
.dashboard h1 {
    text-align: center;
    color: #38bdf8;
    margin-bottom: 30px;
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.card {
    background: #1e293b;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.4);
}
.card h3 {
    color: #38bdf8;
    margin-bottom: 15px;
}
.card ul {
    list-style: none;
    padding: 0;
}
.card ul li {
    padding: 5px 0;
    border-bottom: 1px solid #475569;
}
.card ul li:last-child {
    border-bottom: none;
}

/* Footer */
footer {
    text-align: center;
    padding: 15px;
    color: #64748b;
    margin-top: 40px;
}

.kpi-grid {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}
.kpi-card {
    flex: 1;
    padding: 20px;
    border-radius: 10px;
    color: white;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
.kpi-orange { background: #f59e0b; }
.kpi-green { background: #22c55e; }

.section {
    margin-top: 40px;
}
.section h2 {
    margin-bottom: 15px;
    color: #38bdf8;
}

.project-list {
    list-style: none;
    padding: 0;
}
.project-list li {
    background: #1e293b;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.project-actions a {
    margin-left: 8px;
}
.btn-info { background: #0ea5e9; }
.btn-success { background: #22c55e; }
.btn-warning { background: #f59e0b; }

.form-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 75vh;
    background: #0f172a;
}

.form-card {
    background: #1e293b;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    max-width: 500px;
    width: 100%;
    text-align: left;
}

.form-card h2 {
    color: #38bdf8;
    margin-bottom: 10px;
}

.form-subtitle {
    color: #94a3b8;
    margin-bottom: 25px;
    font-size: 0.95em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #e2e8f0;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: #0f172a;
    border: 1px solid #475569;
    color: #f1f5f9;
    border-radius: 8px;
    font-size: 1em;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #38bdf8;
    outline: none;
    background: #1e293b;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.btn-full {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
}

/* Boutons génériques */
.btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    text-decoration: none;
    color: #fff !important;
    background: #475569;
    transition: background 0.2s ease;
}

.btn:hover {
    opacity: 0.9;
}

/* Tailles */
.btn-small {
    padding: 6px 12px;
    font-size: 0.85em;
}

/* Variantes */
.btn-primary { background: #3b82f6; }       /* Bleu */
.btn-secondary { background: #64748b; }     /* Gris */
.btn-info { background: #0ea5e9; }          /* Cyan */
.btn-success { background: #22c55e; }       /* Vert */
.btn-warning { background: #f59e0b; }       /* Orange */
.btn-danger { background: #dc2626; }        /* Rouge */

/* Effet au survol */
.btn-primary:hover { background: #2563eb; }
.btn-secondary:hover { background: #475569; }
.btn-info:hover { background: #0284c7; }
.btn-success:hover { background: #16a34a; }
.btn-warning:hover { background: #d97706; }
.btn-danger:hover { background: #b91c1c; }
