:root {
    --primary-color: #4A4A4A; /* Gris foncé du logo */
    --accent-color: #5095A3;  /* Bleu-vert/Sarcelle des pixels */
    --light-bg-color: #f8f9fa;
    --white-color: #FFFFFF;
    --text-color: #333333;
    --text-light-color: #6c757d;
    --font-family: 'Poppins', sans-serif;
    --border-radius: 8px;
    --box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --error-color: #721c24;
    --success-color: #155724;
}

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

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--white-color);
    overflow-x: hidden; /* Empêche le scroll horizontal dû aux animations */
}

html {
    scroll-behavior: smooth;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

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

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

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8em;
    font-weight: 700;
    text-decoration: none; /* Pour le lien autour du logo */
}
.logo-j { color: var(--primary-color); }
.logo-web { color: var(--primary-color); }

.logo-pixels {
    display: flex;
    margin-left: 8px;
    align-items: flex-end; /* Aligner les pixels en bas */
}
.pixel {
    display: inline-block;
    background-color: var(--accent-color);
    margin-left: 3px;
    animation: pixelBounce 1.5s infinite ease-in-out;
}
.pixel.p1 { width: 10px; height: 10px; animation-delay: 0s;}
.pixel.p2 { width: 10px; height: 15px; animation-delay: 0.2s;}
.pixel.p3 { width: 10px; height: 8px;  animation-delay: 0.4s;}
.pixel.p4 { width: 10px; height: 12px; animation-delay: 0.6s;}

@keyframes pixelBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}


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

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

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

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

nav ul li a:hover, nav ul li a.active {
    color: var(--accent-color);
}
nav ul li a:hover::after, nav ul li a.active::after {
    width: 100%;
}

/* --- Hero Section --- */
#hero {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: var(--white-color);
    text-align: center;
    padding: 180px 20px 120px 20px; /* Ajout padding horizontal pour mobile */
    position: relative;
    overflow: hidden; /* Pour les pixels en fond */
}

.hero-pixels-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; /* Pour ne pas interférer avec le contenu */
}
/* Les pixels du fond seront générés par JS */

#hero h1 {
    font-size: 3.2em;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

#hero .highlight {
    /* Pas besoin de couleur ici car le fond est déjà coloré */
    display: inline-block; /* Pour les animations de transformation */
}

#hero p {
    font-size: 1.3em;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.cta-button {
    background-color: var(--white-color);
    color: var(--accent-color);
    padding: 15px 35px;
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
}

.cta-button:hover {
    background-color: transparent;
    color: var(--white-color);
    border-color: var(--white-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* --- Sections Générales --- */
section {
    padding: 80px 20px; /* Ajout de padding horizontal pour mobile */
}
section:nth-child(even) { /* Alternance de fond pour les sections */
    background-color: var(--light-bg-color);
}

section h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 60px;
    color: var(--primary-color);
    position: relative;
}
section h2::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

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

.service-card {
    background-color: var(--white-color);
    padding: 35px 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.service-icon {
    margin-bottom: 20px;
}
.service-icon svg {
    width: 50px;
    height: 50px;
    color: var(--accent-color);
}

.service-card h3 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-light-color);
    font-size: 0.95em;
}


/* --- Section Notre Processus --- */
#process {
    background-color: var(--light-bg-color);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 35px;
    margin-top: 0; 
}

.process-step {
    background-color: var(--white-color); 
    padding: 35px 30px; 
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow); 
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-top-color 0.3s ease;
    border-top: 4px solid transparent; 
}

.process-step:hover {
    transform: translateY(-10px); 
    box-shadow: 0 15px 35px rgba(0,0,0,0.15); 
    border-top-color: var(--accent-color); 
}

.process-icon {
    margin-bottom: 20px; 
}
.process-icon svg {
    width: 48px; 
    height: 48px;
    color: var(--accent-color);
}

.step-number {
    position: absolute;
    top: 20px; 
    left: 25px; 
    font-size: 1.5em; 
    font-weight: 700;
    color: var(--accent-color);
    opacity: 0.6; 
    line-height: 1;
    background-color: rgba(80, 149, 163, 0.1); 
    padding: 5px 8px;
    border-radius: 4px;
}

