/* Import Poppins Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
  width: 100%;
}

/* Navigation Menu */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* Logo Styles */
.logo img {
  height: 60px;
  transition: transform 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

/* Hamburger Button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background: #333;
  border-radius: 5px;
  transition: all 0.3s ease;
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Menu Styles */
.menu {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.menu li a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.menu li a:hover {
  background: #FFC107;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Sections Container */
#sections-container {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100vh;
  width: 100%;
}

.section {
  scroll-snap-align: start;
  min-height: 100vh;
  width: 100%;
  padding: 80px 2rem 2rem; /* Account for navbar */
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

/* Ajoutez ceci à votre CSS existant */

/* Responsive Navbar - Correction */
@media (max-width: 768px) {
  /* Force l'affichage du hamburger */
  .hamburger {
    display: flex !important;
  }
  
  /* Cache le menu desktop */
  .menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: #ffffff;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  /* Style quand le menu est actif */
  .menu.active {
    height: auto;
    min-height: 200px;
    overflow-y: auto;
  }
  
  .menu li {
    width: 100%;
    text-align: center;
  }
  
  .menu li a {
    display: block;
    padding: 1rem;
    margin: 0.25rem 0;
  }
  
  /* Ajustement du logo */
  .logo img {
    height: 50px;
  }
}

/* Home Section - Version complète révisée */
#home {
  background: url('../assets/images/hero.webp') no-repeat center center/cover;
  position: relative;
  color: white;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#home::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

.home-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 800px;
  width: 90%;
  margin: 0 auto;
}

/* Slider complètement révisé */
.slider {
  font-size: 1.5rem;
  min-height: 180px; /* Hauteur garantie */
  position: relative;
  margin: 3rem 0; /* Espacement vertical accru */
  display: flex;
  align-items: center; /* Centrage vertical */
}

.slider p {
  margin: 0 auto;
  width: 100%;
  opacity: 0;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  animation: slideText 15s infinite;
  padding: 0 5%;
  box-sizing: border-box;
  line-height: 1.6; /* Meilleure lisibilité */
  text-shadow: 0 1px 3px rgba(0,0,0,0.3); /* Contraste renforcé */
}

.slider p:nth-child(1) { animation-delay: 0s; }
.slider p:nth-child(2) { animation-delay: 5s; }
.slider p:nth-child(3) { animation-delay: 10s; }

/* Animation optimisée */
@keyframes slideText {
  0% { opacity: 0; transform: translateY(20px) translateX(0); }
  10% { opacity: 1; transform: translateY(-50%) translateX(0); }
  30% { opacity: 1; transform: translateY(-50%) translateX(0); }
  40% { opacity: 0; transform: translateY(-70px) translateX(0); }
  100% { opacity: 0; transform: translateY(-70px) translateX(0); }
}

/* Boutons CTA */
.cta-buttons {
  display: flex;
  gap: 1rem; /* Espace entre les deux boutons */
  justify-content: center; /* Centrer les boutons horizontalement */
  margin-top: 2rem;
  flex-wrap: wrap; /* Permettre le passage à la ligne sur mobile */
}

/* Style du premier bouton (Demandez une consultation) */
.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: #FFC107; /* Jaune vibrant */
  color: #333; /* Texte sombre pour contraste */
  font-weight: 600;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  text-align: center;
}

.cta-button:hover {
  background: #e0a800; /* Jaune plus foncé au survol */
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Style du deuxième bouton (Télécharger la brochure) */
.secondary-button {
  background: #333; /* Fond noir élégant */
  color: #fff; /* Texte blanc pour contraste */
  font-weight: 600;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  text-align: center;
}

.secondary-button:hover {
  background: #555; /* Gris foncé au survol */
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
  #home {
    height: auto;
    padding: 6rem 0;
  }
  
  .slider {
    min-height: 220px; /* Plus d'espace sur mobile */
    font-size: 1.2rem;
    margin: 2rem 0;
  }
  
  .slider p {
    padding: 0 10px;
    line-height: 1.5;
  }
  
  /* Boutons CTA */
.cta-buttons {
  display: flex;
  gap: 1rem; /* Espace entre les deux boutons */
  justify-content: center; /* Centrer les boutons horizontalement */
  margin-top: 2rem;
  flex-wrap: wrap; /* Permettre le passage à la ligne sur mobile */
}

/* Style du premier bouton (Demandez une consultation) */
.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: #FFC107; /* Jaune vibrant */
  color: #333; /* Texte sombre pour contraste */
  font-weight: 600;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  text-align: center;
}

.cta-button:hover {
  background: #e0a800; /* Jaune plus foncé au survol */
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Style du deuxième bouton (Télécharger la brochure) */
.secondary-button {
  background: #333; /* Fond noir élégant */
  color: #fff; /* Texte blanc pour contraste */
  font-weight: 600;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  text-align: center;
}

.secondary-button:hover {
  background: #555; /* Gris foncé au survol */
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

}

/* Debug visuel optionnel */
/*
.slider { border: 1px dashed rgba(255,255,255,0.3); }
.slider p { border: 1px dashed rgba(255,0,0,0.3); }
*/

#about {
  background: #f4f4f4;
  padding: 4rem 0;
  text-align: center;
  margin-top: 80px; /* Prevent overlap with fixed navbar */
}

#about h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.about-container {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Left Part (Image Background) */
.about-image {
  position: relative; /* Permet de positionner les boutons à l'intérieur */
  flex: 1;
  background: #F9F7F1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  max-height: 500px;
  margin-right: 2rem;
  overflow: hidden; /* Assure que les boutons ne dépassent pas */
}

.about-box-image {
  max-width: 80%; /* Reduce image size */
  height: auto;
  border-radius: 10px;
}

/* Right Part (Text Slider) */
.about-text {
  flex: 1;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 0 1rem;
}

/* Text Slider */
.text-slider {
  position: relative;
  height: 300px; /* Fixed height for consistency */
  overflow: hidden;
}

.text-slider p, .text-slider .text-slide {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: opacity 0.4s ease-in-out;
}

.text-slider p.active, .text-slider .text-slide.active {
  opacity: 1;
  position: relative;
}


/* Styles pour les boutons */
.slider-buttons {
  position: absolute; /* Positionnement absolu par rapport à .about-image */
  top: 50%; /* Centré verticalement */
  width: 100%; /* Prend toute la largeur pour un positionnement centré */
  display: flex;
  justify-content: space-between; /* Place les boutons aux extrémités */
  pointer-events: none; /* Désactive les clics sur le conteneur */
}

.slider-buttons button {
  pointer-events: auto; /* Réactive les clics sur les boutons */
  background: rgba(0, 0, 0, 0.5); /* Fond semi-transparent pour contraste */
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 50%; /* Forme circulaire pour les boutons */
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-buttons button:hover {
  background: rgba(0, 0, 0, 0.8); /* Fond plus foncé au survol */
  transform: scale(1.1); /* Légère augmentation de taille */
}

/* Responsive Design */
@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
  }

  .about-image {
    margin-right: 0;
    margin-bottom: 1.5rem;
    min-height: 300px;
    max-height: 400px;
  }

  .about-text {
    order: -1; /* Move text above image */
  }
}

