/* css/conduite-egout.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.7;
  color: #1f2937;
  font-size: 16px;
  background: #f9fafb;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   HEADER - DESKTOP & MOBILE
   ============================================ */
.header {
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo img {
  height: 60px;
}

.company-name {
  color: #1f2937;
  font-size: 1.25rem;
  font-weight: 700;
}

/* ============================================
   DESKTOP NAVIGATION
   ============================================ */
.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-main-content {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav a {
  color: #4b5563;
  text-decoration: none;
  /* Animating color causes repaints; use transform/opacity for smoother composited animations */
  transition: transform 0.2s ease, opacity 0.2s ease;
  will-change: transform, opacity;
}

.nav a:hover {
  color: #2563eb;
  transform: translateY(-2px);
  opacity: 0.95;
}

/* ============================================
   DESKTOP DROPDOWN MENU (CLICK TO OPEN)
   ============================================ */
.has-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: #4b5563;
  /* prefer composited transitions to avoid repaints */
  transition: transform 0.2s ease, opacity 0.2s ease;
  will-change: transform, opacity;
  background: none;
  border: none;
  font-size: 1rem;
  padding: 0;
  font-family: inherit;
}

.dropdown-toggle:hover {
  color: #2563eb;
  transform: translateY(-2px);
  opacity: 0.95;
}

.dropdown-arrow {
  font-size: 0.75rem;
  transition: transform 0.3s;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: white;
  min-width: 250px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 1rem 0;
  z-index: 1000;
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 2rem;
  color: #4b5563 !important;
  text-decoration: none;
  transition: background 0.2s;
}

.dropdown-menu a:hover {
  background: #f3f4f6;
  color: #2563eb !important;
}

/* Desktop click-to-open dropdown */
#services-toggle:checked ~ .nav .has-dropdown .services-menu,
#blog-toggle:checked ~ .nav .has-dropdown .blog-menu {
  display: block;
}

#services-toggle:checked ~ .nav .has-dropdown .dropdown-arrow,
#blog-toggle:checked ~ .nav .has-dropdown .dropdown-arrow {
  transform: rotate(180deg);
}

.back-button {
  display: none; /* Hidden on desktop */
}

/* ============================================
   MOBILE MENU SETUP (HIDDEN BY DEFAULT)
   ============================================ */
#menu-toggle {
  display: none;
}

#services-toggle {
  display: none;
}

#blog-toggle {
  display: none;
}

.menu-icon {
  display: none;
  width: 30px;
  height: 30px;
  cursor: pointer;
  position: relative;
  z-index: 102;
}

.menu-icon span {
  display: block;
  width: 100%;
  height: 3px;
  background: #000000;
  margin: 6px 0;
  transition: 0.3s;
}

.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
}

