/* ==========================================================================
   1. VARIABLES & CONFIGURATION GLOBALE
   ================================================================********** */
:root {
  --main-color: #125e6c;       /* Vert canard lumineux */
  --main-dark: #0b4550;        /* Nuance pour le survol et le footer */
  --light-bg: #eaf4f6;         /* Fond clair assorti */
  --accent-light: #d8edf0;     /* Fond d'icônes ou badges clairs */
}

html {
  scroll-behavior: smooth;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  color: #123047;
  line-height: 1.6;
  padding-top: 85px; /* Pousse le contenu pour laisser la place au header fixe */
}

*, *::before, *::after {
  box-sizing: border-box;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: 1150px;
  width: 92%;
  margin: auto;
}

/* Sécurité pour toutes les images et médias */
img, svg, video {
  max-width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}


/* ==========================================================================
   2. HEADER, NAVIGATION & LOGO
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: white;
  border-bottom: 1px solid #ddd;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

/* Header réduit au scroll */
.header.scrolled {
  padding: 5px 0 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  background-color: rgba(255, 255, 255, 0.98);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 8px 0;
  position: relative;
}

.logo {
  font-weight: 800;
  color: var(--main-color);
  font-size: 1.15rem;
}

.logo b {
  display: inline-grid;
  place-items: center;
  background: var(--main-color);
  color: #a6e875;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  margin-right: 8px;
}

/* Logo officiel */
.logo-img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  background: var(--main-dark);
  border-radius: 9px;
  padding: 2px;
  transition: height 0.3s ease, width 0.3s ease;
}

.header.scrolled .logo-img {
  height: 35px;
}

/* Liens du menu */
.navlinks {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.navlinks a {
  font-size: .9rem;
  font-weight: bold;
  transition: color 0.2s ease, border-bottom 0.2s ease;
  padding-bottom: 2px;
}

.navlinks a.active, 
.navlinks a:hover {
  color: var(--main-color);
  border-bottom: 2px solid var(--main-color);
}

/* Bouton Burger */
.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  z-index: 1000;
}

.burger-btn span {
  width: 100%;
  height: 3px;
  background-color: var(--main-dark);
  border-radius: 5px;
  transition: all 0.3s ease;
}


/* ==========================================================================
   3. BOUTONS & ANIMATIONS GLOBALES
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 30px;
  background: var(--main-color);
  color: white;
  font-weight: bold;
  border: 0;
  cursor: pointer;
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: transform 0.2s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--main-dark);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease-out;
  border-radius: 30px;
}

.btn:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(18, 94, 108, 0.3);
}

.btn:active {
  transform: scale(0.97) translateY(0) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.btn.alt {
  background: white;
  color: var(--main-color);
}


/* ==========================================================================
   4. SECTIONS, HERO & COMPOSANTS
   ========================================================================== */
.hero {
  background: var(--main-dark);
  color: white;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 390px;
}

.intro {
  padding: 55px 25px 45px max(4vw, calc((100vw - 1150px)/2));
}

.eyebrow {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: bold;
  color: #a6e875;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  margin: 12px 0;
}

h1 span {
  color: #a6e875;
}

h2 {
  line-height: 1.2;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  display: inline-block;
  position: relative;
}

h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--main-color);
  margin: 8px auto 0;
  border-radius: 2px;
  transition: width 0.3s ease;
}

h2:hover::after {
  width: 100px;
}

.lead {
  font-size: 1.08rem;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0;
}

.hero-photos, .photo, .ba-slider {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-photos:hover, .photo:hover, .ba-slider:hover {
  transform: scale(1.01);
  box-shadow: 0 10px 30px rgba(18, 94, 108, 0.2);
}

.hero-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  min-height: 350px;
}

.pic {
  background-size: cover;
  background-position: center;
}

.before {
  background-image: url('avant-piece-encombre.jpg');
}

.after {
  background-image: url('apres-piece-propre.jpg');
}

.tag {
  position: absolute;
  bottom: 15px;
  background: var(--main-color);
  color: white;
  padding: 5px 13px;
  border-radius: 5px;
  font-weight: bold;
}

