/* Styles généraux */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

body {
  line-height: 1.6;
  background-color: #ffffff; /* Fond général en blanc */
  color: #333; /* Texte par défaut en gris foncé */
}

/* Header */
header {
  background-color: #121121; /* Fond noir pour le header */
  padding: 1rem 2rem; /* Espacement autour du header */
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Conteneur du nav en flex */
header nav {
  display: flex; /* Utiliser flexbox pour aligner le logo et le menu */
  justify-content: center; /* Centrer le menu globalement */
  align-items: center; /* Aligner verticalement le logo et le menu */
}

/* Conteneur de la liste du menu */
header nav ul {
  list-style-type: none;
  display: flex; /* Aligner les éléments de menu en ligne */
  align-items: center; /* Aligner verticalement les éléments de menu */
  margin: 0;
  padding: 0;
}

/* Les éléments du menu (li) */
header nav ul li {
  margin: 0 15px; /* Espacement entre les éléments du menu */
}

/* Logo */
header nav ul li.logo-item {
  margin-right: 20px; /* Espace entre le logo et le premier élément du menu */
}

.logo {
  height: 50px; /* Ajuster la hauteur du logo */
  width: auto; /* Conserver le ratio d'aspect */
  display: block; /* S'assurer que le logo est affiché correctement */
}

/* Style des liens de menu */
header nav ul li a {
  color: #ffffff; /* Couleur du texte */
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 1rem;
  position: relative; /* Nécessaire pour positionner le trait sous le texte */
  padding-bottom: 5px; /* Espacement entre le texte et le trait */
}

/* Animation du trait sous le texte */
header nav ul li a::after {
  content: ''; /* Crée un élément virtuel */
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0; /* Le trait est caché au départ */
  height: 2px; /* Épaisseur du trait */
  background-color: #ffffff; /* Couleur du trait */
  transition: width 0.3s ease-in-out; /* Animation fluide pour le trait */
}

/* Survol : afficher le trait */
header nav ul li a:hover::after {
  width: 100%; /* Le trait s'étend sous tout le texte */
}



/* Section Hero (Bandeau principal) */
#hero {
  background-image: url('../images/slide1.png'); /* Image de fond à ajouter */
  background-size: cover;
  background-position: center;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #ffffff; /* Texte en blanc sur la section hero */
  text-align: center;
}

#hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1); /* Filtre noir transparent */
}

#hero .hero-content {
  z-index: 1;
}

#hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  animation: fadeInDown 1s ease;
}

#hero p {
  font-size: 1.5rem;
  margin-bottom: 30px;
}

.cta-btn {
  background-color: #A9A9A9; /* Bouton en gris */
  padding: 10px 20px;
  color: #121121; /* Texte du bouton en noir */
  text-transform: uppercase;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.cta-btn:hover {
  background-color: #D3D3D3; /* Bouton gris plus clair au survol */
}

/* Animation */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections générales */
section {
  padding: 50px 0;
  text-align: center;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #121121; /* Titres en noir */
}

p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #333; /* Texte par défaut en gris foncé */
}

a.cta-btn {
  display: inline-block;
  margin-top: 20px;
}

#about {
  background-color: #f4f4f4; /* Fond gris clair pour harmoniser avec la section Nos projets */
  padding: 50px 0; /* Ajoutez un espacement vertical similaire */
}

/* Section Services */
#services {
  background-color: #ffffff; /* Fond blanc pour la section */
  padding: 50px 0;
}

#services .services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 5 colonnes pour les services */
  gap: 20px; /* Espacement entre chaque service */
  max-width: 1200px;
  margin: 0 auto; /* Centrer la grille */
}

.service-item {
  text-align: center;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%; /* Assure que tous les éléments ont la même hauteur */
}

.service-text {
  flex-grow: 1; /* Étend cette section pour remplir l'espace disponible */
}

.service-item img {
  width: 100%;
  height: 150px; /* Hauteur fixe pour les images */
  object-fit: cover; /* Ajustement des images pour un rendu uniforme */
}

.service-item .service-text {
  background-color: #A9A9A9; /* background gris */
  padding: 15px;
  color: #121121; /* Texte noir */
  font-size: 1rem;
  font-weight: bold;
}

.service-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.service-item h3 {
  font-size: 1.5rem; /* Taille du titre */
  margin-bottom: 10px;
  color: #121121; /* Titre en noir */
}

