:root {
    --primary-color: #0d6efd;
    --primary-dark: #0a58ca;
    --primary-light: #e6efff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --bg-light: #f8f9fa;
    --border-radius: 10px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --font-family: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: var(--dark-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
    background: linear-gradient(to right, #ffffff, #f8f9fa);
}

.navbar-brand {
    font-weight: 700;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
}

.navbar-brand i {
    font-size: 1.4rem;
    margin-right: 0.5rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.6rem 1.2rem !important;
    transition: var(--transition);
    border-radius: 5px;
    margin: 0 0.2rem;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color) !important;
}

.nav-link.active {
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

/* Notification Badge */
.notification-badge {
    display: inline-block;
    min-width: 18px;
    padding: 3px 5px;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    background-color: var(--danger-color);
    border-radius: 10px;
    margin-left: 5px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

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

.card-header {
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: white;
    font-weight: 600;
    border-bottom: none;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
}

.card-header i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: var(--light-color);
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Theme-colored cards */
.card.card-primary .card-header {
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
}

.card.card-success .card-header {
    background: linear-gradient(to right, var(--success-color), #218838);
}

.card.card-warning .card-header {
    background: linear-gradient(to right, var(--warning-color), #e0a800);
    color: #212529;
}

.card.card-danger .card-header {
    background: linear-gradient(to right, var(--danger-color), #bd2130);
}

.card.card-info .card-header {
    background: linear-gradient(to right, var(--info-color), #0097b2);
}

/* Forms */
.form-control {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-select {
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.25);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.25);
}

/* Profile */
.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    box-shadow: 0 0 15px rgba(13, 110, 253, 0.3);
    transition: transform 0.3s ease;
    cursor: pointer;
    border: 3px solid white;
    position: relative;
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-pic:hover {
    transform: scale(1.05);
}

.profile-pic::after {
    content: '\f030';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-pic:hover::after {
    opacity: 1;
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
    padding: 1rem 1.5rem;
}

.alert i {
    margin-right: 0.5rem;
}

.alert-dismissible .btn-close {
    padding: 1.25rem;
}

/* Login Form */
.login-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-top: 5rem;
}

.login-logo {
    margin-bottom: 2rem;
    text-align: center;
}

.login-logo img {
    max-width: 200px;
    height: auto;
}

/* Pastille indicators */
.pastille {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

.pastille-NAOK { 
    background-color: var(--success-color); 
}

.pastille-NAEC { 
    background-color: var(--warning-color); 
}

.pastille-NAKO { 
    background-color: var(--danger-color); 
}

/* Lesson cards */
.lesson-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1.5rem;
}

.lesson-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.lesson-card.NAOK {
    border-left: 5px solid var(--success-color);
}

.lesson-card.NAEC {
    border-left: 5px solid var(--warning-color);
}

.lesson-card.NAKO {
    border-left: 5px solid var(--danger-color);
}

/* Stats container */
.stats-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    padding: 1.2rem;
    text-align: center;
    border-radius: var(--border-radius);
    background-color: var(--bg-light);
    transition: var(--transition);
    height: 100%;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-count {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* Messagerie */
.message-container {
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 1rem;
}

.message-content {
    padding: 15px;
    border-radius: 15px;
    position: relative;
    max-width: 80%;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.sent {
    background-color: var(--primary-light);
    margin-left: auto;
    border-bottom-right-radius: 0;
}

.received {
    background-color: white;
    margin-right: auto;
    border-bottom-left-radius: 0;
}

/* Planning styles */
.planning-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--info-color) 100%);
    color: white;
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    border-radius: var(--border-radius);
}

.creneau-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.creneau-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.creneau-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.creneau-heure {
    font-weight: 600;
    color: #495057;
    font-size: 1.1rem;
}

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

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

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h4 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem 0;
    margin-top: 3rem;
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .profile-pic {
        width: 120px;
        height: 120px;
    }
    
    .navbar-brand span {
        display: none;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem !important;
        margin: 0.1rem;
    }
    
    .creneau-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .creneau-heure {
        margin-bottom: 0.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .stat-count {
        font-size: 1.5rem;
    }
}

/* Font import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');