/* --- Variables basées sur le site IRJS --- */
:root {
    --primary-blue: #00386e;       /* Le bleu foncé Sorbonne */
    --accent-gold: #ed9b27;        /* Le jaune/or des boutons */
    --text-dark: #333333;
    --text-light: #828282;
    --bg-light: #f6f0ed;           /* Fond légèrement beige/gris */
    --white: #ffffff;
    --font-heading: 'Bitter', serif; /* Police des titres */
    --font-body: 'Quicksand', sans-serif; /* Police du texte */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-blue);
}

a {
    text-decoration: none;
    transition: 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header / Navbar --- */
#navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.site-title {
    font-family: var(--font-heading);
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--accent-gold);
}

.main-nav ul {
    display: flex;
    gap: 30px;
    align-items: center;
}

.main-nav a {
    color: var(--primary-blue);
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--accent-gold);
}

.btn-contact {
    border: 2px solid var(--primary-blue);
    padding: 8px 20px;
    border-radius: 50px;
}

.btn-contact:hover {
    background: var(--primary-blue);
    color: var(--white) !important;
}

.mobile-toggle {
    display: none;
    color: var(--primary-blue);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Hero Section (Image de fond) --- */
.hero {
    height: 80vh;
    background: url('https://images.unsplash.com/photo-1505664194779-8beaceb93744?q=80&w=1920') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 80px; /* Pour compenser le menu fixe */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 56, 110, 0.6); /* Overlay bleu Sorbonne */
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    max-width: 800px;
}

.hero-content .tag {
    background: var(--accent-gold);
    color: var(--white);
    padding: 5px 15px;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 2px;
}

.hero-content h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin: 20px 0;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-blue);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    display: inline-block;
}

.btn-primary:hover {
    background: var(--accent-gold);
    color: var(--white);
}

/* --- Section Articles --- */
.section-padding {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.separator {
    width: 60px;
    height: 3px;
    background: var(--accent-gold);
    margin: 0 auto;
}

/* Filtres */
.filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    transition: 0.3s;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary-blue);
    color: var(--white);
}

/* Grille Cards */
.grid-articles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
}

.card-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-gold);
    color: var(--white);
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content .date {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
    display: block;
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.card-content p {
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more {
    color: var(--primary-blue);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid transparent;
    align-self: flex-start;
}

.read-more:hover {
    border-bottom-color: var(--accent-gold);
}

/* --- Stats Section --- */
.stats-section {
    background: var(--primary-blue);
    color: var(--white);
    padding: 60px 0;
}

.grid-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    flex-wrap: wrap;
    gap: 30px;
}

.stat-item .number {
    display: block;
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.stat-item .label {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Barre de Recherche Design --- */

.search-wrapper {
    position: relative;
    max-width: 600px;       /* Largeur maximale pour ne pas qu'elle soit trop large sur PC */
    width: 90%;             /* Sur mobile, elle prendra 90% de l'écran */
    margin: 0 auto 40px;    /* Centré horizontalement + marge en bas */
    display: flex;
    align-items: center;
    background: var(--white);
    border: 2px solid #e0e0e0; /* Bordure grise subtile par défaut */
    border-radius: 50px;    /* Bords très arrondis (style pilule) */
    padding: 5px 20px;      /* Espace intérieur */
    transition: all 0.3s ease; /* Animation douce au survol */
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); /* Légère ombre */
}

/* Effet quand on clique dans la barre */
.search-wrapper:focus-within {
    border-color: var(--primary-blue); /* La bordure devient bleue */
    box-shadow: 0 4px 15px rgba(0, 56, 110, 0.2); /* L'ombre grandit un peu */
}

/* Le champ de texte lui-même */
#searchBar {
    width: 100%;
    border: none;           /* On enlève la bordure par défaut moche */
    outline: none;          /* On enlève le contour bleu par défaut */
    background: transparent;
    padding: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-dark);
}

/* L'icône loupe */
.search-wrapper i {
    color: var(--primary-blue);
    font-size: 1.1rem;
    padding-left: 10px;
    cursor: pointer;
    transition: 0.3s;
}

/* Petit effet sur la loupe au survol */
.search-wrapper i:hover {
    color: var(--accent-gold);
    transform: scale(1.1);
}

/* --- Footer --- */
footer {
    background: #222;
    color: #fff;
    padding-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #aaa;
}

.footer-col ul li a:hover {
    color: var(--accent-gold);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
    color: #888;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .main-nav {
        display: none; /* Menu burger à implémenter avec JS si besoin plus complexe */
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- RESPONSIVE --- */

@media (max-width: 768px) {
    /* 1. Ajuster la grille des articles pour les petits écrans */
    .grid-articles {
        grid-template-columns: 1fr; /* Une seule colonne sur mobile */
        padding: 0 10px;
    }

    /* 2. Réduire la taille du gros titre sur l'image d'accueil */
    .hero-content h1 {
        font-size: 2rem; /* Plus petit pour ne pas déborder */
    }

    /* 3. Réduire les marges des sections pour gagner de la place */
    .section-padding {
        padding: 40px 0; /* Moins de vide en haut et en bas */
    }

    /* 4. Ajuster les boutons de filtres qui peuvent déborder */
    .filters {
        flex-wrap: wrap; /* Les boutons passeront à la ligne si besoin */
    }
    
    .filter-btn {
        margin-bottom: 10px;
        font-size: 0.9rem;
    }

    /* 5. Ajuster le footer */
    .footer-content {
        grid-template-columns: 1fr; /* Footer en une seule colonne */
        text-align: center;
    }
}

/* --- Adaptation pour Tablettes et Petits Ordinateurs (max 1024px) --- */
@media (max-width: 1024px) {
    
    /* 1. On réduit la taille du gros titre */
    .hero-content h1 {
        font-size: 2.5rem; /* Au lieu de 3.5rem */
    }

    /* 2. On resserre les liens du menu pour qu'ils ne cassent pas la ligne */
    .main-nav ul {
        gap: 15px; /* Au lieu de 30px */
    }
    
    .main-nav a {
        font-size: 0.85rem; /* Texte un peu plus petit */
    }

    /* 3. Adaptation intelligente des boutons (padding réduit) */
    .btn-contact, .btn-primary, .filter-btn {
        padding: 8px 15px; /* Boutons moins larges */
        font-size: 0.9rem;
    }

    /* 4. On réduit les marges globales */
    .container {
        padding: 0 15px; /* Moins d'espace sur les côtés */
    }
    
    .card-content h3 {
        font-size: 1.2rem; /* Titres des cartes ajustés */
    }
}