/* --- Variables & Styles Généraux --- */
:root {
    --bg-color: #1a1a1a;
    --primary-color: #007bff;
    --text-color: #f0f0f0;
    --card-bg: #2a2a2a;
    --border-color: #444;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-image: url('../image/background.jpg'); /* Chemin vers votre image */
    background-size: cover; /* Couvre toute la zone */
    background-attachment: fixed; /* L'image reste fixe au défilement */
    background-position: center center; /* Centre l'image */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
    border-bottom: 1px solid var(--border-color);
}

h1, h2, h3 {
    font-weight: 400;
    margin-top: 0;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 400;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #fff;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 400;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn:hover {
    background: #0056b3;
    transform: translateY(-3px);
    color: #fff;
}

/* --- Header & Navigation --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    font-weight: 400;
    font-size: 1.5rem;
    color: #fff;
    z-index: 1001;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav li {
    margin-left: 2rem;
}

.main-nav a {
    font-weight: 400;
}

.mobile-nav-toggle {
    display: none;
}

/* --- Section Hero --- */
#hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 2rem;
    line-height: 1.8;
}

#hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    height: 3rem;
}

.typed-text {
    color: var(--primary-color);
    font-weight: 400;
}

/* --- Section Services --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 300px);
    gap: 2rem;
    justify-content: center;
}

.service-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* --- Section Portfolio --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 300px);
    gap: 2rem;
    justify-content: center; 
}

.portfolio-item {
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.portfolio-item img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    display: block;
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-info h3 {
    margin-top: 0;
}

/* --- Footer --- */
.main-footer {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

.main-footer p {
    margin: 0;
}

/* --- Formulaire de Contact --- */
.formulaire-contact {
    max-width: 600px;
    margin: 2rem auto 0;
    text-align: left;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 5px;
    box-sizing: border-box; /* Important pour que le padding n'ajoute pas à la largeur */
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.bouton-envoyer {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 400;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
}

.bouton-envoyer:hover {
    background: #0056b3;
    transform: translateY(-3px);
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* --- Responsive / Mobile --- */
@media (max-width: 800px) {
    #hero h1 {
        font-size: 2.8rem;
    }
    .subtitle {
        font-size: 1.2rem;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-color);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .main-nav.is-open {
        transform: translateX(0);
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
    }

    .main-nav li {
        margin: 1.5rem 0;
    }

    .main-nav a {
        font-size: 1.5rem;
    }

    .mobile-nav-toggle {
        display: block;
        position: relative;
        z-index: 1001;
        border: none;
        background: transparent;
        width: 30px;
        height: 30px;
        cursor: pointer;
    }

    .hamburger {
        position: absolute;
        width: 30px;
        height: 3px;
        background: #fff;
        border-radius: 3px;
        transition: transform 0.3s ease-in-out;
    }

    .hamburger::before,
    .hamburger::after {
        content: '';
        position: absolute;
        width: 30px;
        height: 3px;
        left: 0px;
        background: #fff;
        border-radius: 3px;
        transition: transform 0.3s ease-in-out;
    }

    .hamburger::before {
        transform: translateY(-10px);
    }

    .hamburger::after {
        transform: translateY(10px);
    }

    .mobile-nav-toggle.is-open .hamburger {
        transform: rotate(45deg);
    }
    .mobile-nav-toggle.is-open .hamburger::before {
        transform: rotate(90deg) translate(0px, 0px);
    }
    .mobile-nav-toggle.is-open .hamburger::after {
        transform: rotate(90deg) translate(0px, 0px);
        opacity: 0;
    }
}