/* Style global Moodle (Theme Boost / Classic) */
:root {
    --moodle-blue: #0f6cbf;
    --moodle-dark-blue: #064580;
    --moodle-bg: #f4f5f7;
    --moodle-sidebar-bg: #ffffff;
    --moodle-text: #333333;
    --moodle-border: #dee2e6;
    --moodle-alert-info-bg: #e7f3fe;
    --moodle-alert-info-border: #bfe0fe;
    --moodle-alert-info-text: #0c5460;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--moodle-bg);
    color: var(--moodle-text);
}

/* Navbar top */
.moodle-navbar {
    height: 60px;
    background-color: var(--moodle-blue);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-toggle-sidebar {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.site-name {
    font-size: 1.25rem;
    font-weight: 600;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Structure principale avec Sidebar */
.moodle-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

.moodle-sidebar {
    width: 250px;
    background-color: var(--moodle-sidebar-bg);
    border-right: 1px solid var(--moodle-border);
    transition: margin-left 0.3s ease;
}

.moodle-sidebar.collapsed {
    margin-left: -250px;
}

.moodle-sidebar nav ul {
    list-style: none;
    padding-top: 1rem;
}

.moodle-sidebar nav li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #495057;
    text-decoration: none;
    font-size: 0.95rem;
    border-left: 4px solid transparent;
}

.moodle-sidebar nav li.active a,
.moodle-sidebar nav li a:hover {
    background-color: #e9ecef;
    color: var(--moodle-blue);
    border-left-color: var(--moodle-blue);
}

/* Contenu du cours */
.moodle-main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
}

.course-header {
    margin-bottom: 1.5rem;
    background-color: white;
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--moodle-border);
}

.breadcrumb {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: var(--moodle-blue);
    text-decoration: none;
}

.course-header h1 {
    font-size: 1.75rem;
    color: #1d2125;
}

/* Notifications Moodle */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.alert-info {
    background-color: var(--moodle-alert-info-bg);
    border: 1px solid var(--moodle-alert-info-border);
    color: var(--moodle-alert-info-text);
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.alert-icon {
    font-size: 1.2rem;
    margin-top: 2px;
}

/* Sections du cours */
.moodle-section {
    background: white;
    border: 1px solid var(--moodle-border);
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.moodle-section h2 {
    font-size: 1.25rem;
    color: #1d2125;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--moodle-bg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Grille de cartes pour le planning */
.moodle-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.moodle-card {
    background: white;
    border: 1px solid var(--moodle-border);
    border-radius: 6px;
    padding: 1rem;
    transition: box-shadow 0.2s ease;
}

.moodle-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.moodle-card.past {
    opacity: 0.6;
    background-color: #f8f9fa;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.badge {
    background-color: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.date-tag {
    font-size: 0.75rem;
    color: #6c757d;
}

.card-body {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.activity-icon {
    color: var(--moodle-blue);
    margin-top: 3px;
}

/* Image et section calendrier */
.calendar-wrapper {
    text-align: center;
}

.section-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.calendar-img {
    max-width: 100%;
    width: 450px;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--moodle-border);
}