/* Styles généraux du body */
body {
    background: white;
    min-height: 100vh;
}

/* Styles pour les éléments numstyle, numstylepink, etc. */
.numstyle,
.numstylepink,
.opstyle,
.textstyle,
.centerstyle,
.centerstyle1,
.formstyle,
.form,
.entetetab,
.offline,
.underOffline,
.facultatif,
.underFacultatif,
.obligatoire,
.underObligatoire,
.examen,
.underExamen {
    border-radius: 10px;
    padding: 10px;
    font-family: "Arial";
}

.numstyle,
.numstylepink {
    border: 1px solid;
    font-size: 50px;
    margin: 4px;
    color: white;
}

.numstyle {
    background-color: lightblue;
}

.numstylepink {
    background-color: pink;
}

.opstyle {
    border: 1px solid;
    background-color: pink;
    padding: 10px;
    border-radius: 20px;
    color: white;
    font-size: 40px;
}

.textstyle,
.centerstyle,
.centerstyle1 {
    font-weight: bold;
    font-size: 50px;
}

.centerstyle,
.centerstyle1 {
    text-align: center;
}

.centerstyle1 {
    border: 1px solid;
    background-color: lightblue;
    margin: 4px;
    color: white;
}

.formstyle {
    width: 100px;
    height: 60px;
    font-size: 50px;
}

.form {
    display: inline;
}

.entetetab,
.offline,
.underOffline,
.facultatif,
.underFacultatif,
.obligatoire,
.underObligatoire,
.examen,
.underExamen {
    border: 1px solid white;
    color: #383d56;
}

.entetetab {
    background-color: black;
    color: white;
}

.offline {
    background-color: #e2e3e5;
    color: #383d56;
}

.underOffline {
    background-color: #f6f7f8;
    color: #383d56;
}

.facultatif {
    background-color: #d1ecf1;
    color: #383d41;
}

.underFacultatif {
    background-color: #e5f3e8;
    color: #383d41;
}

.obligatoire {
    background-color: #cce5ff;
    color: #383d41;
}

.underObligatoire {
    background-color: #deedfc;
    color: #383d41;
}

.examen {
    background-color: #f8d7da;
    color: #383d41;
}

.underExamen {
    background-color: #faecee;
    color: #383d41;
}

/* Styles pour les ombres et alertes */
.shadow {
    box-shadow: 1px 1px 12px #555;
}

