/* Variables de Couleurs */
:root {
    --color-white: #FFFFFF;
    --color-black: #111111;
    --color-blue: #007AFF;
    --color-light-grey: #f4f4f4;
    --color-dark-grey: #333333;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--color-black);
    background-color: var(--color-white);
}

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

h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 20px;
}

h1 {
    font-size: 3.5em;
    line-height: 1.1;
}

h2 {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-blue);
    margin: 15px auto 0;
}

h3 {
    font-size: 1.5em;
}

p {
    margin-bottom: 15px;
}

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

a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
}

.btn-cta {
    background-color: var(--color-blue);
    color: var(--color-white);
    border: 2px solid var(--color-blue);
}

.btn-cta:hover {
    background-color: var(--color-white);
    color: var(--color-blue);
    text-decoration: none;
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9em;
}

/* Header */
.header {
    background-color: var(--color-white);
    padding: 20px 0;
    border-bottom: 1px solid var(--color-light-grey);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.logo a {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--color-blue);
    text-decoration: none;
}

.logo a:hover {
    color: var(--color-blue);
}

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

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

.main-nav ul li a {
    color: var(--color-black);
    font-weight: 600;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--color-blue);
    text-decoration: none;
}

.menu-toggle {
    display: none; /* Masqué par défaut sur desktop */
    background: none;
    border: none;
    font-size: 1.8em;
    color: var(--color-blue);
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh; /* Pleine hauteur de l'écran */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white); /* Texte blanc sur fond sombre/vidéo */
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4); /* Assombrit la vidéo pour la lisibilité du texte */
}

.hero-image { /* Si vous utilisez une image au lieu d'une vidéo */
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
    filter: brightness(0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 4em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.5em;
    margin-bottom: 40px;
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Section Common Styles */
section {
    padding: 80px 0;
}

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

/* Services Section */
.services-section {
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.service-item {
    background-color: var(--color-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.service-icon {
    font-size: 3.5em;
    color: var(--color-blue);
    margin-bottom: 20px;
    display: block;
}

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

.service-item p {
    font-size: 1.1em;
    color: var(--color-dark-grey);
}

/* Portfolio Section */
.portfolio-section {
    text-align: center;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.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%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 122, 255, 0.8); /* Bleu électrique semi-transparent */
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.portfolio-overlay h4 {
    font-size: 1.4em;
    margin-bottom: 15px;
}

/* Why Us Section */
.why-us-section {
    text-align: center;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.advantage-item {
    background-color: var(--color-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.06);
    text-align: center;
    transition: box-shadow 0.3s ease;
}

.advantage-item:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.advantage-icon {
    font-size: 3em;
    color: var(--color-blue);
    margin-bottom: 20px;
    display: block;
}

.advantage-item h3 {
    margin-bottom: 10px;
    color: var(--color-black);
}

.advantage-item p {
    color: var(--color-dark-grey);
}


/* Contact Section (Footer) */
.contact-section {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 80px 0 0; /* Padding top pour la section, le bas est géré par footer-bottom */
    text-align: center;
}

.contact-section h2 {
    color: var(--color-white);
}

.contact-section h2::after {
    background-color: var(--color-blue);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 50px;
    text-align: left;
}

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

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-dark-grey);
    border-radius: 5px;
    background-color: var(--color-dark-grey);
    color: var(--color-white);
    font-family: 'Montserrat', sans-serif;
    font-size: 1em;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #bbb;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form .btn-cta {
    width: auto;
    display: inline-block;
    border: none;
    cursor: pointer;
}

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

.contact-info p {
    font-size: 1.1em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info .contact-icon {
    color: var(--color-blue);
    font-size: 1.3em;
}

.social-links {
    margin-top: 30px;
    display: flex;
    gap: 20px;
    justify-content: flex-start;
}

.social-links a {
    color: var(--color-white);
    font-size: 1.8em;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--color-blue);
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 1px solid var(--color-dark-grey);
    color: var(--color-light-grey);
    font-size: 0.9em;
}


/* Responsive Design */
@media (max-width: 992px) {
    h1 {
        font-size: 3em;
    }

    h2 {
        font-size: 2em;
        margin-bottom: 40px;
    }

    .header .btn-cta {
        display: none; /* Cache le CTA dans le header sur les tablettes */
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: -100%; /* Masqué par défaut */
        width: 70%;
        height: 100vh;
        background-color: var(--color-black);
        padding-top: 100px;
        transition: left 0.4s ease-in-out;
        z-index: 999;
        box-shadow: 5px 0 15px rgba(0,0,0,0.2);
    }

    .main-nav.active {
        left: 0;
    }

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

    .main-nav ul li {
        margin: 20px 0;
    }

    .main-nav ul li a {
        color: var(--color-white);
        font-size: 1.3em;
    }

    .menu-toggle {
        display: block; /* Affiche le bouton de menu sur les tablettes et mobiles */
    }

    .hero-content h1 {
        font-size: 3em;
    }

    .hero-content p {
        font-size: 1.2em;
    }

    .contact-grid {
        grid-template-columns: 1fr; /* Une colonne sur les tablettes */
    }

    .contact-info {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5em;
    }

    .hero-content h1 {
        font-size: 2.5em;
    }

    .hero-content p {
        font-size: 1em;
    }

    .service-item,
    .portfolio-item,
    .advantage-item {
        padding: 30px;
    }

    .services-grid,
    .portfolio-grid,
    .advantages-grid {
        gap: 20px;
    }

    .contact-form,
    .contact-info {
        padding: 0 10px; /* Ajoute un peu de padding horizontal pour le mobile */
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .logo a {
        font-size: 1.5em;
    }

    .hero-content h1 {
        font-size: 2em;
    }

    .hero-content p {
        font-size: 0.9em;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    section {
        padding: 60px 0;
    }

    .service-icon, .advantage-icon {
        font-size: 3em;
    }
}

/* --- Styles de la Modale Avant/Après --- */
.modal {
    display: none; /* Masqué par défaut */
    position: fixed;
    z-index: 2000; /* Au-dessus de tout */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9); /* Fond noir semi-transparent */
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--color-white);
    margin: auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 1000px; /* Taille maximale */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

.close-btn {
    color: var(--color-dark-grey);
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--color-blue);
    text-decoration: none;
}

.modal-content h3 {
    color: var(--color-black);
    text-align: left;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--color-blue); /* Ligne graphique d'accentuation */
    padding-bottom: 10px;
    padding-right: 40px; /* Espace pour le bouton de fermeture */
}

.before-after-display {
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.image-column {
    flex: 1;
    text-align: center;
}

.image-column h4 {
    color: var(--color-blue);
    font-weight: 600;
    font-size: 1.2em;
    margin-bottom: 10px;
}

.image-column img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Responsive pour la modale */
@media (max-width: 768px) {
    .before-after-display {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }
}
/* --- Styles de la Section Vidéo --- */

.video-section {
    text-align: center;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.video-item {
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden; /* Important pour les bords arrondis */
    padding-bottom: 20px;
}

.video-item h4 {
    margin: 20px 0 10px;
    font-weight: 600;
    color: var(--color-black);
}

/* Rendre l'IFRAME YouTube Responsive (Très important !) */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 (hauteur/largeur) */
    height: 0;
    overflow: hidden;
    width: 100%;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}