/* Custom styles for Renovation Lacombe Connely - Updated 2024-12-19 v4 - FORCE CIRCULAR BUTTONS */

/* Global fix for CSS Grid rendering artifacts - prevents angled lines across all sections */
/* This applies CSS containment to all sections to prevent grid rendering artifacts from bleeding between sections */
section[class*="section_"] {
  position: relative;
  isolation: isolate;
  contain: layout style paint;
  transform: translateZ(0);
  will-change: auto;
}

/* Apply containment to all Webflow grid containers to prevent artifacts */
.w-layout-grid {
  position: relative;
  contain: layout;
}

/* Filter button styles */
.category-filter-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
  padding: 10px 0;
}

.category-filter-link {
  padding: 10px 20px;
  background-color: #f5f5f5;
  border-radius: 6px;
  transition: all 0.3s ease;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  border: 1px solid #e0e0e0;
  min-width: 100px;
  text-align: center;
}

.category-filter-link:hover {
  background-color: #e9e9e9;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.category-filter-link.active {
  background-color: #d3af37; /* Brand color - old gold */
  color: #000; /* Black text */
  border-color: #d3af37;
}

/* Mobile styles - improved for best practices */
@media screen and (max-width: 767px) {
  .category-filter-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 15px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
  }
  
  .category-filter-link {
    padding: 12px 10px;
    font-size: 14px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    width: 100%;
  }
}

/* Small mobile screens */
@media screen and (max-width: 479px) {
  .category-filter-menu {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 10px;
  }
  
  .category-filter-link {
    padding: 10px 8px;
    font-size: 13px;
    min-height: 40px;
  }
}

/* Project item styles */
.blog6_item {
  transition: transform 0.3s ease;
  cursor: pointer;
}

.blog6_item:hover {
  transform: translateY(-5px);
}

/* Hide all items except those in the default category (salle-de-bain) on initial load */
/* JavaScript will take over immediately after to handle URL parameters */
.blog6_item:not([data-category="salle-de-bain"]) {
  display: none;
}

.tag.is-alternate.rea {
  background-color: #000; /* Black background */
  color: #fff; /* White text */
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-top: 10px;
}

/* Tags positioned over images - Hidden */
.blog6_image-tag {
  display: none !important;
}

/* Google My Maps Integration - Hide Title Bar */
.contact16_map-wrapper {
  overflow: hidden !important;
}

.contact16_map-wrapper iframe {
  border: 0 !important;
  margin-top: -150px !important;
  width: 100% !important;
}

/* Desktop: 35rem = 560px, so iframe should be 710px (560 + 150) */
@media screen and (min-width: 992px) {
  .contact16_map-wrapper iframe {
    height: 710px !important;
  }
}

/* Tablet: 30rem = 480px, so iframe should be 630px (480 + 150) */
@media screen and (min-width: 768px) and (max-width: 991px) {
  .contact16_map-wrapper iframe {
    height: 630px !important;
  }
}

/* Mobile: 25rem = 400px, so iframe should be 550px (400 + 150) */
@media screen and (max-width: 767px) {
  .contact16_map-wrapper iframe {
    height: 550px !important;
  }
}

/* Phone number spacing for easier clicking */
.contact16_item-text-wrapper a.text-style-link + a.text-style-link {
  margin-top: 0.75rem !important;
  display: inline-block !important;
}

.footer3_details-wrapper a.text-size-small + a.text-size-small {
  margin-top: 0.5rem !important;
  display: inline-block !important;
}

/* Featured Section - Horizontal Layout (Image Left, Text Right) */
.blog6_featured-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 2rem !important;
  width: 100% !important;
}

.blog6_featured-image-wrapper {
  flex: 1 1 60% !important;
  min-width: 0 !important;
  width: auto !important;
}

.blog6_featured-image-link {
  display: block !important;
  width: 100% !important;
}

.blog6_featured-image-link .blog6_image-wrapper {
  width: 100% !important;
  height: 400px !important;
}

.blog6_featured-content {
  flex: 1 1 40% !important;
  min-width: 0 !important;
  padding-left: 2rem !important;
}

/* Mobile: Stack vertically */
@media screen and (max-width: 991px) {
  .blog6_featured-item {
    flex-direction: column !important;
    gap: 1.5rem !important;
  }
  
  .blog6_featured-image-wrapper {
    flex: 1 1 auto !important;
    width: 100% !important;
  }
  
  .blog6_featured-content {
    flex: 1 1 auto !important;
    width: 100% !important;
    padding-left: 0 !important;
    order: -1 !important; /* Show text above image on mobile */
  }
}

