/* Suppression des débordements horizontaux et ajustement global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%; /* Le HTML et le body prennent toute la hauteur de la page */
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

body {
  background-color: #f4f4f4; /* Ajoutez une couleur de fond neutre */
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
}

header {
  width: 100%;
}

footer {
  background-color: #FF0000;
  color: white;
  padding: 10px;
  text-align: center;
  width: 100%;
  flex-shrink: 0;
}

#about {
  flex: 1; /* Prend tout l'espace disponible entre le header et le footer */
  padding: 50px 20px;
  text-align: center;
  background-color: #f4f4f4; /* Fond neutre */
}

/* Loader style */
#loader{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

#services, #hero, #emergency, #contact, #projets, #about {
  flex: 1;
  padding: 50px 20px;
  text-align: center;
  background-color: #f4f4f4;
  margin: 0;
}

/* Ajustement de la section hero pour éviter le débordement et assurer la réactivité */
#hero {
  height: 100vh;
  background: url('../../images/index/plomberie1.jpg') no-repeat center 30%;
  background-size: cover;
  position: relative;
  color: white;
}

#hero h1 {
  font-size: 3rem;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

#hero p {
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

#hero .cta-btn {
  padding: 15px 30px;
  font-size: 1.2rem;
  border-radius: 5px;
  background-color: #FF0000;
  color: white;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

#hero .cta-btn:hover {
  background-color: #cc0000;
}

#hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3); /* Réduit la luminosité pour une meilleure lisibilité */
  z-index: 1;
}

#hero .container {
  position: relative;
  z-index: 2;
}


.loader-logo {
  width: 250px;
  height: auto;
  animation: spin 1.5s linear infinite;
}

.hero-content {
  max-width: 800px;
  color: white;
  padding: 20px;
}

.hero-logo {
  position: relative;
  margin: 0 auto;
  width: 250px;
  height: auto;
  display: block;
  top: 10px;
}

.text-logo, .phone-number {
  text-align: center;
  width: 100%;
  position: relative;
  margin: 20px 0;
}

.phone-number {
  font-size: 2rem;
  color: red;
}

.cta-btn {
  display: inline-block;
  background-color: white;
  color: #FF0000;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
}

#services-presentation, .service, #emergency, #contact-form {
  background-color: #f4f4f4;
}

#contact-form {
  max-width: 100%;
  width: 1000px;
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1);
  font-family: Arial, Helvetica, sans-serif;
  color: #333
}

#contact-form form {
  width: 100%;
}

#contact-form h2 {
  color: #FF6600;
  font-size: 24px;
  text-align: center;
  margin-bottom: 20px;
}

#contact-form label {
  font-weight: bold;
  margin-top: 15px;
  display: block;
  color: #333;
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form input[type="tel"],
#contact-form textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  color: #333;
  box-sizing: border-box;
}

#contact-form button[type="submit"] {
  display: inline-block;
  width: 100%;
  background-color: #FF6600;
  color: white;
  border: none;
  padding: 10px;
  font-size: 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 10px;
}

#contact-form button[type="submit"]:hover {
  background-color: #cc5200;
}

#contact-form input[type="text"]::placeholder,
#contact-form input[type="email"]::placeholder,
#contact-form input[type="tel"]::placeholder,
#contact-form textarea::placeholder {
  color: #999;
}

#contact-form input[type="text"]#subject {
  color: #808080;
}

#contact-form input[type="text"]#subject:focus {
  color: #333;
}

/* Animation de rotation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .phone-number {
    font-size: 1.5rem;
  }

  .hero-logo {
    width: 200px;
  }

  nav ul {
    flex-direction: row;
  }

  .cta-btn {
    padding: 10px 20px;
  }
}

@media (max-width: 768px) {
  header, footer {
    padding: 20px;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
  }

  #hero {
    padding: 50px 10px;
  }

  .phone-number {
    font-size: 1.2rem;
  }

  .text-logo {
    font-size: 1rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-item h2 {
    font-size: 1.5em;
  }

  .cta-btn {
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  .hero-logo {
    width: 150px;
  }

  .phone-number {
    font-size: 1rem;
  }

  .cta-btn {
    padding: 8px 12px;
    font-size: 14px;
  }

  footer {
    padding: 10px;
    font-size: 14px;
  }

  nav ul li {
    margin: 5px 0;
  }

  nav ul li a {
    font-size: 14px; /* Réduction supplémentaire sur les petits écrans */
    padding: 8px 10px;
  }

  nav ul li a.active {
    color: red !important;
    font-weight: bold;
  }

  #contact-form {
    padding: 15px;
  }
}