/* Style pour les boutons "Next" et "Previous" sur mobile */
@media (max-width: 768px) {
  .slider-buttons button {
    display: inline-block !important; /* Forcer l'affichage */
    font-size: 1.2rem; /* Augmenter la taille pour une meilleure lisibilité */
    padding: 0.5rem 1rem;
  }

  .slider-buttons {
    flex-direction: row; /* Garder les boutons alignés horizontalement */
    gap: 0.5rem; /* Espacement réduit pour les petits écrans */
  }
}

/* Services Section Styling */
#services {
  background: #fff;
  padding: 4rem 0;
  text-align: center;
  margin-top: 80px; /* Prevent overlap with fixed navbar */
}

#services h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem; /* Space between title and subtitle */
  margin-top: 0; /* Reset any unnecessary top margin */
}

#services .subtitle {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 2rem; /* Space between subtitle and service cards */
}

.services-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid layout */
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.service-card {
  background: #1D3E5F; /* New box color */
  color: #fff; /* White text for contrast */
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px); /* Slight lift on hover */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.service-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-card p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.service-image {
  width: 100%; /* Ensure images span the full width of the card */
  height: 170px; /* Fixed height for all images */
  object-fit: cover; /* Ensure images fill the container without distortion */
  border-radius: 10px; /* Rounded corners for consistency */
  margin-top: 1rem; /* Space between text and image */
}