.process-step h3 {
    font-size: 1.4em; 
    color: var(--primary-color);
    margin-top: 10px; 
    margin-bottom: 15px; 
}

.process-step p {
    font-size: 0.95em; 
    color: var(--text-light-color);
    line-height: 1.7; 
}


/* --- Portfolio Section --- */
#portfolio { /* AJOUTÉ pour s'assurer que le fond est blanc si la section précédente est --light-bg-color */
    background-color: var(--white-color);
}
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    position: relative;
    transition: transform 0.3s ease;
}

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

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

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

.portfolio-info {
    padding: 20px;
    background-color: rgba(255,255,255,0.95); 
    position: relative; 
}

.portfolio-info h3 {
    font-size: 1.3em;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.portfolio-description { 
    font-size: 0.9em;
    color: var(--text-light-color);
    margin-bottom: 15px;
}

.portfolio-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}
.portfolio-link:hover {
    text-decoration: underline;
}


/* --- Section Témoignages --- */
#testimonials {
    background-color: var(--light-bg-color); /* MODIFIÉ pour alternance */
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 0; 
}
.testimonial-card {
    background-color: var(--white-color); /* MODIFIÉ pour contraste sur fond clair */
    padding: 35px 30px; 
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative; 
}
.testimonial-card:before { 
    content: '“';
    font-family: Georgia, serif;
    font-size: 5em; 
    color: var(--accent-color);
    opacity: 0.15; 
    position: absolute;
    top: 15px; 
    left: 20px; 
    line-height: 0.8;
    z-index: 0; 
}
.testimonial-quote {
    font-style: italic;
    color: var(--text-color);
    margin-bottom: 25px; 
    font-size: 1.05em;
    line-height: 1.75; 
    position: relative; 
    z-index: 1;
}
.testimonial-author {
    font-weight: 700; 
    color: var(--primary-color);
    margin-bottom: 5px;
    text-align: right;
}
.testimonial-company {
    font-size: 0.9em;
    color: var(--text-light-color);
    text-align: right;
}


/* --- Section FAQ --- */
#faq {
    background-color: var(--white-color); /* MODIFIÉ pour alternance */
}

.faq-list {
    max-width: 850px; 
    margin: 0 auto; 
}

.faq-item {
    background-color: var(--white-color); 
    margin-bottom: 18px; 
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.07); 
    border-left: 4px solid transparent; 
    transition: border-left-color 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}
.faq-item.active {
    border-left-color: var(--accent-color); 
    box-shadow: 0 8px 20px rgba(80, 149, 163, 0.15); 
}

.faq-question {
    width: 100%;
    background-color: transparent;
    border: none;
    padding: 22px 30px; 
    text-align: left;
    font-family: var(--font-family);
    font-size: 1.2em; 
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s ease; 
}

.faq-icon {
    font-size: 1.4em; 
    font-weight: bold; 
    color: var(--accent-color);
    transition: transform 0.3s ease-in-out; 
    min-width: 20px; 
    text-align: center;
}

.faq-item.active .faq-icon {
    transform: rotate(135deg); 
}

.faq-answer {
    padding: 0 30px; 
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.25, 0.1, 0.25, 1.0), 
                padding-top 0.35s cubic-bezier(0.25, 0.1, 0.25, 1.0),
                padding-bottom 0.35s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.faq-answer p {
    padding-bottom: 25px;
    color: var(--text-light-color);
    line-height: 1.75; 
    font-size: 0.95em; 
}
.faq-item.active .faq-answer {
    /* max-height et padding-top sont gérés par JS */
}


/* --- Contact Section Améliorée --- */
#contact {
    background-color: var(--light-bg-color); /* MODIFIÉ pour alternance */
}

.contact-intro {
    text-align: center;
    max-width: 750px;
    margin: -30px auto 40px; 
    font-size: 1.05em;
    color: var(--text-light-color);
}

#form-messages {
    text-align: center;
    padding: 15px;
    margin-bottom: 25px; 
    border-radius: var(--border-radius);
    font-weight: 500;
    display: none; 
    border: 1px solid transparent; 
}
#form-messages.success {
    background-color: #e6f7f0; 
    color: var(--success-color);
    border-color: #a7d7c5; 
    display: block;
}
#form-messages.error {
    background-color: #fdecea; 
    color: var(--error-color);
    border-color: #f5b8be; 
    display: block;
}

