/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden; /* Empêche le défilement horizontal */
}

a {
    text-decoration: none;
    color: inherit;
}

p {
    font-size: 1.5rem;
}

html {
    scroll-behavior: smooth;
}



/* Header et Navigation */
header {
    background-color: #fff;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    margin-left: 10px;
}

/* Menu Navigation */
.nav-menu {
    position: fixed;
    top: 80px;
    right: -350px;
    width: 100%;
    max-width: 350px;
    height: auto;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
    z-index: 999;
    padding: 20px 0;
}

.nav-menu.show {
    right: 0;
}

.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    margin: 0;
    border-bottom: 1px solid #eee;
}

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

.nav-menu a {
    color: #333;
    font-size: 1.1rem;
    padding: 15px 30px;
    display: block;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    color: #007bff;
    background-color: #f8f9fa;
}

/* Menu Burger */
.menu-burger {
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
    position: relative;
}

.bar1,
.bar2,
.bar3 {
    width: 35px;
    height: 3px;
    background-color: #333;
    margin: 6px 0;
    transition: 0.4s;
}

.change .bar1 {
    transform: translate(0, 9px) rotate(-45deg);
}

.change .bar2 {
    opacity: 0;
}

.change .bar3 {
    transform: translate(0, -9px) rotate(45deg);
}

/* Animation des liens du menu */
.nav-menu li:nth-child(1) {
    transition-delay: 0.1s;
}

.nav-menu li:nth-child(2) {
    transition-delay: 0.2s;
}

.nav-menu li:nth-child(3) {
    transition-delay: 0.3s;
}

.nav-menu li:nth-child(4) {
    transition-delay: 0.4s;
}

.nav-menu li:nth-child(5) {
    transition-delay: 0.5s;
}

.nav-menu li:nth-child(6) {
    transition-delay: 0.6s;
}

.nav-menu li:nth-child(7) {
    transition-delay: 0.7s;
}



/* Main Content */
main {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 70px;
}
/* Taille de la police pour le texte de copyright */
.copyright-text {
    font-size: 1rem; /* Taille par défaut pour mobile S */
}
/* Hero Section */
.hero {
    position: relative;
    background-image: url('medias/taha2.JPG');
    background-size: cover;
    background-position: center; /* Position initiale pour le parallax */
    background-repeat: no-repeat;
    height: 750px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: 2rem;
    width: 100%;
    overflow: hidden; /* Assure que l'effet reste dans les limites */
    transform: translateZ(0); /* Ajout pour activer le GPU */
}

/* Overlay sombre pour le hero */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Noir avec 40% d'opacité */
    z-index: 1; /* S'assure que l'overlay est au-dessus de l'image mais en-dessous du contenu */
}

/* S'assurer que le contenu du hero est au-dessus de l'overlay */
.hero-content {
    position: relative;
    z-index: 2; /* Au-dessus de l'overlay */
}

.separator {
    height: 100px; /* Hauteur de l'espace */
    width: 100%;
}

/* Animation pour le titre et sous-titre du hero */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: slideInFromLeft 1.2s ease-out forwards;
}

.hero h2 {
    animation: slideInFromLeft 1.2s ease-out 0.5s forwards;
    opacity: 0; /* Caché initialement */
    background-color: white; /* Fond blanc */
    color: #333; /* Gris foncé */
    padding: 10px 20px; /* Espace intérieur */
    border-radius: 4px; /* Coins légèrement arrondis */
    display: inline-block; /* Pour que le fond ne prenne que la largeur du texte */
    margin-top: 10px; /* Espace au-dessus */
    margin-bottom: 20px; /* Espace en-dessous */
    font-weight: 500; /* Légèrement plus gras */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Légère ombre pour un effet de profondeur */
}

