/* Fichier: roi_inscription/assets/css/style.css */

body {
    background-image: url('images/university_background.jpg'); /* Mettez une belle image de l'université ici */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: 'Segoe UI', 'Tahoma', 'Geneva', 'Verdana', sans-serif;
}

/* assets/css/style.css */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&family=Tajawal:wght@400;500;700&display=swap');

/* ==================================================
   DÉFINITION D'UNE POLICE SPÉCIFIQUE POUR LES CHIFFRES
   ================================================== */
/* On utilise la police 'Poppins' existante mais on lui donne un alias 
   et on restreint son application aux chiffres et symboles courants. */
@font-face {
  font-family: 'URF-Numbers'; /* Un nom personnalisé pour notre police de chiffres */
  src: local('Poppins Regular'), 
  local('Poppins-Regular'), url(https://fonts.gstatic.com/s/poppins/v20/pxiEyp8kv8JHgFVrJJbecnFHGPezSQ.woff2) format('woff2');
  /* La magie est ici : cette police ne sera utilisée QUE pour ces caractères */
  unicode-range: U+0030-0039, /* Chiffres 0-9 */
                 U+0020-002F, /* Espace, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., / */
                 U+003A-0040; /* :, ;, <, =, >, ?, @ */
}

/* Dans la section des styles de base */

/* Ancien code : */
/* [dir="rtl"] body { font-family: 'Tajawal', sans-serif; } */

/* NOUVEAU CODE AMÉLIORÉ : */
[dir="ltr"] body { 
    font-family: 'Poppins', sans-serif; 
}
[dir="rtl"] body { 
    /* Le navigateur essaie d'abord URF-Numbers (qui ne s'applique qu'aux chiffres/symboles),
       puis utilise Tajawal pour tout le reste (le texte arabe). */
    font-family: 'URF-Numbers', 'Tajawal', sans-serif; 
}

/*
 * ===================================================================
 *  Correctif pour l'affichage des Input Group en RTL (Bootstrap)
 * ===================================================================
 */
[dir="rtl"] .input-group > :not(:first-child) {
    border-top-left-radius: var(--bs-border-radius);
    border-bottom-left-radius: var(--bs-border-radius);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

[dir="rtl"] .input-group > :not(:last-child) {
    border-top-right-radius: var(--bs-border-radius);
    border-bottom-right-radius: var(--bs-border-radius);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

[dir="rtl"] .input-group > .form-control:not(:last-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

[dir="rtl"] .input-group > .btn:not(:first-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.form-container {
    max-width: 450px;
    width: 100%;
}

.card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.lang-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 10;
}
.lang-switcher a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}
.lang-switcher a.active {
    color: #0d6efd;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .lang-switcher {
    right: auto;
    left: 20px;
}

/* Style for dashboard sidebar */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}
[dir="rtl"] .sidebar {
    left: auto;
    right: 0;
    box-shadow: inset 1px 0 0 rgba(0, 0, 0, .1);
}
main {
    margin-left: 220px; /* Same as sidebar width */
}
[dir="rtl"] main {
    margin-left: 0;
    margin-right: 320px;
}
.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

/*
 * Fichier: roi_inscription/assets/css/header-style.css
 * Description: Styles professionnels pour l'en-tête de l'application.
 */

/* -- En-tête principal -- */
.app-header {
    height: 70px; /* Hauteur fixe pour une meilleure consistance */
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    z-index: 1030; /* Assure que le header est au-dessus de la plupart des éléments */
}

/* -- Marque / Logo -- */
.app-header .navbar-brand {
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}

.app-header .navbar-brand .logo {
    height: 40px; /* Ajustez selon la taille de votre logo */
    margin-right: 15px;
}
[dir="rtl"] .app-header .navbar-brand .logo {
    margin-right: 0;
    margin-left: 15px;
}

.app-header .navbar-brand .brand-text {
    font-weight: 600;
    font-size: 1.1rem;
    color: #343a40;
}

/* -- Bouton du menu mobile (Sidebar) -- */
.sidebar-toggler {
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
}
.sidebar-toggler:focus {
    box-shadow: none;
}

/* -- Zone de droite (Actions) -- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem; /* Espace entre les icônes */
}

/* Style commun pour les liens d'action (icônes) */
.action-link {
    color: #6c757d;
    font-size: 1.3rem;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}
.action-link:hover {
    color: #0d6efd;
}

/* Spécifique pour les dropdowns */
.dropdown-toggle::after {
    display: none; /* On cache la flèche par défaut de Bootstrap */
}

.dropdown-menu {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
    margin-top: 0.75rem !important; /* Petit espace sous l'icône */
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
}

/* -- Avatar de l'utilisateur -- */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}

/* -- Styles pour la Sidebar mobile -- */
@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        width: 250px;
        transform: translateX(-100%); /* Cachée par défaut */
        transition: transform 0.3s ease-in-out;
        z-index: 1040; /* Au-dessus du header */
    }
    
    [dir="rtl"] .sidebar {
        transform: translateX(100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }
    
    /* Overlay pour assombrir le contenu quand le menu est ouvert */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1035; /* Entre le header et la sidebar */
        display: none; /* Caché par défaut */
    }
    .sidebar-overlay.active {
        display: block;
    }

    main {
       margin-left: 0 !important;
       margin-right: 0 !important;
    }
}

/*
 * ===================================================================
 *  Styles pour la Page "Mes Documents"
 * ===================================================================
 */
.document-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    background-color: #fff;
}
.document-card.unavailable {
    background-color: #f8f9fa;
    opacity: 0.7;
}
.document-card.unavailable .btn {
    pointer-events: none; /* Désactive le clic sur le bouton */
}

.document-card-body {
    padding: 1.5rem;
    display: flex;
    align-items: center;
}

.document-icon {
    font-size: 2.5rem;
    color: var(--bs-primary);
    margin-right: 1.5rem;
    flex-shrink: 0;
}
[dir="rtl"] .document-icon {
    margin-right: 0;
    margin-left: 1.5rem;
}

.document-info h5 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.document-info p {
    color: #6c757d;
    margin-bottom: 0;
}

.document-action {
    margin-left: auto;
    text-align: right;
}
[dir="rtl"] .document-action {
    margin-left: 0;
    margin-right: auto;
    text-align: left;
}

.document-status {
    font-size: 0.8rem;
    font-weight: 700;
}

.toggle-password-icon {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
}
[dir="rtl"] .toggle-password-icon {
    right: auto;
    left: 1rem;
}

.student-active-year {
background-color: rgba(0, 0, 0, 0.1);
padding: 0.3rem 0.8rem;
border-radius: 5px;
font-size: 0.9rem;
color: #495057;
display: flex;
align-items: center;
}
.student-active-year i {
margin-right: 0.5rem;
}
[dir="rtl"] .student-active-year i {
margin-right: 0;
margin-left: 0.5rem;
}