/* ========== GLOBAL RESET & BASE STYLES ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Lato", sans-serif;
  background-color: #fafafa;
  color: #333;
  line-height: 1.6;
}

/* Container utility */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ========== HEADER (TOP NAVIGATION) ========== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #858585;
  color: #fff;
  padding: 15px 0;
  z-index: 999;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.top-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-nav .logo {
  margin: 0;
  padding: 0;
}

.top-nav .logo img {
  max-height: 50px;
  width: auto;
  display: block;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  justify-content: center;
}

.nav-links a {
  color: #ffa500;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ff0000;
}

/* ========== SECONDARY NAVIGATION ========== */
.secondary-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #333;
  color: #fff;
  padding: 10px 0;
  z-index: 998;
  display: none; /* Hidden by default; add .visible when needed */
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.secondary-nav.visible {
  display: flex;
}

.secondary-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  justify-content: center;
}

.secondary-nav a {
  color: #ffa500;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.secondary-nav a:hover {
  color: #ff0000;
}

/* ========== MAIN CONTENT SPACING ========== */
main {
  margin-top: 80px; /* Adjusted to avoid overlap with the fixed header */
}

/* ========== SECTION: NOS PRESTATIONS ========== */
.prestations {
  background: #fff;
  padding: 60px 0;
  margin-top: 1rem;
}

.prestations h2 {
  color: #ffa500;
  text-align: center;
  margin-bottom: 40px;
  font-size: 2rem;
}

.prestations-items {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

/* Each Prestation Item */
.prestation-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.prestation-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.prestation-item h3 {
  color: #ffa500;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.prestation-item p {
  color: #555;
  font-size: 1rem;
  margin-bottom: 20px;
  max-width: 800px;
}

/* Prestation Image */
.prestation-image {
  width: 100%;
  max-width: 600px;
  max-height: 250px;
  height: auto;
  border-radius: 10px;
  margin-bottom: 15px;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Detail Box */
.prestation-detail {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 5px;
  max-width: 800px;
  width: 100%;
  text-align: left; /* Left-align for better readability */
  margin-top: 1rem;
}

.prestation-detail h4 {
  color: #ffa500;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.prestation-detail p {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #333;
}

.prestation-detail ul {
  list-style: disc inside;
  margin-bottom: 20px;
  margin-left: 1rem;
}

.prestation-detail ul li {
  margin-bottom: 8px;
  font-size: 1rem;
}

/* ========== FOOTER ========== */
footer {
  background: #f0ab2c; /* Updated to match index footer styling */
  color: #fff;
  padding: 20px 0;
  text-align: center;
  margin-top: 2rem;
}

footer p {
  margin: 0;
  font-size: 0.9rem;
}

/* ========== BACK TO TOP BUTTON ========== */
#backToTop {
  position: fixed;
  bottom: 40px;
  right: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1000;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    gap: 0.75rem;
  }
  .secondary-nav ul {
    flex-direction: column;
    gap: 0.75rem;
  }
  .prestation-image {
    max-width: 100%;
  }
}
