/* Style global et variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6506a0; /* Violet du logo */
    --secondary: #6506a0;
    --accent: #f8f9fa;
    --dark: #222;
    --light: #f5f5f5;
    --gray: #666;
    --white: #ffffff;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

html {
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

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

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid var(--primary);
}

.btn:hover {
    background: transparent;
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    margin-left: 15px;
}

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

section {
    padding: 80px 0;
}

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

.section-title h2 {
    font-size: 2.5rem;
    color: var(--secondary);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary);
}

.section-title p {
    color: var(--gray);
    max-width: 700px;
    margin: 20px auto 0;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 10px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary);
}

.logo img {
    height: 70px;
    margin-right: 1px;
}

.logo span {
    color: var(--primary);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s ease;
    position: relative;
}

nav ul li a:hover {
    color: var(--primary);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(106, 44, 145, 0.9), rgba(255, 255, 255, 0.9)), url('../images/background.JPG') no-repeat center center/cover;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 60px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    margin-top: 30px;
}

/* About Section */
.about {
    background: var(--light);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-text {
    flex: 1;
}

.about-text h2 {
    color: var(--secondary);
    font-size: 2.2rem;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--gray);
}

.features {
    margin-top: 30px;
}

.feature-item {
    display: flex;
    margin-bottom: 25px;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.feature-icon i {
    color: var(--white);
    font-size: 1.5rem;
}

.feature-text h3 {
    color: var(--secondary);
    margin-bottom: 10px;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.service-img {
    height: 200px;
    overflow: hidden;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-img img {
    transform: scale(1.1);
}

.service-content {
    padding: 25px;
}

.service-content h3 {
    color: var(--secondary);
    margin-bottom: 15px;
}

.service-content p {
    color: var(--gray);
    margin-bottom: 20px;
}

/* Projects Section */
.projects {
    background: var(--light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.project-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 300px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(101, 6, 160, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-item:hover .project-overlay {
    opacity: 1;
}

.project-item:hover img {
    transform: scale(1.1);
}

.project-overlay h3 {
    color: var(--white);
    margin-bottom: 10px;
}

.project-overlay p {
    color: var(--accent);
    margin-bottom: 20px;
}

/* Stats Section */
.stats {
    background: linear-gradient(rgba(101, 6, 160, 0.9), rgba(255, 255, 255, 0.9)), url('../images/background.JPG') no-repeat center center/cover;
    color: var(--white);
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.stat-item {
    padding: 30px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-text {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Contact Section */
.contact {
    background: var(--light);
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
}

.contact-info h3 {
    color: var(--secondary);
    margin-bottom: 25px;
}

.contact-detail {
    display: flex;
    margin-bottom: 25px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.contact-icon i {
    color: var(--white);
    font-size: 1.2rem;
}

.contact-text h4 {
    color: var(--secondary);
    margin-bottom: 5px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
}

.contact-form textarea {
    resize: vertical;
}

/* Footer */
footer {
    background: linear-gradient( rgba(255, 255, 255, 0.9), rgba(101, 6, 160, 0.9)), url('../images/Image1.png') no-repeat center center/cover;
    color: var(--dark);
    padding: 40px 0;
}

.footer-container {
    display: flex;
    justify-content: flex-start; /* Justifies content to the left */
    gap: 60px;
    flex-wrap: wrap;
    padding: 60px 0;
    border-bottom: 1px solid var(--white);
}

.footer-column {
    flex: 1;
    min-width: 250px;
    text-align: left; /* Aligns text to the left */
}

.footer-column h4 {
    color: var(--dark);
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0; /* Aligns the underline to the left */
    width: 40px;
    height: 2px;
    background: var(--secondary);
}

/* Style des liens rapides */
.quick-links ul {
    list-style: none;
    text-align: left; /* Aligns the list to the left */
}

.quick-links ul li {
    margin-bottom: 12px;
}

.quick-links ul li a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.quick-links ul li a:hover {
    color: var(--secondary);
    padding-left: 8px; /* Animates from the left */
}

/* Style des infos de contact */
.contact-info p {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Aligns contact details to the left */
}

.contact-info i {
    color: var(--dark);
    margin-right: 15px; /* Adjust margin for left alignment */
    margin-left: 0;
    width: 20px;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: flex-start; /* Aligns social icons to the left */
    margin-top: 15px;
}

.social-links a {
    color: var(--dark);
    font-size: 1.5rem;
    margin: 0 10px 0 0; /* Adjust margin for left alignment */
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--secondary);
}

/* Partners Logos */
.footer-column.partners .partner-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; /* Justifies logos to the left */
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.footer-column.partners .partner-logos img {
    max-height: 50px;
    width: auto;
    filter: grayscale(100%) brightness(150%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.footer-column.partners .partner-logos img:hover {
    filter: grayscale(0%) brightness(100%);
    opacity: 1;
    transform: scale(1.05);
}


.footer-bottom {
    padding: 20px 0;
    text-align: center;
    color: var(--white);
}

.mobile-close {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

@media (max-width: 768px) {
    .mobile-close {
        display: block;
    }
    .header-container {
        display: flex;
        align-items: center;      /* centrage vertical */
        width: 100%;
    }

    .logo {
        margin-bottom: 0px;
        margin-right: auto;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        margin-top: 20px;
    }

    nav ul li {
        margin: 10px 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-image {
        margin-bottom: 30px;
    }

    .feature-item {
        flex-direction: column;
        text-align: center;
    }

    .feature-icon {
        margin: 0 auto 15px;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .contact-detail {
        flex-direction: column;
        text-align: center;
    }

    .contact-icon {
        margin: 0 auto 15px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .footer-column {
        text-align: center; /* Reset text alignment for mobile */
    }
    
    .footer-column h4::after {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }

    .quick-links ul, .quick-links ul li a {
        text-align: center;
    }

    .quick-links ul li a:hover {
        padding-left: 0;
        padding-right: 8px; /* Corrects animation for mobile */
    }

    .contact-info p {
        justify-content: center;
    }

    .contact-info i {
        margin-left: 0;
        margin-right: 15px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .social-links a {
        margin: 0 10px;
    }
    .footer-column.partners .partner-logos {
        justify-content: center; /* Centrer les logos sur les petits écrans */
    }
}

/* Menu mobile */
@media (max-width: 768px) {
    nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background: var(--white);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 999;
        padding-top: 80px;
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        padding: 20px;
    }
    
    nav ul li {
        margin: 15px 0;
    }
    
    .mobile-toggle {
        margin-left: auto;        /* sécurise : reste à l’extrême droite */
        font-size: 1.8rem;
        cursor: pointer;
        color: var(--dark);
    }
    
    .mobile-toggle i {
        font-size: 1.8rem;
        color: var(--dark);
    }
    
    /* Empêcher le défilement quand le menu est ouvert */
    body.no-scroll {
        overflow: hidden;
    }
    
    /* Overlay sombre lorsque le menu est ouvert */
    nav.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

/* ----------  MOBILE NAV  ---------- */
@media (max-width: 768px) {
    nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        max-width: 80vw;
        height: 100vh;
        background: var(--white);
        box-shadow: -5px 0 15px rgba(0, 0, 0, .1);
        transition: right .3s ease;
        z-index: 999;
        padding-top: 80px;
    }
    nav.active { right: 0; }

    nav ul {
        flex-direction: column;
        padding: 20px;
    }
    nav ul li { margin: 15px 0; }

    .mobile-toggle,
    .mobile-close {
        display: block;
        font-size: 1.8rem;
        cursor: pointer;
        color: var(--dark);
    }
    .mobile-close {
        position: absolute;
        top: 20px;
        right: 20px;
    }

    body.no-scroll { overflow: hidden; }
}