/* Responsive Design */
@media (max-width: 768px) {
  #services h2 {
    font-size: 2rem;
  }

  #services .subtitle {
    font-size: 1rem;
  }

  .service-card {
    padding: 1rem;
  }

  .service-icon {
    width: 40px;
    height: 40px;
  }

  .service-card h3 {
    font-size: 1.2rem;
  }

  .service-card p {
    font-size: 0.9rem;
  }

  .service-image {
    height: 150px; /* Slightly smaller height for mobile */
  }

  .services-container {
    grid-template-columns: repeat(2, 1fr); /* Show 2 cards per row on mobile */
    gap: 1.5rem; /* Adjust spacing between cards */
  }
}

/* Testimonials Section Styling */
#testimonials {
  background: #f4f4f4; /* Light background for contrast */
  padding: 4rem 0;
  text-align: center;
  margin-top: 80px; /* Prevent overlap with fixed navbar */
}

#testimonials h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

#testimonials .subtitle {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 2rem;
}

.testimonials-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid layout */
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  justify-content: center; /* Center cards if fewer than expected */
  padding: 0 1rem;
}

.testimonial-card {
  background: #fff;
  border: 2px solid #1D3E5F; /* Primary color border */
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.testimonial-card:hover {
  transform: translateY(-10px); /* Slight lift on hover */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.client-picture {
  width: 80px;
  height: 80px;
  border-radius: 50%; /* Circular picture */
  object-fit: center;
  margin: 0 auto 1rem; /* Centered and spaced below */
  border: 2px solid #1D3E5F; /* Primary color border */
}

.testimonial-text {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #333;
}

.client-name {
  font-size: 1rem;
  font-weight: bold;
  color: #1D3E5F; /* Primary color for client name */
}

/* Responsive Design */
@media (max-width: 768px) {
  #testimonials h2 {
    font-size: 2rem;
  }

  #testimonials .subtitle {
    font-size: 1rem;
  }

  .testimonials-container {
    grid-template-columns: repeat(2, 1fr); /* Two cards per row on mobile */
    gap: 1.5rem;
  }

  .testimonial-card {
    padding: 1rem;
  }

  .client-picture {
    width: 60px;
    height: 60px;
  }

  .testimonial-text {
    font-size: 0.9rem;
  }

  .client-name {
    font-size: 0.9rem;
  }
}

@media (max-width: 500px) {
  .testimonials-container {
    grid-template-columns: 1fr; /* One card per row on very small screens */
    justify-content: center; /* Center the single card */
  }
}

/* Contact Section Styling */
#contact {
  background: #f4f4f4; /* Light background for contrast */
  padding: 4rem 0;
  text-align: center;
  margin-top: 80px; /* Prevent overlap with fixed navbar */
}

#contact h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

#contact .subtitle {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 2rem;
}

.contact-container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* Contact Form */
.contact-form {
  flex: 1;
  max-width: 500px; /* Limit form width */
  margin-right: 2rem;
  text-align: left;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #1D3E5F; /* Primary color for focus */
  outline: none;
}

.contact-form button.submit-button {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: #1D3E5F; /* Primary color */
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact-form button.submit-button:hover {
  background: #E48D27; /* Secondary color on hover */
}

/* Contact Details */
.contact-details {
  flex: 1;
  text-align: left;
  max-width: 400px;
}

.contact-details h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #1D3E5F; /* Primary color */
}

.contact-info {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.contact-info li {
  margin-bottom: 0.5rem;
}

.contact-info a {
  text-decoration: none;
  color: #333;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: #E48D27; /* Secondary color on hover */
}

/* Social Media Icons */
.social-media {
  display: flex;
  justify-content: center; /* Center icons */
  gap: 1.5rem; /* Space between icons */
  margin-top: 1rem;
}

.social-icon {
  font-size: 2rem; /* Icon size */
  color: #1D3E5F; /* Primary color */
  transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
  color: #E48D27; /* Secondary color on hover */
  transform: scale(1.2); /* Slight enlargement on hover */
}

/* Responsive Design */
@media (max-width: 768px) {
  .contact-container {
    flex-direction: column;
    align-items: center;
  }

  .contact-form {
    margin-right: 0;
    margin-bottom: 2rem;
  }

  .contact-form,
  .contact-details {
    max-width: 100%;
  }
}