/* Override Webflow grid spacing - reduce gaps */
.blog6_list {
  grid-column-gap: 1rem !important;
  grid-row-gap: 1rem !important;
}

/* Gallery Images - All images horizontal with fixed height */
.blog6_image-wrapper {
  width: 100% !important;
  height: 300px !important;
  overflow: hidden !important;
  position: relative !important;
}

/* Gallery Images - Force horizontal display with cover fit */
.blog6_image,
.blog6_item .blog6_image,
.blog6_list .blog6_item .blog6_image,
.blog6_list img,
.blog6_item img,
img.blog6_image {
  width: 100% !important;
  height: 300px !important;
  min-height: 300px !important;
  max-height: 300px !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  aspect-ratio: 4/3 !important;
  image-orientation: none !important;
  transform: none !important;
}

/* Enhanced Lightbox styles with brand colors */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  backdrop-filter: blur(5px);
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 95%;
  max-height: 95%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border: 3px solid #d3af37;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(211, 175, 55, 0.3);
}

/* Enhanced Close Button */
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #d3af37, #b8941f);
  color: #000;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  border-radius: 50%;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(211, 175, 55, 0.4);
  z-index: 10001;
}

.lightbox-close:hover {
  background: linear-gradient(135deg, #b8941f, #d3af37);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(211, 175, 55, 0.6);
}

.lightbox-close:active {
  transform: scale(0.95);
}

/* Navigation Arrows */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #d3af37, #b8941f);
  color: #000;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  border-radius: 50%;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(211, 175, 55, 0.4);
  z-index: 10001;
  opacity: 0.9;
}

