/* ========== GLOBAL STYLES ========== */
body {
    font-family: "Poppins", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7f9fc;
    color: #333;
}

h1, h2, h3, h4 {
    color: #0c2442;
}

/* ========== HEADER STYLES ========== */
header {
    background: linear-gradient(90deg, #0c2442, #4f7492);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 25px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .logo img {
    height: 50px;
    transition: transform 0.3s ease;
}

header .logo img:hover {
    transform: scale(1.05);
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 18px;
}

nav ul li a {
    display: inline-block;
    background-color: #4f7492;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: #0c2442;
    color: white;
    border-color: #ffdd57;
    transform: scale(1.05);
}

/* ========== En-tête de page ========== */
.page-header {
    background: linear-gradient(90deg, #0c2442, #4f7492);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.page-header h1 {
    font-size: 36px;
    margin: 0 0 10px 0;
    color: white;
}

.page-header p {
    font-size: 18px;
    color: #eee;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========== COURSES SECTION ========== */
.courses {
    padding: 40px 20px 60px;
    background-color: #fff;
    text-align: center;
}

.course-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, 300px);
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
    padding: 0 20px;
}

.course-card {
    background-color: #f8faff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0, 64, 128, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 20px rgba(0, 64, 128, 0.2);
}

.course-image-wrapper {
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
}

.course-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.course-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.course-card p {
    font-size: 14px;
    color: #444;
    margin-bottom: 15px;
    flex-grow: 1;
}

.course-btn {
    display: inline-block;
    background-color: #4f7492;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.course-btn:hover {
    background-color: #0c2442;
    border-color: #ffdd57;
    transform: scale(1.05);
}

.all-courses-btn {
    display: flex;
    justify-content: center;
    gap: 15px;
    text-align: center;
    margin-top: 30px;
}

.all-courses-link {
    display: inline-block;
    background-color: #4f7492;
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 64, 128, 0.2);
    cursor: pointer;
    border: none;
}

.all-courses-link:hover {
    background-color: #0c2442;
    box-shadow: 0 4px 12px rgba(0, 64, 128, 0.3);
    transform: translateY(-2px);
}

.all-courses-link.secondary {
    background-color: #fff;
    color: #4f7492;
    border: 2px solid #4f7492;
}

.all-courses-link.secondary:hover {
    background-color: #f0f4f8;
    color: #0c2442;
    border-color: #0c2442;
}

/* ========== SEARCH BAR & FILTERS ========== */
.search-container {
    margin-bottom: 20px;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #dbe3eb;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 64, 128, 0.05);
}

#search-input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    font-size: 16px;
    outline: none;
    width: 100%;
}

.search-buttons {
    display: flex;
    align-items: center;
    padding: 0 5px;
}

.search-icon,
.clear-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
}

.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.filter-btn {
    background-color: #f0f4f8;
    color: #4f7492;
    border: 2px solid #dbe3eb;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: #e1e9f2;
    border-color: #4f7492;
}

.filter-btn.active {
    background-color: #0c2442;
    color: white;
    border-color: #0c2442;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    grid-column: 1 / -1;
}

.no-results p {
    font-size: 18px;
    font-weight: 600;
    color: #0c2442;
    margin-bottom: 10px;
}

/* ========== FOOTER STYLES ========== */
footer {
    background: linear-gradient(90deg, #0c2442, #4f7492);
    color: #ccc;
    padding: 50px 20px;
    font-size: 14px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    text-align: left;
}

.footer-column h3 {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-bottom: 15px;
}

.footer-column p {
    font-size: 14px;
    color: #ddd;
    margin: 8px 0;
}

.footer-column a {
    color: #ffdd57;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

/* --- STYLES CORRIGÉS / AJOUTÉS --- */
.social-links a {
    display: inline-block;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.1);
}

.social-links img {
    width: 32px;
    height: 32px;
    filter: brightness(0.9);
    transition: filter 0.3s ease;
}

.social-links a:hover img {
    filter: brightness(1.2);
}
/* --- FIN DES CORRECTIONS --- */

footer p.copyright {
    text-align: center;
    margin-top: 30px;
    font-size: 13px;
    color: #ddd;
}


/* ========== RESPONSIVE STYLES ========== */
@media screen and (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 15px;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        text-align: center;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-column {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    .page-header h1 {
        font-size: 28px;
    }

    .page-header p {
        font-size: 16px;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 14px;
    }

    .course-card {
        padding: 15px;
    }

    .course-card h3 {
        font-size: 18px;
    }

    .course-card p {
        font-size: 13px;
    }



    .all-courses-link {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .social-links img {
        width: 28px;
        height: 28px;
    }
}