@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300..900;1,300..900&display=swap');


:root {
    --second-bg-color: #eaeaea;
    --text-color: #000000;
    --bg-color: #fff;

    --orange: #FAE0C1;
    --blue: #c1dcf3;
    --green: #D1E4E2;
    --purple: #D7CAE8;
    --yellow: #FFE6A6;
    --pink: #FFD6EA;

    --vibrant-red: #FF6347;
    --vibrant-green: #93D98F;
    --vibrant-orange: #FFB85B;
}

.bg-green {
    background-color: var(--green);
}

.bg-blue {
    background-color: var(--blue);
}

.bg-orange {
    background-color: var(--orange);
}

.bg-purple {
    background-color: var(--purple);
}

.bg-yellow {
    background-color: var(--yellow);
}

.bg-pink {
    background-color: var(--pink);
}

/* global styles */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--second-bg-color);
    color: var(--text-color);
}

/* body scrollbar */

body::-webkit-scrollbar,
body::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-track {
    width: 5px !important;
}

body::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1) !important;
    border-radius: 5px !important;
}

body::-webkit-scrollbar-track {
    background-color: transparent !important;
}


h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 0;
}

h1 {
    font-size: 1.5rem;
}

h2 {
    font-size: 1.3rem;
}

select,
option,
button,
input,
textarea {
    font-family: 'DM Sans', sans-serif;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 0.9rem;
}

a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}


button,
.button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
    width: fit-content;
    cursor: pointer;
    background-color: black;
    border: none;
    color: white;
    padding: 10px 20px;
    font-family: 'DM Sans', sans-serif;
    border-radius: 50px;
}

/* disabled button */
button:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

.secondary-button {
    background-color: var(--second-bg-color);
    color: var(--text-color);
}

/* input type checkbox */

input[type="checkbox"] {
    width: fit-content;
}

input,
option,
select,
textarea {
    padding: 10px;
    resize: vertical;
    border: 1px solid #ccc;
    border-radius: 5px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

header a {
    cursor: pointer;
}


nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Styles de la modal */
.notificationModal {
    display: none;
    /* Cachée par défaut */
    position: fixed;
    z-index: 1000;
    right: 10px;
    top: 60px;
    width: 400px;
    height: fit-content;
    overflow: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Contenu de la modal */
.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: left;
    position: relative;
}

/* Bouton de fermeture */
.modal-content .close {
    color: black;
    font-size: 20px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
}


/* container  */

.container {
    height: 100vh;
    display: flex;
}

main {
    width: calc(100% - 250px);
    position: relative;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
}


/* sidebar */

.sidebar {
    position: relative;
    display: flex;
    flex-direction: column;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background-color: var(--bg-color);
    color: white;
    padding: 15px;
    gap: 5px;
}

.sidebar .closebtn {
    display: none;
    position: absolute;
    /* display: flex; */
    background-color: var(--second-bg-color);
    align-items: center;
    border-radius: 5px;
    justify-content: center;
    top: 10px;
    height: auto;
    width: auto;
    right: 10px;
    cursor: pointer;
    padding: 10px;
    color: var(--text-color);
    font-size: 2rem;
}

.sidebar svg {
    stroke: var(--text-color);
    width: 1rem;
    height: auto;
}

.sidebar .closebtn svg {
    stroke: var(--text-color);
    height: 1rem;
    width: auto
}

.sidebar .logo {
    width: 90%;
    margin: 1rem auto 2rem;
    height: auto;
    max-width: 200px;
}

.sidebar .logo img {
    width: 100%;
    height: auto;
}

.sidebardown {
    margin-top: auto;
    display: flex;
}

.sidebardown svg {
    fill: var(--vibrant-red);
}




.sidebar .buttonlink,
.sidebardown .buttonlink {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 50px;
    color: var(--text-color);
    opacity: 0.7;
}


.sidebar .buttonlink svg {
    stroke: var(--text-color);
}

.sidebar .buttonlink:hover {
    opacity: 1;
}

.sidebar .buttonlink.active {
    opacity: 1;
    color: var(--bg-color);
    background-color: var(--text-color);
}


.sidebar .buttonlink.active svg {
    stroke: var(--bg-color);
}

.sidebar .buttonlink.active svg path {
    fill: var(--bg-color);
}

.red {
    color: var(--vibrant-red) !important;
}

.green {
    color: var(--vibrant-green) !important;
}

.orange {
    color: var(--vibrant-orange) !important;
}

.sidebar .buttonlink.red {
    opacity: 0.8;
}

.sidebar .buttonlink.red:hover {
    opacity: 1;
}

footer {
    padding-top: 20px;
    position: relative;
    bottom: 0;
    margin-top: auto;
    font-size: 0.7rem;
    opacity: 0.5;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.avatarxl {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto;
}

nav button {
    background-color: transparent;
    color: var(--text-color);
    padding: 0;
}

/* Section de connexion */
main.login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
}

.login-container {
    max-width: 360px;
    width: 100%;
}

h4 {
    font-weight: 400;
    text-align: start;
    margin-bottom: 20px;
    color: #777;
}

.logo {
    width: 200px;
    margin: 0 auto 20px;
}

/* Bulle erreur */

.error-message {
    position: fixed;
    top: -50px;
    /* Initialement hors de l'écran */
    left: 50%;
    transform: translateX(-50%);
    background-color: #f44336;
    /* Rouge pour signaler une erreur */
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    opacity: 0;
    transition: all 0.5s ease;
    /* Transition fluide pour entrée/sortie */
    z-index: 1000;
    /* Au-dessus des autres éléments */
}

.error-message.show {
    top: 20px;
    /* Descend dans la zone visible */
    opacity: 1;
    /* Rendu visible */
}


/* Formulaire */
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: start;
}

