/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #f5f6fa;
    color: #333;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e88e5;
    padding: 10px 20px;
    color: white;
    flex-wrap: wrap;
}

.navbar .logo {
    font-size: 1.8em;
    font-weight: bold;
}

.navbar .nav-links {
    display: flex;
    list-style: none;
}

.navbar .nav-links li {
    margin-left: 15px;
}

.navbar .nav-links a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    transition: 0.3s;
}

.navbar .nav-links a:hover {
    background: #1565c0;
}

/* Dashboard Container */
.dashboard-container {
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
}

/* Welcome Card */
.welcome-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* Stats Cards */
.stats-cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stats-cards .card {
    flex: 1;
    min-width: 200px;
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    text-align: center;
    transition: 0.3s;
}

.stats-cards .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.stats-cards .card h3 {
    margin-bottom: 10px;
    color: #1e88e5;
}

.stats-cards .card p {
    font-size: 1.5em;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-cards {
        flex-direction: column;
    }
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar .nav-links {
        margin-top: 10px;
        flex-direction: column;
        width: 100%;
    }
    .navbar .nav-links li {
        margin-left: 0;
        margin-bottom: 10px;
    }
}

/* Grid des sujets */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.subject-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    text-align: center;
    transition: 0.3s;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.subject-card h3 {
    color: #1e88e5;
    margin-bottom: 10px;
}

.subject-card p {
    margin: 5px 0;
}

.subject-card a {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 12px;
    background: #1e88e5;
    color: white;
    border-radius: 5px;
    text-decoration: none;
}

.subject-card a:hover {
    background: #1565c0;
}

/* Formulaire Upload */
form input, form select, form button {
    padding: 10px;
    margin-bottom: 15px;
    width: 100%;
    max-width: 400px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

form button {
    background: #1e88e5;
    color: white;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

form button:hover {
    background: #1565c0;
}

/* === Auth Pages === */
.auth-container {
    background: white;
    max-width: 400px;
    margin: 80px auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.auth-container h2 {
    margin-bottom: 25px;
    color: #1e88e5;
}

.auth-container input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.auth-container button {
    width: 100%;
    padding: 12px;
    background: #1e88e5;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: 0.3s;
}

.auth-container button:hover {
    background: #1565c0;
}

.auth-container p {
    margin-top: 15px;
}

.auth-container a {
    color: #1e88e5;
    font-weight: bold;
}

.auth-container a:hover {
    text-decoration: underline;
}

/* Messages success / error */
.success {
    color: green;
    margin-bottom: 15px;
}

.error {
    color: red;
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 500px) {
    .auth-container {
        margin: 40px 20px;
        padding: 20px;
    }
}