/* 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 !important;
    right: 0 !important;
    box-shadow: inset 1px 0 0 rgba(0, 0, 0, .1);
}

@media (min-width: 768px) {
    main {
        margin-left: 250px !important;
        margin-right: 0 !important;
    }
    [dir="rtl"] main {
        margin-left: 0 !important;
        margin-right: 250px !important;
    }
}

@media (max-width: 767.98px) {
    main {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-bottom: 90px !important;
    }
    .sidebar {
        display: none !important;
    }
}
.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;
}

/* ===================================================================
 *  NAVBAR BOTTOM MOBILE STYLE INSTAGRAM (GEN Z & ULTRA PRO)
 * =================================================================== */
@media (max-width: 767.98px) {
    body {
        padding-bottom: 80px !important;
    }

    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-top: 1px solid rgba(226, 232, 240, 0.9);
        display: flex;
        align-items: center;
        justify-content: space-around;
        z-index: 1050;
        box-shadow: 0 -6px 25px rgba(15, 23, 42, 0.08);
        padding: 0 4px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    [dir="rtl"] .mobile-bottom-nav {
        direction: rtl;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1 1 0;
        min-width: 0;
        max-width: 20%;
        text-decoration: none;
        color: #64748b;
        font-size: 0.7rem;
        font-weight: 500;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 4px 2px;
        position: relative;
        overflow: hidden;
    }

    .mobile-nav-item i {
        font-size: 1.25rem;
        line-height: 1.2;
        margin-bottom: 2px;
        transition: transform 0.25s ease, color 0.25s ease;
    }

    .mobile-nav-item span {
        display: block;
        width: 100%;
        font-size: 0.68rem;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
        padding: 0 1px;
    }

    .mobile-nav-item:active {
        transform: scale(0.9);
    }

    .mobile-nav-item.active {
        color: #0d6efd;
        font-weight: 700;
    }

    .mobile-nav-item.active i {
        transform: translateY(-2px) scale(1.15);
        color: #0d6efd;
        filter: drop-shadow(0 4px 10px rgba(13, 110, 253, 0.4));
    }

    .mobile-nav-item.active::after {
        content: '';
        position: absolute;
        bottom: 2px;
        width: 16px;
        height: 3px;
        background: linear-gradient(90deg, #0d6efd 0%, #06b6d4 100%);
        border-radius: 10px;
    }
}

/* ===================================================================
 *  SIDEBAR DESKTOP MODERNISÉE (DESIGN GEN Z & PRO)
 * =================================================================== */
@media (min-width: 768px) {
    .sidebar {
        background: #ffffff !important;
        border-right: 1px solid #e2e8f0 !important;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.02) !important;
        padding-top: 85px !important;
        width: 250px !important;
    }

    [dir="rtl"] .sidebar {
        border-right: none !important;
        border-left: 1px solid #e2e8f0 !important;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.02) !important;
    }

    .sidebar .nav-link {
        display: flex;
        align-items: center;
        padding: 0.75rem 1.25rem;
        margin: 0.35rem 0.8rem;
        border-radius: 12px;
        color: #475569;
        font-weight: 600;
        font-size: 0.95rem;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar .nav-link i {
        font-size: 1.2rem;
        margin-right: 0.85rem;
        color: #64748b;
        transition: all 0.25s ease;
    }

    [dir="rtl"] .sidebar .nav-link i {
        margin-right: 0;
        margin-left: 0.85rem;
    }

    .sidebar .nav-link:hover {
        background-color: #f1f5f9;
        color: #0f172a;
        transform: translateX(4px);
    }

    [dir="rtl"] .sidebar .nav-link:hover {
        transform: translateX(-4px);
    }

    .sidebar .nav-link:hover i {
        color: #0d6efd;
    }

    .sidebar .nav-link.active {
        background: linear-gradient(135deg, #0d6efd 0%, #0284c7 100%) !important;
        color: #ffffff !important;
        font-weight: 700;
        box-shadow: 0 6px 16px rgba(13, 110, 253, 0.25) !important;
    }

    .sidebar .nav-link.active i {
        color: #ffffff !important;
    }
}