/* --- Styles Généraux & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- En-tête & Navigation (Vert Foncé) --- */
header {
    background-color: #14532d; /* Vert foncé académique */
    color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo a {
    color: #fff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    flex-wrap: wrap;
}

nav ul li a {
    color: #bbf7d0; /* Vert très clair */
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #ffffff;
}

/* --- Contenu Principal --- */
main {
    flex: 1;
    padding: 40px 20px;
}

/* --- Pied de page (Vert Foncé) --- */
footer {
    background-color: #064e3b; /* Vert foncé profond */
    color: #a7f3d0;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
}

footer a {
    color: #a7f3d0;
    text-decoration: underline;
}

/* --- Styles de la Page d'Accueil --- */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 40px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 40px;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 2.2rem;
    color: #1e293b;
    margin-bottom: 10px;
}

.hero-content .subtitle {
    font-size: 1.1rem;
    color: #14532d; /* Rappel du vert */
    font-weight: 600;
    margin-bottom: 15px;
}

.hero-content .intro-text {
    color: #64748b;
    margin-bottom: 25px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-primary {
    background-color: #14532d; /* Bouton en vert foncé */
    color: #fff;
}

.btn-primary:hover {
    background-color: #064e3b;
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #1e293b;
}

.btn-secondary:hover {
    background-color: #cbd5e1;
}

.hero-image {
    flex: 0 0 300px;
    display: flex;
    justify-content: center;
}

.img-placeholder {
    width: 250px;
    height: 250px;
    background-color: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-weight: bold;
    text-align: center;
    border: 4px solid #cbd5e1;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.card {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card h2 {
    font-size: 1.3rem;
    color: #1e293b;
    margin-bottom: 12px;
}

.card p {
    color: #64748b;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.link-more {
    color: #14532d;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.link-more:hover {
    text-decoration: underline;
}

/* --- Responsive Design --- */
@media screen and (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .logo {
        margin-bottom: 15px;
    }

    nav ul {
        justify-content: center;
        gap: 15px;
    }

    .hero-section {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }
}

@media screen and (max-width: 480px) {
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
}

/* --- Styles de l'Espace Étudiants --- */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background-color: #e2e8f0;
    color: #334155;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.filter-btn:hover, .filter-btn.active {
    background-color: #14532d;
    color: #ffffff;
}

.ressources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.ressource-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ressource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.05);
}

.ressource-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* Couleurs des badges selon le type */
.badge-cours { background-color: #dbeafe; color: #1e40af; }
.badge-td { background-color: #fef3c7; color: #92400e; }
.badge-tp { background-color: #fce7f3; color: #9d174d; }
.badge-examen { background-color: #fee2e2; color: #991b1b; }

.ressource-niveau {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.ressource-title {
    font-size: 1.2rem;
    color: #1e293b;
    margin-bottom: 10px;
}

.ressource-desc {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 20px;
    flex: 1;
}

.ressource-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
    margin-top: auto;
}

.ressource-date {
    font-size: 0.8rem;
    color: #94a3b8;
}

.btn-download {
    background-color: #14532d;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-download:hover {
    background-color: #064e3b;
}
/* --- Styles Espace Administration --- */
.login-body {
    background-color: #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.login-card h1 {
    font-size: 1.5rem;
    color: #14532d;
    margin-bottom: 5px;
}

.login-card p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
}

.admin-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.admin-card h2 {
    font-size: 1.3rem;
    color: #1e293b;
    margin-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
}

@media screen and (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   STYLES EXPERTS DE CONNEXION (ADMIN) - ISOLÉS ET PROTÉGÉS
   ========================================================== */

.expert-login-body {
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    background-color: #0f172a !important;
    color: #334155 !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box;
}

.expert-login-body *, .expert-login-body *::before, .expert-login-body *::after {
    box-sizing: border-box;
}

.expert-login-wrapper {
    display: grid !important;
    grid-template-columns: 1.2fr 1fr !important;
    width: 100% !important;
    max-width: 1050px !important;
    min-height: 600px !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    overflow: hidden !important;
    margin: 20px !important;
}

/* Panneau de Gauche */
.expert-login-brand-side {
    background: linear-gradient(135deg, #064e3b 0%, #022c22 100%) !important;
    color: #ffffff !important;
    padding: 50px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    position: relative !important;
}

.expert-login-brand-side .brand-badge {
    display: inline-block !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 30px !important;
    color: #ffffff !important;
}

.expert-login-brand-side h1 {
    font-size: 2.2rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin: 0 0 20px 0 !important;
    color: #ffffff !important;
    letter-spacing: -0.02em !important;
}

.expert-login-brand-side p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    color: #cbd5e1 !important;
    margin: 0 0 30px 0 !important;
    font-weight: 300 !important;
}

.expert-login-brand-side .brand-footer-note {
    font-size: 0.85rem !important;
    color: #94a3b8 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding-top: 20px !important;
}

/* Panneau de Droite */
.expert-login-form-side {
    padding: 50px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    background: #ffffff !important;
}

.expert-login-form-side .form-card-container {
    width: 100% !important;
    max-width: 380px !important;
    margin: 0 auto !important;
}

.expert-login-form-side .form-header {
    margin-bottom: 30px !important;
}

.expert-login-form-side .form-header h2 {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 8px 0 !important;
    letter-spacing: -0.02em !important;
}

.expert-login-form-side .form-header p {
    font-size: 0.9rem !important;
    color: #64748b !important;
    margin: 0 !important;
}

/* Alertes Erreur */
.expert-alert-error {
    background-color: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #991b1b !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    font-size: 0.875rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 24px !important;
}

/* Champs de formulaire */
.expert-form-group {
    margin-bottom: 20px !important;
}

.expert-form-group label {
    display: block !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #334155 !important;
    margin-bottom: 8px !important;
}

.expert-form-group .input-with-icon {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.expert-form-group .input-icon {
    position: absolute !important;
    left: 14px !important;
    color: #94a3b8 !important;
    display: flex !important;
    align-items: center !important;
    pointer-events: none !important;
}

.expert-form-group .input-with-icon input {
    width: 100% !important;
    padding: 12px 16px 12px 44px !important;
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
    color: #0f172a !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.expert-form-group .input-with-icon input:focus {
    outline: none !important;
    border-color: #064e3b !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.1) !important;
}

/* Bouton */
.expert-submit-btn {
    width: 100% !important;
    background-color: #064e3b !important;
    color: #ffffff !important;
    border: none !important;
    padding: 13px 20px !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    transition: background-color 0.2s ease !important;
    margin-top: 10px !important;
}

.expert-submit-btn:hover {
    background-color: #022c22 !important;
}

/* Navigation bas */
.form-footer-nav {
    margin-top: 30px !important;
    text-align: center !important;
    border-top: 1px solid #f1f5f9 !important;
    padding-top: 20px !important;
}

.form-footer-nav a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 0.85rem !important;
    color: #64748b !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

.form-footer-nav a:hover {
    color: #064e3b !important;
}

@media screen and (max-width: 850px) {
    .expert-login-wrapper {
        grid-template-columns: 1fr !important;
        max-width: 480px !important;
    }
    .expert-login-brand-side {
        padding: 30px !important;
    }
    .expert-login-form-side {
        padding: 30px !important;
    }
}
.publication-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    /* vos autres styles existants... */
}

.pub-image-container {
    flex-shrink: 0;
    width: 120px;
    height: 150px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.pub-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pub-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    padding: 5px;
}