* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    color: #1e1e2a;
    background-color: #ffffff;
    line-height: 1.5;
    scroll-behavior: smooth;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-small {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* top bar */
.top-bar {
    background-color: #00bcd1;
    color: #fff;
    padding: 10px 0;
    font-size: 14px;
}

.top-bar .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.top-info {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.top-info a {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.top-info a:hover { opacity: 0.8; }

.social-icons {
    display: flex;
    gap: 18px;
}

.social-icons a {
    color: #fff;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.social-icons a:hover { transform: translateY(-2px); }

/* main header */
.main-header {
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    flex-wrap: wrap;
    gap: 20px;
}

.logo img {
    height: 55px;
    width: auto;
    display: block;
}

/* navigation desktop */
.nav-menu {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    font-weight: 600;
    color: #1e2a32;
    transition: color 0.2s;
    font-size: 1rem;
}

.nav-menu a:hover, .nav-menu .active a { color: #f58c1f; }

.dropdown-menu {
    position: absolute;
    top: 100%;
    margin-top: 8px;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.6);
    border-radius: 12px;
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
    z-index: 100;
    list-style: none;
}

.nav-menu li:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu li a {
    display: block;
    padding: 8px 20px;
    font-weight: 500;
}

.mobile-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #1a2c2e;
}

/* responsive nav */
@media (max-width: 1024px) {
    .mobile-toggle { display: block; }
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 360px;
        height: 100%;
        background: white;
        flex-direction: column;
        padding: 80px 30px 40px;
        box-shadow: 2px 0 20px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
        gap: 20px;
        overflow-y: auto;
        z-index: 1050;
    }
    .nav-menu.active {
        left: 0;
    }
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        padding-left: 20px;
        display: none;
        background: #f9f9fc;
    }
    .nav-menu li.open .dropdown-menu { display: block; }
    .nav-menu a { display: block; }
    .overlay {
        position: fixed;
        top:0; left:0;
        width:100%; height:100%;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
        visibility: hidden;
        opacity:0;
        transition:0.2s;
    }
    .overlay.active { visibility: visible; opacity:1; }
}

/* slider */
.slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #eef2f0;
}

.slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    flex: 0 0 100%;
    position: relative;
    min-height: 550px;
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 70px;
}

.slide-content {
    text-align: center;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(3px);
    padding: 28px 40px;
    border-radius: 28px;
    max-width: 760px;
    margin: 0 20px;
    color: white;
    transition: transform 0.2s;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.slide-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.slide-content p { 
    margin-bottom: 1.5rem; 
    font-size: 1.1rem; 
    line-height: 1.4;
}

.btn-slider {
    display: inline-block;
    background: #f58c1f;
    color: white;
    padding: 12px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}

.btn-slider:hover { background: #d97706; transform: scale(1.02); }

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
    transition: 0.2s;
}

.slider-arrow:hover { background: #f58c1f; }
.prev { left: 20px; }
.next { right: 20px; }

.dots {
    text-align: center;
    position: absolute;
    bottom: 20px;
    width: 100%;
    z-index: 10;
}
.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #e0e0e0;
    border-radius: 50%;
    margin: 0 6px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.dot.active { background: #f58c1f; transform: scale(1.2); }

@media (max-width: 768px) {
    .slide { min-height: 480px; padding-bottom: 60px; }
    .slide-content { padding: 20px 24px; max-width: 90%; }
    .slide-content h2 { font-size: 1.6rem; }
    .slide-content p { font-size: 0.95rem; margin-bottom: 1rem; }
    .btn-slider { padding: 8px 20px; font-size: 0.9rem; }
}

/* section générale */
.section {
    padding: 70px 0;
}
.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: #1a2c2e;
}
.section-sub {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 50px auto;
    font-size: 1.2rem;
    color: #4a5568;
}

/* grid programmes */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
    margin-top: 20px;
}
.card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 30px rgba(0,0,0,0.1); }
.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.card-content {
    padding: 24px;
}
.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: #1f3b3a;
    font-weight: 600;
}
.card-content p {
    color: #2d3e3f;
    margin-bottom: 20px;
}
.btn {
    display: inline-block;
    background: #f58c1f;
    color: white;
    padding: 10px 24px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.btn-outline {
    background: transparent;
    border: 2px solid #f58c1f;
    color: #f58c1f;
}
.btn:hover { background: #e07c0e; }

/* blog grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}
.blog-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: 0.2s;
}
.blog-card:hover { box-shadow: 0 12px 28px rgba(0,0,0,0.08); }
.blog-meta {
    padding: 20px 20px 0;
    font-size: 0.85rem;
    color: #f58c1f;
    font-weight: 600;
}
.blog-title {
    padding: 8px 20px;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
}
.blog-title a {
    text-decoration: none;
    color: #1a2c2e;
}
.blog-excerpt {
    padding: 0 20px 20px;
    color: #4b5563;
}
.blog-date {
    padding: 0 20px 20px;
    font-size: 0.8rem;
    color: #6c757d;
}

/* impacts */
.impacts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
    margin: 40px 0 20px;
}
.impact-item {
    flex: 1;
    min-width: 220px;
    background: #fef7e8;
    padding: 28px 20px;
    border-radius: 28px;
    text-align: center;
    transition: 0.2s;
}
.impact-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: #f58c1f;
}

/* newsletter */
.newsletter {
    background: #eef2f0;
    border-radius: 40px;
    text-align: center;
    padding: 50px 30px;
}
.newsletter form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}
.newsletter input {
    padding: 14px 24px;
    border-radius: 60px;
    border: 1px solid #ddd;
    width: 300px;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
}
.newsletter button {
    background: #f58c1f;
    border: none;
    padding: 14px 32px;
    border-radius: 60px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
}

/* footer */
.footer {
    background: #2c6b6b;
    color: #ddd;
    padding: 60px 0 30px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}
.footer-col p, .footer-col a {
    color: #cbd5e0;
    text-decoration: none;
    line-height: 1.6;
}
.footer-social a {
    font-size: 1.4rem;
    margin-right: 15px;
    color: #fff;
}
.copyright {
    text-align: center;
    border-top: 1px solid #2c4a4a;
    padding-top: 25px;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .section { padding: 50px 0; }
    .slide-content h2 { font-size: 1.5rem; }
    .slide { min-height: 420px; padding-bottom: 60px; }
}

/* Mega menu pour "Nos programmes" */
.mega-menu {
    position: relative;
    display: inline-block;
}

.mega-dropdown {
    position: absolute;
    top: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2), 0 8px 16px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 100;
    display: flex;
    padding: 20px;
    gap: 30px;
}

.mega-menu:hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
}

.mega-col-image {
    flex: 1.2;
    order: 1;
}

.mega-col-links {
    flex: 1;
    order: 2;
}

.mega-col-links a {
    font-weight: 600;
    color: #1e2a32;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 12px;
    transition: all 0.2s;
    background: #f9f9fc;
    display: block;
}

.mega-col-links a:hover {
    background: #f58c1f;
    color: white;
}

.mega-col-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 16px;
    overflow: hidden;
}

#megaPreviewImg {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    border-radius: 12px;
}

@media (max-width: 780px) {
    .mega-dropdown {
        left: 20px;
        right: 20px;
        transform: none;
        width: auto;
    }
}

@media (max-width: 1024px) {
    .mega-dropdown {
        position: static;
        width: 100%;
        transform: none;
        left: auto;
        flex-direction: column;
        box-shadow: none;
        padding: 0;
        background: transparent;
    }
    .mega-col-image {
        display: none;
    }
    .mega-col-links a {
        background: transparent;
        padding-left: 20px;
    }
}