/* Importation de la nouvelle police depuis Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;800&display=swap');

/* Palette de couleurs (Logo) */
:root {
    --primary-color: #0A2463;
    --accent-orange: #f06a4e;
    --accent-purple: #8367a8;
    --accent-teal: #49b5a9;
    --accent-light-blue: #93c6d5;
    --secondary-color: #FAF8F5;    
    --text-color: #333;
    --background-color: #FFFFFF;
    --header-height: 80px;
}

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

/* Style général du corps de la page */
body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.8;
    font-size: 17px;
    color: var(--text-color);
    background-color: var(--background-color);
    scroll-behavior: smooth;
    padding-top: var(--header-height); 
}

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

/* Header et barre de navigation */
header {
    background-color: var(--background-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

nav .logo {
    font-size: 1.8em;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    z-index: 1001;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links li a:hover {
    color: var(--accent-purple);
}

.nav-links li a::after {
    content: "";
    display: block;
    width: 0%;
    height: 2px;
    background-color: var(--accent-purple);
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
}

.nav-links li a:hover::after {
    width: 100%;
}

.contact-button {
    background-color: var(--accent-orange);
    color: var(--background-color);
    padding: 14px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.contact-button:hover {
    background-color: #d85c42;
    transform: scale(1.05);
}

.hamburger-menu-btn, .close-menu-btn {
    display: none;
    cursor: pointer;
    font-size: 1.8rem;
}

/* Style des sections principales */
main {}

section {
    padding: 90px 0;
    text-align: center;
}

#accueil {
    padding-top: 0;
}

section:nth-of-type(even) {
    background-color: var(--secondary-color);
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
}

h1 {
    font-size: 4em;
    margin-bottom: 25px;
}

h2 {
    font-size: 3em;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.section-subtitle {
    font-size: 1.3em;
    color: #555;
    max-width: 750px;
    margin: 0 auto 60px auto;
}

/* Section Accueil (Hero) */
.hero {
    min-height: calc(90vh - var(--header-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    position: relative;
    background-image: url('entete.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 40px 20px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 36, 99, 0.7);
    z-index: 1;
}

.hero h1, .hero p, .hero .cta-button {
    position: relative;
    z-index: 2;
}

.hero h1 {
    animation: heroFadeInUp 1s 0.5s ease-out forwards;
    opacity: 0;
}

.hero p {
    font-size: 1.5em;
    margin-bottom: 45px;
    max-width: 650px;
    animation: heroFadeInUp 1s 0.7s ease-out forwards;
    opacity: 0;
}

.cta-button {
    background-color: var(--accent-orange);
    color: var(--background-color);
    padding: 16px 32px;
    font-size: 1.3em;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    transition: all 0.3s ease;
    animation: heroFadeInUp 1s 0.9s ease-out forwards;
    opacity: 0;
}

.cta-button:hover {
    background-color: #d85c42;
    transform: scale(1.05);
}

/* Section Services */
#services .service-item {
    background: var(--background-color);
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.07);
    margin-bottom: 25px;
    text-align: left;
    border-left: 5px solid;
}

#services .service-item:nth-child(1) { border-left-color: var(--accent-orange); }
#services .service-item:nth-child(2) { border-left-color: var(--accent-purple); }
#services .service-item:nth-child(3) { border-left-color: var(--accent-teal); }
#services .service-item h3 { color: var(--primary-color); margin-bottom: 15px; font-size: 1.6em; }

/* Section Modules */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    text-align: left;
}

.module-card {
    background-color: var(--background-color);
    border-radius: 10px;
    padding: 35px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 5px solid;
}

.module-card:hover { transform: translateY(-10px); box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1); }
.module-card:nth-child(3n + 1) { border-top-color: var(--accent-orange); }
.module-card:nth-child(3n + 2) { border-top-color: var(--accent-purple); }
.module-card:nth-child(3n) { border-top-color: var(--accent-teal); }
.module-card i { font-size: 45px; margin-bottom: 25px; color: var(--primary-color); transition: color 0.3s ease, transform 0.3s ease; }
.module-card:hover i { transform: scale(1.2); }
.module-card:nth-child(3n + 1):hover i { color: var(--accent-orange); }
.module-card:nth-child(3n + 2):hover i { color: var(--accent-purple); }
.module-card:nth-child(3n):hover i { color: var(--accent-teal); }
.module-card h3 { font-size: 1.6em; color: var(--primary-color); margin-bottom: 15px; }
.module-card p { font-size: 1.05em; line-height: 1.8; }

/* Formulaire de Contact */
#contact .container {
    background-color: var(--background-color);
    padding: 50px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

form { display: flex; flex-direction: column; max-width: 700px; margin: 0 auto; text-align: left; }
form label { margin-bottom: 8px; font-weight: 700; }
form input, form textarea { padding: 14px; margin-bottom: 25px; border: 1px solid #ccc; border-radius: 5px; font-size: 1em; }

form button {
    background-color: var(--accent-orange);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form button:hover {
    background-color: #d85c42;
}

/* Footer */
footer { background-color: var(--primary-color); color: white; text-align: center; padding: 25px 0; }

/* Animations de Scroll */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: var(--delay, 0s);
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: none;
}
.slide-in-bottom { transform: translateY(50px); }
.slide-in-left { transform: translateX(-50px); }
.slide-in-right { transform: translateX(50px); }

/* Keyframes pour l'animation du titre hero */
@keyframes heroFadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 992px) {
    .modules-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--background-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: right 0.5s ease-in-out;
        z-index: 1000;
    }
    .nav-links.mobile-nav-active { right: 0; }
    .nav-links li a { font-size: 1.5rem; }
    .hamburger-menu-btn { display: block; z-index: 1001; }
    .close-menu-btn { display: block; position: absolute; top: 30px; right: 30px; }
    .contact-button { display: none; }
    body { font-size: 16px; }
    h1 { font-size: 2.8em; }
    h2 { font-size: 2.2em; }
    section { padding: 60px 0; }
    #contact .container { padding: 30px 20px; }
}

/* Pop-up de notification */
#popup-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(200%);
    background-color: #28a745;
    color: white;
    padding: 16px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2000;
    opacity: 0;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}
#popup-notification.show { transform: translateX(-50%) translateY(0); opacity: 1; }
#popup-notification .popup-content { display: flex; align-items: center; gap: 15px; }
#popup-notification .popup-content i { font-size: 1.5em; }
#popup-notification .popup-content p { margin: 0; font-weight: 600; }
#popup-notification .popup-close { font-size: 1.8em; font-weight: bold; color: white; cursor: pointer; margin-left: 20px; line-height: 1; }
#popup-notification .popup-close:hover { opacity: 0.8; }