/* --- Styles Généraux et Réinitialisation --- */
body {
  font-family: "Roboto", sans-serif; /* Utilisation d'une police plus moderne */
  color: #333;
  background-color: #f8f9fa; /* Couleur de fond légère pour un aspect propre */
  overflow-x: hidden; /* Empêche le défilement horizontal */
}

a {
  color: #007bff; /* Couleur de lien par défaut de Bootstrap */
  text-decoration: none;
  transition: color 0.3s ease; /* Transition douce pour les changements de couleur de lien */
}

a:hover {
  color: #0056b3; /* Assombrit la couleur au survol */
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Montserrat", sans-serif; /* Police plus audacieuse pour les titres */
  color: #343a40; /* Couleur sombre pour les titres */
  margin-bottom: 0.5em;
}

/* --- Header / Navbar --- */
header.bg-white { /* Target the now white header */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1030;
    /* Ensure all text within the header is black by default */
    color: #000000 !important;
}

/* This targets the logo/site title link in the header */
/* Ensure it's black if it's text, not an image */
.navbar-brand {
    color: #000000 !important; /* Force brand text to be black */
}

header .navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    position: relative;
    color: #000000 !important; /* Force navigation links to be black */
}

header .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: #28a745; /* Green underline */
    transition: width 0.3s ease;
}

header .navbar-nav .nav-link:hover::after,
header .navbar-nav .nav-link.active::after {
    width: 100%;
}

header .navbar-nav .nav-link:hover {
    color: #28a745 !important; /* Change text color to green on hover */
}

/* Ensure the toggler icon is visible on a white background */
.navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Ajustez la couleur du logo si c'est une image avec du texte blanc qui ne sera plus visible */
/* Si votre logo est une image (logo.png), cette règle n'est pas pertinente pour l'image elle-même */
/* Si c'était du texte dans un <a>, cela le rendrait sombre */
.navbar-brand {
  color: #343a40 !important; /* Exemple si votre marque était du texte */
}

/* --- Carrousel (Héros) --- */
.carousel-item img {
  max-height: 550px; /* Augmenter la hauteur pour un impact visuel plus grand */
  object-fit: cover;
  filter: brightness(
    0.8
  ); /* Assombrir légèrement l'image pour mieux faire ressortir le texte */
}