.lightbox-nav:hover {
  background: linear-gradient(135deg, #b8941f, #d3af37);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(211, 175, 55, 0.6);
  opacity: 1;
}

.lightbox-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.lightbox-prev {
  left: -80px;
}

.lightbox-next {
  right: -80px;
}

/* Hide navigation arrows on mobile */
@media (max-width: 768px) {
  .lightbox-nav {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
  
  .lightbox-close {
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
  
  .lightbox-image {
    max-height: 80vh;
    border-width: 2px;
  }
}

/* Enhanced Caption */
.lightbox-caption {
  color: #d3af37;
  text-align: center;
  margin-top: 20px;
  font-size: 18px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  background: rgba(0, 0, 0, 0.7);
  padding: 12px 24px;
  border-radius: 25px;
  border: 1px solid rgba(211, 175, 55, 0.3);
  backdrop-filter: blur(10px);
  max-width: 80%;
  word-wrap: break-word;
}

/* Mobile and Tablet Navigation Fixes */
@media screen and (max-width: 991px) {
  /* Fix banner z-index to not overlap mobile menu */
  .banner9_component {
    z-index: -1 !important;
    position: relative !important;
  }
  
  /* Ensure all banner elements stay below menu */
  .banner9_content-wrapper,
  .banner9_content,
  .banner9_social-icons,
  .banner9_social-link {
    z-index: -1 !important;
    position: relative !important;
  }
  
  /* Force banner to stay below everything */
  .banner9_component * {
    z-index: -1 !important;
  }
  
  /* Additional banner fix */
  .banner9_component,
  .banner9_component * {
    z-index: -1 !important;
    position: relative !important;
  }
  
  /* Fix mobile banner layout - keep phone and RBQ side by side */
  .banner9_content {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 1rem !important;
  }
  
  .banner9_content-wrapper {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 1rem !important;
  }
  
  /* Ensure text elements don't stack */
  .banner9_text-wrapper {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
  
  /* Keep social icons on the right */
  .banner9_social-icons {
    flex-shrink: 0 !important;
    margin-left: auto !important;
  }
  
  /* Ensure mobile menu has higher z-index than banner */
  .navbar3_menu {
    z-index: 9999 !important;
    position: relative !important;
  }
  
  /* Ensure mobile menu background also has high z-index */
  .navbar3_menu-background {
    z-index: 9998 !important;
  }
  
  /* Force mobile menu to appear above everything */
  .navbar3_menu * {
    z-index: 9999 !important;
  }
  
  /* Ensure logo is visible and properly styled in mobile menu */
  .navbar3_logo-link-menu {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 2rem 0 !important;
  }
  
  .navbar3_logo-link-menu .navbar3_logo {
    max-width: 200px !important;
    height: auto !important;
    padding: 10px !important;
  }
  
  /* Fix services dropdown on mobile */
  .navbar3_menu-dropdown {
    position: relative !important;
  }
  
  .navbar3_dropdown-list {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background-color: var(--color-scheme-1--background) !important;
    border: 1px solid var(--color-scheme-1--border) !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease !important;
    z-index: 1001 !important;
  }
  
  .navbar3_dropdown-list.w--open {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
  }
  
  .navbar3_dropdown-link {
    padding: 0.75rem 1rem !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
  }
  
  .navbar3_dropdown-link:last-child {
    border-bottom: none !important;
  }
  
  /* Replace black Menu button with Soumission button styling */
  .navbar3_tablet-menu-button {
    background-color: #d3af37 !important;
    background: linear-gradient(135deg, #d3af37, #b8941f) !important;
    color: #000 !important;
    border: 2px solid #d3af37 !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(211, 175, 55, 0.4) !important;
    padding: 12px 24px !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin-top: 20px !important;
  }
  
  .navbar3_tablet-menu-button:hover {
    background: linear-gradient(135deg, #b8941f, #d3af37) !important;
    border-color: #b8941f !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(211, 175, 55, 0.4) !important;
  }
  
  .navbar3_tablet-menu-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(211, 175, 55, 0.3) !important;
  }
  
  /* Additional specificity for Soumission button */
  .navbar3_menu .navbar3_tablet-menu-button,
  .navbar3_tablet-menu-button.w-button {
    background: linear-gradient(135deg, #d3af37, #b8941f) !important;
    background-color: #d3af37 !important;
    color: #000 !important;
    border: 2px solid #d3af37 !important;
  }
  
  /* Override any conflicting styles with maximum specificity */
  .navbar3_component .navbar3_menu .navbar3_tablet-menu-button {
    background: linear-gradient(135deg, #d3af37, #b8941f) !important;
    background-color: #d3af37 !important;
    color: #000 !important;
    border: 2px solid #d3af37 !important;
  }
  
  /* Nuclear option - target all possible selectors */
  .navbar3_tablet-menu-button[class*="w-button"],
  .w-button.navbar3_tablet-menu-button,
  .navbar3_menu a[class*="navbar3_tablet-menu-button"] {
    background: linear-gradient(135deg, #d3af37, #b8941f) !important;
    background-color: #d3af37 !important;
    color: #000 !important;
    border: 2px solid #d3af37 !important;
    box-shadow: 0 4px 12px rgba(211, 175, 55, 0.4) !important;
  }
  
  /* Override w-button class specifically */
  .w-button {
    background: linear-gradient(135deg, #d3af37, #b8941f) !important;
    background-color: #d3af37 !important;
    color: #000 !important;
    border: 2px solid #d3af37 !important;
  }
  
  /* Target the specific button in mobile menu */
  .navbar3_menu a.w-button {
    background: linear-gradient(135deg, #d3af37, #b8941f) !important;
    background-color: #d3af37 !important;
    color: #000 !important;
    border: 2px solid #d3af37 !important;
    box-shadow: 0 4px 12px rgba(211, 175, 55, 0.4) !important;
  }
  
  /* Fix current page text color - make it white */
.navbar3_link.w--current {
  color: #ffffff !important;
  background-color: transparent !important; /* Keep current link text white with no fill */
}
  
  /* Ensure all navbar links are white */
  .navbar3_link {
    color: #ffffff !important;
  }
  
  /* Fix Services dropdown current page items */
.navbar3_dropdown-list .navbar3_dropdown-link.w--current,
.navbar3_menu .navbar3_dropdown-link.w--current,
.navbar3_component .navbar3_dropdown-list .navbar3_dropdown-link.w--current,
.w-dropdown-link.w--current {
  color: #ffffff !important;
  background-color: transparent !important;
}
  
  /* Ensure all Services dropdown links are white */
.navbar3_dropdown-list .navbar3_dropdown-link,
.navbar3_dropdown-list .navbar3_dropdown-link:link,
.navbar3_dropdown-list .navbar3_dropdown-link:visited,
.navbar3_dropdown-list .navbar3_dropdown-link:hover,
.navbar3_dropdown-list .navbar3_dropdown-link:active,
.navbar3_menu .navbar3_dropdown-link,
.w-dropdown-list .w-dropdown-link,
.w-dropdown-list .w-dropdown-link:link,
.w-dropdown-list .w-dropdown-link:visited,
.w-dropdown-list .w-dropdown-link:hover,
.w-dropdown-list .w-dropdown-link:active,
.navbar3_dropdown-list a[href^="/services/"],
.navbar3_dropdown-list a[href^="/services/"]:link,
.navbar3_dropdown-list a[href^="/services/"]:visited {
  color: #ffffff !important;
}

/* Navbar mobile overflow fix */
@media screen and (max-width: 767px) {
  .navbar3_component .navbar3_container {
    gap: 10px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    overflow: hidden !important;
  }
  .navbar3_component .navbar3_logo {
    max-width: 160px !important;
    width: 160px !important;
    height: auto !important;
    padding: 8px !important;
  }
  .navbar3_component .button.w-button {
    padding: 8px 12px !important;
    font-size: 14px !important;
    line-height: 1.1 !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important; /* keep size, prevent squish */
  }
  
  /* Enhanced mobile banner layout for smaller screens */
  .banner9_content {
    padding: 0.5rem 1rem !important;
    gap: 0.5rem !important;
  }
  
  .banner9_text-wrapper {
    font-size: 0.875rem !important;
  }
  
  .banner9_social-icons {
    gap: 0.5rem !important;
  }
  
  .banner9_social-link {
    width: 32px !important;
    height: 32px !important;
  }
}

@media screen and (max-width: 479px) {
  .navbar3_component .navbar3_logo {
    max-width: 140px !important;
    width: 140px !important;
    padding: 6px !important;
  }
  .navbar3_component .button.w-button {
    padding: 6px 10px !important;
    font-size: 13px !important;
  }
  
  /* Ultra-small mobile banner layout */
  .banner9_content {
    padding: 0.25rem 0.75rem !important;
    gap: 0.25rem !important;
  }
  
  .banner9_text-wrapper {
    font-size: 0.75rem !important;
  }
  
  .banner9_social-link {
    width: 28px !important;
    height: 28px !important;
  }
  
  .banner9_social-icons {
    gap: 0.25rem !important;
  }
}

/* Current item inside Services dropdown */
.navbar3_dropdown-list .navbar3_dropdown-link.w--current,
.navbar3_dropdown-list .navbar3_dropdown-link[aria-current="page"],
.w-dropdown-list .w-dropdown-link.w--current,
.w-dropdown-list .w-dropdown-link[aria-current="page"],
.navbar3_menu .navbar3_dropdown-link.w--current,
.navbar3_component .navbar3_menu .navbar3_dropdown-list .navbar3_dropdown-link.w--current,
.navbar3_component .navbar3_menu .navbar3_dropdown-list .navbar3_dropdown-link[aria-current="page"],
.navbar3_dropdown-list a[href="/services/projet-de-renovation-sur-mesure"] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important; /* force for WebKit */
  opacity: 1 !important;
  background-color: transparent !important;
}

/* Ensure nested children inside current link inherit white */
.navbar3_dropdown-list .navbar3_dropdown-link.w--current *,
.navbar3_dropdown-list .navbar3_dropdown-link[aria-current="page"] *,
.w-dropdown-list .w-dropdown-link.w--current *,
.w-dropdown-list .w-dropdown-link[aria-current="page"] * {
  color: #ffffff !important;
}
  
  /* Target w-dropdown-link class as well */
  .w-dropdown-link.w--current {
    color: #ffffff !important;
    background-color: transparent !important;
  }
  
  .w-dropdown-link {
    color: #ffffff !important;
  }

/* FORCE white text for Services dropdown links (including current) */
.navbar3_dropdown-list a,
.navbar3_dropdown-list a *,
.w-nav-overlay .navbar3_dropdown-list a,
.w-nav-overlay .navbar3_dropdown-list a * {
  color: #ffffff !important;
}

/* Desktop: enforce white specifically for the current Services item */
.navbar3_dropdown-list a[href="/services/projet-de-renovation-sur-mesure"],
.navbar3_dropdown-list a[href="/services/projet-de-renovation-sur-mesure"]:link,
.navbar3_dropdown-list a[href="/services/projet-de-renovation-sur-mesure"]:visited,
.navbar3_dropdown-list a[href="/services/projet-de-renovation-sur-mesure"]:hover,
.navbar3_dropdown-list a[href="/services/projet-de-renovation-sur-mesure"]:active,
.navbar3_dropdown-list a[href="/services/projet-de-renovation-sur-mesure"] *,
.navbar3_dropdown-list .navbar3_dropdown-link.w--current,
.navbar3_dropdown-list .navbar3_dropdown-link.w--current * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: none !important;
  mix-blend-mode: normal !important;
  filter: none !important;
  background: transparent !important;
}

/* Target the exact class combination you provided */
.navbar3_dropdown-link.w-dropdown-link.w--current,
.navbar3_dropdown-link.w-dropdown-link.w--current *,
.navbar3_dropdown-list .navbar3_dropdown-link.w-dropdown-link.w--current,
.navbar3_dropdown-list .navbar3_dropdown-link.w-dropdown-link.w--current * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: none !important;
  mix-blend-mode: normal !important;
  filter: none !important;
  background: transparent !important;
}

/* Maximum specificity override - target the exact element with all classes and attributes */
.navbar3_dropdown-list .navbar3_dropdown-link.w-dropdown-link.w--current[aria-current="page"],
.navbar3_dropdown-list .navbar3_dropdown-link.w-dropdown-link.w--current[aria-current="page"] *,
.navbar3_menu .navbar3_dropdown-list .navbar3_dropdown-link.w-dropdown-link.w--current[aria-current="page"],
.navbar3_menu .navbar3_dropdown-list .navbar3_dropdown-link.w-dropdown-link.w--current[aria-current="page"] * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: none !important;
  mix-blend-mode: normal !important;
  filter: none !important;
  background: transparent !important;
  opacity: 1 !important;
}

/* JavaScript fallback - force white color via inline styles */
.navbar3_dropdown-link.w-dropdown-link.w--current[aria-current="page"] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Mobile/Tablet: reset dropdown to Webflow defaults to avoid layout glitches */
@media screen and (max-width: 991px) {
  .navbar3_menu-dropdown { position: static !important; }
  .navbar3_dropdown-list {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    border: 0 !important;
    background: transparent !important;
  }
}
  
  /* Ultra-specific button targeting */
  .navbar3_component .navbar3_container .navbar3_menu .navbar3_tablet-menu-button.w-button {
    background: linear-gradient(135deg, #d3af37, #b8941f) !important;
    background-color: #d3af37 !important;
    color: #000000 !important;
    border: 2px solid #d3af37 !important;
    box-shadow: 0 4px 12px rgba(211, 175, 55, 0.4) !important;
  }
  
  /* Force button styling with inline style override */
  a[href="/soumission"].navbar3_tablet-menu-button.w-button {
    background: linear-gradient(135deg, #d3af37, #b8941f) !important;
    background-color: #d3af37 !important;
    color: #000000 !important;
    border: 2px solid #d3af37 !important;
    box-shadow: 0 4px 12px rgba(211, 175, 55, 0.4) !important;
  }
  
  /* Target any Soumission button in mobile menu */
  .navbar3_menu a[href="/soumission"] {
    background: linear-gradient(135deg, #d3af37, #b8941f) !important;
    background-color: #d3af37 !important;
    color: #000000 !important;
    border: 2px solid #d3af37 !important;
    box-shadow: 0 4px 12px rgba(211, 175, 55, 0.4) !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
  }
  
  /* Target w-button class in mobile menu */
  .navbar3_menu .w-button {
    background: linear-gradient(135deg, #d3af37, #b8941f) !important;
    background-color: #d3af37 !important;
    color: #000000 !important;
    border: 2px solid #d3af37 !important;
    box-shadow: 0 4px 12px rgba(211, 175, 55, 0.4) !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
  }
}

/* Messenger Button Styles - Clean and Circular */
.st_wrapper, html {
  scroll-behavior: smooth;
}
.messenger-button {
  position: fixed !important;
  bottom: 60px !important; /* Tighter gap to back-to-top */
  right: 20px !important;
  z-index: 10000 !important;
  width: 50px !important;
  height: 50px !important;
  background: linear-gradient(135deg, #d3af37, #b8941f) !important;
  border-radius: 50% !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 12px rgba(211, 175, 55, 0.4) !important;
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 280ms ease !important;
  cursor: pointer !important;
  overflow: hidden !important;
  opacity: 0; /* Hidden by default; revealed on scroll via JS */
  transform: translateY(12px) scale(0.98);
  will-change: transform, opacity;
  pointer-events: none;
}

.messenger-button:hover {
  transform: scale(1.1);
  background: linear-gradient(135deg, #e6c547, #c19f2e);
  box-shadow: 0 6px 16px rgba(211, 175, 55, 0.5);
}

.messenger-button a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  border-radius: 50%;
}

.messenger-button img {
  filter: brightness(0) invert(1); /* Make the icon white */
  transition: all 0.3s ease;
}

.messenger-button:hover img {
  transform: scale(1.1);
}

/* Back to Top Button - Clean Circular Shape */
.st_button {
  position: fixed !important; /* Ensure fixed position like Messenger */
  bottom: 20px !important; /* Align with Messenger spacing */
  right: 20px !important;
  z-index: 10002 !important; /* Above any banners/overlays */
  border-radius: 50% !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 50px !important;
  height: 50px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  transition: box-shadow 0.2s ease, background 0.2s ease !important;
}

/* Ensure Messenger overrides generic st_button positioning */
.st_button.messenger-button {
  bottom: 100px !important;
  right: 20px !important;
  z-index: 10000 !important;
}

/* Ensure the scroll-top button starts hidden before JS reveals it */
[ms-code-scroll-top="button"] {
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 280ms ease;
  will-change: transform, opacity;
  pointer-events: none;
  cursor: pointer;
  z-index: 10002 !important;
  width: 50px !important; /* Match Messenger size */
  height: 50px !important; /* Match Messenger size */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
}

/* Visible state (toggled by JS) */
.messenger-button.is-visible,
[ms-code-scroll-top="button"].is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto !important;
}

/* Ensure inner SVG does not intercept clicks */
[ms-code-scroll-top="button"] * {
  pointer-events: none !important; /* Keep inner elements from stealing clicks */
}

/* Keyframe-based appear for reliable, smooth entrance */
@keyframes fadeInUpSmall {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.messenger-button.appear,
[ms-code-scroll-top="button"].appear {
  animation: fadeInUpSmall 280ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Hover animation for Back to Top */
[ms-code-scroll-top="button"]:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25) !important;
}

[ms-code-scroll-top="button"] .icon-embed-xxsmall-2 svg {
  transition: transform 0.2s ease;
  pointer-events: none !important;
}

[ms-code-scroll-top="button"]:hover .icon-embed-xxsmall-2 svg {
  transform: translateY(-1px) scale(1.03);
}

/* Avoid wrapper intercepting clicks; buttons re-enable pointer events */
.st_wrapper {
  pointer-events: none !important; /* Wrapper never intercepts clicks */
}

/* Custom 404 page styles */
.error-404-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 100px 20px !important;
  text-align: center !important;
  min-height: 70vh !important;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  margin: 0 !important;
  width: 100% !important;
  position: relative !important;
}

.error-404-container::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23d3af37" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23d3af37" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23d3af37" opacity="0.05"/><circle cx="10" cy="60" r="0.5" fill="%23d3af37" opacity="0.05"/><circle cx="90" cy="40" r="0.5" fill="%23d3af37" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') !important;
  opacity: 0.3 !important;
  z-index: 0 !important;
}

.error-404-content {
  position: relative !important;
  z-index: 1 !important;
  max-width: 600px !important;
  width: 100% !important;
}


.error-404-number {
  font-family: 'Raleway', sans-serif !important;
  font-size: 8rem !important;
  font-weight: 800 !important;
  color: #d3af37 !important;
  margin: 0 !important;
  line-height: 0.8 !important;
  text-shadow: 0 4px 20px rgba(211, 175, 55, 0.3) !important;
  letter-spacing: -0.02em !important;
}

.error-404-title {
  font-family: 'Raleway', sans-serif !important;
  font-size: 2.5rem !important;
  font-weight: 600 !important;
  margin: 30px 0 20px 0 !important;
  color: #2c3e50 !important;
  letter-spacing: -0.01em !important;
  line-height: 1.2 !important;
}

.error-404-text {
  font-family: 'Inter', sans-serif !important;
  font-size: 1.1rem !important;
  font-weight: 400 !important;
  margin-bottom: 40px !important;
  max-width: 500px !important;
  color: #6c757d !important;
  line-height: 1.6 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.error-404-button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 16px 32px !important;
  background: linear-gradient(135deg, #d3af37 0%, #b8941f 100%) !important;
  color: #000 !important;
  text-decoration: none !important;
  border-radius: 12px !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: none !important;
  box-shadow: 0 4px 20px rgba(211, 175, 55, 0.3) !important;
  position: relative !important;
  overflow: hidden !important;
}

.error-404-button::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
  transition: left 0.5s !important;
}

.error-404-button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 30px rgba(211, 175, 55, 0.4) !important;
  background: linear-gradient(135deg, #e6c547 0%, #c19f2e 100%) !important;
}

.error-404-button:hover::before {
  left: 100% !important;
}

.error-404-button:active {
  transform: translateY(0) !important;
}

.error-404-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  background-color: #c19f2e;
}

@media screen and (max-width: 767px) {
  .error-404-container {
    padding: 60px 20px !important;
    min-height: 60vh !important;
  }
  
  .error-404-number {
    font-size: 6rem !important;
  }
  
  .error-404-title {
    font-size: 2rem !important;
    margin: 20px 0 15px 0 !important;
  }
  
  .error-404-text {
    font-size: 1rem !important;
    margin-bottom: 30px !important;
  }
  
  .error-404-button {
    padding: 14px 28px !important;
    font-size: 15px !important;
  }
  
}

/* Gallery8 button - limit width to fit content */
.gallery8_component .button.w-button {
  display: inline-block !important;
  width: auto !important;
}

/* Fixed header wrapper - Banner and Navbar */
.fixed-header-wrapper {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 10000 !important;
  background-color: var(--color-scheme-1--background) !important;
}

/* Add padding to main content to account for fixed header */
.main-wrapper {
  padding-top: 120px !important; /* Adjust based on banner + navbar height */
}

/* Mobile adjustments for fixed header */
@media screen and (max-width: 991px) {
  .main-wrapper {
    padding-top: 140px !important; /* More space for mobile menu */
  }
}

@media screen and (max-width: 767px) {
  .main-wrapper {
    padding-top: 100px !important; /* Adjust for mobile */
  }
}

/* 404 page special case - no main-wrapper */
.error-404-container {
  margin-top: 80px !important; /* Space for fixed navbar */
}

@media screen and (max-width: 767px) {
  .error-404-container {
    margin-top: 70px !important;
  }
}

/* Logo padding - Add padding around all logos */
.navbar3_logo,
.navbar3_logo-link .navbar3_logo,
.navbar3_logo-link-menu .navbar3_logo {
  padding: 12px !important;
}

.footer3_logo,
.footer3_logo-link .footer3_logo {
  padding: 15px !important;
}

/* Desktop navbar logo padding */
@media screen and (min-width: 768px) {
  .navbar3_logo,
  .navbar3_logo-link .navbar3_logo {
    padding: 12px !important;
  }
}

/* Move buttons up on soumission page to accommodate reCAPTCHA badge with even spacing */
html[data-wf-page="68d2ef2b07e6924cdfb30608"] .st_button.messenger-button {
  bottom: 200px !important; /* Even spacing above Back to Top button */
}

html[data-wf-page="68d2ef2b07e6924cdfb30608"] [ms-code-scroll-top="button"] {
  bottom: 115px !important; /* Even spacing above reCAPTCHA badge (70px badge + 25px gap + 20px offset) */
}

/* Style checkbox for "accepte les conditions générales" - yellow box with black checkmark when checked */
#Contact-12-Terms .form_checkbox-icon.is-alternate {
  position: relative !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
}

#Contact-12-Terms .form_checkbox-icon.is-alternate.w--redirected-checked {
  background-color: #d3af37 !important; /* Yellow background */
  border-color: #d3af37 !important;
  color: #000 !important; /* Ensure text color is black for any content */
}

/* Hide default Webflow checkmark if any */
#Contact-12-Terms .form_checkbox-icon.is-alternate.w--redirected-checked::before {
  display: none !important;
}

/* Add custom black checkmark */
#Contact-12-Terms .form_checkbox-icon.is-alternate.w--redirected-checked::after {
  content: '' !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -60%) rotate(45deg) !important;
  width: 5px !important;
  height: 10px !important;
  border: solid #000 !important; /* Black checkmark */
  border-width: 0 2.5px 2.5px 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  display: block !important;
  z-index: 1 !important;
}
