/* Styles Généraux */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #EFF4FF;
    transition: background-color 0.3s, color 0.3s;
}

.dark-mode {
    background-color: #2c3e50;
    color: white;
}

h1 {
    color: #2c3e50;
    margin-left: 20px;
}

/* Fil d'Ariane */
.breadcrumb {
    font-size: 14px;
    margin-left: 20px;
    margin-bottom: 20px;
}

.breadcrumb a {
    text-decoration: none;
    color: #1a2a6c;
}

.breadcrumb a:hover {
    text-decoration: underline;
    color: #1ABC9C;
}

.breadcrumb span {
    color: #7f8c8d;
}

/* SIDEBAR */
.sidebar {
    width: 250px;
    background-color: #182E68;
    color: white;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 20px;
    border-radius: 0 10px 10px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar h2 {
    font-size: 20px;
    display: flex;
    align-items: center;
}

.sidebar h2 img {
    margin-right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin: 20px 0;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    display: flex;
    align-items: center;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.sidebar ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
    padding: 5px;
}

/* TOGGLE */
.toggle {
    position: relative;
    width: 80px;
    height: 40px;
    background-color: #ccc;
    border-radius: 40px;
    cursor: pointer;
    align-self: flex-start;
    margin-top: 20px;
}

.toggle .circle {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 36px;
    height: 36px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle.active .circle {
    transform: translateX(40px);
}

.toggle .sun {
    position: absolute;
    font-size: 16px;
    color: white;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
}

.toggle .moon {
    position: absolute;
    font-size: 16px;
    color: white;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

/* MAIN CONTENT */
main {
    margin-left: 350px;
    padding: 20px;
}

/* COURSE GRID */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
}

.course-block {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

.course-block:hover {
    transform: translateY(-5px);
}

.course-block img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.course-title {
    background: #1a2a6c;
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: 14px;
}

/* HEADER */
.header-right {
    display: flex;
    align-items: center;
    background-color: #FFFFFF;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-left: 250px;
    width: calc(100% - 250px);
    justify-content: flex-end;
    gap: 20px;
}

/* SEARCH BAR */
.search-container {
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 270px;
}

.search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 5px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #1ABC9C;
}

.search-btn {
    background-color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #182E68;
}

/* USER ACTIONS */
.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #4A5568;
}

.action-btn:hover {
    color: #1ABC9C;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-pic {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-image: url('profil.jpg');
    background-size: cover;
    background-position: center;
}

.user-name {
    font-size: 14px;
    color: #4A5568;
    cursor: pointer;
}

.user-name:hover {
    color: #1ABC9C;
}