.tag.left { left: 14px; }
.tag.right { right: 14px; }

.section {
  padding: 55px 0;
}

.pale { background: var(--light-bg); }
.center { text-align: center; }
.muted { color: #61717a; }
.small { font-size: .85rem; color: #61717a; }

.services, .cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 25px;
}

.service, .card {
  border: 1px solid #d0e2e5;
  border-radius: 13px;
  padding: 20px;
  background: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service {
  text-align: center;
  background: #f4f9fa;
}

.service:hover, .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(18, 94, 108, 0.15);
}

/* Effet de brillance au survol des cartes */
.service::before, .card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
  transform: rotate(30deg) translateY(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.service:hover::before, .card:hover::before {
  transform: rotate(30deg) translateY(100%);
}

.ico {
  display: grid;
  place-items: center;
  margin: auto;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--main-color);
  font-size: 1.6rem;
  transition: all 0.3s ease;
}

.service:hover .ico {
  background-color: var(--main-color);
  color: white;
  transform: rotate(10deg) scale(1.1);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 35px;
  align-items: center;
}

.photo {
  min-height: 300px;
  border-radius: 14px;
  background: url('https://images.unsplash.com/photo-1600607687939-ce8a6c25118c?auto=format&fit=crop&w=1000&q=80') center/cover;
}

.cta {
  padding: 28px;
  border-radius: 15px;
  background: var(--main-color);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  background-image: linear-gradient(115deg, rgba(18,94,108,.97), rgba(11,69,80,.96)), url('logo-debarrassez-vous.png');
  background-repeat: no-repeat;
  background-position: center, right 20px;
  background-size: auto, 180px;
}

.pagehead {
  background: var(--light-bg);
  padding: 40px 0;
}

.pagehead h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: #123047;
}

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

label {
  display: block;
  font-weight: bold;
  margin: 12px 0;
}

input, textarea, select {
  width: 100%;
  padding: 12px;
  border: 1px solid #cbd9d0;
  border-radius: 8px;
  font: inherit;
}

textarea {
  min-height: 110px;
}

footer {
  background: var(--main-dark);
  color: white;
  padding: 28px 0;
}

footer a {
  color: white;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-logo {
  display: inline-block;
  background: var(--main-dark);
  border-radius: 9px;
  padding: 2px;
}

.footer-logo img {
  display: block;
  width: 175px;
  height: 70px;
  object-fit: contain;
}

.service::after {
  content: "";
  position: absolute;
  right: -15px;
  bottom: -16px;
  width: 90px;
  height: 48px;
  background: url('logo-debarrassez-vous.png') center/contain no-repeat;
  opacity: .10;
  pointer-events: none;
}


/* ==========================================================================
   5. COMPARATEUR AVANT / APRÈS (SLIDER)
   ========================================================================== */
.ba-slider {
  --position: 50%;
  position: relative;
  width: 100%;
  max-width: 650px;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 14px;
  background-color: #000;
  isolation: isolate;
  border: 3px solid var(--main-color);
}

.ba-slider__image--after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}

.ba-slider__before {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  clip-path: inset(0 calc(100% - var(--position)) 0 0);
  pointer-events: none;
}

.ba-slider__before .ba-slider__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.ba-slider__tag {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(18, 94, 108, 0.85);
  color: #fff;
  font-weight: bold;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
}

.ba-slider__tag--before { left: 12px; }
.ba-slider__tag--after { right: 12px; }

.ba-slider__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--position);
  z-index: 3;
  width: 3px;
  background: #fff;
  transform: translateX(-50%);
  pointer-events: none;
}

.ba-slider__handle {
  position: absolute;
  top: 50%;
  left: var(--position);
  z-index: 4;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--main-color);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.ba-slider__control {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: none;
}


/* ==========================================================================
   6. PAGE MENTIONS LÉGALES
   ========================================================================== */
.mentions-container {
  width: 90%;
  max-width: 800px;
  margin: 20px auto;
  padding: 15px;
  box-sizing: border-box;
  word-wrap: break-word;
}

.mentions-container h1 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.mentions-container h2 {
  font-size: 1.3rem;
  margin-top: 25px;
}