/* FORCE MAIN DROPDOWN LINKS TO USE FULL WIDTH */
.nav-main-content,
.nav-main-content > a,
.nav-main-content > .has-dropdown,
.nav-main-content > .has-dropdown > .dropdown-toggle {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

/* ============================================
   MOBILE RESPONSIVE STYLES (≤768px)
   ============================================ */
@media (max-width: 768px) {
  /* MOBILE: Show hamburger icon */
  .menu-icon {
    display: block;
    flex-direction: column;
    justify-content: space-around;
  }

  /* MOBILE: Main navigation menu (slides in from right when hamburger clicked) */
  .nav {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 101;
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* MOBILE: Main menu content container */
  .nav-main-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 80px 0 0 0;
    min-height: 100%;
  }

  /* MOBILE: Regular nav links (Accueil, À Propos, Contact) */
  .nav-main-content > a {
    width: 100%;
    padding: 1rem 20px;
    border-bottom: 1px solid #e5e7eb;
    display: block;
    text-align: center;
    text-decoration: none;
    color: #4b5563;
  }

  /* MOBILE: Dropdown wrapper (Services, Blog) */
  .nav-main-content > .has-dropdown {
    width: 100%;
    border-bottom: 1px solid #e5e7eb;
  }

  /* MOBILE: Dropdown toggle buttons (Services ▼, Blog ▼) */
  .nav-main-content > .has-dropdown > .dropdown-toggle {
    width: 100%;
    padding: 1rem 20px;
    display: block;
    text-align: center;
    color: #4b5563;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
  }

  /* MOBILE: Dropdown arrow */
  .dropdown-arrow {
    font-size: 1rem;
    display: inline !important;
    margin-left: 0.5rem;
    transition: transform 0.3;
  }

  /* MOBILE: Submenu (hidden by default, expands below when clicked) */
  .dropdown-menu {
    display: none;
    position: static;
    background: #f9fafb;
    width: 100%;
    padding: 0;
  }

  /* MOBILE: Submenu links */
  .dropdown-menu a {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    width: 100%;
    text-decoration: none;
    color: #4b5563;
    text-align: center;
    display: block;
  }

  /* MOBILE: Hide back button (not needed for accordion) */
  .back-button {
    display: none !important;
  }

  /* MOBILE: Show Services submenu when checkbox checked */
  #services-toggle:checked ~ .nav .services-menu {
    display: block;
  }

  /* MOBILE: Show Blog submenu when checkbox checked */
  #blog-toggle:checked ~ .nav .blog-menu {
    display: block;
  }

  /* MOBILE: Rotate arrow when submenu open */
  #services-toggle:checked ~ .nav .has-dropdown .services-menu ~ .dropdown-toggle .dropdown-arrow,
  #blog-toggle:checked ~ .nav .has-dropdown .blog-menu ~ .dropdown-toggle .dropdown-arrow {
    transform: rotate(180deg);
  }

  /* MOBILE: Emergency CTA button */
  .header-cta {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
    margin-left: 0;
  }

  /* MOBILE: Open main nav when hamburger clicked */
  #menu-toggle:checked ~ .nav {
    display: flex;
    right: 0; /* Slide nav into view */
  }

  /* MOBILE: Animate hamburger to X when menu open */
  #menu-toggle:checked ~ .menu-icon span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
  }

  #menu-toggle:checked ~ .menu-icon span:nth-child(2) {
    opacity: 0;
  }

  #menu-toggle:checked ~ .menu-icon span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
  }

  /* MOBILE: Show dark overlay when menu open */
  #menu-toggle:checked ~ .menu-overlay {
    display: block;
  }

  /* MOBILE: Smaller hero text */
  .hero-section h1 {
    font-size: 2rem;
  }

  /* MOBILE: Single column blog grid */
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.7;
  color: #1f2937;
  font-size: 16px;
  background: #f9fafb;
}
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.header {
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo img {
  height: 60px;
}
.company-name {
  color: #000000;
  font-size: 1.25rem;
  font-weight: 700;
}
.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav a {
  color: #000000;
  text-decoration: none; /* prefer transform/opacity transitions */
  transition: transform 0.2s ease, opacity 0.2s ease;
  will-change: transform, opacity;
}
.nav a:hover {
  color: #2563eb;
  transform: translateY(-2px);
  opacity: 0.95;
}
.breadcrumb {
  padding: 1.5rem 0;
  font-size: 0.875rem;
  color: #6b7280;
}
.breadcrumb a {
  color: #2563eb;
  text-decoration: none;
}
.breadcrumb span {
  margin: 0 0.5rem;
}
.article-header {
  max-width: 800px;
  margin: 2rem auto;
  text-align: center;
  background: white;
  padding: 3rem 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.breadcrumb {
  padding: 1.5rem 0;
  font-size: 0.875rem;
  color: #6b7280;
}

.breadcrumb a {
  color: #2563eb;
  text-decoration: none;
}

.breadcrumb span {
  margin: 0 0.5rem;
}

.article-header {
  max-width: 800px;
  margin: 2rem auto;
  text-align: center;
  background: white;
  padding: 3rem 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.article-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  color: #6b7280;
  font-size: 0.875rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.article-content {
  max-width: 800px;
  margin: 2rem auto;
  background: white;
  padding: 3rem 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.article-intro {
  font-size: 1.125rem;
  color: #374151;
  line-height: 1.8;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f0f9ff;
  border-left: 4px solid #2563eb;
  border-radius: 0 8px 8px 0;
}

.article-content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #111827;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #ef4444;
}

.article-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-content p {
  margin-bottom: 1.25rem;
  color: #374151;
}

.article-content strong {
  font-weight: 600;
  color: #111827;
}

.article-content a {
  color: #2563eb;
  text-decoration: none;
  border-bottom: 2px solid #93c5fd;
  transition: all 0.3s;
}

.article-content a:hover {
  border-color: #2563eb;
  color: #1e40af;
}

.warning-box {
  background: linear-gradient(135deg, #fee2e2 0%, #fef3c7 100%);
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 4px 6px rgba(245, 158, 11, 0.1);
}

.warning-box h3 {
  color: #b45309;
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.warning-box h3::before {
  content: "⚠️";
  font-size: 1.5rem;
}

.info-box {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border: 2px solid #2563eb;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.1);
}

.info-box h3 {
  color: #1e40af;
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-box h3::before {
  content: "💡";
  font-size: 1.5rem;
}

.success-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #10b981;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.1);
}

.success-box h3 {
  color: #065f46;
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.success-box h3::before {
  content: "✓";
  font-size: 1.5rem;
  font-weight: bold;
}

.numbered-list {
  counter-reset: custom-counter;
  list-style: none;
  padding: 0;
}

.numbered-list li {
  counter-increment: custom-counter;
  margin-bottom: 1.5rem;
  padding-left: 3rem;
  position: relative;
}

.numbered-list li::before {
  content: counter(custom-counter);
  position: absolute;
  left: 0;
  top: 0;
  background: #ef4444;
  color: white;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.125rem;
}

.faq-section {
  background: #fefce8;
  border: 2px solid #eab308;
  border-radius: 12px;
  padding: 2rem;
  margin: 3rem 0;
}

.faq-section h2 {
  color: #854d0e;
  border-bottom: 3px solid #eab308;
  margin-top: 0;
}

.faq-item {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #eab308;
}

.faq-question {
  font-weight: 700;
  color: #111827;
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.faq-answer {
  color: #374151;
  line-height: 1.7;
}

.cta-box {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  padding: 2.5rem;
  border-radius: 12px;
  margin: 3rem 0;
  text-align: center;
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
}

.cta-box h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: white;
}

.cta-box p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.95);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  background: white;
  color: #ef4444;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
  transition: all 0.3s;
  overflow-wrap: anywhere; /* break long bits (e.g., phone) */
  overflow-wrap: anywhere; /* break long bits (e.g., phone) */
  word-break: break-word;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.footer {
  background: #1e3a8a;
  color: #e0e7ff;
  padding: 3rem 1rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section a {
  color: #e0e7ff;
  text-decoration: none;
  /* avoid color-transition repaint — use transform/opacity animations if possible */
  transition: transform 0.2s ease, opacity 0.2s ease;
  will-change: transform, opacity;
}
.footer-section a:hover {
  color: white;
  transform: translateY(-1px);
  opacity: 0.95;
}

.footer-section a {
  color: #e0e7ff;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  will-change: transform, opacity;
}
.footer-section a:hover {
  color: white;
  transform: translateY(-1px);
  opacity: 0.95;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  text-align: center;
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .article-title {
    font-size: 2rem;
  }

  .nav {
    display: none;
  }

  .article-content {
    padding: 2rem 1.5rem;
  }

  .numbered-list li {
    padding-left: 2.5rem;
  }
}