.carousel-caption {
  background-color: rgba(
    0,
    0,
    0,
    0.4
  ); /* Fond semi-transparent pour le texte */
  padding: 20px 30px;
  border-radius: 8px;
  bottom: 20%; /* Remonter légèrement la légende */
  left: 50%;
  transform: translateX(-50%);
  width: 80%; /* Largeur pour la légende */
  max-width: 800px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.carousel-caption h1 {
  font-size: 3.5rem; /* Taille de titre plus grande */
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  margin-bottom: 10px;
}

.carousel-caption p {
  font-size: 1.5rem; /* Taille de texte plus grande */
  color: #e9ecef;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  margin-bottom: 20px;
}

.carousel-caption .btn {
  font-size: 1.1rem;
  padding: 12px 30px;
  border-radius: 50px; /* Boutons plus arrondis */
  font-weight: bold;
  transition: all 0.3s ease;
}

/* --- Animations pour les Sections --- */
section {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.7s forwards ease-out; /* Animation plus douce et plus longue */
  animation-delay: var(--delay, 0s); /* Pour des animations décalées */
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Cartes de Produits / Services --- */
.card {
  border: none;
  border-radius: 10px; /* Bords légèrement arrondis */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Ombre plus prononcée */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden; /* Important pour l'effet de zoom de l'image */
}

.card:hover {
  transform: translateY(-5px); /* Léger soulèvement au survol */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); /* Ombre plus intense */
}

.card-img-top {
  height: 200px; /* Hauteur fixe pour toutes les images de carte */
  object-fit: cover;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  transition: transform 0.3s ease;
}

.card:hover .card-img-top {
  transform: scale(1.05); /* Effet de zoom existant, c'est parfait */
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: #495057;
}

.card-text {
  font-size: 0.95rem;
  color: #6c757d;
}

.card-text strong {
  color: #28a745; /* Prix en vert pour attirer l'attention */
  font-size: 1.1rem;
}

/* Boutons Ajouter au panier / Voir le produit */
.card .btn-primary {
  background-color: #28a745; /* Vert pour les appels à l'action */
  border-color: #28a745;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.card .btn-primary:hover {
  background-color: #218838;
  border-color: #1e7e34;
}

/* --- Section "Notre Engagement" --- */
/* (Vous devrez ajouter la classe commitment-icon à vos <i> dans l'HTML) */
.commitment-icon {
  font-size: 3rem;
  color: #28a745; /* Icônes en vert pour un aspect cohérent */
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.col-md-3:hover .commitment-icon {
  transform: scale(1.1); /* Effet de zoom sur les icônes d'engagement */
}

/* --- Section "Prêt à vivre l’expérience SERDIS ?" (Call to Action) --- */
.bg-success {
  background-color: #ffffff !important; /* Bannière blanche */
  color: #28a745 !important;
}

.bg-success h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.bg-success p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 30px;
}

.bg-success .btn-light {
  color: #28a745; /* Texte vert sur fond blanc pour le bouton */
  font-weight: bold;
  border-radius: 50px;
}

.bg-success .btn-outline-light {
  border-color: #fff;
  color: #fff;
  font-weight: bold;
  border-radius: 50px;
}

.bg-success .btn-outline-light:hover {
  background-color: #fff;
  color: #28a745;
}

/* --- Footer Amélioré --- */
footer.bg-dark {
  /* Still target bg-dark from HTML, but force white background */
  background-color: #ffffff !important; /* White background for the footer */
  color: #000000; /* Default text color for the footer (black) */
  padding: 40px 0;
  font-size: 0.9rem;
  border-top: 5px solid #28a745;
}

footer h5 {
  color: #000000 !important; /* Footer headings in black */
  font-weight: bold;
  margin-bottom: 15px;
}

footer p {
  color: #000000 !important; /* Footer paragraphs in black */
}

footer ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

/* Target footer links for default black color */
footer ul li a {
  color: #000000 !important; /* Footer links are black by default */
  text-decoration: none; /* Remove underline */
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline-block;
}

footer ul li a:hover {
  color: #28a745 !important; /* Green on hover */
  transform: translateX(5px);
}

/* Target social media icons */
footer .fab {
  color: #000000 !important; /* Social media icons in black */
  font-size: 1.5rem;
  margin-right: 15px;
  transition: transform 0.3s ease, color 0.3s ease;
}

footer .fab:hover {
  transform: scale(1.2);
  color: #28a745; /* Green on hover */
}

/* Specific rule for the email link in contact info, if it needs a different default color */
footer .col-md-4 p a {
  color: #000000 !important; /* Ensure email link is black */
}
footer .col-md-4 p a:hover {
  color: #28a745 !important; /* Ensure email link is green on hover */
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
  /* Adjust for medium screens and below */
  .carousel-caption h1 {
    font-size: 2.5rem;
  }

  .carousel-caption p {
    font-size: 1.2rem;
  }
  header .navbar-nav .nav-link {
    text-align: center;
  }
  header .navbar-nav .nav-link::after {
    left: 50%; /* Center underline for mobile menu items */
    transform: translateX(-50%);
  }
}

@media (max-width: 768px) {
  .carousel-caption h1 {
    font-size: 2rem;
  }

  .carousel-caption p {
    font-size: 1rem;
  }

  .carousel-caption {
    bottom: 10%;
    padding: 10px 15px;
    width: 90%;
  }

  .col-md-3,
  .col-md-4 {
    /* Apply to both commitment and footer columns */
    margin-bottom: 30px; /* Espacement entre les colonnes d'engagement/footer sur mobile */
  }
  footer .col-md-4:last-child {
    margin-bottom: 0; /* Remove bottom margin for the last column in footer on mobile */
  }
}

/* --- Styles pour les autres pages (Contact, About, Products) --- */
/* Pour s'assurer que le contenu ne soit pas caché par le header fixe */
main .container.py-5 {
  /* Cibler plus spécifiquement les conteneurs de contenu principal */
  padding-top: 6rem !important; /* Ajuste le padding pour le contenu principal, laisse de la place pour le header sticky */
  padding-bottom: 3rem !important;
}

/* Styles spécifiques pour la carte Google Maps sur la page contact */
#contact-map {
  border-radius: 10px; /* Bords arrondis pour l'iframe de la carte */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Styles pour la section filtres sur la page produits */
.col-md-3 h4 {
  border-bottom: 2px solid #28a745;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.form-label {
  font-weight: bold;
  color: #495057;
}

.toast-message {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: 8px;
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease,
    background-color 0.3s ease;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.toast-message.success {
  background-color: #28a745; /* Green for success */
  color: white;
}

.toast-message.error {
  background-color: #dc3545; /* Red for error */
  color: white;
}

.toast-message.show {
  opacity: 1;
  visibility: visible;
}

.toast-message .close-toast {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  margin-left: 15px;
  cursor: pointer;
}
