/* ==========================================================================
   1. Variables et Styles Globaux
   ========================================================================== */

/* Définition des couleurs et polices pour une maintenance facile */
:root {
    --primary-color: #005A9C; /* Un bleu professionnel, inspiré du logo */
    --accent-color: #FFA500;  /* Un orange vibrant, inspiré du logo */
    --dark-color: #2c3e50;    /* Pour le texte principal */
    --light-color: #ffffff;   /* Texte sur fonds sombres */
    --bg-color: #ffffff;      /* Fond principal */
    --grey-bg-color: #f9f9f9; /* Fond pour sections alternées */
    
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
}

/* Reset de base et configuration globale */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth; /* Permet un défilement fluide lors du clic sur les liens d'ancrage */
    font-size: 16px;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--bg-color);
}

h1, h2, h3 {
    font-family: var(--font-primary);
    font-weight: 600;
    line-height: 1.2;
}

section {
    padding: 80px 20px; /* Espace vertical et horizontal pour chaque section */
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 50px;
    position: relative;
}

/* Ligne décorative sous les titres de section */
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 10px auto 0;
}

/* ==========================================================================
   2. Barre de Navigation (Header)
   ========================================================================== */
header {
    background: var(--light-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-link {
    color: var(--dark-color);
    text-decoration: none;
    font-family: var(--font-primary);
    font-weight: 600;
    padding: 10px 15px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-color);
}

/* Style spécifique pour le bouton Contact */
.contact-button {
    background-color: var(--accent-color);
    color: var(--light-color);
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.contact-button:hover {
    background-color: #e69500; /* Orange plus foncé */
    color: var(--light-color);
    transform: translateY(-2px);
}

/* ==========================================================================
   3. Section Héros (Accueil)
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0, 90, 156, 0.8), rgba(44, 62, 80, 0.8)), url('https://via.placeholder.com/1920x1080.png/2c3e50/FFFFFF?text=Background') no-repeat center center/cover;
    color: var(--light-color);
    padding-top: 80px; /* Pour ne pas être caché par le header */
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Bouton principal d'appel à l'action */
.cta-button {
    background-color: var(--accent-color);
    color: var(--light-color);
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.cta-button:hover {
    background-color: #e69500;
    transform: translateY(-3px);
}


/* ==========================================================================
   4. Section Services
   ========================================================================== */
.services-section {
    background-color: var(--grey-bg-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--light-color);
    padding: 40px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 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 8px 25px rgba(0,0,0,0.12);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* ==========================================================================
   5. Section Portfolio
   ========================================================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.portfolio-item img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 90, 156, 0.95), transparent);
    color: var(--light-color);
    padding: 40px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

/* Masquer le titre et ne le montrer qu'au survol */
.portfolio-info p {
    opacity: 0;
    transition: opacity 0.4s ease 0.2s;
}

.portfolio-item:hover .portfolio-info {
    transform: translateY(0);
}

.portfolio-item:hover .portfolio-info p {
    opacity: 1;
}

.portfolio-section .cta-button-secondary {
    display: block;
    width: fit-content;
    margin: 40px auto 0;
    padding: 12px 25px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.3s ease;
}
.portfolio-section .cta-button-secondary:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
}


/* ==========================================================================
   6. Section À Propos
   ========================================================================== */
.about-section {
    background-color: var(--grey-bg-color);
}
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* ==========================================================================
   7. Pied de Page (Footer)
   ========================================================================== */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding-top: 60px;
}

.footer-content h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.footer-content p {
    max-width: 500px;
    margin: 0 auto 30px;
}

.footer-contact-button {
    color: var(--accent-color);
    font-size: 1.2rem;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-bottom-color 0.3s ease;
}
.footer-contact-button:hover {
    border-bottom-color: var(--accent-color);
}

.social-links {
    margin: 30px 0;
}

.social-links a {
    color: var(--light-color);
    font-size: 1.5rem;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    background-color: rgba(0,0,0,0.2);
    padding: 20px;
    font-size: 0.9rem;
}

/* ==========================================================================
   8. Responsive (Adaptation aux petits écrans)
   ========================================================================== */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .navbar {
        flex-direction: column;
        padding: 10px;
    }

    .nav-logo {
        margin-bottom: 10px;
    }

    .nav-menu {
        flex-wrap: wrap; /* Permet aux éléments de passer à la ligne */
        justify-content: center;
    }
    
    .nav-link {
        padding: 8px 10px;
    }

    .hero-section {
        min-height: 70vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }

    section {
        padding: 60px 15px;
    }
    
    .section-title {
        font-size: 2rem;
    }
}