:root {
    --primary-color: #2ecc71;
    --secondary-color: #27ae60;
    --accent-color: #f1c40f;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --white: #ffffff;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

/* Energy Transformation Section Styles */
section.energy-transformation {
    padding: 4rem 5%;
    background-color: var(--light-gray);
    width: 100%;
    display: block;
}

section.energy-transformation .energy-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
}

section.energy-transformation .energy-text {
    flex: 1;
}

section.energy-transformation .energy-text h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

section.energy-transformation .energy-description {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    line-height: 1.6;
}

section.energy-transformation .energy-benefits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

section.energy-transformation .benefit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--white);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

section.energy-transformation .benefit-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 40px;
    text-align: center;
}

section.energy-transformation .benefit-item span {
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 500;
}

section.energy-transformation .energy-image {
    flex: 1;
    position: relative;
}

section.energy-transformation .energy-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

section.energy-transformation .energy-cta {
    text-align: left;
    margin-top: 2rem;
}

section.energy-transformation .cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
}

section.energy-transformation .cta-button:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(-2px);
}

section.energy-transformation .cta-subtitle {
    margin-top: 1rem;
    color: var(--text-color);
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 992px) {
    section.energy-transformation .energy-content {
        flex-direction: column-reverse;
        gap: 2rem;
    }

    section.energy-transformation .energy-text h2 {
        font-size: 2rem;
        text-align: center;
    }

    section.energy-transformation .energy-description {
        text-align: center;
    }

    section.energy-transformation .energy-benefits {
        grid-template-columns: 1fr;
    }

    section.energy-transformation .energy-cta {
        text-align: center;
    }
}

@media (max-width: 768px) {
    section.energy-transformation {
        padding: 3rem 5%;
    }

    section.energy-transformation .energy-text h2 {
        font-size: 1.8rem;
    }

    section.energy-transformation .energy-description {
        font-size: 1rem;
    }

    section.energy-transformation .benefit-item {
        padding: 0.8rem;
    }

    section.energy-transformation .benefit-item i {
        font-size: 1.2rem;
    }
}

/* Navigation and Mobile Menu */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    z-index: 1000;
}

.logo-container {
    flex: 0 0 auto;
}

.logo {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex: 1;
    justify-content: center;
    margin-left: -100px; /* Pour compenser l'espace du logo et centrer les liens */
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.burger {
    display: none;
    cursor: pointer;
    z-index: 1001;
    flex: 0 0 auto;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 70px;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 1rem 0;
        transition: right 0.3s ease-in-out;
        gap: 0;
        margin-left: 0;
        overflow-y: auto;
    }

    .nav-links.nav-active {
        right: 0;
    }

    .nav-links li {
        opacity: 1;
        margin: 0;
        text-align: center;
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        font-size: 1.1rem;
        padding: 0.8rem;
        width: 100%;
    }

    .burger {
        display: block;
    }

    .burger.active .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
        background-color: var(--primary-color);
    }

    .burger.active .line2 {
        opacity: 0;
    }

    .burger.active .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
        background-color: var(--primary-color);
    }
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero Section */
.hero {
    position: relative;
    padding: 0;
    min-height: 100vh;
    height: auto;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
                url('../images/image_header.jpg');
    background-size: cover;
    background-position: center;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
}

@supports (-webkit-touch-callout: none) {
    /* CSS spécifique pour iOS */
    .hero {
        background-attachment: scroll;
        background-position: center center;
    }
}

@supports not (-webkit-touch-callout: none) {
    /* CSS pour les autres navigateurs */
    .hero {
        background-attachment: fixed;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 120px 5% 40px;
    background: rgba(0, 0, 0, 0.3);
    min-height: 100vh;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: white;
}

.hero h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    font-weight: 500;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: white;
}

.hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    color: white;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.cta-primary, .cta-secondary {
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 1.1rem;
}

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

.cta-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cta-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Carousel Styles */
.carousel {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 10px;
}

.carousel-description {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    border-radius: 0 0 10px 10px;
}

.carousel-slide:hover .carousel-description {
    transform: translateY(0);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 10;
}

.carousel-button {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background-color 0.3s;
}

.carousel-dot.active {
    background: var(--primary-color);
}

/* Services Section */
.services {
    padding: 80px 5%;
    background: var(--light-gray);
}

.services h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
}

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

.service-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    color: var(--text-color);
}

.service-card p {
    padding: 0 1.5rem 1.5rem;
    color: #666;
}

.main-service {
    grid-column: 1 / -1;
    background: var(--white);
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.certifications {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 2rem 0;
    flex-wrap: nowrap;
}

.certification-logo {
    max-height: 100px;
    width: auto;
}

@media (max-width: 768px) {
    .certifications {
        gap: 15px;
    }
    .certification-logo {
        max-height: 70px;
    }
}

/* Réalisations Section */
.realisations {
    padding: 80px 5%;
}

.realisations h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s;
}

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

/* CEE Section */
.cee {
    padding: 80px 5%;
    background: var(--light-gray);
}

.cee-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.cee-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

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

/* Contact Section */
.contact {
    padding: 5rem 2rem;
    background-color: var(--light-gray);
}

.contact h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
    font-size: 2.5rem;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.contact-info p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

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

.email-contact a:hover {
    color: var(--primary-color);
}

.team-contacts {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.team-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.team-section h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.team-member {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-3px);
}

.team-member:last-child {
    margin-bottom: 0;
}

.team-member h5 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.team-member .role {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.team-member p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.team-member i {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .contact h2 {
        font-size: 2rem;
    }
    
    .contact-info h3 {
        font-size: 1.5rem;
    }
    
    .team-section h4 {
        font-size: 1.3rem;
    }
}

/* Section Statistiques */
.stats-section {
    padding: 4rem 2rem;
    background-color: #f8f9fa;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 500;
}

/* Media Queries pour la section statistiques */
@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    padding: 2rem;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.modal-description {
    color: white;
    text-align: center;
    margin-top: 1rem;
}

.modal-close {
    position: absolute;
    top: -2rem;
    right: -2rem;
    color: white;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

/* Footer */
footer {
    background: var(--text-color);
    color: var(--white);
    padding: 4rem 5% 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        padding: 100px 5% 40px;
    }

    .hero h1 {
        font-size: 2rem;
        margin-top: 2rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .cta-buttons {
        margin: 1.5rem 0 2rem;
        padding: 0;
    }

    .cta-primary, .cta-secondary {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        width: auto;
        min-width: 200px;
        text-align: center;
    }
}

@media (max-height: 600px) {
    .hero-content {
        padding: 90px 5% 30px;
    }
}
