/* reCAPTCHA badge masqué (v3 invisible) */
.grecaptcha-badge {
  visibility: hidden !important;
}

/* Fond global (même noir que l'image côté gauche) */
body {
  background-color: #000000;
  color: #f9fafb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Tuiles de la Ghost Gallery */
.ghost-tile {
  position: relative;
  border-radius: 1.1rem;
  padding-bottom: 120%;
  background: radial-gradient(circle at top left, #3f4250 0, #14151f 40%, #000000 100%);
  overflow: hidden;
}

.ghost-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.6), transparent, rgba(0, 0, 0, 0.9));
}

.ghost-caption {
  position: absolute;
  left: 0.9rem;
  bottom: 0.8rem;
  z-index: 1;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(226, 232, 240, 0.85);
}

/* Cartes de services */
.service-card {
  border-radius: 1.1rem;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: radial-gradient(
    circle at top left,
    rgba(255, 255, 255, 0.05) 0,
    rgba(15, 23, 42, 0.2) 40%,
    rgba(15, 23, 42, 0.05) 100%
  );
}

#hero-image-wrapper {
  background: transparent;
  overflow: hidden;
}

/* Ensure hero image is always above what-we-do section (which has negative margin) */
#hero {
  padding-bottom: 10rem; /* 160px = same as -mt-40 */
}
@media (min-width: 1024px) {
  #hero {
    padding-bottom: 13rem; /* 208px = same as -mt-52 */
  }
}

/* Classe sur mesure pour les filets du tableau clients */
.client-row-border {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Custom responsive breakpoint (840px) */
@media (min-width: 840px) {
  .custom-hidden {
    display: none !important;
  }
  .custom-flex {
    display: flex !important;
  }
}

/* Overlay hero */
#hero-image-wrapper .hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(65deg, #000 43%, rgba(0,0,0,0) 65%);
}

.hero-image {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  max-width: none;
  border: none !important;
  outline: none !important;
  object-fit: cover;
  opacity: 0;
  transition: opacity 700ms ease-in-out;
}

/* image actuellement visible */
.hero-image.is-visible {
  opacity: 1;
}

/* Track records — hauteur fixe des images sur mobile/tablet */
@media (max-width: 1023px) {
  #track-records article button.track-thumb {
    height: 9rem; /* = 144px, same as h-36 */
  }
}

/* Lightbox Fixes */
#track-lightbox {
  -webkit-tap-highlight-color: transparent !important;
  outline: none !important;
  caret-color: transparent !important;
}

#track-lightbox * {
  -webkit-tap-highlight-color: transparent !important;
  outline: none !important;
}

#track-lightbox img {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-user-drag: none;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

/* Print Styles - Robust Fix */
@media print {
  /* 1. Force Backgrounds */
  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* 2. Page Setup - Reset to defaults to avoid conflicts */
  @page {
    margin: 1.5cm;
    background-color: #000000;
  }

  /* 3. Core Resets */
  html, body {
    width: 100% !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: #000000 !important;
    color: #ffffff !important;
    font-size: 14pt !important; /* Large readable base size */
    line-height: 1.5 !important;
  }

  /* 4. Force Full Widths & Disable Grids/Flex */
  *, *::before, *::after {
    box-sizing: border-box !important;
    max-width: 100% !important;
  }

  /* Break all layouts to simple vertical stacking */
  .lg\:grid, .grid, .flex, .lg\:flex, .md\:grid, .md\:flex {
    display: block !important;
    width: 100% !important;
  }

  /* Reset Layout Containers */
  .max-w-6xl, .max-w-4xl, .max-w-xl, .mx-auto, .container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* 5. Visibility & Cleanup */
  #lang-toggle, 
  .hero-overlay, 
  #track-lightbox, 
  #contact-form button, 
  #load-more-btn, 
  #hero-image-wrapper::after,
  #hero-image-b {
    display: none !important;
  }

  /* 6. Navigation */
  header {
    position: relative !important;
    border-bottom: 2px solid #333 !important;
    padding-bottom: 20pt !important;
    margin-bottom: 30pt !important;
  }

  nav {
    display: flex !important; /* Exception: Keep nav simple flex */
    justify-content: space-between !important;
    align-items: center !important;
  }

  nav a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: bold !important;
    font-size: 12pt !important;
  }

  /* 7. Hero Section */
  #hero {
    padding-bottom: 30pt !important;
  }

  #hero-image-wrapper {
    margin-top: 20pt !important;
    background: transparent !important;
  }

  #hero-image-wrapper img {
    width: 100% !important;
    max-height: 400pt !important;
    object-fit: contain !important;
    border-radius: 12pt !important;
  }

  /* 8. Track Records */
  #track-records {
    display: block !important;
  }

  .lg\:hidden { display: none !important; }

  /* Force Desktop View to Stack */
  .hidden.lg\:grid {
    display: block !important;
    border-bottom: 2px solid #333 !important;
    margin-bottom: 10pt !important;
    padding-bottom: 5pt !important;
  }
  
  .hidden.lg\:contents {
    display: block !important;
    border-bottom: 1px solid #333 !important;
    padding: 15pt 0 !important;
    page-break-inside: avoid;
  }

  .hidden.lg\:contents > div {
    margin-bottom: 5pt !important;
  }

  .track-thumb {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: 200pt !important;
    margin: 10pt 0 !important;
  }

  /* 9. Services */
  .service-card {
    background-color: #111 !important;
    border: 1px solid #333 !important;
    padding: 20pt !important;
    margin-bottom: 15pt !important;
    page-break-inside: avoid;
  }

  /* 10. Typography */
  h1 { font-size: 32pt !important; line-height: 1.2 !important; margin-bottom: 15pt !important; }
  h2 { font-size: 22pt !important; margin-bottom: 15pt !important; color: #fff !important; }
  h3 { font-size: 16pt !important; margin-bottom: 8pt !important; color: #fff !important; }
  p { font-size: 14pt !important; color: #ddd !important; margin-bottom: 10pt !important; }
  
  /* 11. Footer */
  footer {
    border-top: 2px solid #333 !important;
    margin-top: 40pt !important;
    padding-top: 20pt !important;
    font-size: 10pt !important;
  }
}