/* Parallax Section */
.parallax-section {
    position: relative;
    width: 100%;
    height: 400px;
    background-image: url('medias/S1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Par défaut pour desktop */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Empêche le débordement */
}

.parallax-content {
    text-align: center;
    color: white;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    z-index: 2;
    padding: 2rem;
    max-width: 800px;
}

.parallax-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.parallax-content p {
    font-size: 1.2rem;
}

/* Media queries pour la section parallax */
@media screen and (max-width: 768px) {
    .parallax-section {
        background-attachment: scroll !important;
        background-position: center center !important;
        height: 300px;
    }
}

@media screen and (max-width: 425px) {
    .parallax-section {
        height: 300px;
    }
    
    .parallax-content h2 {
        font-size: 1.8rem;
    }
    
    .parallax-content p {
        font-size: 1rem;
    }
}

@media screen and (max-width: 320px) {
    .parallax-section {
        height: 400px;
    }
}

.project-container {
    width: 100%; /* Assurez-vous que ces éléments prennent toute la largeur */
    max-width: 1200px; /* Largeur maximale si nécessaire */
    margin: 0 auto; /* Centre les éléments */
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.project-container:hover {
    transform: translateY(-5px);
}

/* Le reste de votre CSS existant pour les projets */

/* CTA Buttons */
.cta-buttons {
    margin-top: 4rem;
}

.contact-button, .cta-button {
    background-color: #ff6600;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 30px;
    display: inline-block; /* Ceci est crucial - permet au bouton de ne prendre que l'espace nécessaire */
    text-align: center;
    font-weight: bold;
    transition: background-color 0.3s;
}


.cta-button {
    font-size: 20px;
    margin: 0.5rem;
    margin-top: 50px;
    font-family: 'Roboto', sans-serif;  
}

.contact-button {
    margin-top: 1rem;
}

.cta-button:hover,
.contact-button:hover {
    background-color: #ff8c00;
    transform: scale(1.05);
}

.black {
    color: black !important;
    /* L'important est nécessaire car la section hero a probablement une couleur blanche par défaut */
}

/* A propos Section */
.highlight {
    color: black; /* Met le texte en noir */
}
.about-section {
    width: 100%;
    padding: 4rem 4rem;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column; /* Par défaut, en colonne pour les petits écrans */
    padding: 50px 20px;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 4rem;
    align-items: center;
    justify-content: space-between; /* Espace entre le texte et l'image */
}

.about-text {
    flex: 1;
    padding-right: 20px; 
}

.about-text h2 {
    margin-bottom: 2rem;
    font-size: 2.5rem;
    color: #333;
}

.about-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
    text-align: justify;
}

.about-image {
    flex: 1;
}

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


/* Expertise Section */
.expertise {
    padding: 4rem 2rem;
    text-align: center;
}

.expertise h2 {
    margin-bottom: 2rem;
}

.expertise-cards {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.card,
.card2 {
    width: 260px;
    margin: 1rem;
    padding: 1rem;
    border-radius: 10px;
    transition: transform 0.3s;
    cursor: pointer;
    background-color: #fafafa;
}

.card:hover,
.card2:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
}

.card img {
    width: 70px;
    height: 70px;
    margin-bottom: 1rem;
}
  
.project-info {
    padding: 20px;
    background-color: white;
    text-align: center;
    border-radius: 0 0 10px 10px; /* Arrondit uniquement les coins inférieurs de la section info */
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Ajuste le nombre de colonnes */
    gap: 2rem; /* Espace entre les éléments */
    width: 100%; /* Assurez-vous que la grille prend toute la largeur */
    max-width: 1200px; /* Largeur maximale pour la grille */
    margin: 0 auto; /* Centre la grille horizontalement */
}

/* Projects Section */
.projects-section {
    display: flex;
    flex-direction: column; /* Aligne les éléments verticalement */
    align-items: center; /* Centre les éléments horizontalement */
    padding: 40px 20px;
    max-width: 1200px; /* Largeur maximale pour la section */
    margin: 0 auto; /* Centre la section */
}

.project-container {
    flex: 1;
    min-width: 260px;
    width: calc(25% - 23px);
    position: relative;
    cursor: pointer;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
}

.project-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hover-overlay {
    position: absolute; /* Assurez-vous que l'overlay est positionné absolument */
    top: 0; /* Commence en haut */
    left: 0; /* Commence à gauche */
    right: 0; /* S'étend à droite */
    bottom: 0; /* S'étend en bas */
    background-color: rgba(0, 0, 0, 0.5); /* Couleur de fond avec transparence */
    display: flex; /* Utilisez flexbox pour centrer le contenu */
    justify-content: center; /* Centre horizontalement */
    align-items: center; /* Centre verticalement */
    opacity: 0; /* Commence invisible */
    transition: opacity 0.3s ease; /* Transition pour l'effet de survol */
    z-index: 2;
}



.circle {
    width: 50px;
    height: 50px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.plus {
    color: black;
    font-size: 24px;
    font-weight: bold;
}

/* Effets au survol */
.project-container:hover .hover-overlay {
    opacity: 1;
}

.project-container:hover .circle {
    transform: scale(1);
}

.project-container:hover img {
    transform: scale(1.05);
}


.project-info {
    padding: 20px;
    background-color: white;
    text-align: center;
}

.project-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: #333;
}

.project-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}
/* Hover Effects */
.project-container:hover .hover-overlay {
    opacity: 1;
}