input {
    min-width: 100px;
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    outline: none;
    background-color: white;
}

input:focus {
    border-color: #666;
}


/* Container du mot de passe */
.password-container {
    display: flex;
    align-items: center;
    position: relative;
}

.password-container input {
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    cursor: pointer;
    color: #666;
}

/* Options et liens */
.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

.options label {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 5px;
    color: black;
}

input[type="checkbox"] {
    min-width: 0;
    width: fit-content !important;
}

.options .forgot-password {
    color: var(--vibrant-red);
    text-decoration: none;
}

.options .forgot-password:hover {
    text-decoration: underline;
}

.login footer {
    font-size: 0.8rem;
    color: #555;
    margin-top: 20px;
    text-align: center;
}

.login button {
    font-size: 0.9rem;
    margin: 0 auto;
    padding: 10px 110px;
    border-radius: 20px;
}






/* dashboard */

.dashboard_header {
    display: flex;
    justify-content: space-between;
    flex-direction: column;

    gap: 0.6rem;
    margin-bottom: 20px;
}

.dashboard_header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.dashboard_header h2 {
    opacity: 0.5;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 400;
}

.dashboard,
.planning {
    display: flex;
    gap: 20px;
}

.dashboard_left {
    width: 70%;
}

.row_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

.dashboard_grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    grid-template-areas:
        "case1 case1 case2 case2 case3 case3"
        "case4 case4 case4 case5 case5 case5";
    margin-bottom: 50px;
}

.dashboard_grid_teacher {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas:
        "case1 case2 case3";
    gap: 10px;
    margin-bottom: 50px;
    width: 100%;
}

.case {
    background-color: var(--bg-color);
    padding: 10px 15px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
    gap: 20px;
    min-height: 200px;
}

.case h5 {
    font-weight: 500;
}

.case .icon_button {
    position: absolute;
    top: 5px;
    right: 5px;
}

.case ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.case ul li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.case ul li strong {
    display: flex;
    gap: 5px;
    align-items: center;
}

/* media query 1200px */

