@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #E1064D;
    --secondary-color: #1D2644;
    --orange-color: #FF6600;
    --accent-color: #FF5C8D;
    --text-dark: #2D3436;
    --text-muted: #636E72;
    --bg-light: #F8F9FA;
    --white: #FFFFFF;
    --transition: all 0.3s ease;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--secondary-color);
}

a {
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Sous-menus multi-niveaux */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    position: absolute !important;
    top: 0 !important;
    left: 100% !important;
    margin-top: -6px;
    margin-left: 0.1rem;
    border-radius: 0 6px 6px 6px;
    display: none !important;
    min-width: 200px;
    z-index: 1000;
}

/* Pour les sous-menus imbriqués (niveau 3 et plus) */
.dropdown-submenu .dropdown-submenu > .dropdown-menu {
    position: absolute !important;
    top: 0 !important;
    left: 100% !important;
    margin-top: -6px;
    margin-left: 0.1rem;
    border-radius: 0 6px 6px 6px;
    display: none !important;
    min-width: 200px;
    z-index: 1001;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block !important;
}

.dropdown-submenu > .dropdown-item {
    position: relative;
    padding-right: 2.5rem;
}

.dropdown-submenu > .dropdown-item::after {
    content: "›";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    line-height: 1;
}

/* Custom Buttons */
.btn-primary-ifran {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary-ifran:hover {
    background-color: #C00542;
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(225, 6, 77, 0.3);
}

.btn-outline-ifran {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline-ifran:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Section Headers */
.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-title .underline {
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

/* Navbar Customization */
.navbar {
    padding: 20px 0;
    transition: var(--transition);
    background-color: var(--white);
}

.navbar.sticky {
    padding: 10px 0;
    box-shadow: var(--shadow);
}

.nav-link {
    color: var(--secondary-color) !important;
    font-weight: 500;
    margin: 0 12px;
    font-size: 0.95rem;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero {
    padding: 10px 0 30px;
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 25px;
    color: var(--secondary-color);
}

.hero h1 span {
    color: var(--primary-color);
    display: block;
}

.hero p {
    font-size: 1.4rem;
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 40px;
    line-height: 1.3;
}

.hero-list {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.hero-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--secondary-color);
}

.hero-list i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

.btn-hero-red {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
}

.btn-hero-outline {
    background-color: var(--white);
    color: var(--secondary-color);
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    border: 1px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.hero-left-content {
    background-color: var(--bg-light);
    border-radius: 12px;
    padding: 60px 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-right {
     
   
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-right-overlay {
    position: absolute;
    bottom: 30px;
    right: 30px;
    text-align: right;
    z-index: 5;
    pointer-events: none;
}

.hero-right-img {
    width: 60%;
    margin-bottom: 30px;
    opacity: 0.5;
}

.hero-stats {
    text-align: right;
    margin-top: auto;
}

.hero-stats h2 {
    color: var(--primary-color);
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0;
}

.hero-stats p {
    color: var(--secondary-color);
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.hero-community {
    text-align: right;
    max-width: 250px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--secondary-color);
    line-height: 1.2;
    margin-top: 20px;
}

/* Cards Formation */
.card-formation {
    background: #F8F9FC;
    padding: 35px;
    border-radius: 20px;
    height: 100%;
    transition: var(--transition);
    border: none;
    position: relative;
}

.card-header-flex {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.card-icon {
    width: 65px;
    height: 65px;
    min-width: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--white);
}

.card-tag {
    color: var(--white);
    padding: 2px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.card-title-main {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 5px;
    color: var(--text-muted);
}

.icon-blue { background-color: var(--secondary-color); }
.icon-orange { background-color: #FF6B00; }
.icon-purple { background-color: #4B00D1; }

.tag-blue { background-color: var(--secondary-color); }
.tag-orange { background-color: #FF6B00; }
.tag-purple { background-color: #4B00D1; }

.card-formation p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.4;
}

.card-formation ul li {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-formation ul li i {
    font-size: 0.8rem;
}

.btn-small-ifran {
    padding: 6px 18px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    display: inline-block;
    border: none;
    margin-top: 20px;
}

/* News Section */
.card-news {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
    border: 1px solid #EEE;
}

.news-img {
    height: 160px;
    background: #B0B0B0;
    position: relative;
}

.news-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    color: var(--white);
    padding: 4px 15px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
}

.news-content {
    padding: 20px;
}

.news-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.news-content h5 {
    font-size: 1.05rem;
    line-height: 1.3;
    margin-bottom: 12px;
}

.news-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.btn-news {
    background: transparent;
    border: 1px solid;
    padding: 5px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
}

.btn-news-red { border-color: var(--primary-color); color: var(--primary-color); }
.btn-news-blue { border-color: var(--secondary-color); color: var(--secondary-color); }

/* Agenda Section */
.card-agenda {
    background: var(--white);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    border: 1px solid #EEE;
    height: 100%;
}

.agenda-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: block;
}

.agenda-icon-red { color: var(--primary-color); }
.agenda-icon-orange { color: #FF6B00; }
.agenda-icon-blue { color: var(--secondary-color); }

.card-agenda h6 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.card-agenda p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.btn-agenda {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 4px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
}

/* See All Links */
.see-all-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-left: 20px;
}

.see-all-link {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 1rem;
    line-height: 1.1;
    margin-bottom: 12px;
}

.orange-arrow-circle {
    width: 30px;
    height: 30px;
    background-color: #FF6B00;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Projects Section */
.projects-section {
    background-color: #F8F9FC;
    padding: 80px 0;
}

.card-project {
    background: var(--white);
    border-radius: 25px;
    padding: 60px 30px 30px;
    text-align: center;
    border: 1px solid #EEE;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.project-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 40px;
}

.project-title-navy { color: var(--secondary-color); }
.project-title-orange { color: #FF6B00; }

.btn-project {
    align-self: flex-start;
    padding: 4px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid;
    background: transparent;
}

.btn-project-navy { border-color: var(--secondary-color); color: var(--secondary-color); }
.btn-project-orange { border-color: #FF6B00; color: #FF6B00; }

.stats-section .section-title {
    text-align: center;
    margin-bottom: 70px;
}

.stats-section .section-title h2 {
    color: var(--orange-color);
    font-size: 3.5rem;
    text-transform: uppercase;
    font-weight: 800;
}

.stats-section .section-title .underline {
    width: 120px;
    height: 6px;
    background-color: var(--secondary-color);
    margin: 15px auto 0;
    border-radius: 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 4rem;
    font-weight: 700;
    color: var(--orange-color);
    display: block;
    line-height: 1;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--secondary-color);
    line-height: 1.2;
}

/* Footer */
footer {
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 80px 0 0;
}

footer h5 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 30px;
    font-size: 1.2rem;
}

footer .footer-link {
    color: var(--white);
    display: block;
    margin-bottom: 8px;
    opacity: 1;
    font-size: 0.95rem;
    font-weight: 400;
}

footer .footer-link:hover {
    text-decoration: underline;
}

.footer-column {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding-left: 30px;
    height: 100%;
}

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

.social-icon {
    width: 32px;
    height: 32px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 0.9rem;
    transition: var(--transition);
}

.social-icon:hover {
    transform: translateY(-3px);
    background: var(--bg-light);
}

.info-item {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: flex-start;
    font-size: 0.95rem;
}

.info-item i {
    width: 20px;
    text-align: center;
}

.newsletter-box {
    display: flex;
    margin-top: 20px;
}

.newsletter-box input {
    background: #F0F0F0;
    border: none;
    padding: 10px 15px;
    flex-grow: 1;
    border-radius: 4px 0 0 4px;
    font-size: 0.9rem;
}

.newsletter-box button {
    background: #E1064D;
    color: var(--white);
    border: none;
    padding: 0 15px;
    border-radius: 0 4px 4px 0;
    font-size: 1.1rem;
}

.footer-bottom {
    padding: 25px 0;
    margin-top: 40px;
}

.footer-hr {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0;
}

.footer-bottom p {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

.footer-bottom-links a {
    color: var(--white);
    margin-left: 20px;
    font-size: 1rem;
    font-weight: 500;
}

/* Dropdown Menu Customization */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow);
    border-radius: 8px;
    padding: 10px 0;
    animation: fadeInDropdown 0.3s ease;
    background: var(--white);
}

.dropdown-item {
    font-weight: 500;
    color: var(--secondary-color);
    padding: 8px 20px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: #F8F9FA;
    color: var(--primary-color);
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    position: absolute !important;
    top: 0 !important;
    left: 100% !important;
    margin-top: -6px;
    margin-left: 0.1rem;
    border-radius: 0 6px 6px 6px;
    display: none !important;
    min-width: 220px;
    z-index: 1050;
    background: var(--white);
    box-shadow: var(--shadow);
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block !important;
}

/* Dropdown animation */
@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enable dropdown hover on desktop */
@media (min-width: 992px) {
    /* Only target the FIRST-LEVEL dropdown-menu, not nested submenus */
    .navbar-nav .nav-item.dropdown:hover > .dropdown-menu {
        display: block !important;
        margin-top: 0;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
    }

    /* Submenu: appears to the right of its parent item */
    .navbar-nav .dropdown-submenu > .dropdown-menu {
        position: absolute !important;
        top: 0 !important;
        left: 100% !important;
        margin-top: -6px;
        margin-left: 0.1rem;
        border-radius: 0 6px 6px 6px;
        display: none !important;
        min-width: 220px;
        z-index: 1050;
        background: var(--white);
        box-shadow: var(--shadow);
    }

    .navbar-nav .dropdown-submenu:hover > .dropdown-menu {
        display: block !important;
    }
}