.project-container:hover .circle {
    transform: scale(1);
}

.project-container:hover img {
    transform: scale(1.05);
}

/* Footer */
footer {
    background-color: #333;
    color: #fff;
    padding: 2rem;
    text-align: center;
}

.contact-section {
    margin-bottom: 2rem;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: #fff;
    margin: 0 0.5rem;
}

.animate-title {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.animate-title-delay {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.3s;
}


@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries pour les projets */
@media screen and (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 colonnes pour les écrans moyens */
    }
}

/* Desktop (1024px et plus) */
@media screen and (min-width: 1024px) {
    .copyright-text {
        font-size: 0.8rem; /* Ajustez la taille pour desktop */
    }
}

@media screen and (max-width: 900px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes pour les écrans plus petits */
    }
}

@media screen and (max-width: 768px) {
    .parallax-section {
        background-attachment: scroll !important;
        background-position: center center !important;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes pour tablette */
    }

    .hero {
        height: 600px; /* Ajustez la hauteur pour mobile/tablette */
        background-attachment: fixed; /* Garder l'effet parallax */
        background-position: center; /* Garder la position centrale */
    }

    .hero h1 {
        font-size: 2rem; /* Ajustez la taille de la police pour mobile */
    }

    .about-content {
        flex-direction: column; /* Aligne le contenu à la verticale */
        gap: 2rem; /* Espace entre les éléments */
    }

    .copyright-text {
        font-size: 0.95rem; /* Ajustez la taille pour tablette */
    }

    .about {
        padding: 2rem 1rem; /* Ajustez le remplissage pour mobile */
    }

    .about-text h2 {
        font-size: 2rem; /* Ajustez la taille de la police pour mobile */
    }

    .card,
    .card2 {
        width: 100%; /* Les cartes prennent toute la largeur */
        max-width: 260px; /* Largeur maximale pour les cartes */
        margin: 1rem 0; /* Marge entre les cartes */
    }

    .contact-button, .cta-button {
        width: auto; /* Empêche le bouton de prendre toute la largeur */
        max-width: 200px; /* Définit une largeur maximale */
        margin-left: auto;
        margin-right: auto;
    }
}

/* Mobile M (425px) */
@media screen and (max-width: 425px) {
    .copyright-text {
        font-size: 0.9rem; /* Ajustez la taille pour mobile M */
    }
}