@media (max-width: 768px) {
  .logo img {
      height: 80px; /* Réduction supplémentaire sur mobile */
  }

  .phone-number {
      font-size: 1rem; /* Réduction de la taille du texte */
  }

  .navbar {
      height: 80px; /* Ajustez la hauteur de la navbar */
  }
}


.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Affiche deux colonnes */
  gap: 20px;
  max-width: 800px; /* Limite la largeur totale pour un affichage centré */
  margin: 0 auto; /* Centre la grille */
}

.service {
  background-color: white;
  padding: 20px;
  border: 1px solid #ddd;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr; /* Passe à une seule colonne sur mobile */
  }
}


/* Espace pour éviter le chevauchement de la navbar */
body {
  padding-top: 120px;
}

/* Structure de la barre de navigation */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #ADD8E6;
  padding: 0 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  height: 120px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

/* Logo et texte associés */
.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 120px;
  margin-right: 15px;
}

.text-logo {
  color: #333;
  font-weight: bold;
  font-size: 12px;
}

/* Liens de navigation centrés */
nav {
  flex-grow: 1;
  text-align: center;
}

nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style-type: none;
  margin: 0;
  padding: 0;
  gap: 15px;
}

nav ul li {
  margin: 0 10px;
}

nav ul li a {
  text-decoration: none;
  color: white;
  font-size: 16px;
  font-weight: bold;
  padding: 10px 15px; /* Augmenter légèrement le padding pour un espacement uniforme */
  border: 2px solid white;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
  display: inline-block; /* Assurer un bon alignement vertical */
}

nav ul li a:hover {
  background-color: white;
  color: #333;
  border-color: #333;
}

nav ul li a.active {
  background-color: red;
  color: white;
  border-color: red;
}

/* Informations de contact */
.contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: right;
}

.phone-number {
  color: red;
  font-weight: bold;
  font-size: 1.0rem;
/*  text-align: center; */
}

.social-icons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.social-icons img {
  width: 30px;
  height: 30px;
}

.cta-btn {
  display: inline-block;
  background-color: white;
  color: #FF0000;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
}

/* Projet display styling */
.project-display {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 80%;
  margin: auto;
  position: relative;
}

.project-item {
  text-align: center;
  width: 80%;
}

.project-item img {
  width: 100%;
  height: auto;
}

.left-arrow, .right-arrow {
  font-size: 24px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 100;
}

.large-text {
  font-size: 1.3em;
  font-weight: bold
}


#services {
  padding: 50px 20px;
  text-align: center;
  background-color: #f9f9f9;
}

#services h2 {
  color: #333;
  font-size: 28px;
  margin-bottom: 30px;
  font-weight: bold;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Trois colonnes */
  gap: 20px; /* Espace entre les éléments */
  max-width: 1200px;
  margin: 0 auto;
}

.service {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* Ajout d'une transition fluide */
}

.service img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
}

.service h3 {
  font-size: 20px;
  color: #FF6600;
  margin: 15px 0;
}

.service p {
  font-size: 16px;
  color: #666;
  line-height: 1.5;
}

.service:hover {
  transform: translateY(-5px); /* Soulèvement au survol */
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15); /* Effet d'ombre augmenté */
}


/* Responsive Design */
@media (max-width: 768px) {
  .services-grid {
      grid-template-columns: 1fr; /* Une colonne sur mobile */
  }
}

@media (max-width: 1024px) {
  .services-grid {
      grid-template-columns: repeat(2, 1fr); /* Deux colonnes sur tablette */
  }
}


#projets {
  padding: 50px 20px;
  text-align: center;
  background-color: #f9f9f9;
}

#projets h2 {
  font-size: 28px;
  color: #333;
  margin-bottom: 30px;
  font-weight: bold;
}

.project-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.project-item {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 500px; /* Limite la taille de l'affichage */
}

.project-item img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  margin-bottom: 15px;
}

.project-item h3 {
  font-size: 20px;
  color: #FF6600;
  margin: 15px 0;
}

.project-item p {
  font-size: 16px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 15px;
}

.project-item a {
  display: inline-block;
  color: #fff;
  background-color: #FF6600;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.project-item a:hover {
  background-color: #cc5200;
}

.project-item:hover {
  transform: translateY(-5px);
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15);
}

.left-arrow, .right-arrow {
  font-size: 24px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.left-arrow:hover, .right-arrow:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.left-arrow {
  position: absolute;
  left: -50px;
}

.right-arrow {
  position: absolute;
  right: -50px;
}

.project-display {
  overflow: hidden; /* Cache les autres projets */
}