.custom-alert,
.custom-alert-primary,
.custom-alert-warning {
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: white;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.custom-alert-primary-no-hover {
    background: linear-gradient(#6a11cb 20%, #2575fc 80%);
    color: #333333;
}

.custom-alert-primary-no-hover:hover {
    transform: none;
    box-shadow: none;
}

.custom-alert {
    background: linear-gradient(#6a11cb 20%, #2575fc 80%);
}

.custom-alert-primary {
    border-left: 8px solid #007bff;
    background: #d9edf7;
    color: #31708f;
}

.custom-alert-warning {
    background: linear-gradient(#FFFF66 20%, #f9eb9a 80%);
    color: #333333;
}

.custom-alert:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.custom-btn {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.custom-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Styles pour les cartes de cours */
.course-card {
    transition: transform 0.2s;
    margin-bottom: 20px;
}

.course-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.course-icon {
    font-size: 40px;
    color: #ffffff;
}

.btn-course {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    text-align: left;
}

.btn-course span {
    flex-grow: 1;
    margin-left: 10px;
    color: #ffffff;
}

.card-container {
    margin-bottom: 20px;
}

.margin-5 {
    margin: 5px 0;
}

/* Styles pour le fond du modal */
.custom-modal {
    display: none;
    /* Masquer le modal par défaut */
    position: fixed;
    /* Fixer le modal par rapport à la fenêtre du navigateur */
    top: 0;
    left: 0;
    width: 100%;
    /* Prendre toute la largeur de la fenêtre */
    height: 100%;
    /* Prendre toute la hauteur de la fenêtre */
    overflow: auto;
    /* Ajouter un défilement si nécessaire */
    background-color: rgba(0, 0, 0, 0.5);
    /* Fond semi-transparent */
    z-index: 1;
    /* Assurer que le modal est au-dessus des autres éléments */
}

/* Styles pour le contenu du modal */
.custom-modal-content {
    box-sizing: border-box;
    position: absolute;
    /* Positionner le modal par rapport à son conteneur parent */
    top: 20%;
    /* Ajuste la position verticale du modal */
    left: 5%;
    /* Positionner à 5% de la largeur de la fenêtre */
    width: 90%;
    /* Largeur du modal, ajustez selon vos besoins */
    padding: 20px;
    /* Espacement interne du modal */
    background-color: #fff;
    /* Fond blanc pour le modal */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /* Ombre légère autour du modal */
    text-align: center;
    /* Alignement du texte au centre */
    font-size: 1em;
    /* Taille du texte, ajustez selon vos besoins */
    border-radius: 8px;
    /* Coins arrondis du modal */
    animation: pulse 1s ease-out;
    /* Animation d'illumination */
    max-height: 80%;
    /* Limite la hauteur maximale pour éviter de sortir de l'écran */
    overflow-y: auto;
    /* Ajoute un défilement si le contenu dépasse la hauteur max */
}


/* Styles pour le bouton de fermeture du modal */
.custom-close {
    color: #aaa;
    /* Couleur du bouton de fermeture */
    float: right;
    /* Positionner à droite */
    font-size: 28px;
    /* Taille de la police du bouton */
    font-weight: bold;
    /* Gras pour le bouton */
    position: absolute;
    /* Positionné par rapport au modal-content */
    top: 10px;
    right: 10px;
}

.custom-close:hover,
.custom-close:focus {
    color: black;
    /* Couleur lorsque survolé ou en focus */
    text-decoration: none;
    /* Supprimer la décoration du texte */
    cursor: pointer;
    /* Curseur en forme de main */
}

/* Animation d'illumination */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
}

/* Container for buttons */
.btn-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    /* Space between score and buttons */
}

/* Custom button styling */
.custom-btn {
    margin: 5px;
    /* Space between buttons */
    padding: 10px 20px;
    /* Adjust padding for better button size */
    font-size: 1em;
    /* Consistent font size */
    border-radius: 5px;
    /* Rounded corners */
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: white;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 450px;
    width: 100%;
    margin: auto;
    transform: translateY(-20px);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(-20px);
    }
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.login-body {
    padding: 2rem;
}

.form-floating {
    margin-bottom: 1.5rem;
}

.form-floating input {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.form-floating input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    z-index: 5;
}

.password-toggle:hover {
    color: #667eea;
}

.btn-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

@media (max-width: 576px) {
    .login-container {
        align-items: flex-start;
        padding-top: 15vh;
    }

    .login-header {
        padding: 1.5rem;
    }

    .login-body {
        padding: 1.5rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }
}

.blankheader {
    width: auto;
    height: 70px;
}

.verification-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.verification-label {
    font-weight: 600;
    color: #333;
}

.verification-value {
    color: #0d6efd;
    word-break: break-all;
}

.code-input {
    width: 20%;
    max-width: 36px;
    min-width: 28px;
    height: 44px;
    font-size: 1.2em;
    text-align: center;
    padding: 0;
    border: 2px solid #0d6efd;
    border-radius: 8px;
    font-weight: 700;
    color: #0d6efd;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.08);
    margin: 0 2px;
}

.code-input:focus {
    border-color: #0b5ed7;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.code-hint {
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 6px;
}

/* Styles personnalisés pour la navbar */
.custom-navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0;
    min-height: 50px;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    color: #fff !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: #f8f9fa !important;
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.4rem 0.8rem !important;
    border-radius: 8px;
    margin: 0 0.2rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff !important;
}

.dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
    padding: 0.5rem;
}

.dropdown-item {
    padding: 0.7rem 1rem;
    color: #333;
    font-weight: 500;
    border-radius: 8px;
    margin: 0.2rem 0;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: translateX(5px);
}

.dropdown-item i {
    margin-right: 0.7rem;
    width: 16px;
    text-align: center;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.8rem;
}

/* Animation pour les icônes */
.nav-link i,
.dropdown-item i {
    transition: transform 0.2s ease;
}

.nav-link:hover i,
.dropdown-item:hover i {
    transform: scale(1.1);
}

/* Responsive amélioré */
@media (max-width: 991.98px) {
    .navbar-nav {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 1rem;
        margin-top: 1rem;
    }

    .navbar-nav .nav-link {
        margin: 0.2rem 0;
    }

    .dropdown-menu {
        position: static !important;
        transform: none !important;
        border: none;
        background: rgba(255, 255, 255, 0.1);
        box-shadow: none;
        margin-top: 0.5rem;
    }

    .dropdown-item {
        color: rgba(255, 255, 255, 0.9);
    }

    .dropdown-item:hover {
        color: #fff;
    }
}

/* Badge de notification (optionnel) */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.main-container {
    margin: 10px !important;
}