@media (max-width: 1200px) {
    .case ul li {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
}

@media (max-width: 1024px) {
    .case ul li {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
}



.circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.circle.green,
.circle.justified {
    background-color: var(--vibrant-green);
}

.circle.red,
.circle.not_justified {
    background-color: var(--vibrant-red);
}

.circle.orange,
.circle.pending {
    background-color: var(--vibrant-orange);
}

.primary_button {
    background-color: var(--text-color);
    color: var(--bg-color);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 400;
    width: fit-content;
    display: block;
}

.opacity {
    opacity: 0.5;
}

.case1 {
    grid-area: case1;
    background-color: var(--pink);
}

.case2 {
    grid-area: case2;
}

.case3 {
    grid-area: case3;
}

.case4 {
    grid-area: case4;
}

.case5 {
    grid-area: case5;
}

.case .current_event {
    margin-top: auto;
}

.case .next_events .next_event {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.case .next_events .next_event .event_detail {
    display: flex;
    gap: 10px;
}


.case .next_events .next_event .circle {
    margin-top: 0.5rem;
}

.case .next_events .next_event .event_detail {
    text-transform: capitalize;
}

.case .assiduite {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.chartassiduite {
    width: fit-content;
    min-width: fit-content;
    min-height: 300px;
}

.case canvas {
    /* width: 300px !important; */
    width: 400px !important;
    max-height: 200px !important;
    margin: 20px;
}

.case .totalassiduite {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 15px;
    margin-left: auto;
}

.case .totalassiduite small {
    margin-bottom: 0.5rem;
}

.case .totalassiduite h1 {
    font-size: 2.25rem;
}

.no-content {
    margin-top: auto;
    opacity: 0.5;
}

.dashboard_right {
    width: 30%;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.dashboard_row {
    width: 100%;
}

.dashboard_row_content {
    display: flex;
    gap: 20px;
    overflow-x: scroll;
    padding-bottom: 20px;
}

/* scrollbar */

.dashboard_row_content::-webkit-scrollbar {
    height: 5px;
}

.dashboard_row_content::-webkit-scrollbar-thumb {
    background-color: #a9a9a9;
    /* Gris clair */
    border-radius: 5px;
    height: 5px;
}

.dashboard_row_content::-webkit-scrollbar-track {
    background-color: #d3d3d3;
    /* Gris foncé */
    height: 5px;
}

.widget_cours {
    padding: 20px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    min-width: 320px;
    position: relative;
    min-height: 150px;
}

.widget_cours .teacher {
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget_cours .teacher_avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.widget_cours .icon_button {
    position: absolute;
    top: 5px;
    right: 5px;
}

.icon_button {
    background-color: var(--text-color);
    color: var(--bg-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard_right_planning {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard_right_planning a {
    align-self: flex-end;
}

.today_planning {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: space-between;
}

.today_planning .course_item {
    background-color: var(--bg-color);
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 0.7rem;
    width: 100%;
}

/* first course_item bg pink */
.today_planning .course_item:nth-child(1) {
    background-color: var(--pink);
}

.today_planning .course_item:nth-child(2) {
    background-color: var(--blue);
}

.today_planning .course_item:nth-child(3) {
    background-color: var(--green);
}

.today_planning .course_item:nth-child(4) {
    background-color: var(--yellow);
}

.today_planning .course_item .event_title {
    font-weight: 500;
    margin-bottom: 5px;
}

.today_planning .course_item .event_detail {
    text-align: end;
    opacity: 0.5;
}


.backofficemenu {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 20px;
}


/* responsive */

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .dashboard {
        flex-direction: column;
        gap: 20px;
    }

    .dashboard_grid {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "case1 case2"
            "case3 case4"
            "case5 case5";
    }

    .case canvas {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        margin: 0 !important;
    }

    td button {
        font-size: 0.9rem !important;
    }

    main {
        width: 100%;
    }

    .container {
        flex-direction: column;
    }

    .dashboard_left {
        width: 100%;
    }

    .dashboard_right {
        width: 100%;
    }

    .reservations_right .item {
        flex-direction: column;
        gap: 1rem;
        align-items: start !important;
    }

}


/* Crous */

.container-crous {
    display: flex;
    gap: 20px;
    width: 100%;
}

.leaflet-top {
    z-index: 999;
}

.crous-left {
    width: 75%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.crous-right {
    width: 25%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.menu {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    align-items: center;
}

.menu ul {
    list-style: none;
    padding: 0;
}

.menu ul li {
    margin-bottom: 10px;
}

.map,
.menudiv,
.waitingtime,
.izly,
.croushoraires {
    background-color: var(--bg-color);
    border-radius: 20px;
    padding: 20px;
}

.waitingtime {
    height: fit-content;
}

.waitingtime li {
    font-size: 1rem;
}

.croushoraires {
    font-size: 1rem;
}

#map {
    width: 100%;
    height: 100%;
}

.izly {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.izly .gray,
.menu .gray {
    opacity: 0.5;
    font-weight: 600;
}

.izlybalance {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    margin-top: 5px;
}

.buttonizly {
    margin: 0 auto;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* planning */
.planningleft {
    width: 75%;
    min-height: 700px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.planningright {
    width: 25%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-radius: 20px;
    background-color: var(--bg-color);
    padding: 20px;
    max-height: calc(100vh - 120px);
    overflow: hidden;
    height: fit-content;
}

.all-events {
    height: 100%;
    overflow-y: scroll;
    padding-right: 10px;
}

/* scrollbar */

.all-events::-webkit-scrollbar {
    width: 5px;
}

.all-events::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.all-events::-webkit-scrollbar-track {
    background-color: transparent;
}

.event-form {
    display: flex;
    position: fixed;
    margin: 0 auto;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    top: 0;
    left: 0;
    z-index: 3;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.event-form form {
    background-color: var(--bg-color);
    padding: 20px;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.event-form form input,
.event-form form select,
.event-form form textarea {
    margin-bottom: 10px;
}

/* select */

.event-form form select {
    text-transform: capitalize;
}

.event-form form h3 {
    margin-bottom: 1rem;
}

.event-form form .row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
}

/* Structure de la semaine */
.week {
    display: grid;
    grid-template-columns: 60px repeat(5, 1fr);
    /* Ajout d'une 6ème colonne de 60px pour les heures */
    gap: 5px;
    position: relative;
}

/* second week */

.week.week2 {
    height: 100%;
}

/* Structure de la journée */
.day {
    position: relative;
    height: 100%;
    /* height: 700px; */
    /* Hauteur de la journée, ajustable selon le nombre d'heures */
}

.dayheader {
    opacity: 0.5;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 10px;
}

/* Ajout d'une colonne d'heures */
.hours-column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    opacity: 0.5;
    height: 100%;
}

.hour-label {
    width: 100%;
    text-align: center;
    padding: 5px 0;
}

/* Les événements */
.event {
    background-color: #fff;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    position: absolute;
    width: 100%;
    top: var(--start-time);
    height: var(--event-duration);
    overflow: hidden;
    overflow-y: auto;
}

.all-event {
    background-color: #fff;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    position: relative;
    width: 100%;
    top: var(--start-time);
    height: var(--event-duration);
    overflow: hidden;
    overflow-y: auto;
}

/* scrollbar */
.event::-webkit-scrollbar {
    width: 5px;
}

.event::-webkit-scrollbar-thumb {
    background-color: white;
    border-radius: 5px;
}

.event::-webkit-scrollbar-track {
    background-color: transparent;
}

/* Rendre les événements bien visibles */
.event b,
.all-event b {
    font-size: 1rem;
    font-weight: bold;
}

.event .module-name {
    font-size: 0.9rem;
    margin-top: 5px;
}

.event .time {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-top: 5px;
}

.all-event .event-type {
    font-size: 0.9rem;
    text-transform: capitalize;
    margin-top: 5px;
    width: fit-content;
    font-weight: 500;

}

/* Titre de l'événement */
.event h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
    width: fit-content;

}

/* Description de l'événement */
.event p,
.event .event_title {
    font-size: 0.7rem;
    width: fit-content;
}

.event_title {
    font-weight: 500;
}

.all-event .event-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    width: fit-content;
}

/* Styliser le bouton pour chaque événement */
.event a {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.event a:hover {
    background-color: #0056b3;
}

/* Week navigation */
.week-navigation {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.week-range {
    font-weight: bold;
    font-size: 1.2rem;
}

.navigation-arrows {
    display: flex;
    justify-content: space-between;
}

.arrow {
    font-size: 1.1rem;
    padding: 10px;
    text-decoration: none;
}

/* Event default background color */
.event:nth-child(1),
.all-event:nth-child(1),
.event:nth-child(7),
.all-event:nth-child(7) {
    background-color: var(--pink);
}

.event:nth-child(2),
.all-event:nth-child(2),
.event:nth-child(8),
.all-event:nth-child(8) {
    background-color: var(--blue);
}

.event:nth-child(3),
.all-event:nth-child(3),
.event:nth-child(9),
.all-event:nth-child(9) {
    background-color: var(--green);
}

.event:nth-child(4),
.all-event:nth-child(4),
.event:nth-child(10),
.all-event:nth-child(10) {
    background-color: var(--yellow);
}

.event:nth-child(5),
.all-event:nth-child(5),
.event:nth-child(11),
.all-event:nth-child(11) {
    background-color: var(--orange);
}

.event:nth-child(6),
.all-event:nth-child(6),
.event:nth-child(12),
.all-event:nth-child(12) {
    background-color: var(--purple);
}



.event .time,
.event .module-name,
.all-event .time,
.all-event .module-name {
    font-size: 0.7rem;
    opacity: 0.5;
    margin-top: 5px;
    width: fit-content;

}



/* elearning */

.courses_grid {
    display: grid;
    /* responsive columns */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.courses_grid .widget_cours {
    min-width: 0;
}

.search_filter_form {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
    gap: 20px;
    margin-bottom: 20px;
}

.search_filter_form select {
    padding: 10px;
    border-radius: 50px;
    border: none;
    background-color: var(--text-color);
    color: var(--bg-color);
}

.searchbar {
    width: 100%;
    padding: 5px 10px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    background-color: var(--bg-color);
}

.searchbar input {
    width: 100%;
    padding: 0;
    padding-left: 5px;
    border: none;
    background: none;
    min-width: 280px;
}

.search_icon {
    color: var(--text-color);
    padding: 5px;
    background-color: transparent;
    font-size: 1rem;
    opacity: 0.5;
}

.breadcrumb {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.user_avatar_name {
    display: flex;
    gap: 10px;
    align-items: center;
}

.course_details_header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
}

.course_details_header .button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ressources */

.detailcours .flex {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.ressources {
    width: 60%;
}

.ressources ul,
.news ul {
    background-color: var(--bg-color);
    border-radius: 20px;
    padding: 20px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.ressources ul li {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.news {
    width: 40%;
}

.news ul li {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ressources ul li h3,
.news ul li h3 {
    margin-right: auto;
}

.course_details_header_btn {
    display: flex;
    gap: 20px;
    margin-left: auto;
}

@media screen and (max-width: 768px) {
    .detailcours .flex {
        flex-direction: column;
    }

    .ressources,
    .news {
        width: 100%;
    }

    .course_details_header_btn {
        margin-left: 0;
        flex-direction: column;
        gap: 10px;
    }


}

.pdf {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

/* notes */

.notes_modules_tabs {
    display: flex;
    cursor: pointer;
    margin-bottom: 20px;
    overflow-x: scroll;
    max-width: 100%;
}

/* webkit scrollbar */

.notes_modules_tabs::-webkit-scrollbar {
    height: 5px;
}

.notes_modules_tabs::-webkit-scrollbar-thumb {
    background-color: #a9a9a9;
    /* Gris clair */
    border-radius: 5px;
    height: 5px;
}

.notes_modules_tabs::-webkit-scrollbar-track {
    background-color: #d3d3d3;
    /* Gris foncé */
    height: 5px;
}

.notes_modules_tabs div {
    padding: 20px 30px;
    margin-right: 5px;
    opacity: 0.5;
    white-space: nowrap;
}

.notes_modules_tabs div:hover {
    opacity: 1;
}

.notes_modules_tabs div.active-tab {
    font-weight: bold;
    opacity: 1;
}

.notes_modules_tab-content {
    display: none;
}

.notes_modules_tab-content.active {
    display: block;
}

.notes_modules_tab-content ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notes_modules_tab-content ul li {
    border-radius: 10px;
    display: flex;
    gap: 15px;
    flex-direction: column;
    padding: 15px 20px;
    background-color: var(--bg-color);
}

.notes_modules_tab-content ul li .li-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notes-wrapper {
    display: flex;
    gap: 4rem;
}

.notes-wrapper-left {
    width: 60%;
    overflow: hidden;
}

.notes-wrapper-right {
    display: flex;
    flex-direction: column;
    width: 40%;
    background-color: var(--bg-color);
    padding: 20px;
    border-radius: 20px;
}


canvas {
    max-width: 100%;
    height: auto;
}




/* admin */


#ajouterAbsenceModal,
#inscriptionUtilisateurModal {
    display: none;
    position: fixed;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

#ajouterAbsenceModal .modal-content,
#inscriptionUtilisateurModal .modal-content {
    background-color: #fff;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #888;
    width: 50%;
    border-radius: 8px;
    height: fit-content;
}

#ajouterAbsenceModal .close,
#inscriptionUtilisateurModal .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}


/* assiduite */

/* Style pour cacher les popups par défaut */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background-color: var(--bg-color);
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    position: relative;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    padding: 10px;
    background-color: transparent;
    color: var(--text-color);
    font-size: 2rem;
}

.assiduiteflex {
    display: flex;
    align-items: center;
    gap: 25px;
    width: 100%;
}

@media screen and (max-width: 1024px) {
    .case {
        width: 100%;
        height: fit-content !important;
    }

}

.assiduiteflex .case {
    height: 100%;
}

.assiduiteflex .totalassiduitecase {
    width: 100%;
    min-height: 300px;
    height: 100%;
}

.assiduiteflex .totalassiduitecase .no-content {
    margin-top: 0;
}


/* table style, all align left */

.assiduitetable {
    overflow-y: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 10px;
    background-color: var(--bg-color);
    overflow-y: scroll;
}

th,
td {
    padding: 7px 10px;
    text-align: left;
    font-size: 0.9rem;
    white-space: nowrap;
}

th {
    padding: 10px 10px;
}

td .flex {
    gap: 10px;
}

.assiduite_actions button {
    padding: 0;
    background-color: transparent;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: bold;
}

/* messagerie (flex : left is sidebar .contacts and right is messages */

.container-messagerie {
    display: flex;
    gap: 20px;
    width: 100%;
    height: 100%;
}

.contacts {
    width: 25%;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: scroll;
    max-height: calc(100vh - 120px);
}

.contacts .closebtn,
.messages .openbtn {
    display: none;
}

.contacts h4 {
    position: sticky;
    top: 0;
    left: 0;
    background-color: var(--second-bg-color);
    padding: 10px;
    margin: 0;

}

.contacts .contact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 50px;
    background-color: var(--bg-color);
    cursor: pointer;
    margin-right: 15px;
}

.contacts .contact.active {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.conv-contact-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.messages {
    width: 75%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    border-radius: 20px;
    background-color: var(--bg-color);
    max-height: calc(100vh - 120px);
}

.received-messages {
    overflow: scroll;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-x: hidden;
}

/* webkit scrollbar */

.received-messages::-webkit-scrollbar,
.contacts::-webkit-scrollbar {
    width: 5px;
}

.received-messages::-webkit-scrollbar-thumb,
.contacts::-webkit-scrollbar-thumb {
    background-color: #a9a9a9;
    border-radius: 5px;
}

.received-messages::-webkit-scrollbar-track,
.contacts::-webkit-scrollbar-track {
    background-color: #d3d3d3;

}

.user_avatar_name {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 5px;
}

.user_avatar_name .sentat {
    margin-left: auto;
    opacity: 0.5;
}


.message {
    padding: 10px 15px;
    border-radius: 10px;
    background-color: var(--second-bg-color);
    width: fit-content;
    max-width: 80%;
}

.message.received {
    align-self: flex-start;
}

.message.sent {
    align-self: flex-end;
    background-color: var(--purple);
    margin-right: 10px;
}

.messages form {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    flex-direction: row;
    width: 100%;
    justify-self: flex-end;
    margin-top: auto;
}

.messages textarea {
    width: 100%;
    height: 40px;
    padding: 10px;
    border-radius: 50px;
    border: 1px solid #ccc;
    resize: none;
}


.flex button {
    background-color: var(--vibrant-red);
}

.flex {
    display: flex;
    align-items: center;
    gap: 20px;
}


.flex .avatarxl {
    margin: 0;
    width: 80px;
    height: 80px;
}

input[type="file"] {
    border: none;
    background-color: #000000;
    color: white;
    border-radius: 50px;
    max-width: 260px;
    font-size: 0.8rem;
}

.profil__text {
    display: flex;
    margin-top: 30px;
    gap: 3rem;
}


@media screen and (max-width: 768px) {
    .profil__text {
        flex-direction: column;
        gap: 0;
    }

    .profil .flex {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

}

.profil__text ul {
    list-style-type: none;
    color: black;
    font-weight: bold;
    list-style: none;
    padding-left: 0;
}

.profil__text-ul>li,
.profil label {
    color: #787878;
}

.profil__text li ul {
    padding: 0;
}

.profil__text-ul ul {
    margin-bottom: 30px;
}

.profil__text-ul>li>ul {
    margin-top: 10px;
}

.profil__text-ul>li>.container__button {
    margin-top: 20px;
}

.cardpopup,
.passwordpopup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popup__content {
    background-color: var(--second-bg-color);
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.passwordpopup #closepassword,
.cardpopup #closecard {
    position: absolute;
    width: 30px;
    height: 30px;
    top: 10px;
    right: 10px;
    cursor: pointer;
    padding: 10px;
    background-color: transparent;
    fill: var(--text-color);
    stroke: var(--text-color);
}


.reservations {
    padding: 5px;
}

.reservations_container {
    display: flex;
    gap: 20px;
}

.reservations_left {
    width: 60%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reservations_right {
    width: 40%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.reservations_right .items_list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: scroll;
    max-height: 500px;
    padding-right: 10px;
}

.reservations_right .item {
    display: flex;
    justify-content: space-between;
    /* Aligne le contenu à gauche et le bouton à droite */
    align-items: center;
    /* Centre les éléments verticalement */
    padding: 10px 0;
}



.reservations_right .item_info {
    display: flex;
    flex-direction: column;
    /* Empile les éléments (nom et date) en colonne */
    flex: 1;
    /* Laisse cette partie prendre tout l'espace disponible */
}

.reservations_right .item_action {
    flex-shrink: 0;
    /* Empêche le bouton de rétrécir */
    text-align: right;
    /* Aligne le bouton à droite */
}



.reservations_right .items_list::-webkit-scrollbar {
    width: 5px;
}

.reservations_right .items_list::-webkit-scrollbar-thumb {
    background-color: #a9a9a9;
    /* Gris clair */
    border-radius: 5px;
}

.reservations_right .items_list::-webkit-scrollbar-track {
    background-color: #d3d3d3;
    /* Gris clair */
    border-radius: 5px;
}


.reservations_left .item {
    display: flex;
    gap: 20px;
    align-items: center;
}

.reservations_left .item .item_action {
    margin-left: auto;
}


.reservations_left .items_list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: scroll;
    max-height: 500px;
    padding-right: 10px;
}

.reservations_left .items_list::-webkit-scrollbar {
    width: 5px;
}

.reservations_left .items_list::-webkit-scrollbar-thumb {
    background-color: #a9a9a9;
    border-radius: 5px;
}

.reservations_left .items_list::-webkit-scrollbar-track {
    background-color: #d3d3d3;
    border-radius: 5px;
}


@media screen and (max-width: 768px) {
    .reservations_left .item {
        flex-direction: column;
        gap: 0.5rem;
        align-items: start;
    }
}


.item_status {
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.item_status.Disponible {
    background-color: var(--vibrant-green);
}

.item_status.Indisponible {
    background-color: var(--vibrant-red);
}

.item_status.Réservé {
    background-color: var(--vibrant-orange);
}

.reservationModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.reservationModal .modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 50%;
    border-radius: 8px;
}

.reservationModal .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}


.current_reservation {
    display: flex;
    gap: 20px;
    flex-direction: column;
    padding: 10px 15px;
    border-radius: 10px;
    background-color: var(--yellow);
}



/* alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}


/* responsive mobile */

.opennavbtn {
    display: none;
}

@media screen and (max-width: 1024px) {

    /* sidebar */

    .sidebar {
        width: calc(100% - 30px);
        height: 100vh;
        padding: 20px;
        z-index: 100000;
        position: fixed;
        box-shadow: 0 0 50000px rgba(0, 0, 0, 0.5);
        max-width: 300px;
        display: none;
    }

    header {
        position: sticky;
        top: 0;
        background-color: var(--second-bg-color);
        z-index: 1000;
        left: 0;

    }

    .dashboard_header {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .opennavbtn {
        display: flex;
        background-color: var(--bg-color);
        align-items: center;
        border-radius: 5px;
        justify-content: center;
        top: 10px;
        height: auto;
        width: auto;
        right: 10px;
        cursor: pointer;
        padding: 10px;
        color: var(--text-color);
        font-size: 2rem;

    }

    .opennavbtn svg {
        stroke: var(--text-color);
        height: 1rem;
        width: auto
    }

    .sidebar .closebtn {
        display: flex;
    }

    .sidebar .logo {
        margin-left: 0;
    }

    .planningleft {
        height: 100%;
    }

    .dashboard,
    /* .container-crous, */
    .notes-wrapper,
    .elearning,
    .admin,
    .planning {
        flex-direction: column;
        width: 100%;
    }

    main,
    .crous-right,
    .crous-left,
    .messages,
    .notes-wrapper,
    .dashboard_left,
    .dashboard_right,
    .assiduiteflex,
    .planningleft,
    .planningright,
    .elearning,
    .admin,
    .search_filter_form,
    .searchbar,
    .notes-wrapper-left,
    .notes-wrapper-right,
    .widget_cours,
    .all-events,
    .event-form {
        width: 100%;
    }

    .course_details_header,
    .row_header {
        gap: 10px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    main {
        padding: 0;
    }

    .dashboard_header {
        margin: 0;
    }

    header,
    .dashboard,
    .container-crous,
    .detailcours,
    .container-messagerie,
    .notes-wrapper,
    .elearning,
    .admin,
    .assiduitewrapper,
    .planning,
    .profil,
    .reservations {
        padding: 20px;
    }


    /* Réservations */

    .reservations_container {
        flex-direction: column;
        gap: 50px;
    }

    .reservations_left {
        width: 100%;
    }

    .reservations_right {
        width: 100%;
    }

}

/* @media screen 768 */

@media screen and (max-width: 768px) {

    .search_filter_form,
    .dashboard_grid {
        flex-direction: column;
        display: flex;
        align-items: flex-start;
    }

    .search_filter_form select,
    .search_filter,
    .searchbar,
    .dashboard_right,
    .dashboard_left,
    .menu .day {
        width: 100%;
    }

    .searchbar input {
        min-width: fit-content;
    }

    .week {
        grid-template-columns: 30px repeat(5, 1fr);
    }

    .dayheader {
        font-size: 0.8rem;
    }

    header {
        margin: 0;
    }

    .container-messagerie,
    .container-crous,
    .assiduiteflex,
    .menu {
        flex-direction: column;
    }

    .contacts {
        display: none;
        background-color: var(--second-bg-color);
        margin: 20px;
        position: fixed;
        top: calc(80px);
        left: 0;
        z-index: 1000;
        width: fit-content;
        min-width: 300px;
        height: fit-content;
        max-height: calc(100vh - 120px);
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        border-radius: 20px;
        padding-bottom: 8px;
        padding-left: 10px;
        padding-right: 10px;
    }


    .messages .openbtn,
    .contacts .closebtn {
        display: flex;
    }

    .contacts .closebtn {
        padding: 10px;
        background-color: var(--bg-color);
        top: 5px;
        color: var(--text-color);
        position: sticky;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        right: 5px;
        left: 100%;
    }

    .contactstitle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        background-color: var(--second-bg-color);
    }

    .contacts .closebtn svg {
        stroke: var(--text-color);
        height: 15px;
        width: 15px;
    }


    /* Media queries pour la page profil */

    @media and,
    (min-width: 768px) {
        .flex {
            flex-direction: row;
        }

        .flex img {
            margin: 20px;
        }

        .profil__text {
            flex-direction: row;
        }
    }

    /* map height */
    #map {
        height: 300px;
    }

    .totalassiduitecase {
        min-height: fit-content !important;
        height: fit-content;
    }
}