:root {
    --primary-color: #0056b3;
    --secondary-color: #007bff;
    --dark-blue: #0a2351;
    --light-gray: #f8f9fa;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: #ffffff;
    color: #333;
}

/* --- Header --- */
.navbar {
    transition: background-color 0.4s ease-out;
}
.navbar.scrolled {
    background-color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.navbar-brand img {
    max-height: 50px;
    transition: transform 0.3s ease;
}
.navbar-brand:hover img {
    transform: scale(1.05);
}

/* --- Hero Section with Video BG --- */
#hero {
  position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
    background-image: url('../bk1.jpg'); /* Replace with your image path */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}
#video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -100;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
}
#hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 48, 143, 0.7), rgba(0, 86, 179, 0.6));
    z-index: -1;
}
.hero-content {
    z-index: 1;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 800px;
}
.hero-content h1 {
    font-weight: 800;
    font-size: 3.5rem;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.hero-content p {
    font-size: 1.25rem;
    margin-top: 1rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* --- Login Portals Section --- */
.portal-card {
    background: var(--light-gray);
    border: none;
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.portal-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top right, transparent, var(--secondary-color));
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}
.portal-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 86, 179, 0.2);
}
.portal-card:hover::before {
    top: 50%;
    right: 50%;
    opacity: 0.1;
}
.portal-card i {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}
.portal-card:hover i {
    transform: scale(1.1);
}

/* --- Features Section --- */
#features .feature-item i {
    color: var(--primary-color);
    font-size: 2rem;
}

/* --- App Download Section --- */
#download-app {
    background-color: var(--light-gray);
    border-radius: 30px 30px 0 0;
    margin-top: 5rem;
}

/* --- Footer --- */
footer {
    background-color: var(--dark-blue);
    color: #bdc3c7;
    padding-top: 4rem;
}
footer h5 {
    color: #ffffff;
    font-weight: 700;
}
footer .footer-bottom {
    background-color: rgba(0,0,0,0.2);
    padding: 1rem 0;
}
footer a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}
footer a:hover {
    color: #ffffff;
}

/* --- Utility Classes --- */
.section-title {
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--dark-blue);
}
.section-subtitle {
    max-width: 600px;
    margin: 0 auto 4rem auto;
    color: #6c757d;
}
.btn-gradient {
    background-image: linear-gradient(45deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: white;
    transition: all 0.4s ease;
    background-size: 200% auto;
}
.btn-gradient:hover {
    background-position: right center;
    color: white;
}
/* =================================================== */
/* === AJOUT : STYLES DE COULEUR POUR PORTAL CARDS === */
/* =================================================== */

/* On supprime la couleur générique de l'icône si elle existe encore */
/* pour laisser les nouvelles règles prendre le dessus.               */
.portal-card i {
    color: inherit; /* Utilise la couleur par défaut du texte */
}

/* Thème Violet pour l'Admin */
.portal-admin i {
    color: #6f42c1;
}
.portal-admin .btn-outline-primary {
    border-color: #6f42c1;
    color: #6f42c1;
}
.portal-admin .btn-outline-primary:hover {
    background-color: #6f42c1;
    color: #ffffff;
}


/* Thème Vert pour les Professeurs */
.portal-teacher i {
    color: #198754;
}
.portal-teacher .btn-outline-primary {
    border-color: #198754;
    color: #198754;
}
.portal-teacher .btn-outline-primary:hover {
    background-color: #198754;
    color: #ffffff;
}


/* Thème Bleu pour les Étudiants */
.portal-student i {
    color: #0d6efd;
}
.portal-student .btn-outline-primary {
    border-color: #0d6efd;
    color: #0d6efd;
}
.portal-student .btn-outline-primary:hover {
    background-color: #0d6efd;
    color: #ffffff;
}