.mentions-container p, .mentions-container li {
  font-size: 0.95rem;
  line-height: 1.6;
}


/* ==========================================================================
   7. RESPONSIVE / ADAPTATION MOBILE
   ========================================================================== */
@media (max-width: 760px) {
  .hero-grid, .split, .contact {
    grid-template-columns: 1fr;
  }
  .intro {
    padding: 40px 20px;
  }
  .hero-photos {
    min-height: 250px;
  }
  .services, .cards {
    grid-template-columns: 1fr 1fr;
  }
  .section {
    padding: 38px 0;
  }
  .logo-img {
    width: 110px;
    height: auto;
  }
  .footer-logo img {
    width: 120px;
    height: auto;
  }
  .cta {
    background-size: auto, 100px;
  }
}

@media (max-width: 768px) {
  .burger-btn {
    display: flex;
  }

  .navlinks {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    background-color: #ffffff;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid var(--main-color);
  }

  .navlinks.active {
    display: flex;
  }

  .navlinks a {
    padding: 12px 0;
    font-size: 1rem;
    width: 80%;
    text-align: center;
  }

  .navlinks .btn {
    margin-top: 10px;
    width: 80%;
    text-align: center;
  }

  .mentions-container {
    width: 95%;
    padding: 10px;
  }
  
  .mentions-container h1 {
    font-size: 1.4rem;
  }
  
  .mentions-container h2 {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .services, .cards {
    grid-template-columns: 1fr;
  }
  .nav {
    align-items: center;
  }
  .navlinks {
    gap: 10px;
  }
}
/* --- CENTRAGE PARFAIT DU TEXTE DANS LE BOUTON DEVIS --- */
.navlinks .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px; /* Ajuste légèrement la hauteur interne si besoin */
  line-height: normal;
  border-bottom: none !important; /* Évite qu'une bordure de lien ne vienne perturber le bouton */
}
/* --- DÉSACTIVATION DE L'ANIMATION DE SCROLL SUR MOBILE --- */
@media (max-width: 768px) {
  /* On force le header à garder une taille fixe propre, sans effet de scroll bizarre */
  .header.scrolled {
    padding: 8px 0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    background-color: #ffffff !important;
  }

  /* On fige la taille du logo pour éviter qu'il ne grossisse ou ne crée des bordures de folie */
  .header.scrolled .logo-img,
  .logo-img {
    height: 40px !important;
    width: auto !important;
  }
}
/* --- ANIMATION DÉROULANTE DU MENU BURGER SUR MOBILE --- */
@media (max-width: 768px) {
  .navlinks {
    display: flex; /* On le laisse dans le flux pour l'animation */
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    background-color: #ffffff;
    padding: 0 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid var(--main-color);
    
    /* Propriétés pour l'animation (fermé par défaut) */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, padding 0.3s ease;
  }

  /* Quand on clique sur le burger, la classe .active s'ajoute et déclenche l'animation */
  .navlinks.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    padding: 20px 0; /* Se déroule doucement avec de l'espace */
  }

  .navlinks a {
    padding: 12px 0;
    font-size: 1rem;
    width: 80%;
    text-align: center;
  }

  .navlinks .btn {
    margin-top: 10px;
    width: 80%;
    text-align: center;
  }
}
/* Comparateur avant / après */
.img-comp-container {
  position: relative;
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background-color: #f0f4f2;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

.img-comp-img:not(.img-comp-overlay) {
  position: relative;
  width: 100%;
}

.img-comp-img img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  pointer-events: none;
}

.img-comp-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 50% 0 0);
}

.img-comp-overlay img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left top;
}

.img-comp-slider {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 10;
  width: 42px;
  height: 42px;
  padding: 0;
  background-color: var(--main-color, #087447);
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  cursor: ew-resize;
  transform: translate(-50%, -50%);
  touch-action: none;
}

.img-comp-slider::after {
  content: "↔";
  color: white;
  font-weight: bold;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  font-size: 18px;
}

.img-comp-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 9;
  width: 2px;
  background: #fff;
  pointer-events: none;
  transform: translateX(-50%);
}