/* ---------- GLOBAL ---------- */
body {
    font-family: "Poppins", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7f9fc;
    color: #333;
}

h1, h2, h3, h4 {
    color: #0c2442;
}

.section-title {
    text-align: center;
    font-size: 30px;
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 100%;
    height: 3px;
    background-color: #ffdd57;
    transform: translateX(-50%);
}

.section-subtitle {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.section-subtitle::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 100%;
    height: 2px;
    background-color: #ffdd57;
    transform: translateX(-50%);
}

/* ---------- HEADER ---------- */
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);
}

/* ---------- Section Héros (Remplace la bannière) ---------- */
.hero {
    position: relative;
    text-align: center;
    color: white;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('images/banner.jpg') no-repeat center center/cover;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(12, 36, 66, 0.6);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    color: white;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    font-weight: 400;
}

.hero-btn {
    background-color: #ffdd57;
    color: #0c2442;
    padding: 15px 35px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
}

.hero-btn:hover {
    background-color: white;
    transform: translateY(-3px);
}

/* On cache l'ancienne bannière */
.banner {
    display: none;
}

/* ---------- INTRO ---------- */
.intro {
    text-align: center;
    padding: 50px 20px;
}

.intro-content {
    padding: 20px;
}

.intro p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #333;
    margin: 0 auto 30px;
    font-weight: 400;
    max-width: 1200px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 30px;
    padding: 0 20px;
}

.why-item {
    padding: 25px;
    transition: transform 0.4s ease;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 64, 128, 0.08);
}

.why-item:hover {
    transform: translateY(-8px);
}

.why-item h4 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center; /* <-- ajoute cette ligne */
    text-align: center;       /* <-- et celle-ci */
}

.why-image-wrapper {
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
}

.why-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.why-item p {
    font-size: 15px;
    color: #444;
}

/* ---------- COURSES ---------- */
.courses {
    padding: 60px 20px;
    background-color: #fff;
    text-align: center;
}

.course-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    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 {
    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);
}

.all-courses-link:hover {
    background-color: #0c2442;
    box-shadow: 0 4px 12px rgba(0, 64, 128, 0.3);
    transform: translateY(-2px);
}

/* ---------- Section Témoignages ---------- */
.testimonials {
    padding: 60px 20px;
    background-color: #f7f9fc;
    text-align: center;
}

.testimonial-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.testimonial-card {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(235, 236, 238, 0.08);
    max-width: 450px;
    text-align: left;
}

.testimonial-text {
    font-style: italic;
    color: #333;
    line-height: 1.7;
    margin-bottom: 20px;
}

.testimonial-author {
    font-weight: 300;
    color: #ffffff;
}

/* ---------- Section Appel à l'Action (CTA) ---------- */
.cta {
    background: linear-gradient(90deg, #ffffff, #ffffff);
    padding: 60px 20px;
    text-align: center;
    color: #0c2442;
}

.cta-title {
    font-size: 32px;
    margin-bottom: 15px;
    color: #0c2442;
}

.cta-text {
    font-size: 18px;
    margin-bottom: 30px;
    color: #0c2442;
}

.cta-btn {
    background-color: #ffdd57;
    color: #0c2442;
    padding: 15px 35px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
}

.cta-btn:hover {
    background-color: rgb(212, 212, 212);
    transform: translateY(-3px);
}

/* ---------- FOOTER ---------- */
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;
}

.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);
}

footer p.copyright {
    text-align: center;
    margin-top: 30px;
    font-size: 13px;
    color: #ddd;
}

/* ---------- RESPONSIVE ---------- */
@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;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .course-container {
        grid-template-columns: 1fr;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .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) {
    .section-title {
        font-size: 24px;
    }

    .section-subtitle {
        font-size: 20px;
    }
    
    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-btn, .cta-btn {
        padding: 12px 25px;
    }

    .course-card {
        padding: 15px;
    }

    .course-card h3 {
        font-size: 18px;
    }

    .course-card p {
        font-size: 13px;
    }

    .cta-title {
        font-size: 24px;
    }

    .social-links img {
        width: 28px;
        height: 28px;
    }

    .all-courses-link {
        padding: 10px 20px;
        font-size: 14px;
    }
}