@media screen and (max-width: 576px) {
    .projects-section {
        flex-direction: column; /* Aligne les éléments à la verticale */
        gap: 30px; /* Espace entre les éléments */
    }

    .project-container {
        flex: 1;
        max-width: 100%; /* Les conteneurs de projet prennent toute la largeur */
    }

    .parallax-section {
        height: 200px; /* Ajustement optionnel de la hauteur pour mobile */
    }

    .nav-menu a {
        font-size: 1rem; /* Ajustez la taille de la police pour mobile */
        padding: 12px 20px; /* Ajustez le remplissage pour mobile */
    }

    .about-text h2 {
        font-size: 1.8rem; /* Ajustez la taille de la police pour mobile */
    }
}
/* Media Queries */
@media screen and (max-width: 425px) {
    .parallax-section {
        height: 300px; /* Ajustez la hauteur pour mobile 320px */
    }
    .projects-grid {
        grid-template-columns: repeat(1, 1fr); /* 1 colonne pour mobile L */
    }
}

/* Media Query pour les écrans de 320px */
@media screen and (max-width: 320px) {
    .parallax-section {
        height: 400px; /* Ajustez la hauteur pour mobile 320px */
    }
}

/* Styles pour l'effet parallax JavaScript */
.js-parallax-section {
    position: relative;
    overflow: hidden;
    height: 400px; /* Ajustez selon vos besoins */
    display: flex;
    align-items: center;
    justify-content: center;
}

.js-parallax-section .parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-image: url('medias/S1.jpg'); /* Utilisation d'une image existante */
    background-size: cover;
    background-position: center;
    z-index: -1;
    will-change: transform;
}

.js-parallax-section .parallax-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    max-width: 800px;
    margin: 0 auto;
}

/* Styles pour la section Nos Réalisations avec effet parallax comme le hero */
.parallax-realisations {
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: 2rem;
    width: 100%;
    overflow: hidden;
    --parallax-offset: 0px; /* Propriété personnalisée pour l'effet parallax */
}

.parallax-realisations:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150%; /* Plus grand que le conteneur pour permettre le déplacement */
    background-image: url('medias/S1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    transform: translateY(var(--parallax-offset)); /* Utilise la propriété personnalisée */
    will-change: transform;
}

.parallax-realisations .parallax-content {
    text-align: center;
    color: white;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    z-index: 2;
    padding: 2rem;
    max-width: 800px;
    position: relative;
}

/* Media queries pour la section parallax-realisations */
@media screen and (max-width: 768px) {
    .parallax-realisations {
        height: 300px;
    }
}

@media screen and (max-width: 425px) {
    .parallax-realisations {
        height: 300px;
    }
}

@media screen and (max-width: 320px) {
    .parallax-realisations {
        height: 400px;
    }
}

/* Nouvelle approche pour l'effet parallax qui fonctionne sur tous les appareils */
.manual-parallax {
    position: relative;
    height: 400px;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.manual-parallax .parallax-background {
    position: absolute;
    top: -50px; /* Déborde en haut pour permettre le mouvement */
    left: 0;
    width: 100%;
    height: 150%; /* Plus grand que le conteneur pour permettre le mouvement */
    background-image: url('medias/S1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    transform: translateY(0); /* Sera modifié par JavaScript */
    will-change: transform;
}

.manual-parallax .parallax-content {
    text-align: center;
    color: white;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    z-index: 2;
    padding: 2rem;
    max-width: 800px;
}

.manual-parallax .parallax-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.manual-parallax .parallax-content p {
    font-size: 1.2rem;
}

/* Media queries pour la section manual-parallax */
@media screen and (max-width: 768px) {
    .manual-parallax {
        height: 300px;
    }
    
    .manual-parallax .parallax-content h2 {
        font-size: 2rem;
    }
}

@media screen and (max-width: 425px) {
    .manual-parallax {
        height: 300px;
    }
    
    .manual-parallax .parallax-content h2 {
        font-size: 1.8rem;
    }
    
    .manual-parallax .parallax-content p {
        font-size: 1rem;
    }
}

@media screen and (max-width: 320px) {
    .manual-parallax {
        height: 400px;
    }
}