.contact-form {
    max-width: 750px; 
    margin: 0 auto;
    background-color: var(--white-color); 
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95em;
    color: var(--primary-color);
}
.contact-form label .required {
    color: var(--accent-color); 
    font-weight: bold;
    margin-left: 2px;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


.form-row {
    display: flex;
    gap: 25px; 
    margin-bottom: 22px; 
}
.form-row .form-group {
    flex: 1;
    margin-bottom: 0; 
}

/* MODIFIÉ - Styles communs pour les champs de formulaire */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #ccd1d9; 
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 1em;
    line-height: 1.5; /* AJOUTÉ pour la hauteur de ligne interne */
    color: var(--text-color); /* AJOUTÉ pour la couleur du texte sélectionné/saisi */
    background-color: var(--white-color); 
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-appearance: none; /* AJOUTÉ */
    -moz-appearance: none;    /* AJOUTÉ */
    appearance: none;         /* AJOUTÉ */
}

/* MODIFIÉ - Styles spécifiques pour le SELECT amélioré */
.contact-form select {
    background-image: 
        linear-gradient(45deg, transparent 50%, var(--accent-color) 50%),
        linear-gradient(135deg, var(--accent-color) 50%, transparent 50%);
    background-position:
        calc(100% - 20px) calc(1em + 2px), /* Ajuster '1em + 2px' si line-height change */
        calc(100% - 15px) calc(1em + 2px);
    background-size:
        5px 5px,
        5px 5px;
    background-repeat: no-repeat;
    padding-right: 45px; 
    cursor: pointer;
}

/* AJOUTÉ - Style pour l'option placeholder du select */
.contact-form select:required:invalid { 
    color: var(--text-light-color); 
}
.contact-form select option { /* Style de base pour les options dans le dropdown */
    color: var(--text-color); 
    background-color: var(--white-color); /* Souvent ignoré par les navigateurs */
}
.contact-form select option[value=""] { 
    color: var(--text-light-color); /* Cible le placeholder avec value="" */
}
/* FIN DES MODIFICATIONS POUR SELECT */


.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form input[type="tel"]:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(80, 149, 163, 0.25); 
}

/* AJOUTÉ - Style de survol pour le select */
.contact-form select:hover {
    border-color: #a8b0bc; /* Ou une autre couleur de survol de votre choix */
}

.contact-form textarea {
    resize: vertical;
    min-height: 130px; 
    /* Pour textarea, on ne veut pas appearance: none, car ça enlève la barre de redimensionnement */
    /* Donc on le réinitialise ici si besoin, bien que l'ordre CSS devrait déjà le faire */
    -webkit-appearance: textarea; 
    -moz-appearance: textarea;
    appearance: textarea;
}

.form-group-checkbox { 
    display: flex;
    align-items: flex-start; 
    margin-bottom: 25px;
}
.contact-form input[type="checkbox"] {
    width: auto; 
    margin-right: 12px;
    margin-top: 3px; 
    accent-color: var(--accent-color); 
    flex-shrink: 0; 
    -webkit-appearance: checkbox; /* Assurer l'apparence native pour checkbox */
    -moz-appearance: checkbox;
    appearance: checkbox;
}
.rgpd-label {
    font-size: 0.9em; 
    font-weight: 400;
    color: var(--text-light-color);
    line-height: 1.5;
}
.rgpd-label a {
    color: var(--accent-color);
    text-decoration: underline;
}
.rgpd-label a:hover {
    text-decoration: none;
}

.contact-form .cta-button {
    background-color: var(--accent-color);
    color: var(--white-color);
    width: 100%;
    border: 2px solid var(--accent-color);
    padding: 16px 35px; 
    font-size: 1.05em; 
    display: flex; 
    align-items: center;
    justify-content: center;
}
.contact-form .cta-button:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
}
.contact-form .cta-button.loading {
    cursor: not-allowed;
    background-color: var(--text-light-color); 
    border-color: var(--text-light-color);
}

