/* Variables */
:root {
    --color-bg: #F9F7F1;
    --color-accent: #E94F37;
    --color-secondary: #1C77C3;
    --color-additional: #F6AE2D;
    --color-text: #2E2E2E;
    --border-radius: 20px;
    --transition: all 0.3s ease;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    --header-height: 80px; /* Variable pour la hauteur du header */
}

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

html, body {
    overflow-x: hidden; /* Empêche le défilement horizontal */
    width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    padding-top: var(--header-height); /* Ajoute un espace égal à la hauteur du header */
}

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

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
    position: relative;
    margin-bottom: 2rem;
    text-align: center;
}

h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--color-accent), var(--color-additional));
    border-radius: 2px;
}

h3 {
    font-size: 1.8rem;
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--color-accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Solution pour les ancres - décalage pour compenser le header fixe */
section {
    padding: 80px 0;
    scroll-margin-top: var(--header-height); /* Ajout pour éviter que le header ne cache les titres de section */
}

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.elem {
    display: inline-block;
    padding: 12px 25px;
    
    font-weight: bold;
    text-align: center;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(to right, var(--color-accent), var(--color-additional));
    color: white;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--color-accent);
    color: white;
    transform: translateY(-3px);
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* Header & Navigation */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed; /* Position fixe au lieu de sticky */
    top: 0;
    left: 0;
    width: 100%; /* Assure que le header prend toute la largeur */
    z-index: 100;
    height: var(--header-height); /* Utilisation de la variable de hauteur */
    display: flex;
    align-items: center;
}

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

.logo a {
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-accent);
    text-transform: lowercase;
    letter-spacing: 2px;
}

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

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

nav ul li a {
    color: var(--color-text);
    font-weight: 500;
    position: relative;
}

nav ul li a:before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: var(--transition);
}

nav ul li a:hover:before {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(to right, var(--color-accent), var(--color-additional));
    color: white;
    text-align: center;
    padding: 150px 0;
    position: relative;
    overflow: hidden;
    margin-top: calc(-1 * var(--header-height)); /* Compense le padding-top du body */
    padding-top: calc(150px + var(--header-height)); /* Ajuste le padding pour compenser */
}

.hero-section:before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/hero-pattern.svg');
    opacity: 0.1;
}

.hero-section h1 {
    margin-bottom: 20px;
    font-size: 3.5rem;
}

.hero-section h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 40px;
}

.hero-section h2:after {
    display: none;
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.about-image img:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Services Section */
.services-section {
    background-color: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background-color: var(--color-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

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

.service-icon {
    margin-bottom: 20px;
    width: 100%;
}

.service-icon img {
    width: 100%;
    border-radius: var(--border-radius);
    height: auto;
    margin: 0 auto;
}

.service-card h3 {
    color: var(--color-accent);
    margin-bottom: 15px;
    margin-top: 15px;
}

/* Benefits Section */
.benefits-section {
    background: linear-gradient(to right, var(--color-secondary), #3498db);
    color: white;
}

.benefits-section h2:after {
    background: white;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.benefit-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 20px;
    transition: var(--transition);
}

.benefit-item:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.2);
}

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

/* Testimonials Section */
.testimonials-section {
    background-color: var(--color-bg);
}

.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.testimonial {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.testimonial:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.testimonial-content {
    position: relative;
    padding: 20px 0;
}

.testimonial-content:before {
    content: '"';
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 4rem;
    font-family: Georgia, serif;
    color: var(--color-accent);
    opacity: 0.2;
}

.testimonial-author {
    margin-top: 20px;
    text-align: right;
}

/* Contact Form Section */
.contact-section {
    background: linear-gradient(to right, var(--color-accent), var(--color-additional));
    color: white;
}

.contact-section h2:after {
    background: white;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group input {
    width: auto;
    margin-right: 10px;
}

.checkbox-group label {
    margin-bottom: 0;
}

/* FAQ Section */
.faq-section {
    background-color: white;
}

.faq-item {
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.faq-question a {
    display: block;
    padding: 15px 0;
    color: var(--color-text);
    font-weight: 600;
    position: relative;
}

.faq-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--color-accent);
}

.faq-answer {
    display: none;
    padding: 0 0 20px;
}

.faq-answer.open {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Clients Section */
.clients-section {
    background-color: var(--color-bg);
}

.clients-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
}

.client-logo {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.client-logo:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

footer h3 {
    color: white;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

footer h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--color-accent);
}

footer a {
    color: #ddd;
}

footer a:hover {
    color: var(--color-additional);
}

footer ul {
    list-style: none;
}

footer ul li {
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    padding: 20px;
    box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    display: none;
}

.cookie-consent.show {
    display: flex;
}

.cookie-consent p {
    margin: 0;
    flex: 1;
}

.cookie-link {
    margin-left: 20px;
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.service-card, .benefit-item, .testimonial {
    animation: fadeInUp 0.6s ease forwards;
}

.service-card:nth-child(2) {
    animation-delay: 0.2s;
}

.service-card:nth-child(3) {
    animation-delay: 0.4s;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .services-grid, .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonials-slider {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: white;
        transition: var(--transition);
        display: flex;
        flex-direction: column;
        justify-content: center;
        z-index: 200;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    nav.open {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 10px 0;
        text-align: center;
    }
    
    .cookie-consent {
        flex-direction: column;
    }
    
    .cookie-consent button,
    .cookie-link {
        margin: 10px 0 0;
    }
    
    .hero-section {
        padding: 100px 0;
    }
    
    .services-grid, 
    .benefits-grid,
    .testimonials-slider,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .hero-section {
        padding: 80px 0;
    }
    
    .btn-large {
        padding: 12px 25px;
        font-size: 1rem;
    }
}