/* --- Réinitialisation --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #2ecc71; /* Vert SVT */
    --secondary-color: #27ae60;
    --accent-color: #3498db; /* Bleu Terre */
    --text-color: #333;
    --light-bg: #f9f9f9;
}

body {
    color: var(--text-color);
    background-color: var(--light-bg);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* --- Navigation --- */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.logo {
    display: flex; /* Aligne l'image et le texte horizontalement */
    align-items: center; /* Centre l'image et le texte verticalement */
    text-decoration: none; /* Enlève le soulignement du lien */
    gap: 10px; /* C'est ici que tu contrôles l'espace exact entre l'image et le texte ! Change cette valeur selon tes goûts */
}

.logo-img {
    height: 50px; /* Ajuste la taille de ton image */
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}
/* --- Style pour le Logo --- */
.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 70px; /* Ajuste la hauteur pour qu'elle tienne bien dans la barre */
    width: auto;
    margin-right: 10px; /* Ajoute un petit espace si tu veux remettre du texte à côté */
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-color);
}

/* Burger Menu (Mobile) */
.burger {
    display: none;
    cursor: pointer;
}
.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(46, 204, 113, 0.8), rgba(52, 152, 219, 0.8)), url('https://images.unsplash.com/photo-1532094349884-543bc11b234d?auto=format&fit=crop&w=1920&q=80') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding-top: 70px;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background-color: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.3s, background 0.3s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    background-color: var(--text-color);
    color: white;
}

/* --- Section Bienvenue --- */
.welcome-section {
    padding: 80px 0;
    text-align: center;
}

.welcome-section h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.tagline {
    color: var(--accent-color);
    margin-bottom: 30px;
    font-weight: normal;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-size: 1.1rem;
}

/* Grille des caractéristiques */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.conclusion {
    margin-top: 40px;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--secondary-color);
}

/* --- Section Niveaux --- */
.levels-section {
    padding: 80px 0;
    text-align: center;
    background-color: white;
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.level-card {
    display: block;
    padding: 40px;
    background-color: var(--light-bg);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-color);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.level-card:hover {
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 10px 20px rgba(46, 204, 113, 0.2);
}

.card-icon i {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

/* --- Footer --- */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-info a {
    color: #bdc3c7;
    text-decoration: none;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    margin-left: 15px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    font-size: 0.9rem;
}

/* --- Responsive Design (Mobiles) --- */
@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0;
        height: 100vh;
        top: 70px;
        background-color: white;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }
    .nav-links li {
        margin: 30px 0;
    }
    .nav-links.nav-active {
        transform: translateX(0%);
    }
    .burger {
        display: block;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
}
/* --- Styles spécifiques à la page des cours --- */
.hero-small {
    height: 40vh; /* Moins haut que l'accueil */
    min-height: 300px;
}

.course-section {
    padding: 60px 0;
}

.semester-title {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 10px;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.course-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.course-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.course-info {
    padding: 20px;
}

.course-info h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.course-info p {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.course-buttons {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-small:hover {
    background-color: var(--secondary-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: white;
}

/* --- Styles pour la page des Examens Régionaux --- */

.exam-section {
    padding: 60px 0;
}

.exam-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
}

.exam-intro h2 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.exam-intro h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 1.8rem;
}

/* Création des lignes avant et après le texte */
.exam-intro h3::before,
.exam-intro h3::after {
    content: "";
    flex: 1; /* Permet à la ligne de prendre l'espace restant */
    border-bottom: 2px solid #3498db; /* Couleur de la ligne (gris clair) */
    margin: 0 20px; /* L'espace vide entre le texte et les lignes */
}
.exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.exam-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eef2f5;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.exam-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.exam-badge {
    background-color: #e8f8f5;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 0.85rem;
    padding: 6px 14px;
    display: inline-block;
    border-bottom-right-radius: 12px;
}

.exam-info {
    padding: 25px;
}

.exam-info h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 8px;
}

.exam-info p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.exam-actions {
    display: flex;
    gap: 12px;
}

.btn-exam-subject, .btn-exam-correct {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background 0.3s, transform 0.2s;
}

/* Bouton Sujet (Bleu) */
.btn-exam-subject {
    background-color: var(--accent-color);
    color: white;
}
.btn-exam-subject:hover {
    background-color: #2980b9;
}

/* Bouton Correction (Vert) */
.btn-exam-correct {
    background-color: var(--primary-color);
    color: white;
}
.btn-exam-correct:hover {
    background-color: var(--secondary-color);
}
/* --- Styles pour les pages en attente de contenu --- */
.empty-page-container {
    min-height: 70vh; /* Aligne le contenu sur la hauteur de l'écran */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.empty-state-box {
    text-align: center;
    max-width: 500px;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef2f5;
}

.empty-state-icon {
    font-size: 4rem;
    color: #bdc3c7; /* Couleur grise douce pour l'icône */
    margin-bottom: 20px;
}

.empty-state-box h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.empty-state-box p {
    color: #7f8c8d;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.btn-back-home {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-back-home:hover {
    background-color: var(--secondary-color);
}