.loader {
    border: 3px solid var(--white-color);
    border-top: 3px solid var(--primary-color); 
    border-radius: 50%;
    width: 20px; 
    height: 20px;
    animation: spin 0.8s linear infinite; 
    margin-left: 12px; 
    display: none; 
}
.contact-form .cta-button.loading .loader {
    display: inline-block;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* --- Footer --- */
footer {
    background-color: var(--primary-color);
    color: var(--white-color);
    text-align: center;
    padding: 50px 20px; 
}
.footer-logo {
    font-size: 1.6em; 
    font-weight: 700;
    margin-bottom: 15px;
}
.footer-logo .logo-j, .footer-logo .logo-web {
    color: var(--white-color);
}
footer p {
    margin-bottom: 8px; 
    font-size: 0.9em;
    opacity: 0.85; 
}
.footer-links {
    margin: 20px 0; 
}
.footer-links a {
    color: #cdd3d6; 
    margin: 0 12px; 
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}
.footer-links a:hover {
    color: var(--white-color);
    text-decoration: underline;
}


/* --- Animations on Scroll --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.delay-05 { transition-delay: 0.1s !important; } 
.delay-1 { transition-delay: 0.2s !important; }
.delay-2 { transition-delay: 0.4s !important; }
.delay-3 { transition-delay: 0.6s !important; }


/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 10px 0;
    }
    header .container {
        flex-direction: column;
        gap: 10px; 
    }
    nav ul {
        margin-top: 10px;
        flex-wrap: wrap; 
        justify-content: center; 
        gap: 5px 15px; 
    }
    nav ul li {
        margin-left: 0; 
    }
    #hero {
        padding: 140px 20px 70px 20px;
    }
    #hero h1 {
        font-size: 2.4em; 
    }
    #hero p {
        font-size: 1.15em; 
    }
    section {
        padding: 60px 20px; 
    }
    section h2 {
        font-size: 2.1em; 
        margin-bottom: 40px;
    }
    .services-grid, 
    .process-grid, 
    .portfolio-grid,
    .testimonials-grid { 
        grid-template-columns: 1fr; 
    }
    .form-row {
        flex-direction: column;
        gap: 0; 
    }
    .form-row .form-group {
        margin-bottom: 22px; 
    }
    .form-row .form-group:last-child {
        margin-bottom: 0; 
    }
    .contact-form {
        padding: 30px; 
    }
    .faq-question {
        font-size: 1.1em; 
        padding: 18px 20px;
    }
    .faq-answer {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    #hero h1 {
        font-size: 2em;
    }
    #hero p {
        font-size: 1em;
    }
    section h2 {
        font-size: 1.8em;
    }
    .cta-button { 
        padding: 12px 25px;
        font-size: 0.95em;
    }
    .contact-form .cta-button {
        font-size: 1em; 
    }
    .logo {
        font-size: 1.6em;
    }
    .footer-links a {
        margin: 0 8px;
        font-size: 0.9em;
    }
}


/* Styles pour les pages légales (si vous les avez) */
.legal-page-content {
    padding: 120px 20px 60px 20px; 
    min-height: 70vh; 
    background-color: var(--white-color); 
}

.legal-page-content .container {
    max-width: 800px; 
    margin: 0 auto;
}

.legal-page-content h1 {
    font-size: 2.5em;
    margin-bottom: 30px;
    text-align: center;
    color: var(--primary-color);
}
.legal-page-content h1::after { 
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.legal-page-content h2 {
    font-size: 1.8em;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 1px solid #eee; 
    padding-bottom: 10px;
}

.legal-page-content p,
.legal-page-content ul li {
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--text-color);
}

.legal-page-content ul {
    list-style-type: disc; 
    list-style-position: outside;
    padding-left: 40px; 
}
.legal-page-content strong {
    color: var(--primary-color);
}

.legal-page-content a {
    color: var(--accent-color);
    text-decoration: underline;
}
.legal-page-content a:hover {
    text-decoration: none;
}
/* --- Styles pour le NOUVEL effet de pixels (Canvas) --- */

#pixelCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Important: le canvas doit être derrière le contenu */
}

/* Assurez-vous que le contenu du Hero est bien au-dessus du canvas */
#hero .container {
    position: relative;
    z-index: 1;
}