/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Navigation */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*padding: var(--spacing-sm) var(--spacing-md);*/
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.5rem;
}

.logo img {
    height: 100px;
    width: 180px;
    margin-right: var(--spacing-xs);
}

.nav-menu {
    display: flex;
    list-style: none;
    /*gap: var(--spacing-md);*/
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    /* Augmente le padding vertical et horizontal pour un affichage confortable */
    padding: var(--spacing-sm) var(--spacing-md);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(26, 60, 64, 0.9), rgba(45, 95, 115, 0.9)),
                url('https://via.placeholder.com/1920x600/1a3c40/ffffff?text=ILA+Institut');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #3a7a5a;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Features Section */
.features {
    padding: var(--spacing-xl) 0;
    background-color: var(--light-color);
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: var(--primary-color);
    font-size: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.feature-card {
    background-color: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
}

/* Publications Section */
.publications {
    padding: var(--spacing-xl) 0;
}

.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.publication-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal);
}

.publication-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.publication-image {
    height: 200px;
    background-color: var(--gray-light);
    overflow: hidden;
}

.publication-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.publication-content {
    padding: var(--spacing-md);
}

.publication-title {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
}

.publication-author {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.publication-price {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.2rem;
}

.text-center {
    text-align: center;
}

/* CTA Section */
.cta {
    background-color: var(--primary-color);
    color: var(--white);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.cta h2 {
    margin-bottom: var(--spacing-md);
    font-size: 2rem;
}

.cta p {
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: var(--spacing-xl) 0 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.footer-section h3 {
    margin-bottom: var(--spacing-md);
    color: var(--white);
    font-size: 1.2rem;
}

.footer-logo {
    height: 100px;
    width: 150px;
    margin-bottom: var(--spacing-sm);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-section a {
    color: var(--gray-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-section i {
    margin-right: var(--spacing-xs);
    width: 20px;
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: background-color var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding: var(--spacing-md);
    margin-top: var(--spacing-xl);
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--gray-medium);
    font-size: 0.9rem;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: var(--shadow-lg);
    transition: right var(--transition-normal);
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--gray-light);
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
}

.cart-footer {
    padding: var(--spacing-md);
    border-top: 1px solid var(--gray-light);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: var(--spacing-md);
}

.btn-checkout {
    width: 100%;
}


/*Partie Connexion des Utilisateurs*/
/* ============================================
   STYLES POUR LES ONGLETS DE CONNEXION
   ============================================ */

/* Conteneur principal d'authentification */
.nav-auth-dropdown {
    position: relative;
    margin-left: 20px;
}

/* Bouton de connexion principal */
.auth-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.auth-btn i {
    font-size: 1.1rem;
}

/* Menu déroulant d'authentification */
.auth-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 20px;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.auth-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Onglets de sélection */
.auth-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
}

.auth-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s ease;
}

/*.auth-tab.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}*/

.auth-tab:hover:not(.active) {
    color: var(--primary-color);
}

.auth-tab i {
    font-size: 1.1rem;
}



/* Scrollable authentication dropdown */
.auth-dropdown-menu {
    max-height: 500px; /* Hauteur maximale */
    overflow-y: auto; /* Activation du scroll vertical */
    scrollbar-width: thin; /* Pour Firefox */
    scrollbar-color: var(--primary-color) #f0f0f0; /* Pour Firefox */
}

/* Personnalisation de la barre de défilement pour Webkit (Chrome, Safari, Edge) */
.auth-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.auth-dropdown-menu::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.auth-dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.auth-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Ajustement pour les écrans mobiles */
@media (max-width: 768px) {
    .auth-dropdown-menu {
        max-height: 400px; /* Hauteur réduite sur mobile */
    }
    
    .nav-auth-dropdown.active .auth-dropdown-menu {
        max-height: calc(100vh - 200px); /* S'adapte à la hauteur de l'écran */
    }
}

/* S'assurer que les formulaires ne débordent pas */
.auth-forms {
    min-height: min-content;
}

.auth-form {
    padding-right: 5px; /* Espace pour éviter que le contenu touche la scrollbar */
}







/* Formulaires d'authentification */
.auth-form {
    display: visible;
    animation: fadeIn 0.3s ease;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form h4 {
    margin-bottom: 20px;
    color: var(--text-dark);
    font-size: 1.3rem;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: var(--text-light);
}

.checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Boutons d'authentification */
.btn-auth-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-auth-submit i {
    margin-right: 8px;
}

.auth-divider {
    text-align: center;
    margin: 15px 0;
    color: var(--text-light);
    position: relative;
}

.auth-divider:before,
.auth-divider:after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #e9ecef;
}

.auth-divider:before {
    left: 0;
}

.auth-divider:after {
    right: 0;
}

.btn-auth-register {
    display: block;
    width: 100%;
    padding: 12px;
    background: #f8f9fa;
    color: var(--text-dark);
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-auth-register:hover {
    background: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-auth-register i {
    margin-right: 8px;
}

/* État connecté - Profil utilisateur */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 15px;
    background: white;
    border-radius: 50px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.user-profile:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.user-avatar.professor {
    background: linear-gradient(135deg, #8c4a6d, #6d3a54);
}

.user-avatar i {
    font-size: 1.2rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.user-type {
    font-size: 0.8rem;
    color: var(--text-light);
}

.user-menu-toggle {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s ease;
}

.user-profile:hover .user-menu-toggle {
    color: var(--primary-color);
}

/* Menu déroulant utilisateur */
.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 250px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-profile:hover .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.95rem;
}

.user-menu-item:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.user-menu-item i {
    width: 20px;
    text-align: center;
    color: var(--text-light);
}

.user-menu-item:hover i {
    color: var(--primary-color);
}

.user-menu-divider {
    height: 1px;
    background: #e9ecef;
    margin: 8px 0;
}

.logout-btn {
    color: #e74c3c;
}

.logout-btn:hover {
    background: #fff5f5;
    color: #c0392b;
}

.logout-btn i {
    color: #e74c3c;
}

/* États d'affichage */
.auth-container {
    display: none;
}

.auth-container.not-logged-in {
    display: block;
}

/* Quand un utilisateur est connecté, on affiche le bon conteneur via JS */
.logged-in {
    display: none;
}

/* Classes pour le JS */
.logged-in.active {
    display: block;
}

.not-logged-in.hidden {
    display: none;
}

/* Indicateur de statut */
.status-indicator {
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    position: absolute;
    top: -2px;
    right: -2px;
    border: 2px solid white;
}

/* Notification badge */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 992px) {
    .nav-auth-dropdown {
        margin-left: 0;
        margin-top: 10px;
        order: 3;
        width: 100%;
    }
    
    .auth-dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border: 1px solid #e9ecef;
        margin-top: 10px;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    
    .user-profile {
        width: 100%;
        justify-content: center;
    }
    
    .user-dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border: 1px solid #e9ecef;
        margin-top: 10px;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .auth-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .auth-dropdown-menu {
        width: 280px;
        right: -50px;
    }
    
    .auth-tab span {
        display: none;
    }
    
    .auth-tab i {
        font-size: 1.3rem;
    }
}