.service-item p {
  font-size: 0.9rem; /* Texte de description plus petit que le titre */
  color: #121121; /* Couleur du texte */
  line-height: 1.5;
  margin: 0;
}

.service-separator {
  width: 50%; /* Largeur de la ligne */
  margin: 10px auto; /* Centrer la ligne */
  border: 0;
  border-top: 2px solid #ddd; /* Ligne grise */
  opacity: 0.6;
}


/* Section Portfolio / Projets réalisés */
#projects {
  background-color: #f4f4f4; /* Fond gris clair */
  padding: 50px 0;
}

#projects .projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.project-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item img {
  width: 100%;
  height: 200px;
  object-fit: cover; /* Pour un recadrage propre des images */
  transition: transform 0.3s ease;
}

.project-item:hover img {
  transform: scale(1.05);
}

.project-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.project-item p {
  padding: 10px;
  background-color: #A9A9A9;
  text-align: center;
  font-size: 1rem;
  color: #121121; /* Texte des projets en noir */
}

/* Bouton voir plus */
#projects .cta-btn {
  margin-top: 30px;
  display: inline-block;
  background-color: #A9A9A9; /* Bouton gris */
  color: #121121; /* Texte noir */
  padding: 10px 20px;
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
  transition: background-color 0.3s ease;
}

#projects .cta-btn:hover {
  background-color: #D3D3D3; /* gris plus clair au survol */
}

/* Section Contact */
#contact {
  padding: 50px 0;
  background-color: #f9f9f9; /* Fond clair */
}

/* Titre de la section Contactez-nous */
.contact-title {
  text-align: center; /* Centrer le titre */
  font-size: 2.5rem;
  margin-bottom: 30px; /* Espacement en dessous du titre */
  color: #121121; /* Couleur du texte */
}

/* Conteneur principal de la section contact */
.contact-container {
  display: flex; /* Aligner l'image et le formulaire en ligne */
  justify-content: space-between; /* Espace entre les deux éléments */
  align-items: flex-start; /* Aligner verticalement au début */
  max-width: 1200px; /* Largeur maximale de la section */
  margin: 0 auto; /* Centrer la section */
  padding: 20px;
}

/* Image de contact */
.contact-image {
  flex: 1; /* Prendre l'espace à gauche */
}

.contact-image img {
  width: 100%; /* Prendre toute la largeur disponible */
  height: auto; /* Conserver le ratio d'aspect */
  border-radius: 8px; /* Coins arrondis pour l'image */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Ajouter une légère ombre */
}

/* Formulaire de contact */
.contact-form {
  flex: 1; /* Prendre l'espace à droite */
  margin-left: 40px; /* Espace entre l'image et le formulaire */
}

/* Bloc d'information de contact */
.contact-info {
  margin-bottom: 30px; /* Espace entre les informations de contact et le formulaire */
  background-color: #A9A9A9; /* Fond noir pour le bloc d'info */
  color: white; /* Texte en blanc */
  padding: 20px;
  border-radius: 8px; /* Coins arrondis */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Ombre légère */
}

.contact-info p {
  margin-bottom: 10px;
  font-size: 1rem;
}

/* Formulaire de contact */
.contact-form h2 {
  margin-bottom: 20px;
  color: #121121;
  font-size: 2rem;
}

.contact-form label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
  color: #121121;
}

.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.contact-form button {
  padding: 10px 20px;
  background-color: #A9A9A9;
  color: #121121;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: #D3D3D3;
}

/* Styles pour la lightbox */
.lightbox {
  display: none; /* Cacher la lightbox par défaut */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9); /* Fond semi-transparent */
  justify-content: center;
  align-items: center;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
}

.lightbox:target {
  display: flex; /* Afficher la lightbox quand l'utilisateur clique sur l'image */
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #ffffff;
  font-size: 2rem;
  text-decoration: none;
  cursor: pointer;
}


/* Footer */
footer {
  background-color: #121121; /* Fond noir pour le footer */
  color: #ffffff; /* Texte en blanc */
  padding: 20px 0;
  text-align: center;
  font-size: 0.9rem;
}

footer p {
  color: #ffffff; /* Assurez-vous que le texte du paragraphe est bien blanc */
}

/* Responsive Design */
@media (max-width: 768px) {
  #hero h1 {
    font-size: 2.5rem;
  }

  #hero p {
    font-size: 1.2rem;
  }

  .service-item, .project-item {
    margin: 10px 0;
    width: 100%;
  }
}
